/* =========================================================================
   ArabOodh — components.css
   Buttons, header/nav, cards, footer, review carousel.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  --_h: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--_h);
  padding: 0 28px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-out);
  white-space: nowrap;
}

.btn:active, 
.product-card:active, 
.featured-main:active, 
.featured-side:active, 
.chip:active, 
.nav-link:active,
.icon-btn:active {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease-out !important;
}

.btn .btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-1);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text-mute);
}
.btn-outline:hover {
  border-color: var(--text);
  background: rgba(240, 237, 232, 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  padding: 0;
  height: auto;
  letter-spacing: 0.18em;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  padding-bottom: 4px;
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-sm { --_h: 38px; padding: 0 18px; font-size: 11px; letter-spacing: 0.16em; }

/* Paired CTA group */
.cta-pair {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}
.cta-pair .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  height: auto;
  min-height: var(--_h);
  padding-block: 8px;
}

/* Linked-arrow text style ("Read our full story →") */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 4px;
  transition: color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              gap var(--t-fast) var(--ease-out);
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); gap: 14px; }

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background var(--t-med) var(--ease-out),
              backdrop-filter var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(8, 8, 8, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}

.site-header .nav.container {
  max-width: none;
  padding-inline: clamp(20px, 5vw, 72px);
}

.nav {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.brand img,
.brand svg {
  height: 38px;
  width: auto;
  display: block;
}
@media (max-width: 540px) {
  .brand img,
  .brand svg { height: 34px; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 30px);
  justify-content: center;
}
.nav-link {
  position: relative;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

/* Active link — underline owned by .nav-rail-indicator (slides between
   pages via View Transitions). Hide the pseudo-underline on active to
   avoid a double rule. */
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after { transform: scaleX(0); }

/* Sliding underline rail — single element JS positions under the active link */
.nav-links {
  position: relative;
}
.nav-rail-indicator {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  pointer-events: none;
  transition: transform var(--t-med) var(--ease-out),
              width var(--t-med) var(--ease-out);
  transform: translateX(0);
  view-transition-name: nav-rail;
}
/* .nav-rail-indicator.is-ready is enabled once JS has measured the active link */

::view-transition-group(nav-rail) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 880px) {
  .nav-rail-indicator { display: none; }
}

.nav-cta {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.nav-cta .icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: border-color var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}
.nav-cta .icon-btn:hover { color: var(--text); border-color: var(--text); }
.nav-cta .icon-btn svg { width: 14px; height: 14px; }

/* Mobile menu */
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  align-items: center;
  justify-content: center;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  position: relative;
  transition: transform var(--t-med) var(--ease-out),
              opacity var(--t-fast) var(--ease-out),
              top var(--t-med) var(--ease-out),
              bottom var(--t-med) var(--ease-out);
}
.menu-toggle span::before,
.menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after  { bottom: -6px; }

.is-menu-open .menu-toggle span             { background: transparent; }
.is-menu-open .menu-toggle span::before     { top: 0; transform: rotate(45deg); }
.is-menu-open .menu-toggle span::after      { bottom: 0; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }

  /* Mobile menu — slide-in drawer from right with a tap-to-close backdrop */
  .nav-links {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    width: min(82vw, 340px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: clamp(20px, 4vw, 32px) clamp(20px, 4vw, 28px) clamp(28px, 5vw, 40px);
    background: rgba(8, 8, 8, 0.75);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-left: 0.5px solid var(--border);
    box-shadow: -28px 0 60px rgba(0, 0, 0, 0.55);
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.36s var(--ease-out),
                opacity 0.2s var(--ease-out);
    z-index: 81;
  }
  .nav-links .nav-link {
    display: block;
    width: 100%;
    font-family: var(--font-serif);
    font-size: clamp(20px, 3.6vw, 26px);
    font-weight: 300;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-soft);
    padding: 16px 0;
    border-bottom: 0.5px solid var(--border);
  }
  .nav-links .nav-link::after { content: none; }
  .nav-links .nav-link.is-active { color: var(--accent); }

  .is-menu-open .nav-links {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Backdrop — always present at mobile widths; opacity-toggled for smooth in/out */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 79;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s var(--ease-out);
  }
  body.is-menu-open::before {
    opacity: 1;
    pointer-events: auto;
  }
  html.is-menu-open, body.is-menu-open { overflow: hidden; height: 100vh; }

  /* Hide sliding rail in drawer mode */
  .nav-rail-indicator { display: none; }
}

/* -------------------------------------------------------------------------
   Cards (product, collection, review)
   ------------------------------------------------------------------------- */
.card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

/* Product card */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.product-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(120% 80% at 50% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--bg-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}
.product-card:hover .product-figure img { transform: scale(1.04); }

/* Image-absent placeholder treatment — looks intentional */
.product-figure.is-empty::before {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  pointer-events: none;
}
.product-figure.is-empty::after {
  content: attr(data-placeholder);
  position: absolute;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--text-dim);
  letter-spacing: 0.02em;
  pointer-events: none;
}

.product-body {
  padding: clamp(20px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.product-name {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.1;
}

.product-desc {
  color: var(--text-soft);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.notes {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.notes-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: baseline;
}
.notes-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.notes-value {
  font-size: var(--fs-sm);
  color: var(--text-soft);
  line-height: 1.55;
}

.product-card .btn {
  margin-top: 6px;
  align-self: flex-start;
}

/* "Coming soon" variant */
.product-card.is-coming-soon { opacity: 0.78; }
.product-card.is-coming-soon .product-figure {
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 14px,
      rgba(240, 237, 232, 0.018) 14px 28px),
    var(--bg-2);
}
.product-card.is-coming-soon .product-name::after {
  content: " · Coming Soon";
  font-style: italic;
  color: var(--accent);
  font-size: 0.6em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

/* Collection card (smaller, simpler) */
.collection-card {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
  transition: transform var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out);
}
.collection-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.collection-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform var(--t-slow) var(--ease-out),
              opacity var(--t-med) var(--ease-out);
  opacity: 0.75;
}
.collection-card:hover img { transform: scale(1.05); opacity: 0.9; }
.collection-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.85) 0%, rgba(8,8,8,0.2) 60%, transparent 100%);
  z-index: 1;
}
.collection-card .label {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 400;
}

.collection-card.is-empty img { display: none; }
.collection-card.is-empty {
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--bg-3);
}

/* Review card */
.review-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  transition: border-color var(--t-fast) var(--ease-out),
              transform var(--t-med) var(--ease-out);
}
.review-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.review-stars {
  display: inline-flex;
  gap: 4px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.review-text {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text);
  font-style: italic;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}
.review-author { color: var(--text); font-weight: 500; letter-spacing: 0.05em; }
.review-link {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.review-link:hover { color: var(--accent); }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-block: var(--space-xl) var(--space-lg);
  color: var(--text-soft);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.footer-col p, .footer-col a, .footer-col li { line-height: 1.85; }
.footer-col a { color: var(--text-soft); }
.footer-col a:hover { color: var(--accent); }

.footer-brand img,
.footer-brand svg {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}
.footer-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 30ch;
}
.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-mute);
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
  .footer-brand { grid-column: 1 / -1; margin-bottom: var(--space-sm); }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-sm); }
  .site-footer { padding-block: var(--space-lg) var(--space-md); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: var(--space-md); }
}

/* Footer "Connect" row — phone + whatsapp, identical formatting */
.connect-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.connect-row .label-line {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.connect-row .number,
.connect-row .number-static,
.connect-row .number-link {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  border: 0;
  padding: 0;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
.connect-row .number-link:hover {
  color: var(--accent);
}

/* -------------------------------------------------------------------------
   Dedicated call + WhatsApp action buttons
   ------------------------------------------------------------------------- */
.btn-call {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text-mute);
}
.btn-call:hover {
  border-color: var(--text);
  background: rgba(240, 237, 232, 0.04);
}
.btn-call .btn-icon {
  width: 14px; height: 14px;
  flex: 0 0 14px;
}

.btn-whatsapp {
  background: #1f1f1f;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-whatsapp:hover {
  background: #262626;
  border-color: #4a4a4a;
}
.btn-whatsapp .btn-icon {
  width: 16px; height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

/* -------------------------------------------------------------------------
   Scroll to Top FAB — bottom-right corner
   ------------------------------------------------------------------------- */
.fab-scroll-top {
  position: fixed;
  right: clamp(18px, 2.4vw, 28px);
  bottom: clamp(18px, 2.4vw, 28px);
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  background: rgba(13, 13, 13, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-med) var(--ease-bounce),
              background var(--t-fast) var(--ease-out),
              opacity var(--t-med) var(--ease-out);
  cursor: pointer;
  padding: 0;
}
.fab-scroll-top:hover {
  background: rgba(30, 30, 30, 0.75);
  transform: translateY(-4px);
}
.fab-scroll-top:active {
  transform: translateY(0) scale(0.95);
}
.fab-scroll-top svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.fab-scroll-top.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

/* -------------------------------------------------------------------------
   Brand divider — Arabic-inspired ring used between sections
   ------------------------------------------------------------------------- */
.divider-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-block: var(--space-md);
}
.divider-ring::before,
.divider-ring::after {
  content: "";
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 50%, transparent);
}
.divider-ring .ring {
  width: 8px;
  height: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: inline-block;
}
.divider-ring .ring + .ring { margin-left: 12px; }

