/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

:root {
    --primary: #FF8C00;
    --primary-dark: #e67e00;
    --primary-light: #fff2e0;
    --cream: #FFF8F0;
    --espresso: #3E2723;
    --light-grey: #F5F5F5;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-heading: 'Angkor', cursive;
    --font-body: 'Battambang', cursive;
    --header-height: 64px; /* approximate sticky header height */
    --bg-gradient-start: #FFF8F0;
    --bg-gradient-end: #F5F5F5;
    --card-bg: #FFFFFF;
    --border-color: #e0e0e0;
}

/* Dark Mode Variables */
:root.dark-mode {
    --primary: #FFA500;
    --primary-dark: #ff8c00;
    --primary-light: #2a2a2a;
    --cream: #1a1a1a;
    --espresso: #e0e0e0;
    --light-grey: #2d2d2d;
    --white: #1e1e1e;
    --text-dark: #e0e0e0;
    --text-light: #b0b0b0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --bg-gradient-start: #1a1a1a;
    --bg-gradient-end: #2d2d2d;
    --card-bg: #2a2a2a;
    --border-color: #404040;
}

body {
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Touch-friendly sizing */
@media (max-width: 768px) {
    .btn, .option-btn, .reaction-btn, .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, textarea, select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Ensure fonts are applied on all pages */
body, .static-page-section {
    font-family: var(--font-body);
}
h1, h2, h3, h4, .static-page-section h2, .static-page-section h3 {
    font-family: var(--font-heading);
}

/* Utility classes */
.mobile-only { display: none; }
.desktop-only { display: flex; }

/* Hide desktop-only on mobile */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
}

/* Logo animations - responsive for all devices */
@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 140, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 140, 0, 0.6));
    }
}

@keyframes logo-rotate-subtle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

/* Apply logo animation */
.logo, .logo img, header .logo img, footer .logo img {
    animation: logo-pulse 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.logo:hover, .logo:hover img {
    animation: logo-glow 1.5s ease-in-out infinite, logo-rotate-subtle 0.8s ease-in-out;
    transform: scale(1.1);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo img {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-width: 100px;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Profile page specific */
.profile-avatar {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    background: #f5f5f5;
    margin-bottom: 1rem;
}
.avatar-actions {
    display: flex;
    gap: 0.5rem;
}

/* Membership Card - Credit Card Style */
.membership-card {
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  perspective: 1000px;
}

.membership-card-bg.credit-card-style {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 1px 8px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  aspect-ratio: 1.586 / 1;
  min-height: unset;
}

.membership-card-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.membership-card-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Card Front */
.card-front {
  padding: 2rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

/* Card Brand Header */
.card-brand-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card-logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  background: white;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.card-brand-text {
  display: flex;
  flex-direction: column;
}

.card-brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 1px;
}

.card-brand-tagline {
  font-size: 0.7rem;
  margin: 0;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 300;
}

.membership-tier-badge {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Card Chip Section */
.card-chip-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-chip {
  width: 45px;
  height: 35px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 6px;
  gap: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.5);
}

.chip-line {
  height: 2px;
  background: rgba(0,0,0,0.3);
  border-radius: 1px;
}

.card-contactless {
  font-size: 1.8rem;
  opacity: 0.6;
  transform: rotate(90deg);
}

/* Member Information */
.card-member-info {
  flex: 1;
}

.card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin: 0 0 0.25rem 0;
  font-weight: 400;
}

.card-number-group {
  margin-bottom: 1rem;
}

.card-number {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.card-details-row {
  margin-bottom: 0.75rem;
}

.card-value {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-verified-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
}

.card-verified-badge i {
  color: #1877f2;
  background: white;
  border-radius: 50%;
  font-size: 1rem;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card-dates-row {
  display: flex;
  gap: 2rem;
}

.card-date-item {
  flex: 1;
}

.card-date {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 1px;
}

/* Card Footer */
.card-footer-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.card-points-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.points-value {
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.points-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-credit-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.9;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.card-credit-logo i {
  font-size: 1.5rem;
}

/* Card Back */
.card-back {
  display: none;
  padding: 2rem;
  min-height: 280px;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.card-magnetic-strip {
  width: 100%;
  height: 50px;
  background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  margin: -2rem -2rem 1.5rem -2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Membership Card Brand Section */
.membership-card-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 1rem;
}

.membership-card-brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  background: white;
  padding: 2px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.membership-card-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 1px;
}

/* Card Contact Info Section */
.card-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.95;
}

.contact-item i {
  width: 16px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Card Dates Section */
.card-dates-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.date-item {
  text-align: center;
}

.date-item .card-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 0.25rem;
  display: block;
}

.date-item .card-date {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* QR Code Section */
.qr-code-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 0.75rem;
}

#qrCanvas {
  background: white;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.qr-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  font-weight: 600;
}

/* Footer Info */
.footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.75rem;
  opacity: 0.9;
}

.footer-info span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-info i {
  font-size: 0.9rem;
}

/* NEW CARD LAYOUT STYLES */
.card-content-wrapper {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  min-height: unset;
}

.card-left-section {
  flex: 2.5;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.card-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 1px solid rgba(255,255,255,0.2);
  min-width: 0;
}

/* Card Header */
.card-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.brand-text {
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.65rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.tier-badge {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Member Profile Section */
.member-profile-section {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.member-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.member-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  object-fit: cover;
}

.avatar-verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.avatar-verified-badge i {
  color: #1877f2;
  font-size: 14px;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-id {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0 0 0.6rem 0;
  letter-spacing: 1px;
}

.member-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.95;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-row i {
  width: 14px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* Dates Grid */
.card-dates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0.5rem 0;
}

.date-box {
  text-align: center;
  background: rgba(255,255,255,0.1);
  padding: 0.4rem 0.3rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
}

.date-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  display: block;
  margin-bottom: 0.2rem;
}

.date-value {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Footer Info */
.card-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.7rem;
  opacity: 0.9;
  gap: 0.5rem;
}

.footer-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* QR Container */
.qr-container {
  text-align: center;
  flex-shrink: 0;
}

#qrCanvas {
  background: white;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  display: block;
  margin: 0 auto;
}

.qr-label {
  margin-top: 0.5rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.85;
  font-weight: 600;
}

/* Points Container */
.points-container {
  text-align: center;
  width: 100%;
}

.points-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 0.2rem;
}

.points-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.tier-progress-wrapper {
  width: 100%;
}

.tier-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.tier-progress-text {
  font-size: 0.65rem;
  opacity: 0.85;
  margin: 0;
}


.card-back-content {
  display: flex;
  gap: 1.5rem;
  flex-direction: column;
}

.card-qr-section {
  text-align: center;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.card-qr-code {
  width: 120px !important;
  height: 120px !important;
  margin: 0 auto;
  display: block;
}

.qr-label {
  margin: 0.5rem 0 0 0;
  font-size: 0.75rem;
  color: #333;
  font-weight: 600;
}

.card-info-section {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.info-label {
  opacity: 0.8;
}

.info-value {
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.tier-progress-mini {
  margin-top: 0.75rem;
}

.progress-bar-mini {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill-mini {
  height: 100%;
  background: linear-gradient(90deg, #ffd700 0%, #fff 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text-mini {
  font-size: 0.7rem;
  margin: 0;
  opacity: 0.9;
}

.card-terms {
  background: rgba(0,0,0,0.2);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.65rem;
  line-height: 1.6;
}

.card-terms p {
  margin: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-terms i {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  
  .membership-card, .membership-card * {
    visibility: visible;
  }
  
  .membership-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 85.6mm;
    height: 53.98mm;
  }
  
  .membership-card-bg {
    box-shadow: none;
    page-break-after: always;
  }
  
  .card-actions {
    display: none !important;
  }
  
  .card-front {
    padding: 1.5rem;
  }
}

/* Mobile Responsive for Membership Card */
@media (max-width: 768px) {
  .membership-card {
    max-width: 100%;
    padding: 0 0.75rem;
  }

  .membership-card-bg {
    aspect-ratio: unset;
  }

  .card-content-wrapper {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }

  .card-right-section {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-left: 0;
    padding-top: 1rem;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }

  .card-header-section {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .brand-info {
    flex: 1;
    min-width: 0;
  }

  .tier-badge {
    flex-shrink: 0;
  }

  .member-profile-section {
    gap: 0.75rem;
  }

  .member-avatar {
    width: 60px;
    height: 60px;
  }

  .avatar-verified-badge {
    width: 18px;
    height: 18px;
  }

  .avatar-verified-badge i {
    font-size: 12px;
  }

  .member-name {
    font-size: 1.1rem;
  }

  .member-id {
    font-size: 0.8rem;
  }

  .contact-row {
    font-size: 0.75rem;
  }

  .card-dates-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .date-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.6rem;
  }

  .date-label {
    margin-bottom: 0;
    text-align: left;
  }

  .qr-container {
    flex: 1;
  }

  #qrCanvas {
    width: 110px !important;
    height: 110px !important;
  }

  .qr-label {
    font-size: 0.55rem;
  }

  .points-container {
    flex: 1;
  }

  .points-value {
    font-size: 2rem;
  }

  .points-label {
    font-size: 0.7rem;
  }

  .tier-progress-text {
    font-size: 0.6rem;
  }

  .card-footer-info {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
    font-size: 0.65rem;
  }

  .footer-text {
    justify-content: center;
  }
}

/* Tablet responsive */
@media (max-width: 1024px) and (min-width: 769px) {
  .membership-card {
    max-width: 95%;
  }

  .card-content-wrapper {
    padding: 1.35rem;
  }

  .member-avatar {
    width: 65px;
    height: 65px;
  }

  #qrCanvas {
    width: 120px !important;
    height: 120px !important;
  }
}

/* Legacy card styles (keep for non-credit card view) */
.membership-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.membership-tier {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
  background: rgba(255,255,255,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}
.membership-icon {
  font-size: 2rem;
  opacity: 0.8;
}
.membership-card-body h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 600;
}
.tier-lock-badge {
  position: absolute;
  bottom: 5rem;
  left: 1.5rem;
  right: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  z-index: 2;
}
.membership-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.membership-tier {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
  background: rgba(255,255,255,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}
.membership-icon {
  font-size: 2rem;
  opacity: 0.8;
}
.membership-card-body h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 600;
}
/* Verified Badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e7e34;
    background: rgba(40,167,69,0.15);
    border: 1px solid rgba(40,167,69,0.35);
    padding: 3px 8px;
    border-radius: 12px;
}
.verified-badge i {
    font-size: 0.85rem;
}
.member-id {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 0.95;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.card-dates {
  font-family: 'Courier New', monospace;
  line-height: 1.8;
  opacity: 0.9;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 6px;
  backdrop-filter: blur(5px);
}
.card-dates div {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.15rem 0;
}
.card-dates div span:first-child {
  opacity: 0.85;
}
.card-dates div span:last-child {
  font-weight: 600;
  opacity: 1;
}
.expire-date {
  font-weight: 600;
}
.member-points {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.member-points small {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.8;
}

/* Profile Verified Badge - Facebook style */
.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
}

.profile-verified-badge i {
  color: #1877f2 !important;
  font-size: 1.2rem;
  background: white;
  border-radius: 50%;
  padding: 2px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  transition: all 0.3s ease;
}

.profile-verified-badge:hover i {
  transform: scale(1.1);
  filter: drop-shadow(0 3px 6px rgba(24, 119, 242, 0.4));
}

/* Tier Progress Bar */
.tier-progress-container {
  margin-top: 1rem;
}
.tier-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fff 0%, #ffd700 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.tier-progress-text {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
  text-align: center;
}
.membership-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1rem;
  margin-top: 1rem;
}
.qr-code-mini {
  width: auto;
  min-width: 80px;
  height: auto;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qr-code-mini canvas {
  display: block;
  border-radius: 4px;
}

/* Tier Benefits List */
.tier-benefits-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #e0e7ef;
}
.tier-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tier-benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: #333;
}
.tier-benefits-list li:last-child {
  border-bottom: none;
}
.tier-benefits-list li i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Redemption Grid */
.redemption-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.redemption-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e0e7ef;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}
.redemption-card:hover:not(.disabled) {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}
.redemption-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.redemption-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.redemption-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 0.5rem;
}
.redemption-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  min-height: 40px;
}
.redemption-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e0e7ef;
}
.redemption-points {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}
.btn-redeem {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

/* Transaction History */
.transaction-history {
  max-height: 600px;
  overflow-y: auto;
}
.transaction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 0.8rem;
  background: #f8f9fa;
  border-left: 4px solid #ddd;
  transition: all 0.2s ease;
}
.transaction-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.transaction-item.earned {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #d4edda 0%, #f8f9fa 100%);
}
.transaction-item.redeemed {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #f8d7da 0%, #f8f9fa 100%);
}
.transaction-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.transaction-details {
  flex: 1;
}
.transaction-description {
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 0.3rem;
}
.transaction-date {
  font-size: 0.85rem;
  color: #666;
}
.transaction-points {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: right;
}
.transaction-points.earned {
  color: #28a745;
}
.transaction-points.redeemed {
  color: #dc3545;
}
.tier-change-badge {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.stat-item {
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  transition: transform 0.3s ease;
}
.stat-item:hover {
  transform: translateY(-4px);
}
.stat-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* Addresses */
.addresses-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.address-item {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  transition: border-color 0.3s ease;
}
.address-item.default {
  border-color: var(--primary-color);
  background: rgba(138, 43, 226, 0.05);
}
.address-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.address-label {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}
.default-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.address-details {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}
.address-actions {
  display: flex;
  gap: 0.5rem;
}
.address-form {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 12px;
}

/* Payment History */
.payment-history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.payment-item {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.3s ease;
  flex-wrap: wrap;
  gap: 1rem;
}
.payment-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.payment-info {
  flex: 1;
  min-width: 200px;
}
.payment-id {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
}
.payment-date {
  font-size: 0.85rem;
  color: #999;
}
.payment-amount-section {
  text-align: right;
}
.payment-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}
.payment-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.payment-status.completed {
  background: #4caf50;
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}
.payment-status.pending {
  background: #ff9800;
  color: white;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}
.payment-status.failed {
  background: #f44336;
  color: white;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}
.payment-status.processing {
  background: #2196F3;
  color: white;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* Security Items */
.security-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.security-item:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}
.security-item strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #333;
}

/* Card Header Flex */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.avatar-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.card { background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.card-header { padding: 0.75rem 1rem; border-bottom: 1px solid #eee; }
.card-body { padding: 1rem; }
.form-feedback { margin-top: 1rem; }

/* Payment Methods */
.payment-method-item {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  margin-bottom: 0.75rem;
}
.payment-method-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.payment-method-item.default {
  border: 2px solid var(--primary);
  background: var(--primary-light);
}
.payment-method-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.payment-icon {
  font-size: 2rem;
}
.payment-method-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Accessibility Styles */
.high-contrast {
  --primary: #FF6B00;
  --text-dark: #000000;
  --text-light: #333333;
  --card-bg: #FFFFFF;
  --border-color: #000000;
}
.high-contrast .card {
  border: 2px solid #000;
}
.high-contrast .btn {
  border: 2px solid currentColor;
  font-weight: 700;
}

.reduce-motion * {
  animation: none !important;
  transition: none !important;
}

/* Default Badge */
.default-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  text-transform: uppercase;
}

/* Highlight a specific review when navigated from notifications */
.review-item.highlight {
    outline: 2px solid var(--primary);
    background: rgba(255, 140, 0, 0.08);
    border-radius: 8px;
}

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    color: var(--espresso);
    letter-spacing: 1px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--cream);
    color: var(--espresso);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-order-now {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-left: 1rem;
}

/* Animation for the "Order Now" button on initial load */
@keyframes initial-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.btn-order-now {
    animation: initial-bounce 2s ease-in-out 1s 2; /* animation-name, duration, timing-function, delay, iteration-count */
}


/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 9000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    z-index: 9001;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.5)) brightness(1.1) contrast(1.1);
    animation: logoGlow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.8)) brightness(1.15) contrast(1.15);
    transform: scale(1.08) rotate(5deg);
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.5)) brightness(1.1) contrast(1.1);
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 140, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 200, 0, 0.4)) brightness(1.15) contrast(1.15);
    }
}

.logo-text {
    font-family: 'Angkor', cursive;
    font-size: 2rem;
    color: #FF8C00;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-shadow: 
        0 0 10px rgba(255, 140, 0, 0.5),
        0 0 20px rgba(255, 140, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    animation: logoTextShine 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.logo-text:hover {
    color: #FFB84D;
    text-shadow: 
        0 0 15px rgba(255, 140, 0, 0.8),
        0 0 30px rgba(255, 140, 0, 0.5),
        0 0 40px rgba(255, 200, 0, 0.3);
    transform: scale(1.05);
}

@keyframes logoTextShine {
    0%, 100% {
        color: #FF8C00;
        text-shadow: 
            0 0 10px rgba(255, 140, 0, 0.5),
            0 0 20px rgba(255, 140, 0, 0.3),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        color: #FFB84D;
        text-shadow: 
            0 0 20px rgba(255, 140, 0, 0.8),
            0 0 35px rgba(255, 140, 0, 0.6),
            0 0 50px rgba(255, 200, 0, 0.4);
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 40px;
        width: 40px;
    }
    .logo-text {
        font-size: 1.5rem;
    }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* User avatar in nav (shown next to greeting) */
#userNameDisplay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, opacity 0.4s ease;
    opacity: 0;
    animation: avatarFadeIn 0.6s ease forwards;
}
@media (max-width: 480px) {
    .nav-avatar { width: 32px; height: 32px; }
}

.nav-avatar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    cursor: pointer;
}

.nav-avatar:hover {
    transform: scale(1.06) rotate(-2deg);
    filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.4));
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

@keyframes avatarFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Nav avatar link styling */
.nav-avatar-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.nav-avatar-link:hover {
    transform: scale(1.05);
}

.nav-username {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

/* Verified badge - Facebook style blue checkmark */
.verified-badge-icon {
    color: #1877f2;
    font-size: 0.9rem;
    background: white;
    border-radius: 50%;
    padding: 1px;
    margin-left: 2px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.verified-badge-icon:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(24, 119, 242, 0.3));
}

/* Avatar Wrapper with Verified Badge */
.nav-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Avatar Verified Badge - positioned on avatar */
.avatar-verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1877f2;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: badge-bounce 0.6s ease;
}

@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive avatar in userNameDisplay */
@media (max-width: 768px) {
    #userNameDisplay {
        gap: 6px;
    }
    
    .nav-avatar {
        width: 32px;
        height: 32px;
    }
    
    .avatar-verified-badge {
        width: 16px;
        height: 16px;
        font-size: 10px;
        bottom: -1px;
        right: -1px;
    }
    
    .verified-badge-icon {
        font-size: 0.85rem;
    }
    
    .nav-username {
        font-size: 0.9rem;
    }
}

/* Bottom App-Style Navigation */
@media (max-width: 768px) {
    body.has-bottom-nav {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 64px;
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--white);
        border-top: 1px solid var(--light-grey);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        z-index: 1001;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    }

    .bottom-nav .bn-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        gap: 4px;
        color: var(--text-light);
        text-decoration: none;
        font-size: 0.7rem;
        position: relative;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav .bn-item i {
        font-size: 1.25rem;
    }

    .bottom-nav .bn-item.active,
    .bottom-nav .bn-item:hover {
        color: var(--primary);
    }

    .bottom-nav .bn-item .badge {
        position: absolute;
        top: 6px;
        right: 24px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        background: var(--primary);
        color: #fff;
        border-radius: 999px;
        font-size: 10px;
        display: none;
        align-items: center;
        justify-content: center;
    }

    .bottom-nav .bn-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--primary);
    }

    .bottom-nav .bn-profile-icon { display: inline-flex; }

    /* Move chatbot up to avoid overlap */
    body.has-bottom-nav .chatbot-container { bottom: 90px; }
}

/* Dark mode adjustments for bottom nav */
:root.dark-mode .bottom-nav {
    background: var(--white);
    border-top-color: var(--border-color);
}
:root.dark-mode .bottom-nav .bn-item { color: var(--text-light); }
:root.dark-mode .bottom-nav .bn-item.active,
:root.dark-mode .bottom-nav .bn-item:hover { color: var(--primary); }

/* Mobile nav controls container */
.mobile-nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile profile button - shown outside menu */
.mobile-profile-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: var(--white);
    position: relative;
}

.mobile-profile-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mobile Profile Button Verified Badge */
.mobile-profile-btn[data-verified="true"]::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1877f2;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: badge-bounce 0.6s ease;
}

/* Icon default - show when no avatar */
.mobile-profile-icon {
    font-size: 30px;
    color: var(--primary);
    transition: color 0.3s ease;
}

.mobile-profile-btn:hover .mobile-profile-icon {
    color: var(--primary-dark);
}

/* Avatar image - show when avatar exists */
.mobile-profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Show mobile profile button only on mobile when logged in */
@media (max-width: 768px) {
    .mobile-profile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9002;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}


.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Profile nav link with avatar */
.nav-link.profile-nav-link {
    gap: 0.4rem;
}

.nav-link-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-link.profile-nav-link:hover .nav-link-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-link i.fa-heart {
    color: #ff4757;
    font-size: 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover i.fa-heart {
    color: #ff6b7a;
}

.nav-link:hover::after {
    width: 100%;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--espresso);
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(255, 140, 0, 0.4);
}

/* Shake animation for cart icon */
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.cart-icon.shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--cream);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Category Switcher */
.category-switcher {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background-color: var(--cream);
    border: 2px solid var(--primary);
    border-radius: 30px;
    color: var(--espresso);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

/* View Mode Switcher */
.view-mode-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 2rem 0;
}

.view-mode-btn {
    width: 44px;
    height: 44px;
    background-color: var(--cream);
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--espresso);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-mode-btn:hover {
    background-color: var(--primary-light);
}

.view-mode-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

/* Menu Page Section */
.menu-page-section {
    padding: 3rem 0;
}

/* Category Filter Bar (Horizontal) */
.category-filter {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 3rem 0;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    background-color: var(--primary-light);
    border-radius: 12px;
}

.category-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary);
    background-color: transparent;
    color: var(--primary);
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
    white-space: nowrap;
}

.category-btn i {
    font-size: 1.1rem;
}

.category-btn:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

.category-btn.active {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.menu-category {
    margin-bottom: 3rem;
}

.menu-category h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.menu-category h3 i {
    font-size: 2.2rem;
    color: var(--primary);
}

/* Static Page Section (for Privacy Policy, etc.) */
.static-page-section {
    padding: 3rem 0;
    background-color: var(--white);
    min-height: 60vh;
}

.static-page-section h4 {
    margin-top: 2rem;
}

.static-page-section ul {
    padding-left: 20px;
}
/* Product Grid */
.products-section {
    padding: 3rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* List View Mode - Larger Cards */
.products-grid.list-view {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2.5rem;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
}

.products-grid.list-view .product-image {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
}

.products-grid.list-view .product-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.products-grid.list-view .product-name {
    font-size: 1.5rem;
}

.products-grid.list-view .product-price {
    font-size: 1.4rem;
}

.products-grid.list-view .product-description {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.favorite-btn i {
    font-size: 1.3rem;
    color: #666;
    transition: all 0.3s ease;
    pointer-events: none;
}

.favorite-btn:hover {
    transform: scale(1.15);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.favorite-btn:hover i {
    color: #ff4757;
}

.favorite-btn.active i {
    color: #ff4757;
    animation: heartBeat 0.3s ease;
}

.favorite-btn:active {
    transform: scale(1.05);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card .add-to-cart {
    margin-top: auto; /* Push button to the bottom */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.product-card:hover .add-to-cart {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255, 140, 0, 0.25);
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: var(--font-body);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: var(--header-height);
    right: -360px;
    width: 100%;
    max-width: 320px;
    height: min(50vh, calc(100vh - var(--header-height)));
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: right 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s;
    overflow-y: auto;
    padding: 1rem;
    display: none;
    border-radius: 12px 0 0 12px;
}

.cart-sidebar.active {
    right: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    display: block;
}

@keyframes cartPopup {
        0% { right: -360px; opacity: 0; }
    60% { right: 10px; }
    100% { right: 0; opacity: 1; }
}

@media (min-width: 992px) {
    .cart-sidebar { max-width: 320px; }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-grey);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-grey);
}

.cart-item-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
}

.cart-item-options {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.cart-item-options small {
    display: block;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    background-color: var(--light-grey);
    border: none;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.quantity-display {
    margin: 0 10px;
    font-weight: 600;
}

.remove-item {
    margin-left: auto;
    color: #c0392b;
    background: #fff;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.remove-item:hover { background: #ffeaea; color: #992d22; transform: translateY(-1px); }
.remove-item i { pointer-events: none; }
.remove-item .remove-text { display: inline; }

/* Highlight newly added cart item so users can find it */
.cart-item.highlight {
    animation: cartPulse 1.2s ease;
}
@keyframes cartPulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); background: rgba(46, 204, 113, 0.08); }
    100% { box-shadow: 0 0 0 18px rgba(46, 204, 113, 0); background: transparent; }
}

:root.dark-mode .remove-item { background: var(--card-bg); border-color: var(--border-color); }
:root.dark-mode .remove-item:hover { background: rgba(220, 53, 69, 0.12); }

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-grey);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--white);
    border-radius: 8px;
    width: 90%;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
    padding: 1.25rem;
    scroll-behavior: smooth;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .modal {
        width: 92%;
        max-width: 380px;
        max-height: 65vh;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .modal {
        width: 90%;
        max-height: 80vh;
        padding: 0.9rem;
        max-width: 340px;
    }
}

.modal::-webkit-scrollbar {
    width: 8px;
}
.modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.modal::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
.modal::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--light-grey);
}

@media (max-width: 480px) {
    .modal-header {
        margin-bottom: 0.8rem;
        padding-bottom: 0.6rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

@media (max-width: 480px) {
    .close-modal {
        font-size: 2rem;
        width: 44px;
        height: 44px;
    }
}

/* Product Detail Modal */
.product-detail {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

@media (max-width: 480px) {
    .product-detail {
        gap: 0.9rem;
    }
}

.product-detail-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .product-detail-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .product-detail-image {
        height: 160px;
    }
}

.product-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.option-label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.option-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 6px 12px;
    background-color: var(--light-grey);
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

/* Reviews Section in Modal */
.reviews-section {
    margin-top: 1rem;
}
.review-item {
    border-bottom: 1px solid var(--light-grey);
    padding: 1rem 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.review-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.4rem;
    border-radius: 8px;
}

.review-user-info:hover {
    background-color: var(--cream);
    transform: translateX(3px);
}

.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.review-user-info:hover .review-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.review-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.review-username {
    font-size: 1rem;
    color: var(--espresso);
    font-weight: 600;
}

.view-profile-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.review-user-info:hover .view-profile-hint {
    color: var(--primary);
}

.review-stars {
    color: #f39c12;
    font-size: 1rem;
}
.review-item p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}
.review-item small {
    color: var(--text-light);
}
.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}
.reaction-bar { display:flex; align-items:center; gap:10px; margin-top:6px; }
.reaction-buttons { display:flex; gap:6px; }
.reaction-btn { background: var(--cream); border:1px solid var(--primary); color: var(--espresso); padding:4px 10px; font-size:0.75rem; border-radius:16px; cursor:pointer; line-height:1; display:flex; align-items:center; gap:4px; transition: var(--transition); }
.reaction-btn:hover { background: var(--primary); color:#fff; }
.reaction-btn.active { background: var(--primary); color:#fff; }
.reaction-counts { 
    font-size: 0.8rem; 
    color: var(--text-light); 
    display: flex; 
    gap: 12px; 
    align-items: center;
}

.reaction-count-item { 
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
    padding: 4px 10px;
    background: var(--cream);
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.reaction-count-item:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}
.delete-review-btn {
    background: none;
    border: none;
    color: #dc3545; /* Red color for delete */
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.delete-review-btn:hover {
    background-color: #fbeaea;
}

/* See More Reviews Button */
.see-more-reviews {
    display: block;
    margin: 1.5rem auto 1rem;
    padding: 10px 24px;
    background: var(--cream);
    border: 2px solid var(--primary);
    color: var(--espresso);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.see-more-reviews:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 53, 36, 0.2);
}
.see-more-reviews i {
    transition: transform 0.3s ease;
}
.see-more-reviews:hover i {
    transform: translateY(2px);
}

.review-form {
    margin-top: 1.5rem;
    background-color: var(--light-grey);
    padding: 1rem;
    border-radius: 8px;
}
.star-rating {
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    margin-bottom: 1rem;
}
.star-rating .fas {
    color: #f39c12;
}
.review-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 80px;
    margin-bottom: 1rem;
}

/* Submit Review Button Animation */
#submitReviewBtn.submitting {
    cursor: not-allowed;
}
#submitReviewBtn.submitted-success {
    background-color: #28a745; /* Green success color */
    color: var(--white);
    border-color: #28a745;
}

.option-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Special styling for taste buttons */
.option-btn[data-option="taste"],
.option-btn[data-option="spicyLevel"] {
    font-size: 0.9rem;
}

.option-btn[data-option="taste"][data-value="spicy"].active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-color: #ee5a24;
}

.option-btn[data-option="taste"][data-value="sweet"].active {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    border-color: #ff9ff3;
    color: #333;
}

.option-btn[data-option="taste"][data-value="sour"].active {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
    border-color: #0abde3;
}

.option-btn[data-option="taste"][data-value="salty"].active {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    border-color: #6c5ce7;
}

.option-btn[data-option="spicyLevel"].active {
    background: linear-gradient(135deg, #ff6348 0%, #d63031 100%);
    border-color: #d63031;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.75rem;
}

/* Payment Modal */
.payment-modal {
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
}

.qr-container {
    text-align: center;
    margin: 1rem 0;
}

.qr-code {
    width: 150px;
    height: 150px;
    background-color: var(--light-grey);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.qr-container p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.order-summary {
    background-color: var(--light-grey);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.order-summary h4 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.order-item-options {
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
}

.order-item-options small {
    display: block;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--text-light);
}

.file-upload {
    margin: 1rem 0;
}

.file-upload label {
    font-size: 0.95rem;
}

.file-upload small {
    font-size: 0.8rem;
}

.file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--primary);
    border-radius: 8px;
    background-color: var(--cream);
    text-align: center;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: var(--primary-dark);
    background-color: #fff5e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
}

.file-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

/* Auth Modal */
.auth-modal {
    max-width: 400px;
}

@media (max-width: 480px) {
    .auth-modal {
        max-width: 340px;
        max-height: 75vh;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 1.2rem;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.chat-tooltip {
    position: absolute;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 260px;
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--primary);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    display: none;
}

.chat-tooltip.show { display: block; }

.chat-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

@media (max-width: 480px) {
    .chat-tooltip {
        max-width: 220px;
        font-size: 0.85rem;
        bottom: 64px;
    }
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    70% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-icon-img {
    width: 36px; /* Adjust size as needed */
    height: 36px; /* Adjust size as needed */
    z-index: 1;
    transition: transform 0.3s ease;
}

.chatbot-toggle:hover .chatbot-icon-img {
    transform: scale(1.15);
}


.chat-window {
    position: absolute;
    bottom: 80px;
    left: 50%;
    width: 360px;
    height: 450px;
    max-width: 90vw;
    max-height: 75vh;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: var(--transition);
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.chat-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
}

.close-chat {
    background: none;
    border: none;
    color: var(--white);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

.message.bot {
    align-self: flex-start;
}

.message.bot p {
    background-color: var(--light-grey);
    border-radius: 18px 18px 18px 4px;
    padding: 10px 15px;
    margin: 0;
    color: var(--text-dark);
}

.message.user {
    align-self: flex-end;
}

.message.user p {
    background-color: var(--primary-light);
    color: var(--espresso);
    border-radius: 18px 18px 4px 18px;
    padding: 10px 15px;
    margin: 0;
}

.message .timestamp {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

.message.bot .timestamp {
    margin-left: 5px;
}

.message.user .timestamp {
    text-align: right;
    margin-right: 5px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #ccc;
    border-radius: 50%;
    animation: typing 1s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--light-grey);
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 0.5rem;
    background-color: var(--light-grey);
}

/* Footer */
footer {
    background-color: var(--espresso);
    color: var(--cream);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--cream);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--cream);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--espresso);
    color: var(--cream);
    z-index: 1001;
    padding: 1.5rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-consent-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-consent-banner p {
    margin: 0;
    color: var(--cream);
    flex-grow: 1;
}

.cookie-consent-banner a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Back to Home Button */
.back-to-home-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 50px;
    height: 50px;
    background-color: var(--espresso);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: var(--shadow);
    z-index: 999;
    transition: var(--transition);
    font-size: 1.5rem;
}

.back-to-home-btn:hover {
    background-color: var(--primary);
    transform: scale(1.1);
}

/* Brand Name Style */
.navbar .logo, .brand-name {
    font-family: 'Angkor', cursive;
    font-size: 2.4rem; /* Slightly larger for prominence */
    color: #FF8C00; /* Unified to primary orange */
    font-weight: 700; /* Sharper presence */
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #FF8C00 0%, #e67e00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Chatbot Style Enhancements --- */
.chat-window {
    background-color: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    overflow: hidden; /* Ensures child elements conform to border radius */
}

.chat-header {
    background-color: #E87A00;
    color: white;
    padding: 15px;
}

.chat-header h4 {
    margin: 0;
    font-family: 'Battambang', sans-serif;
}

.chat-messages {
    padding: 15px;
    flex: 1;
    min-height: 0; /* allow flexbox to shrink properly */
    overflow-y: auto;
    background-color: #fff;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message p {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
}

.message .chat-image {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 8px;
}

.message.bot p {
    background-color: #f1f0f0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user p {
    background-color: #E87A00;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Chatbot option buttons */
.chat-options button {
    background-color: #fff;
    border: 1px solid #E87A00;
    color: #E87A00;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    margin: 4px 2px;
    transition: all 0.3s ease;
}

.chat-options button:hover {
    background-color: #E87A00;
    color: #fff;
}

/* --- Chatbot Responsiveness --- */
/* Handled in responsive.css */

/* --- Chatbot Mobile Menu Item (Hidden by default) --- */
.chatbot-menu-item {
    display: none;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .chatbot-menu-item {
        display: flex;
    }
}

/* --- Messenger-like Typing Indicator --- */
@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* "Add to Cart" button success animation */
#addToCartModal.added {
    background-color: #28a745; /* Green success color */
    transform: scale(1.02);
    pointer-events: none; /* Prevent multiple clicks */
}

/* Enhanced Notification System */
.notification-container {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10000; /* above sticky header */
    width: 320px;
    max-width: calc(100vw - 40px);
}

.notification {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #fff;
    padding: 14px 16px 18px 16px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.4;
    overflow: hidden;
    transform: translateX(120%);
    animation: slideIn 0.45s cubic-bezier(.25,.8,.25,1) forwards;
}

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.notification.info { background: linear-gradient(135deg, var(--primary) 0%, #ffad33 100%); }
.notification.success { background: linear-gradient(135deg, #28a745 0%, #2ecc71 100%); }
.notification.error { background: linear-gradient(135deg, #dc3545 0%, #ff596d 100%); }

.notification .icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.notification.info .icon { filter: drop-shadow(0 2px 4px rgba(255,140,0,0.4)); }
.notification.success .icon { filter: drop-shadow(0 2px 4px rgba(40,167,69,0.4)); }
.notification.error .icon { filter: drop-shadow(0 2px 4px rgba(220,53,69,0.4)); }

.notification .close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255,255,255,0.25);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    transition: background 0.25s ease;
}
.notification .close-btn:hover { background: rgba(255,255,255,0.45); }

.notification .message-text { flex: 1; }

.notification .progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,0.6);
    width: 100%;
    transform-origin: left;
    animation: progressBar linear var(--timeout);
}
.bell-wrapper {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--espresso);
    display: flex;
    align-items: center;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}
.bell-wrapper:hover { color: var(--primary); }
.notif-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 6px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    min-width: 18px;
    text-align: center;
}

/* Unified badge styles: ensure cart/notification/bottom-nav badges look consistent across pages */
.cart-count,
.notif-count,
.badge,
#bnCartCount,
#bnNotifCount {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary);
    color: var(--white);
    min-width: 18px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: none;
}

/* Ensure parent icons have relative positioning so absolute badges align correctly */
.cart-icon, .bell-wrapper, .bn-item, .mobile-action-bar .cart-icon, .mobile-action-bar .bell-wrapper {
    position: relative;
}

.notifications-panel {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    z-index: 10000; /* above sticky header */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.notifications-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.notifications-panel .notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
.notifications-panel .close-notif {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}
.notif-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafafa;
}
.notif-list::-webkit-scrollbar { width: 8px; }
.notif-list::-webkit-scrollbar-track { background: #eee; border-radius: 8px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 8px; }
.notif-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.25s, transform 0.2s ease, opacity 0.2s ease, height 0.25s ease, margin 0.25s ease, padding 0.25s ease;
    position: relative;
    touch-action: pan-y;
}
.notif-item.unread { border-left: 4px solid var(--primary); }
.notif-item.read { opacity: 0.75; }
.notif-item:hover { background: #f5f5f5; }
.notif-item.success { border-left-color: #28a745; }
.notif-item.error { border-left-color: #dc3545; }
.notif-item.reaction { border-left-color: #ff4fa3; }
.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}
.notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-message { margin: 0 0 4px 0; font-weight: 500; }
.notif-footer { padding: 10px 14px; background: #fff; }
.notif-footer .btn { font-size: 0.8rem; }
.notif-list .empty { text-align: center; color: var(--text-light); padding: 30px 0; }

/* Delete button on each notification */
.notif-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--light-grey);
    color: #c0392b;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.notif-delete-btn:hover { transform: scale(1.1); background: #ffeaea; }

/* Swipe-out animations */
.notif-item.swipe-out-right, .notif-item.swipe-out-left {
    opacity: 0;
    transform: translateX(120%);
    margin: 0;
    height: 0;
    padding-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0;
}
.notif-item.swipe-out-left { transform: translateX(-120%); }
@keyframes progressBar {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Surprise Celebration Modal */
.surprise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.surprise-overlay.active {
    opacity: 1;
    visibility: visible;
}

.surprise-modal {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #fef5e7 100%);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.surprise-overlay.active .surprise-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    top: -10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.surprise-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.celebration-icon {
    font-size: 5rem;
    color: #28a745;
    margin-bottom: 1rem;
    animation: celebrationPulse 1s ease-in-out infinite;
}

@keyframes celebrationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.celebration-title {
    font-size: 2rem;
    color: var(--espresso);
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.celebration-title span {
    color: var(--primary);
    display: inline-block;
    animation: nameHighlight 2s ease-in-out infinite;
}

@keyframes nameHighlight {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

.celebration-message {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.celebration-submessage {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.celebration-order-info {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.order-number,
.order-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    margin: 0.5rem 0;
    color: var(--espresso);
}

.order-number i,
.order-total i {
    color: var(--primary);
    font-size: 1.2rem;
}

.order-number strong,
.order-total strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.celebration-close-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.celebration-close-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.4);
}

.celebration-close-btn i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(0.9); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .surprise-modal {
        padding: 1.8rem;
        max-width: 95%;
    }
    
    .celebration-icon {
        font-size: 3.5rem;
    }
    
    .celebration-title {
        font-size: 1.5rem;
    }
    
    .celebration-message {
        font-size: 1.1rem;
    }
    
    .celebration-submessage {
        font-size: 0.9rem;
    }
    
    .order-number,
    .order-total {
        font-size: 0.95rem;
    }
}

/* Mobile bottom-sheet style for notifications */
@media (max-width: 768px) {
    .notifications-panel {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: 60vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(10px);
    }
    .notifications-panel.active {
        transform: translateY(0);
    }
    .notif-list { max-height: calc(60vh - 110px); }
    /* Ensure avatar displays on mobile */
    .notif-avatar {
        width: 36px;
        height: 36px;
    }
}

/* Scrollbar styling inside chat for nicer UI */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}
.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    color: #fff;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.45));
}
.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
    z-index: 2;
}

/* Hero Controls */
.hero-controls {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none; /* allow inner buttons to capture */
}
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}
.hero-arrow:hover { background: rgba(0,0,0,0.6); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
    pointer-events: auto;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.hero-dot.active { background: #fff; transform: scale(1.2); }

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.theme-toggle:hover {
    background: rgba(255, 140, 0, 0.1);
    transform: rotate(15deg);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

/* Dark mode specific adjustments */
:root.dark-mode .modal,
:root.dark-mode .card,
:root.dark-mode .product-card,
:root.dark-mode .cart-sidebar {
    background-color: var(--card-bg);
    color: var(--text-dark);
}

:root.dark-mode .modal-content,
:root.dark-mode .product-card {
    border-color: var(--border-color);
}

:root.dark-mode input,
:root.dark-mode textarea,
:root.dark-mode select {
    background-color: var(--light-grey);
    color: var(--text-dark);
    border-color: var(--border-color);
}

:root.dark-mode input::placeholder,
:root.dark-mode textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

:root.dark-mode .navbar {
    background-color: var(--white);
    border-bottom-color: var(--border-color);
}

:root.dark-mode .nav-links a {
    color: var(--text-dark);
}

:root.dark-mode .nav-links a:hover {
    color: var(--primary);
}

:root.dark-mode .hero-overlay {
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.75));
}

:root.dark-mode .hero h1 {
    color: var(--text-dark);
    text-shadow: 0 2px 10px rgba(255, 140, 0, 0.3);
}

:root.dark-mode .hero p {
    color: var(--text-light);
}

:root.dark-mode .section-title,
:root.dark-mode h1,
:root.dark-mode h2,
:root.dark-mode h3,
:root.dark-mode h4,
:root.dark-mode h5,
:root.dark-mode h6 {
    color: var(--text-dark);
}

:root.dark-mode .product-name {
    color: var(--text-dark);
}

:root.dark-mode .product-description {
    color: var(--text-light);
}

:root.dark-mode .product-price {
    color: var(--primary);
}

:root.dark-mode .review-item {
    border-bottom-color: var(--border-color);
    color: var(--text-dark);
}

:root.dark-mode .review-item p {
    color: var(--text-light);
}

:root.dark-mode .review-item small {
    color: var(--text-light);
}

:root.dark-mode .category-filter {
    background-color: rgba(255, 140, 0, 0.15);
}

:root.dark-mode .category-btn {
    background-color: var(--light-grey);
    color: var(--text-dark);
    border-color: var(--primary);
}

:root.dark-mode .category-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

:root.dark-mode .btn-secondary {
    background-color: var(--light-grey);
    color: var(--text-dark);
    border-color: var(--primary);
}

:root.dark-mode .btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

:root.dark-mode .cart-item h4,
:root.dark-mode .cart-item p {
    color: var(--text-dark);
}

:root.dark-mode .modal-header h2,
:root.dark-mode .modal-body label,
:root.dark-mode .modal-body p {
    color: var(--text-dark);
}

:root.dark-mode .footer {
    background-color: var(--card-bg);
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

:root.dark-mode .footer a {
    color: var(--text-light);
}

:root.dark-mode .footer a:hover {
    color: var(--primary);
}

:root.dark-mode .static-page-section,
:root.dark-mode .profile-section,
:root.dark-mode .order-history-section {
    color: var(--text-dark);
}

:root.dark-mode .static-page-section p,
:root.dark-mode .static-page-section li {
    color: var(--text-light);
}

:root.dark-mode table {
    color: var(--text-dark);
}

:root.dark-mode table thead {
    background-color: var(--light-grey);
    color: var(--text-dark);
}

:root.dark-mode table tbody tr {
    border-bottom-color: var(--border-color);
}

:root.dark-mode table tbody tr:hover {
    background-color: var(--light-grey);
}

:root.dark-mode .notification {
    background-color: var(--card-bg);
    color: var(--text-dark);
    border-color: var(--border-color);
}

:root.dark-mode .see-more-reviews {
    background-color: var(--light-grey);
    color: var(--text-dark);
}

:root.dark-mode .see-more-reviews:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Reaction List Modal */
.reaction-list-modal {
    max-width: 480px;
}
.reaction-list-content {
    max-height: 420px;
    overflow-y: auto;
    padding: 1rem;
}
.reactor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--light-grey);
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 12px;
}

.reactor-item:hover {
    background: var(--cream);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reactor-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
    transition: var(--transition);
}

.reactor-item:hover .reactor-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.reactor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.reactor-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.reactor-type {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Public Profile Modal */
.profile-modal {
    max-width: 540px;
}
.public-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff5e6 0%, var(--cream) 100%);
    border-radius: 12px;
    margin-bottom: 1.2rem;
    border: 2px solid rgba(255, 140, 0, 0.1);
}

.public-profile-avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.3);
    flex-shrink: 0;
}

.public-profile-info {
    flex: 1;
}

.public-profile-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--espresso);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-role {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-email {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.public-profile-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-box {
    text-align: center;
    padding: 1.25rem 0.75rem;
    border-radius: 10px;
    background: var(--light-grey);
    transition: transform 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
}

.stat-box .stat-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-box .stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Simplified stat box for single stat display */
.stat-box-simple {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cream) 0%, #fff5e6 100%);
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.stat-box-simple:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.2);
}

.stat-box-simple .stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.stat-box-simple .stat-content {
    flex: 1;
    text-align: left;
}

.stat-box-simple .stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.stat-box-simple .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Clickable usernames in reviews */
.review-username.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}
.review-username.clickable:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Clickable reaction counts */
.reaction-count-item {
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
}
.reaction-count-item:hover {
    color: var(--primary);
    transform: scale(1.08);
}

/* Dark mode for new modals */
:root.dark-mode .reactor-item {
    border-bottom-color: var(--border-color);
}
:root.dark-mode .reactor-item:hover {
    background: var(--light-grey);
}
:root.dark-mode .reactor-name {
    color: var(--text-dark);
}
:root.dark-mode .public-profile-header {
    background: linear-gradient(135deg, var(--light-grey) 0%, var(--card-bg) 100%);
}
:root.dark-mode .public-profile-info h4 {
    color: var(--text-dark);
}
:root.dark-mode .stat-box {
    background: var(--light-grey);
}
:root.dark-mode .stat-box .stat-value {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .hero-arrow { width: 36px; height: 36px; }
    .hero-arrow.prev { left: 12px; }
    .hero-arrow.next { right: 12px; }
    .hero-dots { bottom: 12px; gap: 6px; }
    .hero-dot { width: 8px; height: 8px; }
}
.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .hero { min-height: 60vh; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
}