/* ==========================================================================
   Velorya — Design Tokens & Base Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Montserrat:wght@300;400;500;600;700&family=Amiri:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  /* Color — Light (default) */
  --color-bg: #FAF9F7;
  --color-bg-alt: #F1ECE3;
  --color-surface: #FFFFFF;
  --color-text: #1C1917;
  --color-text-muted: #6B6560;
  --color-border: #E5DFD5;
  --color-accent: #A16207;
  --color-accent-soft: #C99A3D;
  --color-accent-ink: #FFFFFF;
  --color-destructive: #B4231C;
  --color-success: #15803D;
  --color-ring: #1C1917;

  /* Product placeholder palette */
  --swatch-1: #EFE4D6;
  --swatch-2: #E3D5C4;
  --swatch-3: #D8C3A5;
  --swatch-4: #C9A97E;
  --swatch-5: #ECEAE3;
  --swatch-6: #DCD3C4;

  /* Typography */
  --font-display: 'Cormorant', 'Amiri', 'Georgia', serif;
  --font-body: 'Montserrat', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 3.75rem;

  /* Spacing (8pt-ish scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Radius / Shadow */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 16px 48px rgba(28, 25, 23, 0.14);

  --container-max: 1320px;
  --header-h: 76px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #15120F;
    --color-bg-alt: #1D1915;
    --color-surface: #211C18;
    --color-text: #F5F1EA;
    --color-text-muted: #B7ADA0;
    --color-border: #382F27;
    --color-accent: #D6A94A;
    --color-accent-soft: #E6C57A;
    --color-accent-ink: #1C1917;
    --color-destructive: #E4665F;
    --color-success: #4ADE80;
    --color-ring: #F5F1EA;

    --swatch-1: #2A2420;
    --swatch-2: #332B24;
    --swatch-3: #3D3327;
    --swatch-4: #4A3C2B;
    --swatch-5: #262220;
    --swatch-6: #302A24;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --color-bg: #15120F;
  --color-bg-alt: #1D1915;
  --color-surface: #211C18;
  --color-text: #F5F1EA;
  --color-text-muted: #B7ADA0;
  --color-border: #382F27;
  --color-accent: #D6A94A;
  --color-accent-soft: #E6C57A;
  --color-accent-ink: #1C1917;
  --color-destructive: #E4665F;
  --color-success: #4ADE80;
  --color-ring: #F5F1EA;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 var(--space-3); letter-spacing: 0.01em; }
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--space-4); color: var(--color-text-muted); }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -60px;
  background: var(--color-text); color: var(--color-bg);
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  z-index: 1000; transition: top var(--transition-base);
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-8); } }

.section { padding-block: var(--space-12); }
.section--tight { padding-block: var(--space-8); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); flex-wrap: wrap; }
.eyebrow {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-accent);
  display: inline-block; margin-bottom: var(--space-2);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.9rem 1.75rem; border-radius: var(--radius-full);
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  min-height: 48px; cursor: pointer; transition: transform var(--transition-fast), background var(--transition-base), color var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid transparent; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-text); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.btn-accent { background: var(--color-accent); color: var(--color-accent-ink); }
.btn-accent:hover { background: var(--color-accent-soft); }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.btn-outline:hover { background: var(--color-text); color: var(--color-bg); }
.btn-ghost { background: transparent; color: var(--color-text); padding: 0.6rem 1rem; min-height: 44px; }
.btn-ghost:hover { color: var(--color-accent); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.6rem 1.25rem; min-height: 40px; font-size: var(--fs-xs); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  color: var(--color-text); transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}
.btn-icon:hover { background: var(--color-bg-alt); color: var(--color-accent); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 32px; height: 32px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
}
.announce-bar {
  background: var(--color-text); color: var(--color-bg);
  text-align: center; font-size: var(--fs-xs); letter-spacing: 0.08em;
  padding: 0.55rem var(--space-4); text-transform: uppercase;
}
.navbar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--space-4); }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: 0.03em; }
.brand .icon { color: var(--color-accent); }
.nav-links { display: none; align-items: center; gap: var(--space-6); }
.nav-links a { font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0.02em; padding-block: 0.4rem; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; inset-inline-start: 0; inset-inline-end: 100%; bottom: -2px; height: 2px; background: var(--color-accent);
  transition: inset-inline-end var(--transition-base);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { inset-inline-end: 0; }
.nav-links a[aria-current="page"] { color: var(--color-accent); }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-actions { display: flex; align-items: center; gap: 0.15rem; }
.cart-badge {
  position: absolute; top: 2px; inset-inline-end: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-bg); line-height: 1;
}
.cart-badge[hidden] { display: none; }
.menu-toggle { display: inline-flex; }
@media (min-width: 960px) { .menu-toggle { display: none; } }
.search-toggle { display: none; }
@media (min-width: 560px) { .search-toggle { display: inline-flex; } }
.search-overlay[hidden] { display: none; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 200; visibility: hidden; overflow: hidden;
}
.mobile-drawer[data-open="true"] { visibility: visible; }
.drawer-scrim {
  position: absolute; inset: 0; background: rgba(20, 16, 12, 0.5); opacity: 0; transition: opacity var(--transition-base);
}
.drawer-panel {
  position: absolute; top: 0; inset-inline-end: 0; height: 100%; width: min(84vw, 360px);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform var(--transition-base);
  display: flex; flex-direction: column; padding: var(--space-5); overflow-y: auto;
}
[dir="rtl"] .drawer-panel { transform: translateX(-100%); }
.mobile-drawer[data-open="true"] .drawer-scrim { opacity: 1; }
.mobile-drawer[data-open="true"] .drawer-panel { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-6); }
.drawer-links { display: flex; flex-direction: column; gap: var(--space-1); }
.drawer-links a { font-family: var(--font-display); font-size: var(--fs-xl); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, var(--color-bg-alt) 0%, var(--color-bg) 60%);
  padding-block: var(--space-10) var(--space-12);
}
.hero-grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-10); } }
.hero-copy h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
.hero-copy p { font-size: var(--fs-md); max-width: 42ch; }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-8); margin-top: var(--space-8); }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); }
.hero-stat span { font-size: var(--fs-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.hero-visual { position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }

/* ---- Product placeholder art tiles ---- */
.art-tile {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 20% 15%, var(--tile-a, var(--swatch-1)) 0%, var(--tile-b, var(--swatch-3)) 100%);
}
.art-tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(circle at 1px 1px, rgba(28,25,23,0.06) 1px, transparent 0);
  background-size: 14px 14px;
}
.art-tile .icon {
  position: relative; width: 46%; height: 46%; stroke: var(--color-text); opacity: 0.82; stroke-width: 1.1;
  filter: drop-shadow(0 8px 18px rgba(28,25,23,0.18));
}
.art-tile .art-monogram {
  position: absolute; bottom: var(--space-3); inset-inline-start: var(--space-3);
  font-family: var(--font-display); font-style: italic; font-size: var(--fs-sm); color: var(--color-text); opacity: 0.45;
}

/* ---- Category cards ---- */
.category-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
.category-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.category-card .cat-label {
  position: absolute; inset-inline: var(--space-4); bottom: var(--space-4);
  color: var(--color-text); font-family: var(--font-display); font-size: var(--fs-lg);
  display: flex; justify-content: space-between; align-items: center;
}

/* ---- Product grid & card ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-6); }
.chip-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  padding: 0.55rem 1.1rem; border-radius: var(--radius-full); border: 1px solid var(--color-border);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  transition: all var(--transition-fast); min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.chip:not([aria-pressed="true"]):hover { border-color: var(--color-text); }
.select-field {
  border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface);
  padding-block: 0.55rem; padding-inline: 1.1rem 2.2rem; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase;
  min-height: 40px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1917' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 14px;
}
[dir="rtl"] .select-field { background-position: left 0.7rem center; }
.results-count { font-size: var(--fs-sm); color: var(--color-text-muted); }

.product-grid { display: grid; gap: var(--space-6) var(--space-5); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { display: flex; flex-direction: column; }
.product-media {
  position: relative; aspect-ratio: 1/1; border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-bg-alt); margin-bottom: var(--space-3);
}
.product-media .art-tile { transition: transform 400ms ease; }
.product-card:hover .art-tile { transform: scale(1.05); }
.product-badge {
  position: absolute; top: var(--space-3); inset-inline-start: var(--space-3); z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.65rem; border-radius: var(--radius-full);
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm);
}
.product-badge.badge-new { color: var(--color-accent); }
.wish-btn {
  position: absolute; top: var(--space-3); inset-inline-end: var(--space-3); z-index: 2;
  width: 38px; height: 38px; border-radius: var(--radius-full); background: var(--color-surface);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.wish-btn:hover { color: var(--color-destructive); }
.wish-btn[aria-pressed="true"] { color: var(--color-destructive); }
.wish-btn[aria-pressed="true"] .icon { fill: currentColor; }
.quick-add {
  position: absolute; inset-inline: var(--space-3); bottom: var(--space-3); z-index: 2;
  opacity: 0; transform: translateY(6px); transition: all var(--transition-base);
}
.product-card:hover .quick-add, .product-card:focus-within .quick-add { opacity: 1; transform: translateY(0); }
.product-info h3 { font-size: var(--fs-md); margin-bottom: 0.2rem; }
.product-cat { font-size: var(--fs-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.product-price { font-weight: 600; color: var(--color-text); }
.product-price .price-strike { text-decoration: line-through; color: var(--color-text-muted); font-weight: 400; margin-inline-end: 0.4rem; font-size: var(--fs-sm); }
.product-link { display: block; }

.empty-state { text-align: center; padding: var(--space-12) var(--space-4); color: var(--color-text-muted); }
.empty-state .icon-lg { margin: 0 auto var(--space-4); color: var(--color-border); width: 64px; height: 64px; }

/* ---- Feature strip ---- */
.feature-strip { display: grid; gap: var(--space-6); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .feature-strip { grid-template-columns: repeat(4, 1fr); } }
.feature-item { text-align: center; padding: var(--space-4); }
.feature-item .icon-lg { margin: 0 auto var(--space-3); color: var(--color-accent); }
.feature-item h4 { font-family: var(--font-body); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-1); }
.feature-item p { font-size: var(--fs-sm); margin: 0; }

/* ---- Testimonials ---- */
.testimonial-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 800px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); }
.stars { color: var(--color-accent); display: flex; gap: 2px; margin-bottom: var(--space-3); }
.testimonial-card footer { margin-top: var(--space-4); font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); }
.testimonial-card footer span { display: block; font-weight: 400; color: var(--color-text-muted); font-size: var(--fs-xs); }

/* ---- Newsletter ---- */
.newsletter {
  background: var(--color-text); color: var(--color-bg); border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-6); text-align: center;
}
.newsletter h2, .newsletter .eyebrow { color: var(--color-bg); }
.newsletter p { color: color-mix(in srgb, var(--color-bg) 70%, transparent); }
.newsletter-form { display: flex; gap: var(--space-3); max-width: 460px; margin: var(--space-6) auto 0; flex-wrap: wrap; justify-content: center; }
.newsletter-form input {
  flex: 1; min-width: 220px; padding: 0.9rem 1.25rem; border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--color-bg) 30%, transparent); background: transparent; color: var(--color-bg); min-height: 48px;
}
.newsletter-form input::placeholder { color: color-mix(in srgb, var(--color-bg) 55%, transparent); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-10) var(--space-6); background: var(--color-bg-alt); }
.footer-grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-brand .brand { margin-bottom: var(--space-3); }
.footer-brand p { max-width: 32ch; }
.social-row { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.footer-col h4 { font-family: var(--font-body); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { color: var(--color-text-muted); font-size: var(--fs-sm); transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-10); padding-top: var(--space-6); border-top: 1px solid var(--color-border);
  font-size: var(--fs-xs); color: var(--color-text-muted);
}
.payment-icons { display: flex; gap: var(--space-2); }
.theme-toggle { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); }

/* ---- Breadcrumb ---- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-6); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb .sep { opacity: 0.5; }

/* ---- Product detail ---- */
.pdp-grid { display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .pdp-grid { grid-template-columns: 1fr 1fr; gap: var(--space-10); } }
.pdp-gallery-main { scroll-margin-top: calc(var(--header-h) + 3.5rem); aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-3); box-shadow: var(--shadow-md); }
.pdp-thumbs { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.pdp-thumb { width: 76px; height: 76px; border-radius: var(--radius-md); overflow: hidden; border: 2px solid transparent; transition: border-color var(--transition-fast); flex-shrink: 0; }
.pdp-thumb[aria-current="true"] { border-color: var(--color-accent); }
.pdp-info .product-cat { margin-top: 0; }
.pdp-info h1 { font-size: var(--fs-2xl); }
.pdp-rating { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.pdp-price { font-size: var(--fs-xl); font-weight: 600; margin-bottom: var(--space-5); }
.option-group { margin-bottom: var(--space-5); }
.option-label { display: flex; justify-content: space-between; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--space-3); }
.option-label .option-value { font-weight: 400; color: var(--color-text-muted); }
.swatch-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.swatch {
  width: 44px; height: 44px; border-radius: var(--radius-full); border: 2px solid transparent;
  outline: 1px solid var(--color-border); outline-offset: 2px; position: relative; transition: outline-color var(--transition-fast);
}
.swatch[aria-pressed="true"] { outline-color: var(--color-text); }
.size-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.size-btn {
  min-width: 48px; height: 48px; padding-inline: var(--space-3); border-radius: var(--radius-md);
  border: 1px solid var(--color-border); font-size: var(--fs-sm); font-weight: 500;
  transition: all var(--transition-fast);
}
.size-btn:hover { border-color: var(--color-text); }
.size-btn[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-full); }
.qty-stepper button { width: 44px; height: 48px; font-size: var(--fs-md); }
.qty-stepper input { width: 40px; text-align: center; border: none; background: transparent; font-weight: 600; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-actions { display: flex; gap: var(--space-3); margin: var(--space-6) 0; flex-wrap: wrap; }
.pdp-actions .btn-primary { flex: 1; min-width: 200px; }
.pdp-meta { border-top: 1px solid var(--color-border); padding-top: var(--space-5); }
.pdp-meta-row { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--fs-sm); margin-bottom: var(--space-3); }
.pdp-meta-row .icon { color: var(--color-accent); flex-shrink: 0; margin-top: 2px; }
.accordion { border-top: 1px solid var(--color-border); }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4) 0; font-weight: 600; text-align: start; gap: var(--space-3);
}
.accordion-trigger .icon { transition: transform var(--transition-base); }
.accordion-item[data-open="true"] .accordion-trigger .icon { transform: rotate(180deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height var(--transition-base); }
.accordion-item[data-open="true"] .accordion-panel { max-height: 400px; }
.accordion-panel-inner { padding-bottom: var(--space-4); font-size: var(--fs-sm); }

/* ---- Cart ---- */
.cart-layout { display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1.7fr 1fr; align-items: start; } }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto; gap: var(--space-4); padding-block: var(--space-5); border-bottom: 1px solid var(--color-border); align-items: center; }
.cart-layout > *, .cart-row > *, .feature-item { min-width: 0; }
.feature-item h4 { overflow-wrap: break-word; }
.cart-row-media { width: 84px; height: 84px; border-radius: var(--radius-md); overflow: hidden; }
.cart-row-info h3 { font-size: var(--fs-md); margin-bottom: 0.2rem; }
.cart-row-meta { font-size: var(--fs-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cart-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
.cart-row-price { text-align: end; font-weight: 600; white-space: nowrap; }
.remove-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--fs-xs); color: var(--color-text-muted); }
.remove-link:hover { color: var(--color-destructive); }
.summary-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); position: sticky; top: calc(var(--header-h) + var(--space-4)); }
.summary-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: var(--space-3); color: var(--color-text-muted); }
.summary-row.total { font-size: var(--fs-lg); font-weight: 700; color: var(--color-text); border-top: 1px solid var(--color-border); padding-top: var(--space-4); margin-top: var(--space-4); }
.promo-row { display: flex; gap: var(--space-2); margin: var(--space-5) 0; }
.promo-row input { flex: 1; min-width: 0; padding: 0.7rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); min-height: 44px; }
.trust-badges { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-6); font-size: var(--fs-xs); color: var(--color-text-muted); }
.trust-badges li { display: flex; align-items: center; gap: var(--space-2); }
.trust-badges .icon { color: var(--color-accent); }

/* ---- Forms (contact / checkout) ---- */
.form-grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field .req { color: var(--color-destructive); }
.field input, .field select, .field textarea {
  padding: 0.85rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); min-height: 48px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field small { font-size: var(--fs-xs); color: var(--color-text-muted); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-destructive); }
.field-error { font-size: var(--fs-xs); color: var(--color-destructive); display: none; align-items: center; gap: 0.3rem; }
.field.has-error .field-error { display: flex; }

/* ---- Page header ---- */
.page-hero { padding-block: var(--space-8) var(--space-6); text-align: center; background: var(--color-bg-alt); }
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }

/* ---- Toast ---- */
.toast-region { position: fixed; bottom: var(--space-5); right: var(--space-5); left: var(--space-5); z-index: 300; display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--space-3);
  background: var(--color-text); color: var(--color-bg); padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-width: 380px; width: 100%;
  transform: translateY(12px); opacity: 0; transition: all var(--transition-base);
}
.toast[data-show="true"] { transform: translateY(0); opacity: 1; }
.toast .icon { color: var(--color-accent); flex-shrink: 0; }
.toast-body { flex: 1; font-size: var(--fs-sm); }
.toast-body strong { display: block; font-size: var(--fs-sm); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.badge-count { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Live catalog (Velorya backend): photos, stock, account, orders
   ========================================================================== */
.art-tile.has-photo { background: var(--color-bg-alt); }
.art-tile.has-photo::before { display: none; }
.art-tile.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.skeleton, .skeleton-line {
  background: linear-gradient(90deg, var(--color-bg-alt) 0%, var(--color-border) 50%, var(--color-bg-alt) 100%);
  background-size: 200% 100%; animation: velorya-shimmer 1.4s ease-in-out infinite;
}
.skeleton::before { display: none; }
.skeleton-line { height: 0.9rem; border-radius: var(--radius-sm, 4px); margin: 0.6rem 0; }
.skeleton-line.short { width: 40%; }
@keyframes velorya-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .skeleton-line { animation: none; } }

.card-swatches { display: flex; gap: 6px; margin-top: var(--space-2); }
.swatch-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--color-border); }
.product-card.is-sold-out .art-tile { filter: grayscale(0.6); opacity: 0.75; }
.product-card.is-sold-out .product-badge { background: var(--color-text-muted); color: var(--color-bg); }

.swatch.is-out { opacity: 0.6; background-image: linear-gradient(135deg, transparent 46%, var(--color-text) 46%, var(--color-text) 54%, transparent 54%) !important; background-blend-mode: normal; }

.pdp-stock { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); font-weight: 600; margin-top: calc(var(--space-2) * -1); }
.pdp-stock.is-in { color: var(--color-success); }
.pdp-stock.is-low { color: var(--color-accent); }
.pdp-stock.is-out { color: var(--color-destructive); }
.stock-note { color: var(--color-accent); font-weight: 600; }
#add-to-bag:disabled { opacity: 0.55; cursor: not-allowed; }

.stock-toggle { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); cursor: pointer; min-height: 44px; }
.stock-toggle input { width: 18px; height: 18px; accent-color: var(--color-text); }

label.chip { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
label.chip input { accent-color: var(--color-text); }
label.chip:has(input:checked) { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }

.form-error { color: var(--color-destructive); font-size: var(--fs-sm); margin: var(--space-4) 0; }

.auth-wrap { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-8) var(--space-6); }
.auth-tabs { margin-bottom: var(--space-6); }
.auth-tabs .chip { flex: 1; justify-content: center; }
.auth-title { font-size: var(--fs-xl); margin-bottom: var(--space-5); }
.auth-card .btn-block { margin-top: var(--space-6); }

.order-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-4); }
.order-head, .order-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.order-meta { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
.order-status { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid currentColor; }
.order-status.is-pending { color: var(--color-accent); }
.order-status.is-ok { color: var(--color-success); }
.order-status.is-bad { color: var(--color-destructive); }
.order-status.is-muted { color: var(--color-text-muted); }
.order-lines { list-style: none; padding: 0; margin: var(--space-4) 0; border-block: 1px solid var(--color-border); }
.order-lines li { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; font-size: var(--fs-sm); }
.product-media > .product-link { height: 100%; }
[hidden] { display: none !important; }

/* ==========================================================================
   Language: Arabic (RTL, default) and English — see assets/js/i18n.js
   ========================================================================== */
/* Static markup is English source; hold the first paint until it is translated. */
html[data-i18n-pending] body { visibility: hidden; }

.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; height: 44px; padding-inline: 0.6rem; border-radius: var(--radius-full);
  font-size: var(--fs-sm); font-weight: 600; color: var(--color-text);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.lang-toggle:hover { background: var(--color-bg-alt); color: var(--color-accent); }
.lang-toggle .lang-name { display: none; }
@media (min-width: 560px) {
  .lang-toggle { border: 1px solid var(--color-border); height: 38px; padding-inline: 0.85rem; margin-inline-end: 0.35rem; }
  .lang-toggle .lang-name { display: inline; }
  .lang-toggle .lang-short { display: none; }
}
.drawer-panel .btn .lang-short { display: none; }
.lang-toggle:lang(ar), [data-action="set-lang"]:lang(ar) { font-family: 'IBM Plex Sans Arabic', var(--font-body); }

.drawer-search { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding-inline-start: 1rem; background: var(--color-bg); }
.drawer-search input { flex: 1; min-width: 0; border: none; background: transparent; min-height: 44px; outline: none; }
.drawer-search:focus-within { border-color: var(--color-text); }

/* Arabic script is cursive: tracking breaks its joins, and its taller forms need more leading. */
html[lang="ar"] *, html[lang="ar"] *::before, html[lang="ar"] *::after { letter-spacing: normal !important; }
html[lang="ar"] body { line-height: 1.8; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { line-height: 1.45; }
html[lang="ar"] .art-tile .art-monogram { font-style: normal; }

/* Email, phone and numbers read left-to-right even inside Arabic pages. */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="number"] { direction: ltr; text-align: right; }
[dir="rtl"] .qty-stepper input { text-align: center; }

/* ---- Phones ---- */
.feature-strip--3 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .feature-strip--3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 559px) {
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  .section { padding-block: var(--space-10); }
  .brand { font-size: var(--fs-xl); }
  .navbar { gap: var(--space-2); }
  .announce-bar { font-size: 0.7rem; padding-inline: var(--space-3); }
  .cart-row { grid-template-columns: 64px 1fr; }
  .cart-row-media { width: 64px; height: 64px; }
  .cart-row-price { grid-column: 2; text-align: start; }
  .summary-card { position: static; padding: var(--space-5); }
  .auth-card { padding: var(--space-6) var(--space-4); }
  .newsletter { padding: var(--space-8) var(--space-4); }
  .btn { white-space: normal; text-align: center; }
  .hero-stats { gap: var(--space-4) var(--space-6); }
  .footer-bottom { justify-content: center; text-align: center; }
}
/* The smallest phones: the account link moves to the drawer to keep the header on one line. */
@media (max-width: 359px) {
  .nav-actions [data-account-link] { display: none; }
  .feature-item { padding-inline: var(--space-2); }
}
/* No hover on touch screens: keep the quick action visible instead of hidden behind it. */
@media (hover: none) {
  .quick-add { opacity: 1; transform: none; }
}
