/* ==========================================================================
   KamRekh - Universal Ultra-Responsive & Fluid Stylesheet
   Designed for all Smartphones (iOS/Android), Foldables, Tablets/iPads,
   Laptops, Ultra-wides & Retina Displays.
   ========================================================================== */

:root {
  --primary: #2874f0;
  --primary-dark: #1a5bbf;
  --primary-glow: rgba(40, 116, 240, 0.25);
  --accent: #fb641b;
  --accent-hover: #e5571a;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --sidebar-w: clamp(210px, 18vw, 260px);
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button, input, select {
  font: inherit;
  outline: none;
  border: none;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #1d4ed8 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding-top: var(--safe-top);
  backdrop-filter: blur(10px);
}

.header-top {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 18px);
  padding: 8px clamp(12px, 3vw, 24px);
  min-height: var(--header-h);
}

/* Logo */
.logo {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: #ffffff;
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  user-select: none;
}

.logo-k, .logo-r {
  color: #facc15;
  font-size: 1.2em;
  font-weight: 900;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo small {
  font-size: 0.45em;
  color: #bfdbfe;
  font-style: italic;
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0.5px;
  display: inline-block;
}

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 720px;
  display: flex;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: var(--transition);
}

.search-bar:focus-within {
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.5);
}

.search-cat {
  padding: 0 clamp(8px, 1.2vw, 14px);
  background: #f1f5f9;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  border-right: 1px solid var(--border-light);
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  color: #0f172a;
  min-width: 80px;
}

.search-btn {
  background: var(--accent);
  color: #ffffff;
  padding: 0 clamp(14px, 2vw, 22px);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--accent-hover);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 14px);
  flex-shrink: 0;
}

.btn-login {
  background: #ffffff;
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 7px clamp(10px, 1.5vw, 18px);
  font-weight: 700;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-login:hover {
  background: #eff6ff;
  transform: translateY(-1px);
}

.icon-btn {
  color: #ffffff;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  position: relative;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: -2px;
  right: -3px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2563eb;
}

.user-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255,255,255,0.18);
  padding: 5px 12px;
  border-radius: 20px;
}

.btn-logout {
  background: none;
  border: none;
  color: #fca5a5;
  cursor: pointer;
  margin-left: 6px;
  font-size: 0.8rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  width: 22px;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */
.page-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
  position: relative;
}

/* ==========================================================================
   LEFT VERTICAL SIDEBAR
   ========================================================================== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card-bg);
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.05);
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top));
  height: calc(100vh - var(--header-h) - var(--safe-top));
  height: calc(100dvh - var(--header-h) - var(--safe-top));
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: var(--transition);
  border-right: 1px solid var(--border-light);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.sidebar-title {
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-menu {
  padding: 8px 0;
}

.sidebar-item {
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  user-select: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  transition: var(--transition);
  font-size: clamp(0.82rem, 1vw, 0.9rem);
  font-weight: 500;
  color: #334155;
}

.sidebar-link:hover,
.sidebar-item.active > .sidebar-link {
  background: #eff6ff;
  color: var(--primary);
}

.sidebar-item.active > .sidebar-link {
  border-left: 4px solid var(--primary);
  font-weight: 700;
}

.s-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.s-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  color: #94a3b8;
  transition: var(--transition);
}

.sidebar-item.active > .sidebar-link .s-arrow {
  transform: rotate(90deg);
  color: var(--primary);
}

.sidebar-sub {
  display: none;
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  margin-left: 14px;
}

.sidebar-item.active .sidebar-sub {
  display: block;
}

.sidebar-sub li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.8rem;
  color: #64748b;
  transition: var(--transition);
  border-bottom: 1px solid #e2e8f0;
}

.sidebar-sub li a:hover {
  color: var(--primary);
  padding-left: 18px;
  background: #eff6ff;
}

.offer-item .sidebar-link {
  color: #ea580c;
  font-weight: 700;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 99;
  backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
  display: block;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
  flex: 1;
  min-width: 0;
  padding-bottom: clamp(30px, 5vw, 60px);
}

/* Offer Strip */
.offer-strip {
  background: linear-gradient(90deg, #1d4ed8, #ea580c, #1d4ed8);
  background-size: 200% 100%;
  animation: stripGradient 6s linear infinite;
  color: #ffffff;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  font-weight: 600;
  padding: 7px 0;
}

@keyframes stripGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero Slider */
.hero {
  position: relative;
  overflow: hidden;
  height: clamp(180px, 32vw, 360px);
  margin: clamp(10px, 1.5vw, 16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-slider {
  height: 100%;
}

.slide {
  display: none;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0; left: 0;
  padding: clamp(14px, 3vw, 30px);
}

.slide.active {
  display: flex;
}

.slide-content {
  text-align: center;
  color: #ffffff;
  max-width: 650px;
}

.slide-content h1 {
  font-size: clamp(1.2rem, 3.2vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.25;
}

.slide-content p {
  font-size: clamp(0.8rem, 1.5vw, 1.05rem);
  margin-bottom: 16px;
  opacity: 0.92;
}

.slide-content.dark h1,
.slide-content.dark p {
  color: #0f172a;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--primary);
  border-radius: 50px;
  padding: clamp(8px, 1.2vw, 12px) clamp(20px, 2.5vw, 32px);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.dark-btn {
  background: #0f172a;
  color: #ffffff;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  color: #ffffff;
  border-radius: 50%;
  width: clamp(32px, 4vw, 42px);
  height: clamp(32px, 4vw, 42px);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
}

.prev { left: 12px; }
.next { right: 12px; }

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
}

/* Promo Banners */
.promo-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(10px, 1.5vw, 16px);
  padding: 0 clamp(10px, 1.5vw, 16px) clamp(12px, 2vw, 20px);
}

.promo-card {
  border-radius: var(--radius);
  padding: clamp(14px, 2vw, 22px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.promo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.promo-card i {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  opacity: 0.9;
  flex-shrink: 0;
}

.promo-card h3 {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 700;
  margin-bottom: 2px;
}

.promo-card p {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  opacity: 0.9;
  margin-bottom: 8px;
}

.promo-card a {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-block;
  transition: var(--transition);
}

.promo-card a:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Products Section */
.section {
  padding: 0 clamp(10px, 1.5vw, 16px);
}

.section-title {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  padding-left: 12px;
  color: #0f172a;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* Products Grid - Ultra Fluid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 20vw, 220px), 1fr));
  gap: clamp(10px, 1.5vw, 18px);
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid #f1f5f9;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.badge-sale, .badge-new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  z-index: 2;
  letter-spacing: 0.3px;
}

.badge-new {
  background: #10b981;
}

.product-img {
  height: clamp(140px, 18vw, 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 8px;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.35s ease;
}

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

.product-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  margin-bottom: 4px;
}

.quick-view-btn {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  transition: var(--transition);
  cursor: pointer;
}

.quick-view-btn:hover {
  background: #e2e8f0;
  color: var(--primary);
}

/* Product Detail Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(5px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px;
  animation: modalPop 0.25s ease-out;
}

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

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: #e2e8f0;
  color: #ef4444;
}

.modal-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
}

.modal-img-wrap img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 640px) {
  .modal-content {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
}

/* ==========================================================================
   CART DRAWER & ORDER SYSTEM STYLES
   ========================================================================== */

/* Cart Drawer Slider */
.cart-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: flex-end;
}

.cart-drawer-overlay.active {
  display: flex;
}

.cart-drawer {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  animation: slideDrawer 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.cart-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #ef4444;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 75px 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #ffffff;
  align-items: center;
}

.cart-item-img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 6px;
  background: #f8fafc;
}

.cart-item-details h4 {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-details .cart-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

.cart-qty-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.qty-btn:hover {
  background: #e2e8f0;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 6px;
  font-size: 1rem;
}

.cart-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #475569;
}

.cart-summary-row.total-row {
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1.05rem;
  color: #0f172a;
}

.btn-checkout {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
  padding: 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(251, 100, 27, 0.3);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 100, 27, 0.4);
}

/* Checkout Modal */
.checkout-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px clamp(16px, 3vw, 28px);
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.checkout-header {
  margin-bottom: 18px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

.checkout-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.form-group-compact {
  margin-bottom: 12px;
}

.form-group-compact label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.form-group-compact input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: #f8fafc;
}

.form-group-compact input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.pay-option:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.pay-option strong {
  font-size: 0.86rem;
  color: #0f172a;
}

.pay-option p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-bill-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}

.btn-place-order {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-place-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

/* Success Order Modal */
.success-modal-content {
  background: #ffffff;
  border-radius: 18px;
  max-width: 460px;
  width: 100%;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.success-icon-wrap {
  width: 70px;
  height: 70px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.order-receipt-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  text-align: left;
}

/* My Orders Tracking Modal */
.orders-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.orders-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-record-card {
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
}

.order-record-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.order-status-badge {
  background: #dcfce7;
  color: #16a34a;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 20px;
}

.order-tracking-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px;
  padding: 0 10px;
  font-size: 0.72rem;
  color: #64748b;
  position: relative;
}

.track-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.track-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-items-preview {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
}

.order-item-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.order-item-chip img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
}

.product-info {
  padding: clamp(10px, 1.2vw, 14px);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.product-info h3 {
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}

.stars {
  font-size: 0.78rem;
  color: #f59e0b;
}

.stars span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.new-price {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 800;
  color: #0f172a;
}

.old-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.add-cart {
  margin-top: auto;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  cursor: pointer;
}

.add-cart:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: clamp(28px, 4vw, 44px) clamp(16px, 3vw, 32px) var(--safe-bottom);
  margin-top: clamp(20px, 3vw, 40px);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  padding-bottom: 24px;
  border-bottom: 1px solid #1e293b;
}

.footer h4 {
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer ul li {
  margin-bottom: 6px;
}

.footer ul li a {
  font-size: 0.82rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.footer ul li a:hover {
  color: #ffffff;
}

.social-links {
  display: flex;
  gap: 8px;
}

.social-links a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.app-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.app-btn {
  background: #1e293b;
  color: #ffffff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom {
  text-align: center;
  padding: 16px 0 6px;
  font-size: 0.78rem;
  color: #64748b;
}

/* Toast */
.toast {
  position: fixed;
  bottom: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast i {
  color: #10b981;
}

/* ==========================================================================
   LOGIN & AUTH PAGE
   ========================================================================== */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 80% 20%, #1e3a8a, #0f172a 70%);
  padding: clamp(12px, 3vw, 24px);
  position: relative;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  max-width: 860px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
}

.login-banner {
  background: linear-gradient(145deg, #1d4ed8 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 44px);
  color: #ffffff;
  text-align: center;
}

.login-banner .logo {
  margin-bottom: 20px;
}

.login-banner h2 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.login-banner p {
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.5;
}

.login-banner-icons {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.login-form-wrap {
  padding: clamp(24px, 4vw, 44px);
  background: #ffffff;
}

.login-form-wrap h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  color: #0f172a;
}

.login-form-wrap p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.login-tabs {
  display: flex;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.login-tab {
  flex: 1;
  padding: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.login-tab.active {
  background: var(--primary);
  color: #ffffff;
}

.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
  background: #f8fafc;
}

.form-group input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group .input-icon {
  position: absolute;
  left: 12px;
  top: 32px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.show-pass {
  position: absolute;
  right: 12px;
  top: 32px;
  color: #94a3b8;
  cursor: pointer;
  background: none;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 0.8rem;
}

.form-row a {
  color: var(--primary);
  font-weight: 600;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.divider {
  text-align: center;
  color: #94a3b8;
  margin: 16px 0;
  font-size: 0.78rem;
  position: relative;
}

.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border-light);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.social-login {
  display: flex;
  gap: 10px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.social-btn .fa-google { color: #ea4335; }
.social-btn .fa-facebook { color: #1877f2; }

.signup-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.signup-link a {
  color: var(--primary);
  font-weight: 700;
}

.otp-info {
  background: #eff6ff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #1e40af;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   DEVICE SPECIFIC ADAPTATIONS & BREAKPOINTS
   ========================================================================== */

/* Laptop & Large Desktop */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* iPad Landscape & Small Laptops (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets, iPad Portrait, Foldables Unfolded (<= 991px) */
@media (max-width: 991px) {
  :root {
    --sidebar-w: 250px;
  }

  .hamburger {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .login-container {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .login-banner {
    display: none;
  }
}

/* Standard Smartphones (iPhone 12/13/14/15/16, Samsung Galaxy S, Pixel) (<= 768px) */
@media (max-width: 768px) {
  .search-cat {
    display: none;
  }

  .btn-login span {
    display: none;
  }

  .btn-login {
    padding: 7px 11px;
  }

  .hero {
    height: clamp(160px, 45vw, 240px);
    margin: 8px;
  }

  .promo-banners {
    grid-template-columns: 1fr;
    padding: 0 8px 12px;
  }

  .section {
    padding: 0 8px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-img {
    height: 130px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Screen Phones (Galaxy Fold Closed, iPhone SE, etc. <= 380px) */
@media (max-width: 380px) {
  .logo small {
    display: none;
  }

  .header-top {
    padding: 6px 10px;
    gap: 8px;
  }

  .search-bar input {
    padding: 8px 10px;
  }

  .search-btn {
    padding: 0 12px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  /* ==========================================================================
   CART DRAWER & ORDER SYSTEM STYLES
   ========================================================================== */

/* Cart Drawer Slider */
.cart-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: flex-end;
}

.cart-drawer-overlay.active {
  display: flex;
}

.cart-drawer {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  animation: slideDrawer 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.cart-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #ef4444;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 75px 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #ffffff;
  align-items: center;
}

.cart-item-img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 6px;
  background: #f8fafc;
}

.cart-item-details h4 {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-details .cart-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

.cart-qty-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.qty-btn:hover {
  background: #e2e8f0;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 6px;
  font-size: 1rem;
}

.cart-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #475569;
}

.cart-summary-row.total-row {
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1.05rem;
  color: #0f172a;
}

.btn-checkout {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
  padding: 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(251, 100, 27, 0.3);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 100, 27, 0.4);
}

/* Checkout Modal */
.checkout-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px clamp(16px, 3vw, 28px);
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.checkout-header {
  margin-bottom: 18px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

.checkout-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.form-group-compact {
  margin-bottom: 12px;
}

.form-group-compact label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.form-group-compact input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: #f8fafc;
}

.form-group-compact input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.pay-option:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.pay-option strong {
  font-size: 0.86rem;
  color: #0f172a;
}

.pay-option p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-bill-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}

.btn-place-order {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-place-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

/* Success Order Modal */
.success-modal-content {
  background: #ffffff;
  border-radius: 18px;
  max-width: 460px;
  width: 100%;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.success-icon-wrap {
  width: 70px;
  height: 70px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.order-receipt-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  text-align: left;
}

/* My Orders Tracking Modal */
.orders-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.orders-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-record-card {
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
}

.order-record-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.order-status-badge {
  background: #dcfce7;
  color: #16a34a;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 20px;
}

.order-tracking-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px;
  padding: 0 10px;
  font-size: 0.72rem;
  color: #64748b;
  position: relative;
}

.track-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.track-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-items-preview {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
}

.order-item-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.order-item-chip img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
}

.product-info {
    padding: 8px;
  }

  .product-info h3 {
    font-size: 0.8rem;
  }

  .new-price {
    font-size: 0.9rem;
  }

  .add-cart {
    padding: 6px;
    font-size: 0.72rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PRODUCT DETAIL MODAL VARIANTS & KEY HIGHLIGHTS (FLIPKART STYLE)
   ========================================================================== */
#productModal .modal-content {
  max-width: 820px;
  max-height: 92vh;
  overflow-y: auto;
  align-items: flex-start;
}

#productModal .modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-group {
  margin: 8px 0 10px;
}

.variant-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.variant-label span.selected-val {
  color: #2563eb;
  font-weight: 800;
}

.color-swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.color-swatch .swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.color-swatch:hover {
  border-color: #94a3b8;
}

.color-swatch.active {
  border-color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 0 0 1px #0f172a;
}

.variant-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-chip {
  padding: 7px 13px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.variant-chip:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.variant-chip.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 1px #2563eb;
}

.highlights-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 6px 0 10px;
}

.highlights-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
}

@media (max-width: 520px) {
  .highlight-grid {
    grid-template-columns: 1fr;
  }
}

.highlight-row {
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 4px;
}

.highlight-row small {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.highlight-row strong {
  display: block;
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 700;
}

/* ==========================================================================
   SOLD OUT & NOTIFY ME STYLES
   ========================================================================== */
.product-card.is-sold-out .product-img img {
  filter: grayscale(40%) opacity(0.82);
}

.sold-out-ribbon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  border: 2px solid #ef4444;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.badge-sold-out {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  z-index: 3;
  text-transform: uppercase;
}

.btn-notify-me {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: 6px;
}

.btn-notify-me:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.sold-out-notice-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
