:root {
  --sf-bg: #f6f7f9;
  --sf-surface: #ffffff;
  --sf-surface-soft: #eef3f6;
  --sf-ink: #17212b;
  --sf-muted: #64717d;
  --sf-line: #dfe5e9;
  --sf-brand: #0f6473;
  --sf-brand-strong: #084b57;
  --sf-brand-soft: #dceef0;
  --sf-accent: #d98732;
  --sf-success: #287a54;
  --sf-danger: #b54747;
  --sf-radius-sm: 10px;
  --sf-radius: 16px;
  --sf-radius-lg: 24px;
  --sf-shadow-sm: 0 5px 18px rgba(20, 36, 48, .06);
  --sf-shadow: 0 18px 48px rgba(20, 36, 48, .10);
  --sf-content: 1320px;
}

html { background: var(--sf-bg); }
body {
  min-width: 320px;
  color: var(--sf-ink);
  background: var(--sf-bg);
  font-family: Tajawal, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(15, 100, 115, .28);
  outline-offset: 3px;
}

.ui-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.announcement {
  height: auto;
  min-height: 34px;
  padding: 6px 20px;
  background: var(--sf-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
}
.announcement i { background: rgba(255, 255, 255, .35); }

.site-header {
  background: rgba(255, 255, 255, .96);
  border-color: var(--sf-line);
  box-shadow: 0 1px 0 rgba(23, 33, 43, .04);
}
.header-row {
  width: min(100%, var(--sf-content));
  min-height: 72px;
  padding: 10px 24px;
  grid-template-columns: minmax(210px, 1fr) minmax(300px, 520px) minmax(130px, 1fr);
  gap: 30px;
}
.brand {
  gap: 11px;
  color: var(--sf-ink);
  font-family: Tajawal, "Segoe UI", sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-text { color: var(--sf-ink); }
.brand small {
  color: var(--sf-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: start;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}
.search {
  height: 44px;
  border-color: var(--sf-line);
  border-radius: 12px;
  background: var(--sf-bg);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search:focus-within {
  border-color: var(--sf-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 100, 115, .09);
}
.search input { min-width: 0; color: var(--sf-ink); }
.search input::placeholder { color: #8a949c; }
.search button {
  display: grid;
  place-items: center;
  color: var(--sf-brand-strong);
}
.cart-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  transition: border-color .2s, background .2s;
}
.cart-button:hover { border-color: var(--sf-brand); background: var(--sf-brand-soft); }
.cart-button b { background: var(--sf-brand); }
.cart-icon { display: grid; place-items: center; font-size: inherit; }
.main-nav {
  min-height: 46px;
  gap: 8px;
  border-color: var(--sf-line);
  font-size: 14px;
}
.main-nav a {
  padding: 11px 15px;
  border-radius: 9px;
  font-weight: 600;
}
.main-nav a:hover { color: var(--sf-brand-strong); background: var(--sf-brand-soft); }
.main-nav a:first-child { color: var(--sf-brand-strong); }
.main-nav a:first-child::after { display: none; }

main { min-height: 50vh; }
.hero-shell { padding: 26px 24px 0; }
.hero {
  width: min(100%, var(--sf-content));
  min-height: 430px;
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius-lg);
  background: linear-gradient(135deg, #e7f0f2 0%, #f6f8f8 55%, #e9eef0 100%);
  box-shadow: var(--sf-shadow-sm);
}
.hero::before {
  width: 420px;
  height: 420px;
  inset-inline-start: -260px;
  inset-inline-end: auto;
  top: -240px;
  border-color: rgba(15, 100, 115, .25);
}
.hero::after {
  width: 280px;
  height: 280px;
  inset-inline-start: -170px;
  inset-inline-end: auto;
  bottom: -190px;
  border-color: rgba(15, 100, 115, .18);
}
.hero-copy {
  padding: 64px clamp(34px, 6vw, 88px);
  position: relative;
}
.eyebrow, .section-head small, .page-title small {
  color: var(--sf-brand-strong);
  font-weight: 800;
  letter-spacing: .02em;
}
.hero h1 {
  max-width: 620px;
  margin: 12px 0 18px;
  color: var(--sf-ink);
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -.035em;
}
.hero p {
  max-width: 570px;
  margin-bottom: 30px;
  color: var(--sf-muted);
  font-size: 18px;
  line-height: 1.85;
}
.primary {
  min-height: 46px;
  padding: 11px 26px;
  gap: 14px;
  border-radius: 12px;
  background: var(--sf-brand);
  box-shadow: 0 9px 22px rgba(15, 100, 115, .20);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.primary:hover { background: var(--sf-brand-strong); box-shadow: 0 12px 26px rgba(15, 100, 115, .25); }
.hero-visual { min-height: 430px; background: #e9eef0; }
.hero-visual img {
  width: 100%;
  height: 100%;
  mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
}
[dir="ltr"] .hero-visual img { mask-image: linear-gradient(270deg, #000 82%, transparent 100%); }
.botanical { display: none; }
.hero-placeholder {
  background: linear-gradient(145deg, #d8e7e9, #eff4f4 48%, #cbdadd);
  color: var(--sf-brand-strong);
}
.hero-placeholder span { font-family: Tajawal, "Segoe UI", sans-serif; font-weight: 800; }

.category-section { padding: 18px 24px 0; }
.category-grid {
  width: min(100%, var(--sf-content));
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.category-card {
  height: 116px;
  border-color: var(--sf-line);
  border-radius: var(--sf-radius);
  background: var(--sf-surface);
  box-shadow: 0 1px 0 rgba(23, 33, 43, .03);
}
.category-card:hover {
  border-color: rgba(15, 100, 115, .45);
  box-shadow: var(--sf-shadow-sm);
}
.category-card > div { padding: 17px; }
.category-card strong { color: var(--sf-ink); font-size: 16px; }
.category-card span { color: var(--sf-brand-strong); font-size: 12px; font-weight: 700; }
.category-card img {
  width: 44%;
  mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
}
[dir="ltr"] .category-card img { mask-image: linear-gradient(270deg, #000 55%, transparent 100%); }

.section { padding: 60px 24px; }
.products-section { padding-top: 52px; }
.section-head { width: min(100%, var(--sf-content)); margin-bottom: 24px; }
.section-head h2, .page-title h1 {
  color: var(--sf-ink);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.025em;
}
.section-head > a { color: var(--sf-brand-strong); font-weight: 800; }
.section-head > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-grid {
  width: min(100%, var(--sf-content));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  min-width: 0;
  border-color: var(--sf-line);
  border-radius: var(--sf-radius);
  background: var(--sf-surface);
  box-shadow: 0 1px 0 rgba(23, 33, 43, .03);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--sf-shadow); }
.product-media { aspect-ratio: 4 / 4.8; background: var(--sf-surface-soft); }
.product-media > a { display: block; width: 100%; height: 100%; }
.product-media img { display: block; }
.sale-badge, .new-badge {
  inset-inline-start: 12px;
  inset-inline-end: auto;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--sf-danger);
  font-weight: 700;
}
.new-badge { top: 45px; background: var(--sf-success); }
.favorite { display: none; }
.product-info { min-height: 104px; padding: 15px 16px 12px; }
.product-info small { color: var(--sf-muted); font-size: 12px; }
.product-info h3 {
  min-height: 42px;
  margin: 4px 0 9px;
  color: var(--sf-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}
.product-price { gap: 9px; }
.product-price b, .price { color: var(--sf-brand-strong); font-weight: 800; }
.product-card > button {
  min-height: 42px;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 8px 12px;
  border: 1px solid var(--sf-brand);
  border-radius: 11px;
  background: var(--sf-brand);
  font-size: 13px;
  font-weight: 800;
  transition: background .2s, color .2s;
}
.product-card > button:hover { background: var(--sf-brand-strong); }
.product-card > button:disabled { cursor: not-allowed; opacity: .55; }
.product-card > button.added { background: var(--sf-success); border-color: var(--sf-success); }

.promo-band, .service-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: var(--sf-line);
  background: var(--sf-surface);
}
.promo-band {
  width: min(calc(100% - 48px), var(--sf-content));
  margin-bottom: 46px;
  padding: 22px;
  border-radius: var(--sf-radius);
  box-shadow: var(--sf-shadow-sm);
}
.promo-band div, .service-strip div { border-color: var(--sf-line); }
.promo-band b { color: var(--sf-ink); }
.promo-band span, .service-strip span { color: var(--sf-muted); }
.service-strip { padding: 32px max(7vw, 28px); }
.service-strip b { color: var(--sf-ink); }
.secondary-banner {
  width: min(calc(100% - 48px), var(--sf-content));
  height: 210px;
  margin-bottom: 48px;
  border-radius: var(--sf-radius-lg);
  box-shadow: var(--sf-shadow-sm);
}
.secondary-banner span { background: linear-gradient(90deg, transparent, rgba(10, 24, 33, .80)); }
[dir="ltr"] .secondary-banner span { background: linear-gradient(270deg, transparent, rgba(10, 24, 33, .80)); }

.crumbs {
  width: min(calc(100% - 48px), var(--sf-content));
  margin: 20px auto 0;
  color: var(--sf-muted);
}
.product-detail .crumbs { width: auto; margin: 0; }
.crumbs a:hover { color: var(--sf-brand-strong); text-decoration: underline; }
.page-title {
  padding: 54px 20px 30px;
  background: linear-gradient(180deg, #edf3f5, var(--sf-bg));
}
.page-title p { color: var(--sf-muted); }
.filters { max-width: var(--sf-content); margin: 0 auto; }
.filters a {
  border-color: var(--sf-line);
  border-radius: 10px;
  background: var(--sf-surface);
  color: var(--sf-muted);
  font-weight: 700;
}
.filters a:hover, .filters a.active { border-color: var(--sf-brand); background: var(--sf-brand); color: #fff; }
.empty-state {
  border-color: #b9c7ce;
  border-radius: var(--sf-radius-lg);
  background: var(--sf-surface);
}
.empty-state > span { color: var(--sf-brand); }

.product-detail {
  width: min(calc(100% - 32px), 1180px);
  margin: 38px auto 70px;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 58px;
  padding: 0;
}
.gallery-stage {
  height: min(660px, 72vh);
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius-lg);
  background: var(--sf-surface-soft);
}
.gallery-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid var(--sf-line);
  color: var(--sf-ink);
  box-shadow: var(--sf-shadow-sm);
}
.gallery-thumb {
  flex-basis: 72px;
  height: 78px;
  border-color: transparent;
  border-radius: 11px;
  background: var(--sf-surface-soft);
  color: var(--sf-brand-strong);
}
.gallery-thumb.active { border-color: var(--sf-brand); }
.detail-copy { padding-top: 6px; }
.product-detail h1 { margin: 16px 0 12px; color: var(--sf-ink); font-size: clamp(30px, 4vw, 45px); font-weight: 800; }
.detail-description { color: var(--sf-muted); line-height: 1.9; }
.choice-label { color: var(--sf-ink); }
.choice-label small { color: var(--sf-muted); font-weight: 500; }
.product-detail select, .customer-form input, .customer-form select, .customer-form textarea, .checkout-line input, .checkout-line select {
  min-height: 46px;
  border-color: var(--sf-line);
  border-radius: 11px;
  color: var(--sf-ink);
}
.product-detail select:focus, .customer-form input:focus, .customer-form select:focus, .customer-form textarea:focus {
  border-color: var(--sf-brand);
  box-shadow: 0 0 0 4px rgba(15, 100, 115, .10);
}
.stock { color: var(--sf-success); background: #e7f4ed; }
.secondary {
  min-height: 46px;
  justify-content: center;
  border-color: var(--sf-line);
  border-radius: 12px;
  color: var(--sf-ink);
  font-weight: 800;
}
.secondary:hover { border-color: var(--sf-brand); color: var(--sf-brand-strong); background: var(--sf-brand-soft); }
.detail-benefits span { border-color: var(--sf-line); border-radius: 10px; background: var(--sf-surface); color: var(--sf-muted); }

.checkout {
  width: min(calc(100% - 32px), 1120px);
  margin: 20px auto 80px;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 28px;
  padding: 0;
}
.checkout-products > h2, .customer-form h2 { color: var(--sf-ink); font-size: 22px; }
.checkout-line {
  grid-template-columns: 96px minmax(0, 1fr);
  border-color: var(--sf-line);
  border-radius: var(--sf-radius);
  background: var(--sf-surface);
  box-shadow: 0 1px 0 rgba(23, 33, 43, .03);
}
.checkout-line img { border-radius: 11px; background: var(--sf-surface-soft); }
.checkout-line-info { min-width: 0; }
.remove-line { color: var(--sf-danger); font-weight: 700; }
.customer-form {
  border-color: var(--sf-line);
  border-radius: var(--sf-radius-lg);
  background: var(--sf-surface);
  box-shadow: var(--sf-shadow-sm);
}
.customer-form label { color: var(--sf-ink); }
.delivery-summary { border: 1px solid var(--sf-line); background: var(--sf-surface-soft); }
.validation-summary-errors {
  width: min(calc(100% - 32px), 1120px);
  margin: 16px auto;
  padding: 12px 16px;
  border: 1px solid #efcaca;
  border-radius: 11px;
  background: #fff1f1;
  color: #8d3030;
}

.success {
  width: min(calc(100% - 32px), 680px);
  margin: 72px auto;
  padding: 52px;
  border-color: var(--sf-line);
  border-radius: var(--sf-radius-lg);
  background: var(--sf-surface);
  box-shadow: var(--sf-shadow);
}
.success-icon { background: #e7f4ed; color: var(--sf-success); }
.success h1 { color: var(--sf-ink); }
.success > p { color: var(--sf-muted); }
.order-number, .success-total { border: 1px solid var(--sf-line); background: var(--sf-surface-soft); }

footer {
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding: 54px max(5vw, 24px);
  border-color: #25323d;
  background: var(--sf-ink);
  color: #fff;
}
footer b { color: #fff; }
footer a, footer span, footer p { color: #bfc8cf; }
footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.brand.light { color: #fff; font-family: Tajawal, "Segoe UI", sans-serif; font-weight: 800; }
.footer-logo { border-radius: 12px; background: #fff; }
.copyright { padding: 15px; background: #0d151c; color: #aeb9c1; }

@media (max-width: 1100px) {
  .header-row { grid-template-columns: minmax(190px, 1fr) minmax(260px, 420px) auto; gap: 18px; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero, .hero-visual { min-height: 420px; }
  footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .announcement { min-height: 30px; padding-inline: 12px; font-size: 10px; }
  .site-header { position: relative; }
  .header-row { padding: 9px 12px; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .brand { min-width: 0; font-size: 18px; }
  .brand-text { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-logo { width: 36px; height: 36px; }
  .brand small { display: none; }
  .cart-button { min-height: 38px; padding: 7px 10px; }
  .cart-label { display: none; }
  .search { grid-column: 1 / -1; grid-row: 2; height: 41px; }
  .nav-toggle {
    display: flex;
    width: 100%;
    min-height: 40px;
    padding: 8px 13px;
    justify-content: space-between;
    border: 0;
    border-top: 1px solid var(--sf-line);
    background: #fff;
    color: var(--sf-ink);
    font-weight: 700;
  }
  .main-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--sf-line);
    background: #fff;
    box-shadow: var(--sf-shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; border: 0; }
  .hero-shell { padding: 12px 10px 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; border-radius: 18px; }
  .hero-visual { min-height: 260px; order: 1; }
  .hero-visual img { mask-image: linear-gradient(#000 82%, transparent); }
  [dir="ltr"] .hero-visual img { mask-image: linear-gradient(#000 82%, transparent); }
  .hero-copy { order: 2; padding: 30px 22px 34px; }
  .hero h1 { margin-block: 8px 12px; font-size: clamp(29px, 9vw, 38px); }
  .hero p { margin-bottom: 22px; font-size: 15px; }
  .primary { min-height: 44px; }
  .category-section { padding: 10px 10px 0; }
  .category-grid { display: flex; gap: 9px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .category-card { min-width: 210px; height: 98px; scroll-snap-align: start; }
  .section { padding: 42px 10px; }
  .section-head { align-items: end; gap: 12px; }
  .section-head h2 { font-size: 25px; }
  .section-head > a { flex: 0 0 auto; font-size: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-card { border-radius: 13px; }
  .product-info { min-height: 94px; padding: 11px 11px 9px; }
  .product-info h3 { min-height: 38px; font-size: 13px; }
  .product-price { align-items: flex-start; flex-direction: column; gap: 0; }
  .product-price b { font-size: 14px; }
  .product-card > button { min-height: 39px; width: calc(100% - 18px); margin: 0 9px 9px; padding: 6px; font-size: 11px; }
  .sale-badge, .new-badge { inset-inline-start: 7px; padding: 3px 7px; font-size: 9px; }
  .new-badge { top: 34px; }
  .promo-band, .service-strip { grid-template-columns: 1fr; gap: 0; }
  .promo-band { width: calc(100% - 20px); margin-bottom: 30px; padding: 10px 18px; }
  .promo-band div, .service-strip div { padding: 13px 0; border-inline-start: 0; border-bottom: 1px solid var(--sf-line); }
  .promo-band div:last-child, .service-strip div:last-child { border-bottom: 0; }
  .service-strip { margin: 0; padding: 12px 22px; }
  .secondary-banner { width: calc(100% - 20px); height: 150px; margin: 0 10px 30px; border-radius: 16px; }
  .secondary-banner span { padding: 20px; background: rgba(10, 24, 33, .62); }
  [dir="ltr"] .secondary-banner span { background: rgba(10, 24, 33, .62); }
  .crumbs { width: calc(100% - 24px); margin-top: 14px; font-size: 12px; }
  .page-title { padding: 38px 14px 22px; }
  .page-title h1 { font-size: 30px; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; padding: 0 10px 4px; overflow-x: auto; }
  .filters a { flex: 0 0 auto; }
  .product-detail { width: 100%; margin: 10px auto 45px; grid-template-columns: 1fr; gap: 22px; padding: 10px; }
  .gallery-stage { height: min(112vw, 500px); border-radius: 16px; }
  .gallery-thumb { flex-basis: 58px; height: 64px; }
  .detail-copy { padding: 2px 3px; }
  .product-detail h1 { font-size: 29px; }
  .detail-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-benefits span { padding: 8px 3px; font-size: 10px; }
  .checkout { width: 100%; margin-top: 10px; grid-template-columns: 1fr; gap: 20px; padding: 10px; }
  .checkout-line { grid-template-columns: 82px minmax(0, 1fr); padding: 10px; }
  .checkout-line img { width: 82px; height: 108px; }
  .checkout-line-info { grid-template-columns: 1fr; }
  .checkout-line-info > * { grid-column: 1 !important; }
  .customer-form { padding: 18px; border-radius: 17px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .delivery-summary { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
  .success { margin: 34px auto; padding: 34px 18px; }
  .success h1 { font-size: 29px; }
  .success-actions { flex-direction: column; }
  footer { grid-template-columns: 1fr; gap: 28px; padding: 42px 24px; }
}

@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card { display: grid; grid-template-columns: 118px minmax(0, 1fr); }
  .product-media { grid-row: 1 / 3; aspect-ratio: auto; min-height: 176px; }
  .product-info { min-height: 124px; }
  .product-card > button { grid-column: 2; }
  .announcement span:last-child, .announcement i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
