/* ==========================================================================
   Storefront Styles - Matching Admin Dashboard Palette & Typography
   Luxury Black, White, Stone & Gold (#C9A227)
   ========================================================================== */

:root {
  --ink: #000000;
  --dark-surface: #111111;
  --dark-elevated: #1a1a1a;
  --paper: #ffffff;
  --stone: #F2F2EF;
  --line: #E2E2DD;
  --mute: #6B6B66;
  --gold: #C9A227;
  --gold-hover: #b8941f;
  --gold-ink: #7A5F00;
  --gold-bg: rgba(201, 162, 39, 0.12);
  --r-s: 6px;
  --r-m: 12px;
  --r-l: 20px;
  --font: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
}

body.storefront-body {
  font-family: var(--font);
  background-color: #ffffff;
  color: var(--ink);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  padding-top: 76px;
}

/* ---------------- Header / Navbar ---------------- */
.store-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background-color: var(--ink);
  border-bottom: 2px solid var(--gold);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
}

.store-nav-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.store-brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.store-brand-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.store-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.store-nav-menu li a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: #cfcfcf;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.store-nav-menu li a:hover,
.store-nav-menu li a.active {
  color: var(--gold);
}

.store-nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width 0.2s ease;
}

.store-nav-menu li a:hover::after,
.store-nav-menu li a.active::after {
  width: 100%;
}

/* Mobile Toggle */
.store-burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
}

.store-burger span {
  width: 100%;
  height: 2.5px;
  background-color: var(--gold);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.store-burger.open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.store-burger.open span:nth-child(2) {
  opacity: 0;
}
.store-burger.open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.store-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.store-mobile-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 991px) {
  .store-burger {
    display: flex;
  }

  .store-nav-menu {
    position: fixed;
    top: 76px;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: calc(100vh - 76px);
    background: #111;
    border-inline-start: 2px solid var(--gold);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.2rem;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
  }

  html[dir="ltr"] .store-nav-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }

  .store-nav-menu.open {
    transform: translateX(0) !important;
  }

  .store-nav-menu li a {
    color: #e0e0e0;
    padding: 0.8rem 1rem;
    border-radius: var(--r-s);
    border-bottom: 1px solid #222;
    display: block;
  }

  .store-nav-menu li a:hover {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
  }
}

/* ---------------- Hero Section (Clean & Typographic) ---------------- */
.store-hero {
  background: radial-gradient(circle at 50% 30%, #1f1f1f 0%, #000000 100%);
  color: #ffffff;
  padding: clamp(3.5rem, 8vw, 6rem) 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #2a2a2a;
}

.store-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.store-hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.store-gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold);
  border: 1.5px solid var(--gold);
  padding: 0.4rem 1.25rem;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.store-hero-title {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.store-hero-title span {
  color: var(--gold);
}

.store-hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: #b5b5b0;
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.store-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-hero-btn {
  background: var(--gold);
  color: #000000;
  border: 1.5px solid var(--gold);
  padding: 0.75rem 2rem;
  border-radius: var(--r-s);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.store-hero-btn:hover {
  background: var(--gold-hover);
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}

/* ---------------- Products Section (Direct from DB) ---------------- */
.store-products-section {
  padding: clamp(3rem, 6vw, 5rem) 1.25rem;
  max-width: 1320px;
  margin: 0 auto;
}

.store-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.store-section-badge {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-ink);
  background: var(--gold-bg);
  padding: 0.25rem 0.8rem;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.store-section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.store-section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--gold);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.store-section-subtitle {
  font-size: 0.95rem;
  color: var(--mute);
  margin-top: 0.5rem;
}

/* Products Grid */
.store-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.store-prod-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.store-prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: var(--gold);
}

.store-prod-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.store-prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.store-prod-card:hover .store-prod-img {
  transform: scale(1.05);
}

.store-prod-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--mute);
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f7f7f5 0%, #ebebea 100%);
}

.store-prod-placeholder i {
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.85;
}

.store-prod-placeholder span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mute);
}

.store-prod-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.store-prod-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.store-prod-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--mute);
}

.store-prod-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.store-prod-price-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.store-prod-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-ink);
}

.store-prod-status {
  font-size: 0.75rem;
  color: var(--ok);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.store-empty-products {
  grid-column: 1 / -1;
  background: var(--stone);
  border: 2px dashed var(--line);
  border-radius: var(--r-m);
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--mute);
}

.store-empty-products i {
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.store-empty-products h4 {
  color: var(--ink);
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .store-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .store-prod-body {
    padding: 0.75rem;
  }
  .store-prod-name {
    font-size: 0.88rem;
  }
  .store-prod-price {
    font-size: 1.05rem;
  }
}

/* ---------------- Perks / Features ---------------- */
.store-perks {
  background: var(--stone);
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  padding: 3rem 1.25rem;
}

.store-perks-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.store-perk-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.store-perk-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.store-perk-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-s);
  background: #000000;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.store-perk-content h6 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  color: var(--ink);
}

.store-perk-content p {
  font-size: 0.8rem;
  color: var(--mute);
  margin: 0;
}

@media (max-width: 991px) {
  .store-perks-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

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

/* ---------------- Footer (Black & Gold) ---------------- */
.store-footer {
  background-color: var(--ink);
  color: #ffffff;
  padding: 4rem 1.25rem 2rem;
}

.store-footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #222;
}

.store-footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.store-footer-text {
  font-size: 0.9rem;
  color: #999;
  line-height: 1.7;
  max-width: 360px;
}

.store-footer-col h5 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.25rem;
  position: relative;
}

.store-footer-col h5::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--gold);
  margin-top: 0.5rem;
}

.store-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.store-footer-links li {
  margin-bottom: 0.65rem;
}

.store-footer-links li a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.store-footer-links li a:hover {
  color: var(--gold);
}

.store-footer-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #ccc;
  font-size: 0.9rem;
}

.store-footer-contact i {
  color: var(--gold);
  font-size: 1.1rem;
}

.store-copyright {
  text-align: center;
  padding-top: 2rem;
  font-size: 0.85rem;
  color: #777;
}

.store-copyright span {
  color: var(--gold);
}

@media (max-width: 768px) {
  .store-footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
