/* Ruvika Fashion Hub - storefront
   Palette: chalk, ink, indigo (the accent), madder (sale / errors)
   Type: Archivo, using its width axis. Wide for headlines, normal for reading. */

:root {
  --chalk: #f2f2ee;
  --paper: #fafaf8;
  --ink: #111318;
  --muted: #62656b;
  --line: #d9d9d2;
  --indigo: #27338f;
  --indigo-dark: #1b2470;
  --madder: #a83a2e;
  --ok: #2f6b4a;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1320px;
  --display: 'Archivo', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 1rem/1.6 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-stretch: 118%; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-stretch: 112%; }
h3 { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 0; }
.muted { color: var(--muted); }
.ico { display: block; }

/* Top bar */
.notice-bar { background: var(--ink); color: #e9e9e4; text-align: center; font-size: .8125rem; padding: 8px var(--gutter); }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--chalk); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-stretch: 125%; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; text-decoration: none; line-height: 1; white-space: nowrap; }
.brand span { font-weight: 300; color: var(--indigo); }
.brand-lg { font-size: 1.6rem; margin-bottom: 12px; }
.main-nav { display: flex; gap: 22px; font-size: .9375rem; margin-left: 12px; }
.main-nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--ink); }
.actions { margin-left: auto; display: flex; gap: 4px; }
.icon-btn { background: none; border: 0; color: inherit; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; position: relative; border-radius: 50%; }
.icon-btn:hover { background: rgba(17, 19, 24, .06); }
.bag-count { position: absolute; top: 4px; right: 2px; background: var(--indigo); color: #fff; font-size: .6875rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; font-weight: 600; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; margin-left: -10px; }
  .site-header .bar { gap: 8px; }
  .brand { margin-right: auto; }
  .actions { margin-left: 0; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--chalk); border-bottom: 1px solid var(--line); margin: 0; padding: 8px var(--gutter) 16px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
}

/* Flash */
.flash { padding: 12px 0; font-size: .9375rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.flash-success { background: #e4efe8; color: #1f4d35; }
.flash-error { background: #f6e3e0; color: #7d2a21; }
.flash-info { background: #e5e8f6; color: var(--indigo-dark); }

/* Buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 .9375rem/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--indigo); border-color: var(--indigo); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.link-btn:hover { text-decoration-color: currentColor; }

.field { margin-bottom: 18px; }
.field label, .label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: .8125rem; color: var(--muted); margin: 6px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 1rem;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--indigo); outline-offset: 0; border-color: var(--indigo); }
.field-error { color: var(--madder); font-size: .875rem; margin: 6px 0 0; }
.form-error { background: #f6e3e0; color: #7d2a21; padding: 12px 14px; margin-bottom: 20px; font-size: .9375rem; border-radius: var(--radius); }
.form-error ul { list-style: disc; padding-left: 18px; }
.row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* Hero: the oversized wordmark is the one loud thing on the site */
.hero { padding: clamp(28px, 6vw, 72px) 0 0; overflow: hidden; }
.wordmark { font-stretch: 125%; font-weight: 800; letter-spacing: -0.06em; line-height: .8; font-size: clamp(5rem, 26.5vw, 24rem); margin: 0 0 0 -0.04em; white-space: nowrap; color: var(--ink); }
.wordmark i { font-style: normal; color: var(--indigo); }
.hero-foot { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; padding: clamp(20px, 3vw, 36px) 0 clamp(36px, 6vw, 72px); }
.hero-foot p { font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 32ch; line-height: 1.35; margin: 0; font-stretch: 108%; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hero-art { display: block; width: 100%; aspect-ratio: 21 / 8; background-size: cover; background-position: center; }
@media (max-width: 700px) {
  .hero-foot { grid-template-columns: 1fr; }
  .hero-cta { justify-content: flex-start; }
}

/* Sections */
.section { padding: clamp(40px, 7vw, 88px) 0; }
.section-tight { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.section-head a { font-size: .9375rem; }
.page-head { padding: clamp(28px, 5vw, 56px) 0 24px; }
.page-head p { color: var(--muted); margin: 12px 0 0; }

/* Category strip: flat colour blocks taken from dye shades */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; justify-content: flex-end; min-height: 180px; padding: 18px; text-decoration: none; color: #fff; border-radius: var(--radius); transition: transform .2s; }
.cat-tile:hover { transform: translateY(-3px); }
.cat-tile strong { font-size: 1.25rem; font-stretch: 112%; font-weight: 600; letter-spacing: -0.01em; }
.cat-tile span { font-size: .875rem; opacity: .8; }

/* Tones used for flat product placeholders and category tiles */
.tone-indigo { background: #2b3790; color: #fff; }
.tone-madder { background: #a8433a; color: #fff; }
.tone-ink { background: #1c1f26; color: #fff; }
.tone-sage { background: #8d9b86; color: #101410; }
.tone-ochre { background: #c79b3d; color: #1b1405; }
.tone-slate { background: #7e8795; color: #0f1217; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.2vw, 28px) clamp(10px, 1.6vw, 20px); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card { display: block; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center; border-radius: var(--radius); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-mark { font-stretch: 125%; font-weight: 800; font-size: clamp(4rem, 12vw, 8rem); opacity: .28; line-height: 1; }
.card-body { padding-top: 12px; }
.card-body h3 { margin-bottom: 4px; }
.price { margin: 0; font-size: .9375rem; display: flex; gap: 8px; align-items: baseline; }
.price s { color: var(--muted); font-size: .875rem; }
.badge { position: absolute; top: 10px; left: 10px; font-size: .75rem; font-weight: 600; padding: 4px 9px; background: var(--paper); color: var(--ink); border-radius: var(--radius); }
.badge-sale { background: var(--madder); color: #fff; }
.badge-out { background: var(--ink); color: #fff; }
.empty { padding: 56px 0; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.empty .btn { margin-top: 16px; }

/* Shop toolbar */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 14px 0 22px; border-top: 1px solid var(--line); margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .875rem; background: transparent; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.tools input[type=search] { min-width: 220px; min-height: 42px; }
.tools select { min-height: 42px; width: auto; padding-right: 32px; }
.tools .btn { min-height: 42px; padding: 0 18px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); text-decoration: none; border-radius: var(--radius); font-size: .9375rem; }
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: 24px 0 64px; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } }
.crumbs { font-size: .875rem; color: var(--muted); padding: 20px 0 0; }
.crumbs a { color: inherit; }
.gallery { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; }
.thumbs { display: grid; gap: 10px; }
.thumbs button { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; aspect-ratio: 4/5; overflow: hidden; border-radius: var(--radius); opacity: .65; }
.thumbs button[aria-current=true] { border-color: var(--ink); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.stage { aspect-ratio: 4/5; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage .card-mark { font-size: clamp(8rem, 24vw, 16rem); }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } .thumbs { grid-auto-flow: column; grid-auto-columns: 64px; order: 2; } }
.pdp-info { position: sticky; top: 90px; align-self: start; }
@media (max-width: 860px) { .pdp-info { position: static; } }
.pdp-info h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.pdp-price { font-size: 1.375rem; display: flex; gap: 12px; align-items: baseline; margin-bottom: 20px; }
.pdp-price s { font-size: 1rem; color: var(--muted); }
.pdp-price .off { font-size: .875rem; color: var(--madder); font-weight: 600; }
.desc { color: #34373d; max-width: 60ch; white-space: pre-line; margin-bottom: 24px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.sizes input { position: absolute; opacity: 0; pointer-events: none; }
.sizes label { min-width: 52px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); cursor: pointer; padding: 0 12px; font-size: .9375rem; border-radius: var(--radius); background: var(--paper); }
.sizes input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.sizes input:focus-visible + label { outline: 2px solid var(--indigo); outline-offset: 2px; }
.buy { display: flex; gap: 12px; margin-bottom: 14px; }
.qty { display: inline-flex; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); }
.qty button { width: 44px; border: 0; background: none; font-size: 1.25rem; cursor: pointer; }
.qty input { width: 48px; min-height: 46px; text-align: center; border: 0; background: none; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock-note { font-size: .875rem; color: var(--madder); margin: 0 0 12px; }
.assure { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; font-size: .9375rem; color: var(--muted); }
.assure li { padding: 3px 0; }

/* Cart + checkout */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding-bottom: 72px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.line { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.line:last-child { border-bottom: 1px solid var(--line); }
.line-media { aspect-ratio: 4/5; overflow: hidden; display: grid; place-items: center; border-radius: var(--radius); }
.line-media img { width: 100%; height: 100%; object-fit: cover; }
.line-media .card-mark { font-size: 2.4rem; }
.line h3 a { text-decoration: none; }
.line .meta { color: var(--muted); font-size: .875rem; margin: 2px 0 10px; }
.line .tot { text-align: right; font-weight: 500; }
.line .qty { transform: scale(.9); transform-origin: left; }
.line form.inline { display: inline-flex; gap: 8px; align-items: center; }
.summary { background: var(--paper); border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); position: sticky; top: 90px; }
.summary h2 { font-size: 1.25rem; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .9375rem; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-size: 1.125rem; font-weight: 600; }
.summary .btn { margin-top: 18px; }
.ship-note { font-size: .8125rem; color: var(--muted); margin: 10px 0 0; }
.pay-opt { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); background: var(--paper); margin-bottom: 10px; cursor: pointer; border-radius: var(--radius); align-items: flex-start; }
.pay-opt:has(input:checked) { border-color: var(--ink); }
.pay-opt input { margin-top: 5px; accent-color: var(--ink); }
.pay-opt strong { display: block; font-weight: 500; }
.pay-opt span { font-size: .875rem; color: var(--muted); }

/* Auth + account */
.auth { max-width: 440px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) 0 80px; }
.auth h1 { font-size: 2rem; margin-bottom: 8px; }
.auth > p { color: var(--muted); }
.auth .alt { margin-top: 20px; font-size: .9375rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tbl th, .tbl td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 500; color: var(--muted); font-size: .875rem; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; background: #e5e5df; }
.status-pending { background: #f1e6c9; color: #6b4f0d; }
.status-confirmed { background: #e0e4f6; color: var(--indigo-dark); }
.status-shipped { background: #dcebf0; color: #1d4f60; }
.status-delivered { background: #dcebe2; color: #1f4d35; }
.status-cancelled { background: #f1dbd8; color: #7d2a21; }
.panel { background: var(--paper); border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); margin-bottom: 24px; }
.panel h2 { font-size: 1.2rem; margin-bottom: 14px; }
.success { text-align: center; padding: clamp(40px, 8vw, 96px) 0; max-width: 560px; margin: 0 auto; }
.success h1 { margin-bottom: 14px; }

/* Footer */
.site-footer { background: var(--ink); color: #d4d4cf; margin-top: 40px; padding-top: 56px; }
.site-footer .brand span { color: #8f9bf0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.site-footer h2 { font-size: .9375rem; font-stretch: 100%; font-weight: 600; color: #fff; margin-bottom: 12px; letter-spacing: 0; }
.site-footer li { padding: 4px 0; font-size: .9375rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .link-btn { text-decoration: none; }
.foot-base { border-top: 1px solid #2a2d35; padding-block: 20px; font-size: .8125rem; color: #8c8f96; }
.foot-base p { margin: 0; }

/* One deliberate motion: the wordmark settles in on first load */
@media (prefers-reduced-motion: no-preference) {
  .wordmark { animation: settle .9s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes settle { from { opacity: 0; letter-spacing: -0.02em; } to { opacity: 1; letter-spacing: -0.06em; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/*.brand-logo{display:flex;align-items:center;line-height:0}*/
/*.brand-logo img{height:48px;width:auto;max-width:200px;object-fit:contain}*/
/*@media (max-width:700px){.brand-logo img{height:38px;max-width:150px}}*/

