@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Satisfy&display=swap');

:root {
  --color-primary: #19381f;       /* Lush Forest Green */
  --color-primary-light: #2c5936; /* Bright Grass Green */
  --color-accent-pink: #d4a5b8;   /* Soft Rosette Pink */
  --color-accent-dark: #8c4e5c;   /* Mauvewood */
  --color-paper: #fdfbf7;         /* Warm Scrapbook Paper */
  --color-text-dark: #2c3531;
  --color-text-muted: #64748b;
  --color-border: #e2dcd0;
  --color-border-hover: #cbd5e1;
  --color-white: #ffffff;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-cursive: 'Caveat', cursive;
  --font-script: 'Satisfy', cursive;
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 32px;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 10px 20px -5px rgba(28, 43, 33, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(28, 43, 33, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Bulletproof & Flicker-free Grass Background */
html {
  min-height: 100%;
  background-color: #19381f;
}
html::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: url('/grass_bg_mobile.jpg') no-repeat center center / cover;
  z-index: -1;
}

/* Background Desktop */
@media (min-width: 768px) {
  html::before {
    background-image: url('/grass_bg_desktop.jpg');
    background-size: 100% 100%;
  }
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background: transparent; /* Transparent body to show html background */
}

/* Split Pane Grid Layout */
.checkout-container {
  display: grid;
  grid-template-columns: 460px 1fr;
  min-height: 100vh;
}

/* Left Sidebar - Summary (Desktop only) */
.order-summary-sidebar {
  background-color: rgba(25, 56, 31, 0.95);
  backdrop-filter: blur(20px);
  color: var(--color-white);
  padding: 50px 40px;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Decorative Header */
.sidebar-decor-header {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.decor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.decor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(25,56,31,0.1), rgba(25,56,31,0.9));
  pointer-events: none;
}

.event-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.event-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.event-subtitle {
  color: #a7f3d0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Cart Item Preview */
.visual-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 30px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.visual-emoji {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.visual-details h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-white);
}

.visual-details p {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-top: 2px;
}

/* Invoice list */
.invoice-summary {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.invoice-val {
  color: var(--color-white);
  font-weight: 600;
}

.total-container {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  font-weight: 600;
}

.total-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.guarantee-note {
  font-size: 0.75rem;
  color: #6ee7b7;
  line-height: 1.5;
  margin-top: 24px;
}

/* Right Panel: Pinterest-style Scalloped Card Container */
.checkout-form-main {
  padding: 60px 80px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Custom Scrapbook Card Container */
.form-content {
  max-width: 560px;
  width: 100%;
  background-color: var(--color-paper);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--color-border);
}

/* Cursive title overlay styles */
.form-header-decor {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px dashed var(--color-border);
}

.flower-banner-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--color-white);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.brand-tag {
  font-family: var(--font-cursive);
  font-size: 2.2rem;
  color: var(--color-accent-dark);
  line-height: 1;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
  margin-bottom: 4px;
  display: block;
}

.form-brand-text h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.form-brand-text p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Checkout inputs & Steps */
.checkout-step {
  margin-bottom: 30px;
}

.checkout-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.step-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modern-link-trigger {
  font-size: 0.8rem;
  color: var(--color-accent-dark);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
}

/* Elegant Inputs - Scrapbook style */
.modern-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px; /* Prevent iOS zoom */
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
  color: var(--color-text-dark);
  background-color: var(--color-white);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.modern-input:focus {
  border-color: var(--color-accent-dark);
  box-shadow: 0 0 0 4px rgba(140, 78, 92, 0.12);
}

/* Combobox Dropdown Customization */
.select-wrapper {
  position: relative;
}

.dropdown-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.dropdown-item {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background-color: var(--color-mauve-light);
  color: var(--color-accent-dark);
  font-weight: 600;
}

.dropdown-no-results {
  padding: 14px;
  text-align: center;
  color: var(--color-text-muted);
}

/* Custom button group grid */
.modern-grid-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modern-card-option {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  background-color: var(--color-white);
}

.modern-card-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.card-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.card-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.modern-card-option:hover {
  border-color: var(--color-accent-dark);
}

.modern-card-option.selected {
  border-color: var(--color-accent-dark);
  background-color: var(--color-mauve-light);
  box-shadow: 0 0 0 1px var(--color-accent-dark);
}

.modern-card-option.selected .card-title {
  color: var(--color-accent-dark);
}

.modern-card-option.selected .card-desc {
  color: var(--color-accent-dark);
}

/* Sizing button grid */
.modern-grid-sizes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.modern-size-option {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  background-color: var(--color-white);
  transition: all 0.15s ease;
  position: relative;
}

.modern-size-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.size-text {
  font-size: 0.9rem;
  text-align: center;
}

.size-text small {
  display: block;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-top: 2px;
}

.modern-size-option:hover {
  border-color: var(--color-accent-dark);
}

.modern-size-option.selected {
  border-color: var(--color-accent-dark);
  background-color: var(--color-accent-dark);
  color: var(--color-white);
  box-shadow: 0 4px 10px rgba(140, 78, 92, 0.25);
}

.modern-size-option.selected .size-text small {
  color: var(--color-accent-pink);
}

/* Inline Summary Card (Mobile) */
.inline-summary-section {
  display: none;
}

.modern-inline-summary-box {
  background-color: var(--color-mauve-light);
  border: 1.5px dashed var(--color-accent-dark);
  border-radius: var(--radius-md);
  padding: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: var(--color-text-dark);
}

.line-label {
  font-weight: 500;
  color: var(--color-text-muted);
}

.line-val {
  font-weight: 700;
  color: var(--color-primary);
}

.summary-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(140, 78, 92, 0.15);
}

.total-text-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-accent-dark);
}

.total-text-price {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-accent-dark);
}

/* Modern QRIS card */
.modern-qris-card {
  background-color: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.qris-image-container {
  background: var(--color-white);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.qris-main-img {
  width: 130px;
  height: auto;
  display: block;
}

.qris-text-flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.qris-instructions {
  font-size: 0.8rem;
  color: var(--color-text-dark);
  line-height: 1.5;
  font-weight: 600;
}

.qris-badge {
  background-color: var(--color-mauve-light);
  color: var(--color-accent-dark);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Submit Action Button */
.modern-submit-btn {
  width: 100%;
  padding: 18px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-sans);
  background-color: var(--color-accent-dark);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(140, 78, 92, 0.25);
  margin-top: 10px;
}

.modern-submit-btn:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(44, 89, 54, 0.35);
}

.modern-submit-btn:disabled {
  background-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.modern-footer {
  margin-top: 48px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Size Modal Layout */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(28, 43, 33, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.open .modal-content {
  transform: scale(1) translateY(0);
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
}

.close-btn:hover {
  color: var(--color-text-dark);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-weight: 500;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table th, .modern-table td {
  padding: 12px;
  font-size: 0.85rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.modern-table th {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
  font-weight: 700;
}

.modern-table td {
  color: var(--color-text-dark);
  font-weight: 500;
}

/* Responsiveness - Mobile Layout Optimization */
@media(max-width: 960px) {
  .checkout-container {
    grid-template-columns: 1fr;
    padding: 30px 16px;
  }
  
  /* Hide desktop left sidebar completely on Mobile */
  .order-summary-sidebar {
    display: none;
  }
  
  /* Show inline summary on mobile */
  .inline-summary-section {
    display: block;
  }

  .checkout-form-main {
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .form-content {
    padding: 32px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
  }

  .form-header-decor {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }

  .flower-banner-img {
    width: 80px;
    height: 80px;
  }
}

@media(max-width: 480px) {
  .modern-grid-sizes {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .modern-qris-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .qris-main-img {
    width: 100%;
    max-width: 160px;
  }

  .qris-text-flow {
    align-items: center;
  }
  
  .modern-grid-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .checkout-step {
    margin-bottom: 26px;
  }

  .modern-submit-btn {
    padding: 16px 20px;
  }
}
