/**
 * Marketplace layer — Digikala-like structure, original brand colors.
 * Scoped to body.aqua-dk so older sheets cannot restyle these rules away.
 */

body.aqua-dk {
  /* light defaults; dark overrides via html[data-aqua-theme] below */
  --dk-canvas: #f0f0f1;
  --dk-card: #ffffff;
  --dk-ink: #0c0c0c;
  --dk-mute: #81858b;
  --dk-line: #e0e0e2;
  --dk-search: #f0f0f1;
  --dk-accent: #ef4056;
  --dk-brand: #0aa3b8;
  --dk-radius: 8px;
  --header: auto;
  --max: 1336px;
  --bg: var(--dk-canvas);
  --card: var(--dk-card);
  --ink: var(--dk-ink);
  --mute: var(--dk-mute);
  --line: var(--dk-line);
  --blue: var(--dk-brand);
  --r: 8px;
  --r-lg: 8px;
  background: var(--dk-canvas) !important;
  color: var(--dk-ink);
}

body.aqua-dk .site-header {
  height: auto !important;
  min-height: 0 !important;
  background: var(--dk-card) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--dk-line) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

body.aqua-dk .header-inner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-areas:
    "brand search actions"
    "nav nav nav";
  align-items: center !important;
  gap: 12px 16px !important;
  height: auto !important;
  min-height: 0 !important;
  padding-block: 12px 8px !important;
}

body.aqua-dk .brand { grid-area: brand; }
body.aqua-dk .header-search { grid-area: search; }
body.aqua-dk .header-actions { grid-area: actions; }
body.aqua-dk .nav-main {
  grid-area: nav;
  justify-content: flex-start !important;
  flex: none !important;
}

body.aqua-dk .header-search {
  display: block !important;
  flex: none !important;
  max-width: 780px;
  width: 100%;
}

body.aqua-dk .header-search input {
  height: 44px !important;
  border-radius: 8px !important;
  background: var(--dk-search) !important;
  padding: 0 16px 0 44px !important;
  font-size: 14px !important;
  border: 1px solid transparent !important;
}

body.aqua-dk .header-search input:focus {
  background: var(--dk-card) !important;
  border-color: var(--dk-brand) !important;
  box-shadow: 0 0 0 3px rgba(10, 163, 184, 0.15) !important;
}

body.aqua-dk .nav-main a {
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

body.aqua-dk .container {
  width: min(var(--max), calc(100% - 32px)) !important;
}

body.aqua-dk .hero.hero-pro {
  background: var(--dk-card) !important;
  padding-block: 20px !important;
  border-bottom: 1px solid var(--dk-line);
}

body.aqua-dk .hero-photo {
  border-radius: 8px !important;
  box-shadow: none !important;
}

body.aqua-dk .section {
  padding-block: 28px !important;
}

body.aqua-dk .section-head h2,
body.aqua-dk .hero-copy h1 {
  letter-spacing: -0.02em;
}

body.aqua-dk .btn-primary,
body.aqua-dk .btn.btn-primary {
  background: var(--dk-brand) !important;
  border-radius: 8px !important;
}

body.aqua-dk .badge-sale,
body.aqua-dk .product-thumb .badge-sale {
  background: var(--dk-accent) !important;
  border-radius: 4px !important;
}

body.aqua-dk .product-card,
body.aqua-dk .cat-card,
body.aqua-dk .feature-card,
body.aqua-dk .post-card {
  background: var(--dk-card) !important;
  border: 1px solid var(--dk-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transform: none !important;
}

body.aqua-dk .product-card:hover,
body.aqua-dk .cat-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transform: none !important;
}

body.aqua-dk .product-card {
  overflow: hidden !important;
}

body.aqua-dk .product-card .product-actions,
body.aqua-dk .product-card .buy-form,
body.aqua-dk .product-card .btn-add-cart {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.aqua-dk .product-card .btn-add-cart {
  border-radius: 8px !important;
  background: var(--dk-brand) !important;
}

body.aqua-dk .site-footer {
  background: var(--dk-card) !important;
  border-top: 1px solid var(--dk-line) !important;
}

body.aqua-dk .home-cta-photo {
  border-radius: 8px;
}

@media (max-width: 900px) {
  body.aqua-dk .header-inner {
    grid-template-columns: auto 1fr auto !important;
    grid-template-areas:
      "brand actions actions"
      "nav nav nav" !important;
  }
  body.aqua-dk .header-search {
    display: none !important;
  }
  body.aqua-dk .hero-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  body.aqua-dk .grid-4,
  body.aqua-dk .grid-3,
  body.aqua-dk .sale-products-grid,
  body.aqua-dk .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body.aqua-dk .product-card .product-body {
    padding: 10px !important;
  }
}

@media (max-width: 419px) {
  body.aqua-dk .grid-4,
  body.aqua-dk .grid-3,
  body.aqua-dk .sale-products-grid,
  body.aqua-dk .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

html[data-aqua-theme="dark"] body.aqua-dk {
  --dk-canvas: #0f1115;
  --dk-card: #171b22;
  --dk-ink: #f3f4f6;
  --dk-mute: #9aa0a6;
  --dk-line: #2a3038;
  --dk-search: #1c222b;
}

html[data-aqua-theme="dark"] body.aqua-dk .site-header,
html[data-aqua-theme="dark"] body.aqua-dk .hero.hero-pro,
html[data-aqua-theme="dark"] body.aqua-dk .site-footer,
html[data-aqua-theme="dark"] body.aqua-dk .product-card,
html[data-aqua-theme="dark"] body.aqua-dk .cat-card {
  background: var(--dk-card) !important;
}


