:root {
  --primary-color: #25D366;
  --primary-dark: #1EAE50;
  --dark-text: #1a202c;
  --body-text: #4a5568;
  --light-text: #718096;
  --border-color: #e2e8f0;
  --bg-light: #f7f9fc;
  --bg-white: #ffffff;
  --error-bg: #fef2f2;
  --error-text: #dc2626;
  --success-bg: #f0fdf4;
  --success-text: #16a34a;
}

body {
  background-color: var(--bg-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

.halaman-toko {
  padding-bottom: 120px; 
}
.print-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}
#print-form {
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;
}

.landscape-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 20px; 
}

.steps-column {
  display: flex;
  flex-direction: column;
  gap: 20px; 
}

.print-step {
  background: var(--bg-white);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 0;
}
.print-step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 8px;
}
.step-number {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: 50%;
}
.print-step > p {
  font-size: 0.95rem;
  color: var(--body-text);
  margin-left: 44px;
  margin-top: -5px;
  margin-bottom: 15px;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.file-upload-label:hover {
  border-color: var(--primary-color);
}
.file-upload-label i {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
}
.file-upload-label span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-text);
}
.file-upload-label small {
  font-size: 0.9rem;
  color: var(--light-text);
  margin-top: 4px;
}
.file-info-box {
  margin-top: 15px;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  word-break: break-all;
  font-weight: 500;
}
.file-info-box:not(:empty) { display: block; }
.file-info-box:empty { display: none; }

.print-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.print-options-grid label {
  display: block;
  position: relative;
  cursor: pointer;
}
.print-options-grid input[type="radio"] {
  display: none; 
}
.print-options-grid label span {
  display: block;
  padding: 16px 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--dark-text);
  transition: all 0.2s ease;
  font-size: 0.95rem;
}
.print-options-grid label small {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--light-text);
  margin-top: 6px;
}
.print-options-grid label input[type="radio"]:checked + span {
  border-color: var(--primary-color);
  background: var(--success-bg);
  color: var(--success-text);
}

@media (min-width: 640px) {
  .print-options-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .print-options-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 480px) {
  .print-options-grid {
    grid-template-columns: 1fr; 
  }
}

.options-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-top: 25px;
  margin-bottom: 5px;
}
.options-heading + p {
  font-size: 0.9rem;
  color: var(--light-text);
  margin-top: 0;
  margin-bottom: 10px;
}
.form-input,
#jumlah-print {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.print-summary-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  background: var(--bg-white);
  padding: 15px;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  
  border-radius: 0;
  border-bottom: none;
  border-left: none;
  border-right: none;
}
.print-total-box {
  flex-shrink: 1;
  padding: 0;
  background: none;
}
.print-total-box h3 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--body-text);
  margin: 0;
}
#total-harga-display {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark-text);
  line-height: 1.2;
  margin-top: 0;
}

.btn-kirim-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  
  width: auto; 
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--primary-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 0;
  transition: all 0.3s ease;
  box-shadow: none;
}
.btn-kirim-wa i {
  width: 20px;
  height: 20px;
}
.btn-kirim-wa span {
  display: block;
}
.btn-kirim-wa:hover {
  background: var(--primary-dark);
  transform: none;
}
.btn-kirim-wa:disabled {
  background: #b0b8c5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (min-width: 1024px) {
  .halaman-toko {
    padding-bottom: 60px; 
  }

  .landscape-layout-wrapper {
    grid-template-columns: 2fr 1fr; 
    gap: 30px;
  }
  
  .print-summary-sticky {

    position: sticky;
    top: 100px;

    bottom: auto;
    left: auto;
    right: auto;
    width: auto;
    display: block; 

    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
    padding: 24px;
    z-index: 1; 
  }
  
  .print-total-box h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--body-text);
  }
  #total-harga-display {
    font-size: 2.4rem;
    margin-top: 4px;
  }
  
  .btn-kirim-wa {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    gap: 12px;
    margin-top: 20px; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
  }
  .btn-kirim-wa i {
    width: 22px;
    height: 22px;
  }
  .btn-kirim-wa:hover {
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
  }
}

.wa-modal-backdrop,
.custom-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 15px;
}
.wa-modal-backdrop.show,
.custom-modal-backdrop.show {
  display: flex;
  opacity: 1;
}
.wa-modal-content,
.custom-modal-content {
  background: white;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  text-align: center;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.wa-modal-backdrop.show .wa-modal-content,
.custom-modal-backdrop.show .custom-modal-content {
  transform: scale(1);
  opacity: 1;
}
.wa-modal-icon, .custom-modal-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
}
.wa-modal-icon i, .custom-modal-icon i {
  width: 28px;
  height: 28px;
}
.wa-modal-icon {
  background: var(--success-bg);
  color: var(--success-text);
}
.custom-modal-icon {
  background: #f0f6ff;
  color: #0056b3;
}
.wa-modal-content h3, .custom-modal-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 10px;
}
.wa-modal-content p, .custom-modal-content p {
  font-size: 0.95rem;
  color: var(--body-text);
  margin-bottom: 25px;
  line-height: 1.6;
}
#wa-modal-close {
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--dark-text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}
.custom-modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-modal {
  padding: 12px 15px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-cancel {
  background: #f1f3f5;
  color: var(--body-text);
}
.btn-cancel:hover { background: #e9ecef; }
.btn-confirm {
  background: var(--primary-color);
  color: white;
}
.btn-confirm:hover { background: var(--primary-dark); }
.spinner-icon {
  width: 36px;
  height: 36px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}