/* ==========================================================================
   MOCHI BLOOMS STUDIO — Master Stylesheet
   Handcrafted Kawaii Plush Blooms & Bag Charms — Soft Outside, Unbreakable Inside
   ========================================================================== */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (Brand Design Tokens)
   ========================================================================== */

:root {
  /* ── Brand Palette ── */
  --color-alabaster:    #FFFBF7;
  --color-cream:        #F9F3EB;
  --color-blush-light:  #FDE8ED;
  --color-blush:        #F9A8B8;
  --color-blush-dark:   #F48FB1;
  --color-blush-deep:   #E06D8B;
  --color-gold-light:   #F5E4B7;
  --color-gold:         #E6B85C;
  --color-gold-dark:    #C99636;
  --color-cocoa-light:  #7A5E48;
  --color-cocoa:        #4A3525;
  --color-cocoa-dark:   #2F2015;
  --color-lavender:     #D8B4E2;

  /* ── Typography ── */
  --font-display:  'Fredoka', sans-serif;
  --font-script:   'Dancing Script', cursive;
  --font-body:     'Plus Jakarta Sans', sans-serif;

  /* ── Shadows ── */
  --shadow-soft:  0 10px 30px -5px rgba(74, 53, 37, 0.06);
  --shadow-card:  0 12px 32px -8px rgba(244, 143, 177, 0.18);
  --shadow-pill:  0 4px 14px rgba(244, 143, 177, 0.35);

  /* ── Spacing ── */
  --bottom-nav-height: 4.5rem;  /* 72px */
  --safe-area-bottom:  env(safe-area-inset-bottom, 0px);

  /* ── Transitions ── */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Z-Index Scale ── */
  --z-nav:       30;
  --z-bottom-nav: 40;
  --z-drawer:    50;
  --z-modal:     50;
  --z-toast:     60;
  --z-admin:     55;
}


/* ==========================================================================
   2. BASE & RESET
   ========================================================================== */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-alabaster);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Add bottom padding when mobile bottom nav is showing */
body.has-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
}

/* Selection Colors */
::selection {
  background-color: var(--color-blush-light);
  color: var(--color-cocoa);
}

::-moz-selection {
  background-color: var(--color-blush-light);
  color: var(--color-cocoa);
}

/* ── Links & Focus ── */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-blush-deep);
}

:focus-visible {
  outline: 2px solid var(--color-blush-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-blush-dark);
  outline-offset: 2px;
}

/* ── Custom Scrollbar (WebKit) ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-alabaster);
}

::-webkit-scrollbar-thumb {
  background: var(--color-blush);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-blush-dark);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-blush) var(--color-alabaster);
}

/* ── Images ── */
img,
svg {
  max-width: 100%;
  height: auto;
}


/* ==========================================================================
   3. KEYFRAME ANIMATIONS
   ========================================================================== */

/* Subtle floating animation for hero charms */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(1.5deg); }
}

.animate-float {
  animation: floatSlow 4.5s ease-in-out infinite;
}

.animate-float-delayed {
  animation: floatSlow 5.2s ease-in-out 1.4s infinite;
}

/* Toast slide-up animation */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast-enter {
  animation: slideUpFade 0.28s ease-out forwards;
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Slide up */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.35s var(--ease-smooth) forwards;
}

/* Modal entrance */
@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-enter {
  animation: modalEnter 0.25s var(--ease-spring) forwards;
}

/* Skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-cream) 25%,
    var(--color-blush-light) 37%,
    var(--color-cream) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

/* Pulsing dot for active tracking step */
@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(224, 109, 139, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(224, 109, 139, 0);
  }
}

/* Shipping bar gradient slide */
@keyframes gradientSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}


/* ==========================================================================
   4. BRAND MOTIFS & DECORATIVE ELEMENTS
   ========================================================================== */

/* Arch backdrop motif matching Mochi Blooms thank-you card */
.boutique-arch {
  border-radius: 9999px 9999px 24px 24px;
}


/* ==========================================================================
   5. MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: rgba(255, 251, 247, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(249, 168, 184, 0.45);
  z-index: 50;
  box-shadow: 0 -4px 20px -4px rgba(74, 53, 37, 0.08);
  transition: transform 0.3s var(--ease-smooth);
}

/* Hide on medium+ screens */
@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }

  body.has-bottom-nav {
    padding-bottom: 0;
  }
}

/* Individual nav item */
.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.25rem 0.125rem;
  color: var(--color-cocoa-light);
  font-size: 0.625rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-bottom-nav .nav-item i,
.mobile-bottom-nav .nav-item .nav-icon {
  font-size: 1.125rem;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-bottom-nav .nav-item span {
  font-size: 0.625rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Active state */
.mobile-bottom-nav .nav-item.active {
  color: var(--color-blush-deep);
}

.mobile-bottom-nav .nav-item.active i,
.mobile-bottom-nav .nav-item.active .nav-icon {
  color: var(--color-blush-deep);
  transform: scale(1.1);
}

/* Hover / press feedback */
.mobile-bottom-nav .nav-item:active {
  transform: scale(0.95);
}

/* Cart badge on bottom nav */
.mobile-bottom-nav .nav-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  background: var(--color-cocoa);
  color: var(--color-alabaster);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}


/* ==========================================================================
   6. DUAL PRICING TOGGLE
   ========================================================================== */

.pricing-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--color-cream);
  border-radius: 9999px;
  padding: 3px;
  border: 1px solid rgba(249, 168, 184, 0.3);
  position: relative;
  gap: 0;
}

.pricing-toggle .toggle-option {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-cocoa);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
}

.pricing-toggle .toggle-option.active {
  background: var(--color-blush-deep);
  color: #FFFFFF;
  box-shadow: var(--shadow-pill);
}

.pricing-toggle .toggle-option:not(.active):hover {
  background: var(--color-blush-light);
}

/* Price display helpers */
.price-standard {
  display: inline;
}

.price-saver {
  display: none;
}

.saver-mode .price-standard {
  display: none;
}

.saver-mode .price-saver {
  display: inline;
}


/* ==========================================================================
   7. PRODUCT DETAIL GALLERY
   ========================================================================== */

/* Horizontal scrollable tab strip */
.gallery-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-tabs::-webkit-scrollbar {
  display: none;
}

/* Individual pill-shaped tab */
.gallery-tab {
  flex-shrink: 0;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-cocoa);
  background: var(--color-cream);
  border: 1px solid rgba(249, 168, 184, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-tab:hover {
  background: var(--color-blush-light);
  border-color: var(--color-blush);
}

.gallery-tab.active {
  background: var(--color-blush-deep);
  color: #FFFFFF;
  border-color: var(--color-blush-deep);
  box-shadow: var(--shadow-pill);
}

/* Gallery display area */
.gallery-display {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, var(--color-blush-light), rgba(249, 243, 235, 0.4));
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  transition: opacity 0.3s ease;
}

.gallery-display > * {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Upload photo placeholder */
.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  border: 2px dashed var(--color-blush);
  border-radius: 1.5rem;
  background: var(--color-alabaster);
  color: var(--color-cocoa-light);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.image-placeholder:hover {
  border-color: var(--color-blush-deep);
  background: var(--color-blush-light);
}

.image-placeholder i {
  font-size: 2rem;
  color: var(--color-blush);
}


/* ==========================================================================
   8. CART DRAWER ENHANCEMENTS
   ========================================================================== */

/* Overlay backdrop */
#cart-overlay {
  transition: opacity 0.3s ease;
}

#cart-overlay.visible {
  opacity: 1;
}

/* Drawer slide in/out */
#cart-drawer {
  transition: transform 0.3s var(--ease-smooth);
}

#cart-drawer.open {
  transform: translateX(0) !important;
}

/* Shipping progress bar with animated gradient */
.shipping-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    var(--color-blush),
    var(--color-gold),
    var(--color-blush)
  );
  background-size: 200% 100%;
  animation: gradientSlide 2s linear infinite;
  transition: width 0.4s var(--ease-smooth);
}

/* Cart empty state */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  height: 100%;
}

.cart-empty-state .empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--color-blush-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-blush-deep);
}


/* ==========================================================================
   9. ADMIN PANEL STYLES
   ========================================================================== */

/* Admin overlay — fixed fullscreen dark backdrop */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(47, 32, 21, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: var(--z-admin);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.admin-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Admin panel — full-height right-side slide-in */
.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 42rem; /* max-w-2xl */
  background: var(--color-alabaster);
  z-index: calc(var(--z-admin) + 1);
  box-shadow: -8px 0 30px rgba(47, 32, 21, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-panel.open {
  transform: translateX(0);
}

/* Admin horizontal tab navigation */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-cream);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
  background: var(--color-alabaster);
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs button,
.admin-tabs .admin-tab {
  position: relative;
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-cocoa-light);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
  min-height: 44px;
  flex-shrink: 0;
}

.admin-tabs button:hover,
.admin-tabs .admin-tab:hover {
  color: var(--color-cocoa);
  background: rgba(249, 168, 184, 0.08);
}

.admin-tabs button.active,
.admin-tabs .admin-tab.active {
  color: var(--color-blush-deep);
  font-weight: 700;
}

.admin-tabs button.active::after,
.admin-tabs .admin-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2.5px;
  background: var(--color-blush-deep);
  border-radius: 2px 2px 0 0;
}

/* Admin card — white rounded with subtle border */
.admin-card {
  background: #FFFFFF;
  border: 1px solid var(--color-cream);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

/* Admin stat card — colored cards for economics dashboard */
.admin-stat-card {
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-stat-card .stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}

.admin-stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
}

.admin-stat-card.stat-revenue {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
}

.admin-stat-card.stat-orders {
  background: linear-gradient(135deg, var(--color-blush-light), #fce7f3);
  color: var(--color-blush-deep);
}

.admin-stat-card.stat-cogs {
  background: linear-gradient(135deg, var(--color-gold-light), #fef3c7);
  color: var(--color-gold-dark);
}

.admin-stat-card.stat-margin {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #5b21b6;
}

/* Admin data table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.admin-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-cocoa-light);
  background: var(--color-cream);
  border-bottom: 1px solid rgba(249, 168, 184, 0.2);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--color-cream);
  color: var(--color-cocoa);
  vertical-align: middle;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(249, 243, 235, 0.4);
}

.admin-table tbody tr:hover {
  background: var(--color-blush-light);
}

/* Admin status badges */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.admin-badge.badge-placed {
  background: #dbeafe;
  color: #1e40af;
}

.admin-badge.badge-crafting {
  background: #fef3c7;
  color: #92400e;
}

.admin-badge.badge-packed {
  background: #ede9fe;
  color: #6b21a8;
}

.admin-badge.badge-shipped {
  background: #cffafe;
  color: #155e75;
}

.admin-badge.badge-delivered {
  background: #d1fae5;
  color: #065f46;
}

/* Admin form fields */
.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  background: var(--color-cream);
  border: 1px solid rgba(249, 168, 184, 0.35);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--color-blush-deep);
  box-shadow: 0 0 0 3px rgba(224, 109, 139, 0.15);
}

.admin-input::placeholder,
.admin-textarea::placeholder {
  color: rgba(122, 94, 72, 0.5);
}

.admin-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234A3525'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.admin-textarea {
  resize: vertical;
  min-height: 5rem;
}

/* Admin button variants */
.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: var(--color-cocoa);
  color: var(--color-alabaster);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  min-height: 40px;
}

.admin-btn-primary:hover {
  background: var(--color-cocoa-dark);
  box-shadow: 0 4px 12px rgba(47, 32, 21, 0.2);
}

.admin-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: var(--color-blush-light);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid var(--color-blush);
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 40px;
}

.admin-btn-secondary:hover {
  background: rgba(249, 168, 184, 0.35);
}

.admin-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: #FEE2E2;
  color: #991B1B;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid #FECACA;
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 40px;
}

.admin-btn-danger:hover {
  background: #FECACA;
}


/* ==========================================================================
   10. CHECKOUT & PAYMENT
   ========================================================================== */

/* Selectable payment card */
.payment-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-cream);
  border-radius: 1rem;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  min-height: 56px;
}

.payment-option:hover {
  border-color: var(--color-blush);
  background: var(--color-blush-light);
}

.payment-option.active {
  border-color: var(--color-blush-deep);
  background: var(--color-blush-light);
  box-shadow: 0 0 0 3px rgba(224, 109, 139, 0.15);
}

.payment-option .radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-blush);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.payment-option.active .radio-dot {
  border-color: var(--color-blush-deep);
}

.payment-option.active .radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-blush-deep);
}

/* UPI QR display area */
.upi-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: #FFFFFF;
  border: 2px dashed var(--color-blush);
  border-radius: 1.5rem;
  text-align: center;
}

.upi-qr-container canvas,
.upi-qr-container img {
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Checkout vertical timeline */
.checkout-timeline {
  position: relative;
  padding-left: 2rem;
}

.checkout-timeline::before {
  content: '';
  position: absolute;
  left: 0.625rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-cream);
}

.checkout-timeline .timeline-step {
  position: relative;
  padding-bottom: 1.25rem;
  padding-left: 0.75rem;
}

.checkout-timeline .timeline-step::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-cream);
  border: 2px solid var(--color-blush);
}

.checkout-timeline .timeline-step.completed::before {
  background: #10b981;
  border-color: #059669;
}

.checkout-timeline .timeline-step.active::before {
  background: var(--color-blush-deep);
  border-color: var(--color-blush-deep);
  animation: pulseDot 2s infinite;
}


/* ==========================================================================
   11. ORDER TRACKING TIMELINE
   ========================================================================== */

.tracking-timeline {
  position: relative;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Connecting vertical line */
.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-cream);
  z-index: 0;
}

/* Each tracking step */
.tracking-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  padding-left: 2.5rem;
}

/* Step dot */
.tracking-step::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 1rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 1;
  transition: all 0.3s ease;
}

.tracking-step .step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.tracking-step .step-info {
  flex: 1;
  min-width: 0;
}

.tracking-step .step-label {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-cocoa);
}

.tracking-step .step-time {
  font-size: 0.6875rem;
  color: var(--color-cocoa-light);
  margin-top: 0.125rem;
}

/* Completed step */
.tracking-step.completed::before {
  background: #10b981;
  border: 3px solid #d1fae5;
}

.tracking-step.completed .step-icon {
  background: #d1fae5;
  color: #065f46;
}

.tracking-step.completed .step-label {
  color: #065f46;
}

/* Active step */
.tracking-step.active::before {
  background: var(--color-blush-deep);
  border: 3px solid var(--color-blush-light);
  animation: pulseDot 2s infinite;
}

.tracking-step.active .step-icon {
  background: var(--color-blush-light);
  color: var(--color-blush-deep);
}

.tracking-step.active .step-label {
  color: var(--color-blush-deep);
}

/* Pending step */
.tracking-step.pending::before {
  background: var(--color-cream);
  border: 3px solid var(--color-cream);
}

.tracking-step.pending .step-icon {
  background: var(--color-cream);
  color: var(--color-cocoa-light);
  opacity: 0.6;
}

.tracking-step.pending .step-label {
  color: var(--color-cocoa-light);
  opacity: 0.6;
}

.tracking-step.pending .step-time {
  opacity: 0.4;
}


/* ==========================================================================
   12. MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(47, 32, 21, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: 1rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--color-alabaster);
  border: 2px solid rgba(249, 168, 184, 0.4);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 60px -12px rgba(47, 32, 21, 0.25);
  position: relative;
  animation: modalEnter 0.25s var(--ease-spring) forwards;
}

@media (min-width: 640px) {
  .modal-content {
    padding: 2rem;
    max-width: 36rem;
  }
}


/* ==========================================================================
   13. COMBO BUILDER ENHANCEMENTS
   ========================================================================== */

/* Dual-button toggle: 2 Charms / 3 Charms */
.combo-size-toggle {
  display: inline-flex;
  background: var(--color-cream);
  border: 1px solid rgba(249, 168, 184, 0.3);
  border-radius: 9999px;
  padding: 3px;
  gap: 0;
}

.combo-size-toggle .size-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-cocoa);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}

.combo-size-toggle .size-btn.active {
  background: var(--color-cocoa);
  color: var(--color-alabaster);
  box-shadow: 0 2px 8px rgba(74, 53, 37, 0.2);
}

.combo-size-toggle .size-btn:not(.active):hover {
  background: var(--color-blush-light);
}

/* Selectable charm option in grid */
.charm-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid var(--color-cream);
  border-radius: 1rem;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  text-align: center;
  min-height: 44px;
}

.charm-option:hover {
  border-color: var(--color-blush);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.charm-option.selected {
  border-color: var(--color-blush-deep);
  background: var(--color-blush-light);
  box-shadow: 0 0 0 3px rgba(224, 109, 139, 0.15);
}

.charm-option .charm-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-cocoa);
  line-height: 1.3;
}

/* Hardware radio-style selectable card */
.hardware-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border: 2px solid var(--color-cream);
  border-radius: 0.75rem;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-height: 44px;
}

.hardware-option:hover {
  border-color: var(--color-blush);
}

.hardware-option.selected {
  border-color: var(--color-blush-deep);
  background: var(--color-blush-light);
}

.hardware-option .hw-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-blush);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hardware-option.selected .hw-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-blush-deep);
}

.hardware-option .hw-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-cocoa);
}

.hardware-option .hw-price {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-cocoa-light);
}


/* ==========================================================================
   14. INVOICE STYLES
   ========================================================================== */

.invoice {
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  padding: 2rem;
  background: #FFFFFF;
  font-family: var(--font-body);
  color: var(--color-cocoa);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.invoice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-cocoa);
  margin-bottom: 1.5rem;
}

.invoice-header .invoice-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.invoice-header .invoice-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-cocoa);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.invoice-table th,
.invoice-table td {
  padding: 0.5rem 0.625rem;
  text-align: left;
  border: 1px solid #d1d5db;
  font-size: 0.75rem;
}

.invoice-table th {
  background: var(--color-cream);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.6875rem;
  color: var(--color-cocoa);
}

.invoice-table td {
  color: var(--color-cocoa);
}

.invoice-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--color-cocoa);
}

.invoice-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #d1d5db;
  font-size: 0.6875rem;
  color: var(--color-cocoa-light);
}

.invoice-footer .hsn-code {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.invoice-footer .terms {
  margin-bottom: 1rem;
}

.invoice-footer .signature-area {
  display: flex;
  justify-content: flex-end;
  padding-top: 2rem;
}

.invoice-footer .signature-line {
  width: 10rem;
  border-top: 1px solid var(--color-cocoa);
  text-align: center;
  padding-top: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
}


/* ==========================================================================
   15. SHIPPING LABEL
   ========================================================================== */

.shipping-label {
  width: 384px;
  height: 384px;
  border: 2px solid var(--color-cocoa);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-cocoa);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.label-brand-stamp {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px dashed var(--color-cocoa-light);
}

.label-brand-stamp .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-blush-deep);
}

.label-brand-stamp .brand-sub {
  font-size: 0.5625rem;
  color: var(--color-cocoa-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.label-address {
  flex: 1;
  padding: 0.5rem 0;
}

.label-address .address-type {
  font-weight: 700;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-cocoa-light);
  margin-bottom: 0.25rem;
}

.label-address .address-name {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.label-address .address-line {
  font-size: 0.75rem;
  line-height: 1.4;
}

.label-address .address-phone {
  font-weight: 600;
  margin-top: 0.25rem;
}

.label-barcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1.5px dashed var(--color-cocoa-light);
}

.label-barcode .awb-label {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-cocoa-light);
  font-weight: 700;
}

.label-barcode .awb-number {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}


/* ==========================================================================
   16. PRINT STYLES
   ========================================================================== */

@media print {
  /* ── Hide non-printable elements ── */
  header,
  footer,
  nav,
  .mobile-bottom-nav,
  .mobile-bottom-nav *,
  #cart-overlay,
  #cart-drawer,
  .admin-overlay,
  .admin-panel,
  .modal-overlay,
  #checkout-modal,
  #quickview-modal,
  #bulk-modal,
  #tracking-modal,
  #product-detail-modal,
  #toast-container,
  .announcement-bar,
  [class*="announcement"],
  button:not(.print-visible),
  .no-print {
    display: none !important;
    visibility: hidden !important;
  }

  /* ── Reset backgrounds for clean printing ── */
  html,
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Page margins */
  @page {
    margin: 15mm 12mm;
    size: A4;
  }

  /* ── Show only invoice content ── */
  #invoice-content,
  .invoice {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* Invoice table borders visible in print */
  .invoice-table th,
  .invoice-table td {
    border: 1px solid #333333 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .invoice-table th {
    background: #f3f4f6 !important;
  }

  .invoice-header {
    border-bottom: 2px solid #000000 !important;
  }

  .invoice-footer {
    border-top: 1px solid #666666 !important;
  }

  /* Brand logo area in print */
  .invoice-header .invoice-brand {
    color: #000000 !important;
  }

  /* Avoid page breaks inside elements */
  .invoice-table,
  .invoice-header,
  .invoice-footer {
    page-break-inside: avoid;
  }

  /* Links show URL in print */
  a[href]::after {
    content: none;
  }

  /* Shipping label print */
  .shipping-label {
    border: 2px solid #000000 !important;
    page-break-inside: avoid;
  }
}


/* ==========================================================================
   17. UTILITY CLASSES
   ========================================================================== */

/* 2-line text ellipsis */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide scrollbar utility */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Touch target helper — ensures minimum 44px tap target */
.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* Visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ==========================================================================
   18. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

/* ── Extra-small devices (320px+) ── */
@media (max-width: 374px) {
  .modal-content {
    padding: 1rem;
    border-radius: 1rem;
  }

  .admin-panel {
    max-width: 100%;
  }

  .gallery-display {
    height: 240px;
  }

  .shipping-label {
    width: 100%;
    height: auto;
    min-height: 320px;
  }

  .invoice {
    padding: 1rem;
    font-size: 0.75rem;
  }

  .pricing-toggle .toggle-option {
    padding: 0.3rem 0.625rem;
    font-size: 0.6875rem;
  }

  .admin-tabs button,
  .admin-tabs .admin-tab {
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }

  .combo-size-toggle .size-btn {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
  }
}

/* ── Small devices (375px–639px) ── */
@media (min-width: 375px) and (max-width: 639px) {
  .gallery-display {
    height: 260px;
  }
}

/* ── Medium screens (640px+) ── */
@media (min-width: 640px) {
  .gallery-display {
    height: 320px;
  }
}

/* ── Large screens (1024px+) ── */
@media (min-width: 1024px) {
  .admin-panel {
    max-width: 42rem;
  }

  .gallery-display {
    height: 360px;
  }
}

/* ── Ensure proper touch targets everywhere on mobile ── */
@media (pointer: coarse) {
  button,
  [role="button"],
  a,
  select,
  .gallery-tab,
  .charm-option,
  .hardware-option,
  .payment-option,
  .mobile-bottom-nav .nav-item {
    min-height: 44px;
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px; /* Prevent iOS zoom on focus */
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-float,
  .animate-float-delayed {
    animation: none;
  }

  .shipping-progress-bar {
    animation: none;
  }
}


/* ==========================================================================
   20. ULTRA-RESPONSIVE ADAPTATIONS (PHONES, TABLETS, PC, ULTRA-WIDE)
   ========================================================================== */

/* ── Prevent iOS input auto-zoom on mobile ── */
@media (max-width: 767px) {
  input[type="text"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── Momentum Scrolling for horizontal carousels & tabs on touch devices ── */
.no-scrollbar,
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ── iOS Safe Area Support for Notches & Home Indicator ── */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

.mobile-bottom-nav {
  padding-bottom: var(--sab);
}

#cart-drawer {
  padding-bottom: var(--sab);
}

/* ── Compact mobile screens (320px - 360px like iPhone SE, Galaxy Fold) ── */
@media (max-width: 360px) {
  .boutique-arch {
    border-radius: 9999px 9999px 16px 16px;
  }
  
  .filter-btn {
    font-size: 0.6875rem !important; /* 11px */
    padding: 0.375rem 0.625rem !important;
  }
}

/* ── Tablet / iPad optimizations (768px - 1023px) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  #product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* ── Large Desktop & Ultra-Wide PC Monitors (1440px, 1920px+) ── */
@media (min-width: 1536px) {
  .max-w-7xl {
    max-width: 86rem; /* 1376px */
  }
  
  #product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem;
  }
}

/* ── Short landscape screens (mobile landscape) ── */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-content,
  #checkout-modal > div,
  #product-detail-modal > div,
  #admin-dashboard-view {
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 1rem !important;
  }
  
  .mobile-bottom-nav {
    display: none !important;
  }
  
  body {
    padding-bottom: 0 !important;
  }
}
