/* Holistic storefront — original wellness aesthetic (Arabic-first).
   Inspired by premium organic e-commerce UX patterns; no third-party assets. */

@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap");

/* —— Shell restyle when Holistic content is present —— */
body:has(.storefront-holistic) {
  background: #f7f1e6;
  font-family: "Cairo", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
}

body:has(.storefront-holistic) .store-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5d8c0;
  box-shadow: 0 4px 20px rgba(44, 36, 22, 0.04);
}

body:has(.storefront-holistic) .brand {
  color: #2c2416;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body:has(.storefront-holistic) .menu a,
body:has(.storefront-holistic) .quick-links a {
  border-color: #e8dcc8;
  background: #fffdf8;
  border-radius: 999px;
  color: #2c2416;
  font-weight: 600;
}

body:has(.storefront-holistic) .store-footer {
  background: #2c2416;
  color: #f3ead8;
  border-top: none;
  margin-top: 0;
}

body:has(.storefront-holistic) .store-footer a {
  color: #e8dcc8;
}

body:has(.storefront-holistic) .store-footer .muted {
  color: #b8a890;
}

/* —— Root tokens —— */
.storefront-holistic {
  --hc-cream: #f7f1e6;
  --hc-cream-deep: #efe4cf;
  --hc-ink: #2c2416;
  --hc-muted: #6b5e4a;
  --hc-accent: #4f8062;
  --hc-accent-dark: #3d6650;
  --hc-accent-2: #c4a35a;
  --hc-sale: #c45c4a;
  --hc-card: #fffdf8;
  --hc-border: #e8dcc8;
  --hc-radius: 18px;
  --hc-shadow: 0 10px 30px rgba(44, 36, 22, 0.07);
  --hc-shadow-sm: 0 4px 14px rgba(44, 36, 22, 0.06);
  background: var(--hc-cream);
  color: var(--hc-ink);
  font-family: "Cairo", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  padding-bottom: 4.5rem;
}

.storefront-holistic * {
  box-sizing: border-box;
}

.hc-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* —— Top promo strip —— */
.hc-topstrip {
  background: linear-gradient(90deg, #4f8062, #5c8f6f 50%, #4f8062);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  letter-spacing: 0.01em;
}

.hc-topstrip span {
  opacity: 0.95;
}

/* —— Local toolbar (search + cart badge) —— */
.hc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.85rem 0 0.25rem;
}

.hc-search {
  flex: 1 1 220px;
  display: flex;
  max-width: 420px;
  background: var(--hc-card);
  border: 1px solid var(--hc-border);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--hc-shadow-sm);
}

.hc-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  font: inherit;
  color: var(--hc-ink);
  min-width: 0;
}

.hc-search input:focus {
  outline: none;
}

.hc-search button {
  border: 0;
  background: var(--hc-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
}

.hc-search button:hover {
  background: var(--hc-accent-dark);
}

.hc-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.hc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--hc-card);
  border: 1px solid var(--hc-border);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  text-decoration: none;
  color: var(--hc-ink);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--hc-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hc-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--hc-shadow);
}

.hc-pill .hc-count {
  background: var(--hc-accent);
  color: #fff;
  border-radius: 999px;
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  padding: 0 0.35rem;
}

.hc-pill-cart {
  background: var(--hc-ink);
  color: #fff;
  border-color: var(--hc-ink);
}

.hc-pill-cart .hc-count {
  background: var(--hc-accent-2);
  color: var(--hc-ink);
}

/* —— Hero —— */
.hc-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--hc-radius);
  margin: 1rem 0 1.25rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(79, 128, 98, 0.18), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(196, 163, 90, 0.22), transparent 40%),
    linear-gradient(135deg, #efe4cf 0%, #f9f2e5 55%, #e5f0e8 100%);
  border: 1px solid var(--hc-border);
  box-shadow: var(--hc-shadow);
  min-height: 220px;
}

.hc-hero-media {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.hc-hero-body {
  padding: 2rem 1.75rem 2.1rem;
}

.hc-hero-kicker {
  display: inline-block;
  background: rgba(79, 128, 98, 0.12);
  color: var(--hc-accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.hc-hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  margin: 0 0 0.55rem;
  line-height: 1.25;
  font-weight: 800;
}

.hc-hero p {
  color: var(--hc-muted);
  max-width: 34rem;
  margin: 0 0 1.15rem;
  font-size: 1.02rem;
  line-height: 1.65;
}

.hc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--hc-accent);
  color: #fff !important;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(79, 128, 98, 0.25);
}

.hc-cta:hover {
  background: var(--hc-accent-dark);
  transform: translateY(-1px);
}

.hc-cta-ghost {
  background: transparent;
  color: var(--hc-ink) !important;
  border: 1.5px solid var(--hc-border);
  box-shadow: none;
}

.hc-cta-ghost:hover {
  background: var(--hc-card);
  border-color: var(--hc-accent);
  color: var(--hc-accent-dark) !important;
}

.hc-cta-block {
  width: 100%;
}

.hc-cta-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  box-shadow: none;
}

/* —— Trust strip —— */
.hc-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}

.hc-trust-item {
  background: var(--hc-card);
  border: 1px solid var(--hc-border);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: var(--hc-shadow-sm);
}

.hc-trust-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 0.55rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8f0e4, #f3ead8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--hc-accent-dark);
}

.hc-trust-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.hc-trust-item span {
  color: var(--hc-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* —— Sections —— */
.hc-section {
  margin: 1.75rem 0;
}

.hc-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  flex-wrap: wrap;
}

.hc-section-title {
  font-size: 1.35rem;
  margin: 0;
  font-weight: 800;
}

.hc-section-sub {
  color: var(--hc-muted);
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  max-width: 36rem;
}

.hc-link-more {
  color: var(--hc-accent-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.hc-link-more:hover {
  text-decoration: underline;
}

/* —— Category tiles —— */
.hc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.hc-tile {
  background: var(--hc-card);
  border-radius: 16px;
  padding: 1.1rem 0.85rem;
  border: 1px solid var(--hc-border);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--hc-shadow-sm);
  position: relative;
  overflow: hidden;
}

.hc-tile::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hc-accent), var(--hc-accent-2));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.hc-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--hc-shadow);
  border-color: #d4c4a8;
}

.hc-tile:hover::before {
  opacity: 1;
}

.hc-tile-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.65rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #eef5ef, #f6efe3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

.hc-tile strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.hc-tile span {
  color: var(--hc-muted);
  font-size: 0.82rem;
}

.hc-tile.active {
  border-color: var(--hc-accent);
  background: #f3f8f4;
}

/* —— Product grid / cards —— */
.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}

.hc-card {
  background: var(--hc-card);
  border-radius: 16px;
  border: 1px solid var(--hc-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--hc-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

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

.hc-card-media {
  position: relative;
  background: #efe8da;
  aspect-ratio: 1;
  overflow: hidden;
}

.hc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hc-card:hover .hc-card-media img {
  transform: scale(1.05);
}

.hc-badge {
  position: absolute;
  top: 0.65rem;
  inset-inline-start: 0.65rem;
  background: var(--hc-sale);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(196, 92, 74, 0.3);
}

.hc-badge-soft {
  background: var(--hc-accent);
  box-shadow: 0 4px 10px rgba(79, 128, 98, 0.25);
}

.hc-card-actions {
  position: absolute;
  inset-inline-end: 0.55rem;
  top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hc-card:hover .hc-card-actions,
.hc-card:focus-within .hc-card-actions {
  opacity: 1;
  transform: none;
}

.hc-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hc-border);
  background: rgba(255, 253, 248, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--hc-ink);
  text-decoration: none;
  box-shadow: var(--hc-shadow-sm);
  padding: 0;
}

.hc-icon-btn:hover {
  background: var(--hc-accent);
  color: #fff;
  border-color: var(--hc-accent);
}

.hc-card-body {
  padding: 0.85rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.hc-card-cat {
  color: var(--hc-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.hc-card-title {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.hc-card-title:hover {
  color: var(--hc-accent-dark);
}

.hc-stars {
  color: #c4a35a;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.hc-stars small {
  color: var(--hc-muted);
  letter-spacing: 0;
  margin-inline-start: 0.25rem;
}

.hc-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.hc-price {
  font-weight: 800;
  color: var(--hc-accent-dark);
  font-size: 1.05rem;
}

.hc-price s,
.hc-compare {
  color: var(--hc-muted);
  font-weight: 500;
  font-size: 0.88rem;
  text-decoration: line-through;
}

.hc-card-desc {
  color: var(--hc-muted);
  font-size: 0.8rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.hc-card-foot {
  margin-top: auto;
  padding-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hc-qty-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hc-qty-row label {
  font-size: 0.8rem;
  color: var(--hc-muted);
  font-weight: 600;
}

.hc-qty {
  width: 3.25rem;
  border: 1px solid var(--hc-border);
  border-radius: 10px;
  padding: 0.4rem;
  text-align: center;
  font: inherit;
  background: #fff;
}

/* —— Horizontal rail —— */
.hc-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.15rem 0.85rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.hc-rail .hc-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
}

.hc-rail::-webkit-scrollbar {
  height: 6px;
}

.hc-rail::-webkit-scrollbar-thumb {
  background: #d4c4a8;
  border-radius: 999px;
}

/* —— Promo band —— */
.hc-promo {
  margin: 1.75rem 0;
  border-radius: var(--hc-radius);
  background: linear-gradient(120deg, #2c2416 0%, #3d6650 55%, #4f8062 100%);
  color: #fff;
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--hc-shadow);
}

.hc-promo h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.hc-promo p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.92rem;
  max-width: 28rem;
}

.hc-promo .hc-cta {
  background: #fff;
  color: var(--hc-ink) !important;
  box-shadow: none;
}

.hc-promo .hc-cta:hover {
  background: #f3ead8;
}

/* —— Reviews —— */
.hc-reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.hc-review {
  background: var(--hc-card);
  border: 1px solid var(--hc-border);
  border-radius: 14px;
  padding: 1.05rem;
  font-size: 0.94rem;
  box-shadow: var(--hc-shadow-sm);
}

.hc-review p {
  margin: 0.45rem 0;
  line-height: 1.55;
}

.hc-review small {
  color: var(--hc-muted);
}

/* —— Newsletter —— */
.hc-newsletter {
  margin: 2rem 0 0.5rem;
  background: var(--hc-card);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius);
  padding: 1.35rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--hc-shadow-sm);
}

.hc-newsletter h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.hc-newsletter p {
  margin: 0;
  color: var(--hc-muted);
  font-size: 0.9rem;
}

.hc-newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1 1 260px;
  max-width: 420px;
  justify-content: flex-end;
}

.hc-newsletter input[type="email"] {
  flex: 1 1 160px;
  border: 1px solid var(--hc-border);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  background: #fff;
}

/* —— Pagination —— */
.hc-pager {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0 0.5rem;
  flex-wrap: wrap;
}

.hc-pager a,
.hc-pager span {
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--hc-border);
  background: #fff;
  color: var(--hc-ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.hc-pager .current {
  background: var(--hc-accent);
  color: #fff;
  border-color: var(--hc-accent);
}

/* —— Empty / filter chips —— */
.hc-empty {
  color: var(--hc-muted);
  padding: 1.5rem;
  text-align: center;
  background: var(--hc-card);
  border-radius: 14px;
  border: 1px dashed var(--hc-border);
}

.hc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  align-items: center;
}

.hc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid var(--hc-border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--hc-muted);
  text-decoration: none;
}

.hc-chip strong {
  color: var(--hc-ink);
}

/* —— Toast (add-to-cart feedback) —— */
.hc-toast {
  position: fixed;
  bottom: 5.25rem;
  inset-inline-end: 1rem;
  background: var(--hc-ink);
  color: #fff;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  z-index: 60;
  font-weight: 700;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(320px, calc(100vw - 2rem));
}

.hc-toast.show {
  opacity: 1;
  transform: none;
}

/* —— Mobile sticky cart bar —— */
.hc-sticky-cart {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.97);
  border-top: 1px solid var(--hc-border);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(44, 36, 22, 0.08);
}

.hc-sticky-cart a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--hc-ink);
  font-weight: 800;
  background: var(--hc-ink);
  color: #fff;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
}

.hc-sticky-cart .hc-sticky-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
}

.hc-sticky-cart .hc-sticky-meta strong {
  font-size: 1rem;
  font-weight: 800;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .hc-trust {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hc-hero-body {
    padding: 1.4rem 1.1rem 1.55rem;
  }

  .hc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .hc-card-body {
    padding: 0.65rem 0.65rem 0.8rem;
  }

  .hc-card-title {
    font-size: 0.88rem;
    min-height: 2.4em;
  }

  .hc-card-desc {
    display: none;
  }

  .hc-card-actions {
    opacity: 1;
    transform: none;
  }

  .hc-qty-row {
    display: none;
  }

  .hc-sticky-cart {
    display: block;
  }

  .storefront-holistic {
    padding-bottom: 5.5rem;
  }

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

  .hc-newsletter form {
    max-width: none;
    justify-content: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc-card,
  .hc-tile,
  .hc-cta,
  .hc-card-media img,
  .hc-toast {
    transition: none;
  }
}
