:root {
  --bg: #f5f5f5;          /* Light grey canvas */
  --bg-card: #ffffff;     /* Pure white cards */
  --gold: #c9a24b;
  --gold-deep: #a88530;
  --text: #1a1a1a;
  --muted: #6b6560;
  --line: #e0e0e0;
  --sale-red: #e63946;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ==================== HEADER ==================== */
.store-top {
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.store-nav {
  background: #f8f6f2;
  border-bottom: 1px solid rgba(201,162,75,0.3);
}
.store-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.store-logo-img { height: 36px; width: auto; object-fit: contain; }

/* Search */
.store-search {
  flex: 1; max-width: 600px; margin: 0 20px; display: flex;
  background: #fff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden;
}
.store-search input {
  flex: 1; padding: 10px 16px; border: 0; font-size: 0.9rem; outline: none;
}
.store-search button {
  padding: 0 16px; background: var(--gold); border: 0; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.store-search button:hover { background: var(--gold-deep); }

/* Actions */
.store-actions { display: flex; align-items: center; gap: 20px; }
.store-action-link {
  font-size: 0.8rem; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px;
}
.store-action-link:hover { color: var(--gold-deep); }
.store-cart-badge {
  background: var(--gold); color: #fff; font-size: 0.65rem; font-weight: bold;
  padding: 2px 6px; border-radius: 10px;
}

/* Category Nav */
.store-cat-nav {
  background: #f8f6f2; border-bottom: 1px solid #e0e0e0;
}
.store-cat-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; gap: 30px; overflow-x: auto;
}
.store-cat-inner::-webkit-scrollbar { display: none; }
.store-cat-inner a {
  padding: 12px 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.store-cat-inner a:hover, .store-cat-inner a.active {
  color: var(--gold-deep); border-bottom-color: var(--gold-deep);
}

/* ==================== MAIN & HERO ==================== */
.store-main { max-width: 1280px; margin: 0 auto; padding: 30px 20px 80px; }
.shop-hero {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; margin-bottom: 24px;
}
.shop-hero h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400; color: var(--text); margin-bottom: 12px; }
.shop-hero h1 span { color: var(--gold-deep); }
.shop-hero .hero-desc { color: var(--muted); font-size: 0.95rem; }

/* Mobile Category Scroll */
.mobile-cat-scroll {
  display: none; overflow-x: auto; white-space: nowrap; padding-bottom: 15px; margin-bottom: 15px;
}
.mobile-cat-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-block; padding: 8px 16px; background: #fff; border: 1px solid #ddd;
  border-radius: 20px; margin-right: 10px; font-size: 0.8rem; color: var(--text);
}
.cat-pill.active { border-color: var(--gold); color: var(--gold-deep); background: #fdfbf7; }

/* ==================== PRODUCT GRID (JUMIA DENSITY) ==================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* Product Card */
.product-card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid transparent;
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 2;
}

/* Image Wrap */
.card-image-wrap {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: #f9f9f9; display: flex; align-items: center; justify-content: center;
}
.card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-image-wrap .placeholder { color: #ccc; font-weight: bold; letter-spacing: 2px; }

/* Badges */
.product-badge {
  position: absolute; top: 8px; left: 8px; font-size: 0.55rem; letter-spacing: 0.1em;
  font-weight: bold; text-transform: uppercase; padding: 4px 6px; border-radius: 2px; color: #fff;
}
.product-badge.sale { background: var(--sale-red); }
.product-badge.digital { background: var(--gold-deep); }

/* Card Info */
.card-info { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.card-name {
  font-size: 0.85rem; color: var(--text); font-weight: 400; line-height: 1.3;
  margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-name:hover { color: var(--gold-deep); }

/* Pricing */
.card-price { margin-bottom: 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-now { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.price-was { font-size: 0.8rem; color: var(--muted); text-decoration: line-through; }

/* Logistics Badges */
.card-logistics { margin-bottom: 10px; }
.badge-logistic {
  display: inline-block; font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #2e7d32; background: #e8f5e9; padding: 3px 5px; border-radius: 2px; font-weight: 600;
}

/* Action Button */
.card-action { margin-top: auto; }
.btn-card {
  display: block; width: 100%; text-align: center; padding: 8px; border: 1px solid var(--gold);
  background: transparent; color: var(--gold-deep); border-radius: 2px; font-size: 0.75rem;
  font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em;
  transition: background 0.2s;
}
.btn-card:hover { background: var(--gold); color: #1a1a1a; }
.btn-card:active { background: var(--gold-deep); color: #fff; }

/* ==================== FOOTER (Maintained) ==================== */
.store-footer { background: #1a1a1a; color: #f0ede8; margin-top: 60px; padding: 50px 20px 20px; }
/* ... Keep existing footer styles from previous block ... */
.store-footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h5 { color: var(--gold); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col ul a { color: #9a9691; font-size: 0.8rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold); }
.store-footer-bottom { text-align: center; border-top: 1px solid #333; margin-top: 40px; padding-top: 20px; font-size: 9.5px; color: #777; }

/* Responsive */
@media (max-width: 900px) {
  .store-nav-inner { height: 60px; padding: 0 15px; }
  .store-search { margin: 0 10px; }
  .hide-mobile { display: none; }
  .store-cat-nav { display: none; }
  .mobile-cat-scroll { display: flex; }
}
@media (max-width: 480px) {
  .store-actions .cart-text { display: none; }
  .store-logo-img { height: 30px; }
}

/* Sale price — green */
.price-now.sale-price,
.product-price.sale-price {
  color: #2e7d32 !important;
}

/* ============================================================
   MOBILE OPTIMIZATION — Compact, Contained, & Classy
   ============================================================ */

@media (max-width: 768px) {
  
  /* 1. HEADER: Slim, sticky, and clean */
  .store-nav-inner {
    height: 54px;
    padding: 0 12px;
    gap: 8px;
  }
  .store-logo-img { height: 32px; }
  .store-search {
    margin: 0;
    padding: 4px;
    background: transparent;
    border: 0;
    flex: 0 0 auto;
  }
  /* Hide the search input field, keep only the icon */
  .store-search input { display: none; }
  .store-search button { 
    background: transparent; 
    color: var(--text); 
    padding: 8px; 
  }
  .store-nav-links { gap: 12px; }
  .store-nav-links a.hide-mobile { display: none; }
  .store-cart-badge { top: -6px; right: -8px; }
  
  /* Category Bar */
  .store-cat-inner {
    padding: 0 12px;
    gap: 16px;
  }
  .store-cat-inner a { padding: 10px 0; font-size: 0.65rem; }

  /* 2. MAIN CONTAINER: Tighter margins */
  .store-main {
    padding: 16px 10px 50px;
  }

  /* 3. HERO CAROUSEL: Contained card with rounded corners */
  .hero-carousel-wrap {
    margin-bottom: 24px;
    padding: 0 2px;
  }
  .hero-carousel {
    height: 280px; /* Shorter for mobile */
    border-radius: 8px; /* Classy rounded corners */
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .carousel-content {
    padding: 0 20px;
    text-align: center;
  }
  .carousel-content h2 {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }
  .carousel-desc {
    font-size: 0.8rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Truncate to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .carousel-price { font-size: 1rem; }
  .carousel-price .price-was { font-size: 0.8rem; }
  .carousel-content .btn-primary {
    padding: 10px 24px;
    font-size: 0.65rem;
  }
  .carousel-arrow { display: none; } /* Rely on swipe/dots for mobile */
  .carousel-dots { right: 50%; transform: translateX(50%); bottom: 12px; }
  .carousel-dot { width: 20px; height: 2px; }

  /* 4. CATEGORY PILLS: Smooth horizontal scroll */
  .mobile-cat-scroll {
    display: flex;
    gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .mobile-cat-scroll::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  .cat-pill {
    margin-right: 0;
    padding: 6px 14px;
    font-size: 0.7rem;
    border-radius: 4px; /* Square-ish looks more premium on mobile */
    background: #fff;
    white-space: nowrap;
  }
  .cat-pill.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
  }

  /* 5. PRODUCT GRID: Compact 2-column layout */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; /* Extremely tight grid */
  }
  .product-card {
    border-radius: 6px;
    border-color: #eee;
  }
  .card-image-wrap {
    aspect-ratio: 1/1;
  }
  .card-info {
    padding: 8px;
  }
  .card-name {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 4px;
    -webkit-line-clamp: 2;
    height: 2.6em; /* Force 2 lines for alignment */
  }
  .card-price {
    margin-bottom: 0;
    gap: 4px;
  }
  .price-now { font-size: 0.85rem; }
  .price-was { font-size: 0.65rem; }
  .btn-card {
    padding: 6px;
    font-size: 0.65rem;
    margin-top: 6px;
  }
  .product-badge {
    top: 6px; left: 6px;
    font-size: 0.5rem;
    padding: 2px 5px;
  }

  /* 6. SINGLE PRODUCT PAGE */
  .product-layout {
    gap: 16px;
    grid-template-columns: 1fr;
  }
  .product-media {
    border-radius: 8px;
  }
  .gallery-thumbs { justify-content: center; }
  .product-title { font-size: 1.3rem; margin-bottom: 8px; }
  .product-price-block { margin-bottom: 12px; padding-bottom: 12px; }
  .price-now { font-size: 1.2rem; }
  .product-desc { font-size: 0.85rem; margin-bottom: 16px; }
  .option-btn { padding: 8px 14px; font-size: 0.7rem; }
  .btn-add-to-cart { padding: 14px; font-size: 0.75rem; }

  /* 7. RELATED PRODUCTS */
  .related-products-section { margin-top: 30px; padding-top: 20px; }
  .related-header { margin-bottom: 16px; }
  .related-header h2 { font-size: 1.1rem; }
  .related-header p { font-size: 0.75rem; }

  /* 8. CART & CHECKOUT */
  .cart-line { grid-template-columns: 60px 1fr; gap: 10px; padding: 12px 0; }
  .cart-thumb { width: 60px; height: 60px; }
  .cart-qty, .cart-line-total, .cart-remove { grid-column: 2; }
  .cart-qty { justify-self: start; margin-top: 4px; }
  .cart-line-total { text-align: left; margin-top: 4px; font-size: 0.85rem; }
  .cart-remove { position: absolute; right: 10px; top: 12px; }
  .cart-line { position: relative; }
  .cart-layout { gap: 16px; }
  .cart-summary { position: static; padding: 16px; }

  .checkout-grid { grid-template-columns: 1fr; gap: 16px; }
  .checkout-section { padding: 16px; margin-bottom: 12px; }
  .checkout-section h3 { margin-bottom: 12px; }
  .form-row.two-col { grid-template-columns: 1fr; gap: 10px; }
}

/* Micro-adjustments for very small phones */
@media (max-width: 360px) {
  .product-grid { gap: 6px; }
  .card-name { font-size: 0.7rem; }
  .price-now { font-size: 0.8rem; }
}

/* ============================================================
   MOBILE FOOTER FIX
   ============================================================ */
@media (max-width: 768px) {
  .store-footer {
    padding: 30px 16px 20px; /* Tighter padding */
  }
  
  .store-footer-inner {
    grid-template-columns: 1fr; /* Stack everything into 1 column */
    gap: 24px;
    text-align: center; /* Center text on mobile */
    padding-bottom: 24px;
  }
  
  .footer-brand-logo {
    margin: 0 auto 12px; /* Center the logo */
  }
  
  .footer-brand-sub {
    margin: 0 auto; /* Center the paragraph */
    font-size: 0.8rem;
  }

  .footer-col h5 {
    margin-bottom: 12px;
    font-size: 0.65rem;
  }

  .footer-col li {
    margin-bottom: 10px;
  }

  /* Ensure emails and long links don't push the screen wide */
  .footer-col ul a {
    font-size: 0.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: inline-block; /* Helps with word breaking */
    max-width: 100%;
  }

  .store-footer-bottom {
    padding-top: 16px;
    font-size: 9px;
    line-height: 1.6;
  }
}

/* ============================================================
   ULTRA-COMPACT MOBILE FOOTER (40% Size Reduction)
   ============================================================ */
@media (max-width: 768px) {
  .store-footer {
    padding: 24px 16px 16px;
    margin-top: 30px;
  }
  
  .store-footer-inner {
    grid-template-columns: 1fr;
    gap: 16px; /* Drastically reduced gap */
    padding-bottom: 16px;
  }
  
  /* Shrink logo */
  .footer-brand-logo {
    height: 36px; 
    margin: 0 auto 8px;
  }
  
  .footer-brand-tag {
    font-size: 0.7rem; /* ~11px */
    margin-bottom: 2px;
  }
  
  .footer-brand-sub {
    font-size: 0.65rem; /* ~10px */
    max-width: 250px;
    margin: 0 auto;
    line-height: 1.4;
  }

  /* Shrink headings */
  .footer-col h5 {
    font-size: 0.55rem; /* ~9px */
    letter-spacing: 0.2em;
    margin-bottom: 8px;
  }

  /* Shrink links */
  .footer-col li {
    margin-bottom: 6px;
  }
  
  .footer-col ul a {
    font-size: 0.65rem; /* ~10px */
    line-height: 1.3;
  }

  /* Shrink bottom copyright block */
  .store-footer-bottom {
    padding-top: 12px;
    font-size: 7px;
    line-height: 1.5;
    opacity: 0.8;
  }
}

/* Make Store Logo 50% Bigger */
.store-logo {
  height: 60px; /* was 40px */
}
.store-logo-img {
  height: 60px; /* was 40px */
}
.store-nav-inner {
  height: 84px; /* Increased header height to fit the bigger logo */
}

@media (max-width: 900px) {
  .store-logo, .store-logo-img { height: 48px; } /* was 32px */
  .store-nav-inner { height: 68px; }
}
@media (max-width: 600px) {
  .store-logo, .store-logo-img { height: 42px; } /* was 28px */
  .store-nav-inner { height: 60px; }
}

/* ---- Reduce Store Logo by 15% ---- */
.store-logo {
  height: 51px !important;
}
.store-logo-img {
  height: 51px !important;
}

@media (max-width: 900px) {
  .store-logo, .store-logo-img { height: 41px !important; } /* was 48px */
}
@media (max-width: 600px) {
  .store-logo, .store-logo-img { height: 36px !important; } /* was 42px */
}

/* ---- Reduce Store Logo by another 20% ---- */
.store-logo {
  height: 41px !important; /* was 51px */
}
.store-logo-img {
  height: 41px !important; /* was 51px */
}

@media (max-width: 900px) {
  .store-logo, .store-logo-img { height: 33px !important; } /* was 41px */
}
@media (max-width: 600px) {
  .store-logo, .store-logo-img { height: 29px !important; } /* was 36px */
}
