/* ==========================================================================
   Berliner & Donut Bar - Mobile Web PWA Showcase & Box Builder
   Design strictly based on reference: clean white, pastel cards, lavender gradients,
   bright yellow CTA, coral pill counters, floating dark nav pill, real 3D pop-out
   ========================================================================== */

:root {
  --bg-app: #FFFFFF;
  --bg-page: #F4F5F9;
  --text-main: #18181B;
  --text-muted: #8E8E93;
  --text-light: #71717A;
  
  /* Primary & Accent Palettes */
  --accent-purple-start: #8B7CF6;
  --accent-purple-end: #A695FF;
  --accent-purple-text: #6C5CE7;
  --accent-yellow: #FFD21F;
  --accent-coral: #FF6B4A;
  --accent-coral-glow: rgba(255, 107, 74, 0.38);
  --nav-dark: #18181B;
  
  /* Pastel Card Colors */
  --pastel-lavender: #EFEAFF;
  --pastel-blue: #E6F4FE;
  --pastel-pink: #FDE8EE;
  --pastel-cream: #FFF4E4;
  --pastel-mint: #E8F8F0;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Radii */
  --radius-card: 26px;
  --radius-btn: 20px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-donut: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.14));
  --shadow-cta: 0 10px 25px rgba(255, 210, 31, 0.42);
  --shadow-nav: 0 14px 35px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
}

/* App Container Frame */
.mobile-wrapper {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  background-color: var(--bg-app);
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* Mobile: full-width, clean edges */
@media (max-width: 767px) {
  body {
    padding: 0;
    background-color: var(--bg-app);
  }
  .mobile-wrapper {
    max-width: 100%;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Tablet & Desktop: Centered container max-width 1120px */
@media (min-width: 768px) {
  body {
    padding: 24px 16px;
    background-color: var(--bg-page);
  }
  .mobile-wrapper {
    max-width: 1120px;
    min-height: auto;
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    padding-bottom: 32px;
  }
}

/* Minimalist Air Header */
.app-header {
  padding: 16px 20px 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-minimal {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.brand-logo-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

/* Live Operational Status Indicator (pulsing green dot) */
.header-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
}

.header-status-indicator.open {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.header-status-indicator.closed {
  background: #27272A;
  color: #D4D4D8;
  border: 1px solid #3F3F46;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
  flex-shrink: 0;
}

.header-status-indicator.closed .status-pulse-dot {
  background-color: #71717A;
  box-shadow: none;
  animation: none;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Desktop navigation elements (hidden on mobile) */
.desktop-nav-tabs,
.desktop-header-right {
  display: none;
}

@media (min-width: 768px) {
  .app-header {
    position: sticky;
    top: 0;
    z-index: 400;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px 28px;
  }
  .desktop-nav-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #F4F4F5;
    padding: 4px;
    border-radius: var(--radius-pill);
  }
  .desk-nav-tab {
    background: transparent;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    color: #52525B;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .desk-nav-tab:hover {
    color: #18181B;
  }
  .desk-nav-tab.active {
    background: #FFFFFF;
    color: #6D28D9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  .desk-coins-badge {
    background: #EDE9FE;
    color: #6D28D9;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
  }
  .desktop-header-right {
    display: flex;
    align-items: center;
  }
  .desk-header-cart-btn {
    background: linear-gradient(135deg, #8B7CF6 0%, #7C3AED 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(139, 124, 246, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .desk-header-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(139, 124, 246, 0.4);
  }
  .desk-header-cart-btn:active {
    transform: scale(0.98);
  }
  .desk-cart-summary {
    background: rgba(255, 255, 255, 0.22);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 800;
  }

  /* COMPLETELY HIDE BOTTOM FLOATING BAR ON DESKTOP */
  .bottom-nav-bar {
    display: none !important;
  }
}

/* Store Closed Full-Width Expressive Banner */
.store-closed-banner {
  background: linear-gradient(135deg, #1E1B2E 0%, #2A2438 100%);
  border: 1px solid rgba(139, 124, 246, 0.25);
  color: #FFFFFF;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 10px 18px 16px 18px;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.closed-banner-icon {
  font-size: 26px;
  line-height: 1;
  padding-top: 2px;
}

.closed-banner-title {
  font-size: 16px;
  font-weight: 800;
  color: #EDE9FE;
  margin-bottom: 3px;
}

.closed-banner-text {
  font-size: 13px;
  color: #D4D4D8;
  line-height: 1.4;
}

.closed-banner-sub {
  font-size: 11.5px;
  color: #A1A1AA;
  margin-top: 5px;
}

/* Disabled states when store is closed */
.box-controller-disabled {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.5);
}

.btn-order-paused {
  background: #F4F4F5 !important;
  color: #71717A !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: not-allowed !important;
  border: 1px solid #E4E4E7 !important;
  padding: 6px 10px !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: none !important;
}

.header-status-pill.open {
  background: #E8F8F0;
  color: #10B981;
}

.header-status-pill.closed {
  background: #FEE2E2;
  color: #EF4444;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Large Expressive Titles */
.main-headline-wrap {
  padding: 6px 20px 14px 20px;
}

.main-screen-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: var(--text-main);
}

/* Interactive Expressive Hero Carousel with 3D Pop-out */
.hero-carousel-container {
  margin: 0 16px 18px 16px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.hero-carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 28px;
  position: relative;
}

.hero-carousel-track {
  display: flex;
  gap: 0;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  width: 100%;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hero-slide-card {
  border-radius: 28px;
  padding: 24px 22px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  min-height: 185px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  user-select: none;
  box-sizing: border-box;
  width: 100%;
}

.hero-slide-card:active {
  transform: scale(0.985);
}

.slide-purple {
  background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.slide-coral {
  background: linear-gradient(135deg, #E11D48 0%, #FB7185 55%, #F472B6 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.slide-blue {
  background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 50%, #60A5FA 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.slide-gold {
  background: linear-gradient(135deg, #B45309 0%, #D97706 40%, #7C3AED 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.banner-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.24);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 6px;
  width: fit-content;
  position: relative;
  z-index: 2;
}

.hero-slide-card h3 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
  max-width: 58%;
  letter-spacing: -0.2px;
  position: relative;
  z-index: 2;
}

.hero-slide-card p {
  font-size: 12.5px;
  opacity: 0.94;
  line-height: 1.38;
  max-width: 58%;
  position: relative;
  z-index: 2;
}

/* Donut positioned cleanly on the right inside slide boundaries */
.hero-slide-card .hero-banner-donut {
  position: absolute;
  right: 12px;
  top: 22px;
  width: 135px;
  height: 135px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
  pointer-events: none;
  animation: floatDonut 4s ease-in-out infinite;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-carousel-container {
    margin: 0 20px 24px 20px;
    border-radius: 28px;
  }
  .hero-carousel-viewport {
    border-radius: 28px;
  }
  .hero-slide-card {
    min-height: 220px;
    padding: 30px 32px;
    border-radius: 28px;
  }
  .hero-slide-card h3 {
    font-size: 26px;
    max-width: 60%;
  }
  .hero-slide-card p {
    font-size: 14px;
    max-width: 60%;
  }
  .hero-slide-card .hero-banner-donut {
    right: 24px;
    top: 24px;
    width: 170px;
    height: 170px;
  }
}

/* Desktop Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #18181B;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
}

.hero-carousel-container:hover .carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background: #FFFFFF;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }

@media (max-width: 767px) {
  .carousel-arrow {
    display: none;
  }
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D4D4D8;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dot.active {
  width: 22px;
  border-radius: var(--radius-pill);
  background: #7C3AED;
}
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.25));
  pointer-events: none;
  animation: floatDonut 4s ease-in-out infinite;
}

@keyframes floatDonut {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ==========================================================================
   STICKY BOX PROGRESS & FORMAT SELECTOR (Always visible during scroll)
   ========================================================================== */
.box-sticky-controller {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 18px 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 14px;
}

/* Box sizes segmented row */
.box-sizes-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.box-sizes-row::-webkit-scrollbar {
  display: none;
}

.box-size-btn {
  flex: 1;
  min-width: 78px;
  background: #F4F5F7;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.box-size-btn .size-qty {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.box-size-btn .size-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.box-size-btn.active {
  background: #FFFFFF;
  border-color: var(--accent-purple-start);
  box-shadow: 0 4px 14px rgba(139, 124, 246, 0.22);
}

.box-size-btn.active .size-qty {
  color: var(--accent-purple-start);
}

.box-size-btn.active .size-badge {
  color: var(--accent-purple-start);
}

/* Compact Progress Bar Card */
.sticky-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-pill-badge {
  background: #EFEAFF;
  color: var(--accent-purple-start);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
}

.progress-pill-badge.full {
  background: #E8F8F0;
  color: #10B981;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #ECE7FD;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-purple-start), var(--accent-purple-end));
  border-radius: 6px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar.full {
  background: #10B981;
}

/* Yellow Action Button when Box is Full */
.add-box-cta {
  width: 100%;
  background: var(--accent-yellow);
  color: #18181B;
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 4px;
  animation: pulseCta 2s infinite ease-in-out;
}

.add-box-cta:disabled {
  display: none; /* Hide when not full to keep sticky bar ultra compact */
}

@keyframes pulseCta {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.add-box-cta:not(:disabled):active {
  transform: scale(0.97);
}

/* ==========================================================================
   FLAVORS SHOWCASE GRID (Clean, airy, 2 columns, pop-out 3D donut)
   ========================================================================== */
.flavors-section {
  padding: 0 18px;
}

.flavors-section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flavors-hint-text {
  font-size: 12px;
  font-weight: 600;
  color: #71717A;
  text-transform: none;
  letter-spacing: normal;
}

.flavors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-top: 12px;
}

@media (min-width: 768px) {
  .flavors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .flavors-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* Donut Card */
.donut-card {
  border-radius: var(--radius-card);
  padding: 12px 12px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  box-shadow: var(--shadow-card);
  overflow: visible; /* Allows donut image to break out */
  min-height: 175px;
}

.donut-card:active {
  transform: scale(0.98);
}

.donut-card.out-of-stock {
  opacity: 0.62;
  filter: grayscale(0.2);
}

/* Semi-transparent info pill in top left of card */
.donut-info-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #52525B;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s, background-color 0.15s;
}

.donut-card:hover .donut-info-pill {
  background: #FFFFFF;
  color: var(--accent-purple-text);
  transform: scale(1.08);
}

/* Semi-transparent stock badge in top right of card */
.donut-stock-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  color: #52525B;
  z-index: 5;
}

.donut-stock-pill.empty {
  background: #FEE2E2;
  color: #DC2626;
}

/* 3D Donut Image Popping Out of Card */
.donut-image-wrap {
  width: 100%;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: -24px;
  margin-bottom: 6px;
}

.donut-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: var(--shadow-donut);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(-4px) scale(1.06);
}

.donut-card:hover img {
  transform: translateY(-8px) scale(1.10);
}

/* Card Content: Title and Price/Button Row */
.donut-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.donut-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}

.donut-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.donut-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-main);
}

/* Compact Round Plus Button */
.btn-round-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-coral);
  color: #FFFFFF;
  border: none;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-coral-glow);
  transition: transform 0.15s, background-color 0.15s;
}

.btn-round-plus:active {
  transform: scale(0.88);
}

.btn-round-plus:disabled {
  background: #D4D4D8;
  box-shadow: none;
  cursor: not-allowed;
}

/* Coral Orange Pill Counter: - 02 + */
.pill-counter {
  display: flex;
  align-items: center;
  background: var(--accent-coral);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 3px 5px;
  box-shadow: 0 4px 14px var(--accent-coral-glow);
  gap: 3px;
  user-select: none;
}

.pill-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}

.pill-btn:active {
  transform: scale(0.85);
  background: rgba(255, 255, 255, 0.2);
}

.pill-qty {
  font-size: 12px;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
}

/* ==========================================================================
   DETAIL MODAL / BURGER SCREEN (Like the right screen on reference)
   ========================================================================== */
.detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.detail-sheet {
  width: 100%;
  max-width: 430px;
  background: #FFFFFF;
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  padding: 20px 22px 30px 22px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.detail-modal.active .detail-sheet {
  transform: translateY(0);
}

.detail-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.detail-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F4F5F7;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-main);
}

/* Detail Split Layout: Left Info, Right Big Donut */
.detail-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.detail-left-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.detail-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.15;
}

.detail-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent-purple-text); /* Violet price like reference */
}

.detail-specs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0;
}

.detail-spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
}

.detail-spec-item strong {
  color: var(--text-main);
}

.detail-spec-icon {
  font-size: 14px;
}

/* Big 3D Donut Floating on Right */
.detail-right-donut {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -10px;
}

.detail-right-donut img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.2));
  animation: floatDonut 4s ease-in-out infinite;
}

/* Bottom Stats Panel in Lavender */
.detail-stats-panel {
  background: linear-gradient(135deg, var(--pastel-lavender) 0%, #E8E2FF 100%);
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 18px;
}

.detail-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.detail-stat-box .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #7C3AED;
}

.detail-stat-box .stat-val {
  font-size: 18px;
  font-weight: 900;
  color: #5B21B6;
}

.detail-stat-box .stat-subval {
  font-size: 11px;
  font-weight: 700;
  color: #6D28D9;
  margin-top: 3px;
  letter-spacing: 0.2px;
}

/* ==========================================================================
   CART SCREEN (Clean, modern, strictly matching reference center screen)
   ========================================================================== */
.view-container {
  display: none;
}

.view-container.active {
  display: block;
}

.cart-header {
  padding: 16px 20px 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-header h2 {
  font-size: 26px;
  font-weight: 900;
}

/* Top Lavender Cart Banner with Pop-out Donut & Switcher */
.cart-top-banner {
  margin: 0 18px 16px 18px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--accent-purple-start), var(--accent-purple-end));
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: visible;
  box-shadow: 0 10px 24px rgba(139, 124, 246, 0.25);
  min-height: 100px;
}

.cart-top-banner-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 65%;
  z-index: 2;
}

/* Segmented switcher inside lavender card */
.cart-delivery-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-pill);
  padding: 3px;
  width: fit-content;
}

.cart-delivery-tab {
  background: transparent;
  border: none;
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cart-delivery-tab.active {
  background: #FFFFFF;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* White Pill Button for Time Slot (like "Time" on reference) */
.cart-time-pill-btn {
  background: #FFFFFF;
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cart-banner-popout-donut {
  position: absolute;
  right: -10px;
  top: -15px;
  width: 105px;
  height: 105px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.22));
}

/* Assembled Boxes List (Reference Items Chosen layout) */
.cart-boxes-list {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.cart-box-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Coral circular badge with box quantity (4, 6) */
.cart-box-qty-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-coral);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px var(--accent-coral-glow);
}

.cart-box-main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-box-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.cart-box-items-preview {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.35;
}

.cart-box-price-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.delete-box-btn {
  background: #FEE2E2;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #EF4444;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Empty Cart State */
.empty-cart-state {
  text-align: center;
  padding: 50px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-cart-icon {
  font-size: 64px;
  animation: floatDonut 3s infinite ease-in-out;
}

.empty-cart-state h3 {
  font-size: 18px;
  font-weight: 800;
}

.empty-cart-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 260px;
}

/* Clean Customer Form Inputs */
.checkout-form-section {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.form-input, .form-select {
  background: #F8F9FA;
  border: 1px solid #ECECEC;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-purple-start);
  background: #FFFFFF;
}

/* Promo Code Box */
.promo-box {
  padding: 0 18px;
  margin-bottom: 14px;
}

.promo-input-row {
  display: flex;
  gap: 8px;
}

.promo-input {
  flex: 1;
  background: #F8F9FA;
  border: 1px solid #ECECEC;
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  outline: none;
}

.promo-input:focus {
  border-color: var(--accent-purple-start);
  background: #FFFFFF;
}

.promo-apply-btn {
  background: #18181B;
  color: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.promo-status-msg {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.promo-status-msg.success { color: #10B981; }
.promo-status-msg.error { color: #EF4444; }

/* Totals Summary Card & Yellow Checkout Button */
.cart-checkout-footer {
  padding: 0 18px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.totals-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
}

.totals-row {
  display: flex;
  justify-content: space-between;
}

.totals-row.discount {
  color: #10B981;
  font-weight: 700;
}

/* Total row like reference: "Total" left, large purple amount right */
.cart-total-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 4px 0;
  border-top: 1px dashed #E5E7EB;
}

.cart-total-label {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.cart-total-amount {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-purple-text); /* #6C5CE7 */
}

/* Yellow Checkout CTA */
.checkout-btn-cta {
  width: 100%;
  background: var(--accent-yellow);
  color: #18181B;
  border: none;
  border-radius: var(--radius-btn);
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s;
}

.checkout-btn-cta:active {
  transform: scale(0.97);
}

/* ==========================================================================
   ORDER SUCCESS SCREEN
   ========================================================================== */
.order-success-card {
  margin: 18px;
  background: #FFFFFF;
  border-radius: 28px;
  padding: 24px 20px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.success-badge-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #E8F8F0;
  color: #10B981;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-num-pill {
  background: #EFEAFF;
  color: var(--accent-purple-start);
  font-size: 18px;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
}

.reservation-timer-box {
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  border-radius: 18px;
  padding: 12px 18px;
  width: 100%;
}

.timer-label {
  font-size: 11px;
  font-weight: 700;
  color: #C2410C;
  text-transform: uppercase;
}

.timer-countdown {
  font-size: 24px;
  font-weight: 800;
  color: #EA580C;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.pay-btn-cta {
  background: var(--accent-yellow);
  color: #18181B;
  border: none;
  border-radius: var(--radius-btn);
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
}

.tg-btn-cta {
  background: #229ED9;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-btn);
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(34, 158, 217, 0.35);
  cursor: pointer;
}

.back-home-btn {
  background: #F4F5F7;
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

/* ==========================================================================
   FLOATING DARK BOTTOM NAVIGATION BAR (Strictly centered inside frame)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 360px;
  background: var(--nav-dark);
  border-radius: var(--radius-pill);
  padding: 8px 24px 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-nav);
  z-index: 500;
}

.nav-item-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 7px;
}

.nav-item-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.nav-item-btn.active {
  color: #FFFFFF;
}

.nav-item-btn.active::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FFFFFF;
  position: absolute;
  bottom: 0px;
}

.nav-cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent-coral);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px var(--accent-coral-glow);
}

.nav-center-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  color: #5B21B6;
  border: 1.5px solid #C4B5FD;
  box-shadow: 0 4px 14px rgba(139, 124, 246, 0.35);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, background 0.2s;
  user-select: none;
  margin-top: -6px;
  flex-shrink: 0;
}

.nav-center-bubble.active {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  color: #FFFFFF;
  border-color: #A78BFA;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.5);
}

.nav-center-bubble:active {
  transform: scale(0.92);
}

.nav-center-icon {
  font-size: 17px;
  line-height: 1;
}

.nav-center-label {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* Desktop Cart 2-Column Split Layout */
.cart-desktop-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .cart-desktop-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    align-items: flex-start;
    padding: 0 20px 24px 20px;
  }

  .cart-left-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .cart-right-col {
    background: #F8F9FA;
    border: 1px solid #EDEDF0;
    border-radius: 28px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .cart-right-col .checkout-form-section {
    padding: 0;
  }

  .cart-right-col .cart-checkout-footer {
    padding: 0;
  }
}

/* Toast notifications */
.toast-notice {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #18181B;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
}


/* ==========================================================================
   Pending Resumed Order Banner (10-min reservation)
   ========================================================================== */
.pending-order-banner {
  position: sticky;
  top: 0;
  z-index: 900;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
  animation: slideDownBanner 0.3s ease;
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.pending-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
}

.pending-banner-content strong {
  color: #B45309;
  font-variant-numeric: tabular-nums;
}

.btn-banner-action {
  background: #FFD21F;
  color: #18181B;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(255, 210, 31, 0.35);
  transition: transform 0.15s ease;
}

.btn-banner-action:active {
  transform: scale(0.94);
}

/* Order Cancellation Button */
.cancel-order-btn {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid #FCA5A5;
  color: #EF4444;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 6px;
}

.cancel-order-btn:hover {
  background: #FEF2F2;
}

.cancel-order-btn:active {
  transform: scale(0.97);
}

/* Interactive Customer Rating Stars */
.detail-rating-interactive {
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  border-radius: 18px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rating-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-prompt {
  font-size: 12px;
  font-weight: 700;
  color: #6B21A8;
}

.my-score-label {
  font-size: 12px;
  font-weight: 800;
  color: #7C3AED;
}

.interactive-stars-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.star-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: #D1D5DB;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease;
  user-select: none;
}

.star-btn.active, .star-btn.hovered {
  color: #F59E0B;
}

.star-btn:active {
  transform: scale(1.3);
}

/* ==========================================================================
   Loyalty & Ponchcoins Club Screen
   ========================================================================== */
.loyalty-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 8px 20px;
}

.loyalty-header h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
}

.loyalty-auth-card {
  margin: 16px 20px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-card);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.loyalty-auth-icon {
  font-size: 42px;
  margin-bottom: 8px;
}

.loyalty-auth-card h3 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
}

.loyalty-auth-card p {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Gradient Balance Card */
.loyalty-balance-card {
  margin: 12px 20px 16px 20px;
  background: linear-gradient(135deg, var(--accent-purple-start) 0%, var(--accent-purple-end) 100%);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  color: #FFFFFF;
  box-shadow: 0 12px 28px rgba(139, 124, 246, 0.35);
  position: relative;
  overflow: hidden;
}

.loyalty-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.loyalty-user-tag {
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}

.loyalty-switch-user-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.loyalty-balance-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.loyalty-balance-num {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}

.loyalty-balance-currency {
  font-size: 16px;
  font-weight: 800;
  opacity: 0.95;
}

.loyalty-rate-hint {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 18px;
}

.loyalty-rank-section {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 12px 14px;
}

.loyalty-rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 6px;
}

.loyalty-rank-title strong {
  color: #FFD21F;
}

.loyalty-rank-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.loyalty-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 6px;
}

.loyalty-progress-fill {
  height: 100%;
  background: #FFD21F;
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.loyalty-rank-subtext {
  font-size: 11px;
  opacity: 0.9;
  font-weight: 600;
}

/* Sections Inside Loyalty View */
.loyalty-section-card {
  margin: 0 20px 16px 20px;
  background: #FFFFFF;
  border: 1px solid #F0F0F3;
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.loyalty-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.loyalty-section-header h3 {
  font-size: 16px;
  font-weight: 850;
  color: var(--text-main);
}

.loyalty-section-badge {
  font-size: 12px;
  font-weight: 800;
  background: #EFEAFF;
  color: var(--accent-purple-text);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.loyalty-section-desc {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.4;
  margin-bottom: 14px;
}

/* Stickers Grid */
.loyalty-stickers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.sticker-card {
  background: #F9FAFB;
  border: 1.5px dashed #E5E7EB;
  border-radius: 18px;
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}

.sticker-card.tried {
  background: #F5F3FF;
  border: 1.5px solid #8B7CF6;
  box-shadow: 0 4px 12px rgba(139, 124, 246, 0.15);
}

.sticker-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08));
}

.sticker-card:not(.tried) .sticker-img {
  filter: grayscale(1) opacity(0.35);
}

.sticker-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sticker-status-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.sticker-card.tried .sticker-status-pill {
  background: #10B981;
  color: #FFFFFF;
}

.sticker-card:not(.tried) .sticker-status-pill {
  background: #E5E7EB;
  color: #6B7280;
}

.loyalty-claim-btn {
  width: 100%;
  padding: 12px;
  background: #FFD21F;
  border: none;
  border-radius: var(--radius-btn);
  color: #18181B;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s ease;
  animation: pulseClaimBtn 1.5s infinite;
}

@keyframes pulseClaimBtn {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Rewards Grid */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.reward-item-card {
  background: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.reward-item-card.popular {
  border-color: #F59E0B;
  background: #FFFDF5;
}

.reward-pill-tag {
  position: absolute;
  top: -8px;
  background: #F59E0B;
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.reward-badge {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-purple-text);
  margin-bottom: 2px;
}

.reward-title {
  font-size: 10px;
  font-weight: 700;
  color: #6B7280;
  margin-bottom: 6px;
}

.reward-cost {
  font-size: 12px;
  font-weight: 850;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.reward-exchange-btn {
  width: 100%;
  padding: 6px 4px;
  background: var(--nav-dark);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.reward-exchange-btn:active {
  transform: scale(0.94);
}

.reward-code-box {
  margin-top: 14px;
  background: #F5F3FF;
  border: 1.5px dashed #8B7CF6;
  border-radius: 18px;
  padding: 14px;
  text-align: center;
}

.reward-code-label {
  font-size: 11px;
  font-weight: 700;
  color: #6D28D9;
  margin-bottom: 4px;
}

.reward-code-value {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--accent-purple-text);
  user-select: all;
  margin-bottom: 10px;
}

.reward-apply-btn {
  background: #FFD21F;
  color: #18181B;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* History List */
.loyalty-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: #F9FAFB;
  font-size: 12px;
}

.history-left {
  display: flex;
  flex-direction: column;
}

.history-reason {
  font-weight: 700;
  color: var(--text-main);
}

.history-date {
  font-size: 10px;
  color: #9CA3AF;
}

.history-amount {
  font-weight: 900;
  font-size: 13px;
}

.history-amount.positive {
  color: #10B981;
}

.history-amount.negative {
  color: #EF4444;
}


/* ==========================================================================
   Consent Checkbox (152-FZ & Public Offer)
   ========================================================================== */
.consent-group {
  margin: 12px 0 8px 0;
  display: flex;
  align-items: flex-start;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #71717A;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #8B7CF6;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label a {
  color: #6C5CE7;
  text-decoration: underline;
  font-weight: 600;
}

.checkbox-label a:hover {
  color: #5541D7;
}

/* ==========================================================================
   Test Payment Mode Button
   ========================================================================== */
.test-pay-btn {
  width: 100%;
  padding: 13px 18px;
  background: #F0FDF4;
  border: 1.5px dashed #22C55E;
  color: #15803D;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}

.test-pay-btn:hover {
  background: #DCFCE7;
  border-color: #16A34A;
}

.test-pay-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Depersonalized Checkout & Club Berlicoins Styles
   ========================================================================== */
.delivery-banner-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 12px 14px;
  border-radius: 16px;
  margin: 6px 0 12px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #1E40AF;
}

.delivery-banner-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.delivery-banner-text strong {
  color: #1D4ED8;
  font-weight: 700;
}

.checkout-offer-note {
  font-size: 11px;
  color: #9CA3AF;
  text-align: center;
  margin-top: 6px;
}

.checkout-offer-note a {
  color: #6C5CE7;
  text-decoration: underline;
  font-weight: 600;
}

/* Loyalty Account & Club Code Card */
.loyalty-account-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid #EAEAEA;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.club-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.club-code-title {
  font-size: 13px;
  font-weight: 700;
  color: #4B5563;
}

.club-code-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.club-code-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #6C5CE7;
  background: #F3E8FF;
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid #E9D5FF;
}

.btn-copy-code {
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #3F3F46;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-code:hover {
  background: #E4E4E7;
}

.btn-copy-code:active {
  transform: scale(0.96);
}

.club-code-hint {
  font-size: 11px;
  color: #6B7280;
  line-height: 1.35;
}

.loyalty-nickname-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.nickname-input {
  flex: 1;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 12px;
}

.btn-save-nickname {
  background: #6C5CE7;
  color: #FFFFFF;
  border: none;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-save-nickname:hover {
  background: #5541D7;
}

.loyalty-login-accordion {
  border-top: 1px dashed #E5E7EB;
  padding-top: 8px;
  margin-top: 2px;
}

.loyalty-toggle-login-btn {
  background: none;
  border: none;
  color: #6C5CE7;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-align: left;
}

.loyalty-login-drawer {
  margin-top: 8px;
  padding: 10px;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px solid #F3F4F6;
}

.loyalty-login-input-row {
  display: flex;
  gap: 8px;
}

.loyalty-login-input-row .form-input {
  flex: 1;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  font-family: monospace;
}

.btn-login-code {
  background: #111827;
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-login-code:hover {
  background: #1F2937;
}

.order-club-tag {
  display: inline-block;
  background: #EDE9FE;
  color: #5B21B6;
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}

/* ==========================================================================
   LOYALTY USER PROFILE & DEVICE TRANSFER MODAL STYLES
   ========================================================================== */
.loyalty-user-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.loyalty-user-greeting {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

.loyalty-user-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loyalty-display-name-val {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}

.loyalty-edit-name-btn {
  background: rgba(255, 255, 255, 0.22);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.loyalty-edit-name-btn:hover {
  background: rgba(255, 255, 255, 0.38);
  transform: scale(1.08);
}

.loyalty-member-tag {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Inline Nickname Editor */
.loyalty-inline-name-form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.18);
  padding: 8px;
  border-radius: 14px;
}

.inline-name-input {
  background: #FFFFFF !important;
  color: #18181B !important;
  font-size: 14px !important;
  height: 38px !important;
  padding: 0 12px !important;
  flex: 1;
}

.btn-save-inline {
  background: #FFFFFF;
  color: #7C3AED;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-save-inline:hover {
  opacity: 0.9;
}

.btn-cancel-inline {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

/* Device Transfer Footer in Loyalty View */
.loyalty-transfer-footer {
  margin-top: 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.loyalty-transfer-link-btn {
  background: transparent;
  border: none;
  color: #8B7CF6;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.loyalty-transfer-link-btn:hover {
  background: #EDE9FE;
  color: #6D28D9;
}

/* ==========================================================================
   GENERIC MODAL & DEVICE TRANSFER MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 20, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-card {
  max-width: 420px;
  width: 100%;
  border-radius: 28px;
  padding: 24px;
  background: #FFFFFF;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
  box-sizing: border-box;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.transfer-modal-card {
  max-width: 420px;
  width: 100%;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 0;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F4F5F7;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  line-height: 1;
}

.modal-close-btn:hover {
  background: #E4E5E9;
  transform: scale(1.05);
}

.modal-close-btn:active {
  transform: scale(0.92);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.transfer-desc {
  font-size: 13.5px;
  color: #52525B;
  line-height: 1.5;
  margin-bottom: 16px;
}

.transfer-link-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.transfer-input {
  background: #F4F4F5 !important;
  color: #27272A !important;
  font-size: 12px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border: 1px solid #E4E4E7 !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  word-break: break-all;
  width: 100%;
  box-sizing: border-box;
}

.transfer-copy-btn {
  margin-top: 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 12px 18px !important;
  border-radius: var(--radius-pill) !important;
  width: 100%;
}

.transfer-divider {
  text-align: center;
  position: relative;
  margin: 18px 0 14px 0;
}

.transfer-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: #E4E4E7;
  z-index: 1;
}

.transfer-divider span {
  background: #FFFFFF;
  position: relative;
  z-index: 2;
  padding: 0 10px;
  font-size: 11px;
  color: #A1A1AA;
}

.transfer-manual-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.transfer-manual-row input {
  flex: 1;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid #E4E4E7;
  background: #F9FAFB;
  outline: none;
  transition: border-color 0.15s;
}

.transfer-manual-row input:focus {
  border-color: #8B7CF6;
  background: #FFFFFF;
}

.btn-transfer-apply {
  background: #18181B;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn-transfer-apply:hover {
  opacity: 0.9;
}
