@charset "UTF-8";

/* ============ HEADER & TOP WRAPPER ============ */
.site-header-wrapper {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

header.site-header {
  position: relative;
  inset-inline: 0;
  z-index: 100;
  padding-block: var(--sp-4);
  pointer-events: none;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  background: rgba(253,248,239,0.78);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-radius: var(--r-full);
  padding: 8px 26px 8px 10px;
  box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(255,255,255,0.7);
  transition: box-shadow 0.4s cubic-bezier(0.16,1,0.3,1), padding 0.4s ease, transform 0.4s ease;
  transform-style: preserve-3d;
  pointer-events: auto;
}
header.site-header.scrolled .nav-row {
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(255,255,255,0.8);
  padding-block: 7px;
}

.brand { display: flex; align-items: center; gap: var(--sp-3); }
.brand-mark {
  width: 52px; height: 52px; border-radius: var(--r-md); flex: none; padding: 3px;
  background: conic-gradient(from 210deg, var(--forest-light), var(--sky), var(--brass), var(--wine-light), var(--forest-light));
  box-shadow: 0 10px 20px -8px rgba(20,16,8,0.45);
  transition: transform 0.3s ease;
}
.brand-mark:hover { transform: scale(1.08); }
.brand-mark .logo-art { width: 100%; height: 100%; border-radius: calc(var(--r-md) - 3px); }
.logo-art {
  background-image: var(--logo-full);
  background-size: contain; background-repeat: no-repeat; background-position: center;
  background-color: var(--ivory);
}
.brand-name { font-family: 'Tajawal', sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--forest); }
.brand-name small { display: block; font-family: 'Tajawal', sans-serif; font-weight: 500; font-size: 0.68rem; color: var(--ink-soft); letter-spacing: 0.03em; }

.main-nav { display: flex; align-items: center; gap: var(--sp-6); }
.main-nav a, .main-nav button { font-weight: 500; font-size: 0.98rem; position: relative; padding-block: 4px; color: var(--ink); text-decoration: none; }
.main-nav a::after, .main-nav button::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: -2px; height: 2px;
  background: var(--brass); transform: scaleX(0); transition: transform 0.3s ease;
}
.main-nav a:hover::after, .main-nav button:hover::after, .main-nav a.active::after, .main-nav button.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }
.cart-badge {
  position: absolute; top: -4px; left: -4px; background: var(--wine); color: var(--ivory);
  font-size: 0.65rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding-inline: 3px;
  box-shadow: 0 0 0 2px var(--ivory);
}
.menu-toggle { display: none; }

.mm-link { color: inherit; text-decoration: none; }
.mm-link.active { color: var(--brass); font-weight: 700; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
}

/* ============ FOOTER ============ */
footer {
  background: var(--ink);
  color: var(--ivory);
  padding-block: var(--sp-8) var(--sp-5);
  margin-top: var(--sp-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-6);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { color: var(--ivory); margin-bottom: var(--sp-3); }
.footer-brand p { color: rgba(253,248,239,0.7); font-size: 0.92rem; }
.footer-col h5 { font-family: 'Tajawal', sans-serif; font-size: 1.05rem; font-weight: 700; margin-bottom: var(--sp-4); color: var(--brass-light); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a, .footer-col button { color: rgba(253,248,239,0.8); font-size: 0.95rem; transition: color 0.3s; }
.footer-col a:hover, .footer-col button:hover { color: var(--brass); }

/* ============ CART DRAWER ============ */
.overlay-bg {
  position: fixed; inset: 0; background: rgba(26,23,18,0.5); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.overlay-bg.show { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: 400px; max-width: 100%;
  height: 100%;
  background: var(--ivory); z-index: 1000; box-shadow: 20px 0 40px rgba(0,0,0,0.2);
  transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cd-head {
  padding: var(--sp-5); border-bottom: 1px solid rgba(26,23,18,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.cd-close { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(26,23,18,0.05); }
.cd-close:hover { background: rgba(26,23,18,0.1); }
.cd-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.cd-item { display: flex; gap: var(--sp-3); align-items: center; }
.cd-item-info { flex: 1; }
.qty-ctrl { display: flex; align-items: center; gap: 12px; background: var(--white); padding: 4px 8px; border-radius: var(--r-full); box-shadow: var(--shadow-soft); }
.cd-foot {
  flex-shrink: 0;
  padding: var(--sp-5);
  background: var(--white);
  border-top: 1px solid rgba(26,23,18,0.08);
}
.cd-subtotal { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.2rem; margin-bottom: var(--sp-4); }

@media (max-width: 768px) {
  .cart-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 76px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 76px - env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    z-index: 945;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
  }
  .cd-foot {
    padding: var(--sp-4) var(--sp-5);
    flex-shrink: 0;
  }
  body.cart-open .fixed-install-pill {
    display: none !important;
  }
}

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .product-grid { gap: var(--sp-3); } }

