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

:root {
  --primary: #570000;
  --primary-hover: #3d0000;
  --secondary: #570000;
  --button: #570000;
  --text-main: #000000;
  --text-muted: #454545;
  --page-bg: #F5F5F5;
  --primary-rgb: 87 0 0;
  --btn-green: #15803d;
  --offer-red: #dc2626;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--page-bg);
  color: var(--text-main);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.bg-brandPrimary { background-color: var(--primary); }
.text-brandPrimary { color: var(--primary); }
.border-brandPrimary { border-color: var(--primary); }

.bg-brandOrange { background-color: #570000; }
.text-brandOrange { color: #570000; }
.border-brandOrange { border-color: #570000; }
.text-brandBlue { color: #570000; }
.text-btnGreen { color: #15803d; }

/* Global Smooth Transitions */
a, button, input, select, textarea, .payment-method-card, .category-tile {
  transition: all 0.25s var(--ease-spring);
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(87, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(87, 0, 0, 0);
  }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes softRipple {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Animation Utility Classes */
.animate-fade-in {
  animation: fadeIn 0.4s var(--ease-spring) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.45s var(--ease-spring) forwards;
}

.animate-pop-in {
  animation: popIn 0.35s var(--ease-bounce) forwards;
}

.animate-float {
  animation: floatSlow 4s ease-in-out infinite;
}

.animate-soft-ripple {
  animation: softRipple 2.5s ease-in-out infinite;
}

/* Offer Marquee Banner */
.offer-banner {
  background: linear-gradient(135deg, #570000 0%, #7a0000 50%, #570000 100%);
}

@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  width: 200%;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 30px;
}

/* Product Cards micro-interactions */
.product-card {
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.2s ease;
  background: #ffffff;
  will-change: transform, box-shadow;
}

.product-card img {
  transition: transform 0.4s var(--ease-spring);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px -6px rgba(87, 0, 0, 0.14), 0 8px 12px -6px rgba(0, 0, 0, 0.04);
}

.product-card:hover img {
  transform: scale(1.06);
}

.product-card-badge-offer {
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.product-card-badge-delivery {
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.15);
}

.cart-add-button {
  border-color: #570000;
  color: #570000;
  background-color: #ffffff;
  transition: all 0.2s var(--ease-spring);
}

.cart-add-button:hover {
  background-color: #570000;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(87, 0, 0, 0.25);
}

.cart-add-button:active {
  transform: scale(0.95);
}

/* Payment Method Cards */
.payment-method-card {
  transition: all 0.25s var(--ease-spring);
}

.payment-method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.payment-method-card.active {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Overlay and Drawers */
.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-spring);
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: #ffffff;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-spring);
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 35px rgba(0, 0, 0, 0.18);
}

.side-menu.active {
  transform: translateX(0);
}

/* Modal Popup Smooth Spring Animation */
.modal-checkout-popup, #payment-modal > div {
  transition: transform 0.35s var(--ease-spring), opacity 0.35s var(--ease-spring);
}

.modal-checkout-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.94);
  width: 92%;
  max-width: 440px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 24px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-checkout-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal Scrollable Items List */
#cart-modal-items {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

#cart-modal-items::-webkit-scrollbar {
  width: 6px;
}

#cart-modal-items::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

#cart-modal-items::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}

#cart-modal-items::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.45);
}

/* Scrollbars */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Category Selected Pill */
.category-tile {
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-2px) scale(1.02);
}

.category-tile.active {
  border-color: #570000 !important;
  box-shadow: 0 6px 18px rgba(87, 0, 0, 0.22);
  opacity: 1 !important;
  transform: scale(1.06);
}

.pop-btn {
  transition: transform 0.2s var(--ease-spring), background-color 0.2s ease, box-shadow 0.2s ease;
}

.pop-btn:hover {
  transform: translateY(-1.5px);
}

.pop-btn:active {
  transform: scale(0.95);
}

/* Input Focus Smooth Glow */
input:focus, select:focus, textarea:focus {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 3px rgba(87, 0, 0, 0.12);
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(24px) scale(0.95);
  background: #570000;
  color: white;
  padding: 11px 22px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(87, 0, 0, 0.45);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease-spring);
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
