/* ==========================================================================
   PRESENCE Design System
   Neutral luxury palette, editorial typography, and backend-friendly layout.
   ========================================================================== */
:root {
  --ivory: #eee3d4;
  --warm-beige: #e5d6c2;
  --stone: #cbc0b2;
  --soft-black: #171412;
  --muted-brown: #76604f;
  --deep-brown: #2b211b;
  --paper: #f6efe4;
  --line: rgba(23, 20, 18, 0.16);
  --line-dark: rgba(247, 242, 234, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", "Montserrat", Arial, sans-serif;
  --header-height: 86px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--soft-black);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a,
button,
select,
input {
  font: inherit;
}

a,
button {
  color: inherit;
}

button {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ==========================================================================
   Shared Type, Links, and Motion
   ========================================================================== */
h1,
h2,
h3,
.drawer-title,
.footer-line {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.08;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 3.1rem);
}

p {
  margin: 0;
}

.eyebrow {
  color: var(--muted-brown);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.underlined-link,
.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.underlined-link::after,
.text-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.34rem;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 420ms var(--ease), opacity 420ms var(--ease);
}

.underlined-link:hover::after,
.text-link:hover::after {
  transform: scaleX(0.55);
  opacity: 0.65;
}

.underlined-link.light {
  color: var(--paper);
}

.view-section {
  display: none;
}

.view-section.is-active {
  display: block;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Header and Announcement
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-nav {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 2.25rem;
}

.header-cluster {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-home-icon {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
}

.header-home-icon svg {
  width: 1.22rem;
  height: 1.22rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.header-cluster-right {
  justify-content: flex-end;
}

.header-logo img {
  width: clamp(138px, 17vw, 238px);
}

.icon-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  color: var(--soft-black);
}

.icon-action svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamburger-line {
  width: 1.35rem;
  height: 1px;
  background: currentColor;
  transition: transform 360ms var(--ease);
}

.icon-action:hover .hamburger-line:first-child {
  transform: translateY(-2px);
}

.icon-action:hover .hamburger-line:last-child {
  transform: translateY(2px);
}

.counter {
  position: absolute;
  top: 0.12rem;
  inset-inline-end: 0.02rem;
  display: grid;
  place-items: center;
  min-width: 1.05rem;
  height: 1.05rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.58rem;
  line-height: 1;
}

.announcement {
  border-top: 1px solid var(--line);
  padding: 0.55rem 1rem;
  color: var(--muted-brown);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-align: center;
}

/* ==========================================================================
   Side Drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(23, 20, 18, 0.42);
  opacity: 0;
  transition: opacity 480ms var(--ease);
}

.drawer-backdrop.is-open {
  opacity: 1;
}

.side-drawer {
  position: fixed;
  inset-block: 0;
  left: 0;
  right: auto;
  z-index: 90;
  width: min(92vw, 430px);
  padding: 2rem;
  background: var(--paper);
  box-shadow: 22px 0 70px rgba(23, 20, 18, 0.18);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-105%);
  transition: transform 620ms var(--ease);
}

.side-drawer.is-open {
  transform: translateX(0);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-icon {
  width: 42px;
}

.drawer-title {
  margin: 2.8rem 0 2.1rem;
  font-size: 2rem;
}

.drawer-nav {
  display: grid;
  gap: 0.9rem;
}

.drawer-nav a {
  color: var(--soft-black);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.25;
  text-decoration: none;
  transition: color 280ms ease, transform 280ms ease;
}

.drawer-nav a:hover {
  color: var(--muted-brown);
  transform: translateX(8px);
}

.language-switcher {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.language-switcher .is-active {
  color: var(--muted-brown);
}

/* ==========================================================================
   Hero and Editorial Sections
   ========================================================================== */
.hero-section {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(430px, 60vh, 620px);
  min-height: 0;
  overflow: hidden;
  color: var(--paper);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  animation: heroDrift 14s var(--ease) infinite alternate;
}

.hero-overlay {
  background: rgba(20, 10, 10, 0.16);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 1rem;
  width: min(82vw, 760px);
  text-align: center;
  animation: fadeUp 1200ms var(--ease) both;
}

.hero-logo {
  width: min(54vw, 340px);
}

.hero-home-icon {
  width: clamp(34px, 5vw, 56px);
  opacity: 0.88;
}

.hero-content p {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.8vw, 1.55rem);
}

@keyframes heroDrift {
  from { transform: scale(1); }
  to { transform: scale(1.045); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 6vw, 5.5rem);
}

.presence-code {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0;
  min-height: 48vh;
  padding: 0;
  background: var(--paper);
}

.split-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.35rem;
  min-height: 48vh;
  padding: clamp(2rem, 6vw, 5rem);
  text-align: center;
}

.code-icon {
  width: clamp(64px, 8vw, 112px);
  margin-bottom: 0.4rem;
}

.split-copy h1 {
  max-width: 560px;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
}

.presence-code .eyebrow::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 1rem auto 0;
  background: var(--muted-brown);
}

.presence-code .eyebrow,
.presence-code .underlined-link {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.editorial-image {
  margin: 0;
  overflow: hidden;
  background: var(--warm-beige);
}

.editorial-image img {
  width: 100%;
  height: 48vh;
  min-height: 360px;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}

.editorial-image:hover img {
  transform: scale(1.035);
}

.editorial-image.tall img {
  height: min(78vw, 820px);
  object-position: 45% center;
}

.content-band,
.collection-section,
.details-section,
.category-entry,
.shop-section {
  padding: clamp(2.6rem, 5.5vw, 4.5rem) clamp(1.2rem, 5vw, 4rem);
}

/* Category teaser remains backend-ready, but the homepage now follows the
   provided editorial reference: collection, details, notes, signature pieces. */
.category-entry {
  display: none;
}

.section-heading {
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: 880px;
  margin-inline: auto;
  margin-bottom: clamp(2.2rem, 5vw, 4rem);
  text-align: center;
}

.section-heading.compact h2 {
  font-size: clamp(2rem, 4.5vw, 4.2rem);
}

/* ==========================================================================
   Accordion Storytelling
   ========================================================================== */
.accordion-list {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  align-items: center;
  width: 100%;
  padding: 1.4rem 0;
  text-align: inherit;
}

.accordion-number {
  color: var(--muted-brown);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

.accordion-title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.8rem);
  line-height: 1.18;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 520ms var(--ease);
}

.accordion-panel p {
  max-width: 760px;
  padding: 0 0 1.7rem calc(3.2rem + 1.2rem);
  color: var(--muted-brown);
}

/* ==========================================================================
   Collection Looks and Details
   ========================================================================== */
.collection-head {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  text-align: center;
}

.collection-head h2 {
  max-width: 860px;
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
}

.collection-sub {
  margin-top: 0.7rem;
  color: var(--muted-brown);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.collection-head > .underlined-link {
  position: absolute;
  inset-inline-end: 0;
  bottom: 0.25rem;
}

.looks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.55rem, 1vw, 0.9rem);
  background: transparent;
}

.look-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  text-align: center;
  text-decoration: none;
  transition: background 360ms ease;
}

.look-card:hover {
  background: var(--paper);
}

.look-card img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  height: auto;
  object-fit: cover;
  filter: saturate(0.82);
  transition: transform 620ms var(--ease), filter 620ms var(--ease);
}

.look-card:hover img {
  transform: translateY(-8px);
  filter: saturate(1);
}

.look-card span {
  color: var(--muted-brown);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
}

.look-card h3 {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.45rem);
}

.look-card p {
  color: var(--muted-brown);
  font-size: 0.82rem;
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.35rem, 0.8vw, 0.65rem);
  overflow: visible;
  background: transparent;
}

.detail-card {
  min-height: 0;
  background: var(--paper);
  overflow: hidden;
}

.detail-card img {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  height: auto;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.detail-card:hover img {
  transform: scale(1.07);
}

.detail-card p {
  padding: 0.65rem 0.2rem 0;
  background: var(--ivory);
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.notes-section {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  background: var(--ivory);
}

.notes-copy p {
  max-width: 360px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 2.1rem);
  line-height: 1.18;
  text-align: left;
}

.notes-section .editorial-image img {
  height: min(42vw, 420px);
  min-height: 280px;
}

/* ==========================================================================
   Category and Product Cards
   ========================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.category-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  color: var(--paper);
  text-decoration: none;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(0.78);
  transition: transform 800ms var(--ease), filter 800ms var(--ease);
}

.category-card:hover img {
  transform: scale(1.055);
  filter: brightness(0.62) saturate(0.9);
}

.category-card div {
  position: absolute;
  inset-inline: 1.4rem;
  bottom: 1.5rem;
}

.category-card h3 {
  margin: 0 0 0.45rem;
  font-size: 2.2rem;
}

.category-card p {
  max-width: 18rem;
  color: rgba(247, 242, 234, 0.82);
}

.commerce-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: calc(var(--header-height) + 3rem);
  display: grid;
  gap: 1.35rem;
}

.filter-group {
  display: grid;
  gap: 0.65rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.filter-group p {
  color: var(--muted-brown);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.filter-option {
  color: var(--soft-black);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.58;
}

.filter-option.is-active,
.filter-option:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.45rem;
}

.sort-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
  color: var(--muted-brown);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sort-select,
.admin-form input {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--soft-black);
  padding: 0.45rem 0;
  outline: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.2vw, 2rem);
}

.product-grid.small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shop-section {
  background: var(--ivory);
}

.shop-section .section-heading {
  margin-inline: auto;
  margin-bottom: 1.4rem;
  text-align: center;
}

.shop-section .commerce-layout {
  grid-template-columns: 1fr;
}

#home-view .shop-section .filter-panel {
  display: grid;
  position: static;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#home-view .shop-section .sort-row {
  display: flex;
  justify-content: center;
}

.category-products .filter-panel {
  position: static;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.shop-section .product-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.55rem, 1vw, 0.9rem);
}

.category-products .commerce-layout {
  grid-template-columns: 230px minmax(0, 1fr);
}

.category-products .filter-panel {
  position: sticky;
  top: calc(var(--header-height) + 3rem);
  grid-template-columns: 1fr;
  display: grid;
}

.category-products .sort-row {
  justify-content: flex-end;
}

.filter-toggle,
.category-filter-backdrop,
.category-filter-drawer-head {
  display: none;
}

.product-card {
  display: grid;
  gap: 0.45rem;
}

.product-card a {
  color: inherit;
  text-decoration: none;
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 4.8;
  overflow: hidden;
  background: var(--warm-beige);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 850ms var(--ease), filter 850ms var(--ease);
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.04);
  filter: saturate(0.92);
}

.product-meta {
  display: grid;
  gap: 0.3rem;
}

.product-title {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.24;
}

.product-price,
.product-sizes {
  color: var(--muted-brown);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.color-dots,
.color-options {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.color-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid rgba(23, 20, 18, 0.28);
  border-radius: 50%;
}

/* ==========================================================================
   Category Page and Product Detail Page
   ========================================================================== */
.category-hero {
  position: relative;
  min-height: 0;
  display: grid;
  align-items: center;
  background: var(--paper);
  color: var(--soft-black);
  overflow: hidden;
}

.category-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.56) saturate(0.82);
}

.category-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.2rem, 6vw, 5.5rem);
}

.category-hero-copy p:last-child {
  max-width: 560px;
  margin-top: 1rem;
  color: var(--muted-brown);
}

.product-detail-shell {
  padding: clamp(2rem, 5vw, 5.5rem);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: 2rem;
}

.product-gallery {
  display: grid;
  gap: 1rem;
}

.gallery-main {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--warm-beige);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}

.gallery-main:hover img {
  transform: scale(1.08);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.gallery-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  opacity: 0.56;
  transition: opacity 240ms ease;
}

.gallery-thumb.is-active,
.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}

.product-info h1 {
  font-size: clamp(2.2rem, 5vw, 5.4rem);
}

.product-description {
  color: var(--muted-brown);
}

.variant-block {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.variant-block > p {
  color: var(--muted-brown);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.variant-options {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.variant-pill {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Size Pill Selector ────────────────────────────────────────────────────── */
.size-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.55rem;
  height: 2.55rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--soft-black);
  font-size: 0.72rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease,
              transform 200ms ease;
}

.size-pill:hover {
  border-color: var(--soft-black);
  background: var(--warm-beige);
  transform: translateY(-1px);
}

.size-pill.is-selected {
  background: var(--soft-black);
  color: var(--paper);
  border-color: var(--soft-black);
}

.size-pill.out-of-stock,
.size-pill.disabled {
  opacity: 0.4;
  text-decoration: line-through;
  pointer-events: none;
  cursor: not-allowed;
  background: var(--paper);
  border-color: var(--line-dark);
}

.product-actions {
  display: grid;
  gap: 1rem;
  justify-items: start;
  margin: 1rem 0;
}

.action-text {
  text-align: inherit;
}

.product-details-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.product-details-list div {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.product-details-list dt {
  color: var(--muted-brown);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product-details-list dd {
  margin: 0;
}

.product-story,
.related-section {
  padding-top: clamp(4rem, 8vw, 7rem);
}

.product-story p:last-child {
  max-width: 980px;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 4.2rem);
  line-height: 1.16;
}

/* ==========================================================================
   Admin Dashboard
   ========================================================================== */
.admin-view.is-active {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--paper);
  overflow-x: hidden;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1.5rem;
  border-inline-end: 1px solid var(--line);
  background: var(--ivory);
  overflow-y: auto;
}

.admin-sidebar img {
  width: 42px;
}

.admin-sidebar p {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  overflow-wrap: anywhere;
}

.admin-tab {
  padding: 0.5rem 0;
  color: var(--muted-brown);
  text-align: inherit;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-tab.is-active,
.admin-tab:hover {
  color: var(--soft-black);
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

.admin-content {
  min-width: 0;
  padding: clamp(1.2rem, 3.5vw, 3rem);
}

.admin-auth {
  display: grid;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border: 1px solid var(--line);
  background: var(--ivory);
}

.admin-auth h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.admin-login-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 1rem;
  align-items: end;
}

.admin-login-form label {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  color: var(--muted-brown);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-login-form input {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0.5rem 0;
  color: var(--soft-black);
  outline: none;
}

.admin-auth-note,
.admin-auth-status {
  max-width: 720px;
  color: var(--muted-brown);
  font-size: 0.85rem;
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: block;
}

.admin-panel h1 {
  margin-bottom: 2rem;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 1rem;
}

.admin-card-grid article,
.admin-list,
.admin-form {
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--ivory);
  min-width: 0;
}

.admin-card-grid article {
  display: grid;
  gap: 1rem;
}

.admin-card-grid span {
  color: var(--muted-brown);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.admin-card-grid strong {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  text-align: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted-brown);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-form {
  display: grid;
  gap: 1.2rem;
  max-width: 640px;
}

.admin-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted-brown);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.admin-list {
  display: grid;
  gap: 1rem;
  max-width: 620px;
}

/* ==========================================================================
   Modals and Footer
   ========================================================================== */
.size-modal {
  width: min(92vw, 680px);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--soft-black);
  padding: 2rem;
}

.size-modal::backdrop {
  background: rgba(23, 20, 18, 0.46);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.modal-head h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

/* ── Size Guide Table ──────────────────────────────────────────────────────── */
.size-modal[data-size-modal] {
  width: min(92vw, 780px);
}

.size-guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.size-guide-table th {
  padding: 0.65rem 1rem;
  background: var(--ivory);
  color: var(--muted-brown);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 2px solid var(--line);
}

.size-guide-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease;
}

.size-guide-table td:first-child {
  font-weight: 600;
  letter-spacing: 0.1em;
}

.size-guide-table tbody tr:hover td {
  background: var(--warm-beige);
}

.site-footer {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.2rem, 6vw, 5.5rem) 2rem;
  background: var(--deep-brown);
  color: var(--paper);
  text-align: center;
}

.site-footer img {
  width: clamp(92px, 10vw, 132px);
  margin: 0 auto 1.5rem;
}

.footer-line {
  max-width: 620px;
  margin-inline: auto;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
}

.footer-sub {
  margin-top: 1.3rem;
  color: rgba(247, 242, 234, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line-dark);
}

.footer-columns div {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
}

.footer-columns h3,
.footer-columns a,
.copyright {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-columns h3 {
  color: rgba(247, 242, 234, 0.55);
}

.footer-columns a {
  color: rgba(247, 242, 234, 0.82);
  text-decoration: none;
  cursor: pointer;
}

.copyright {
  margin-top: 3rem;
  color: rgba(247, 242, 234, 0.54);
}

.primary-btn {
  background: var(--soft-black);
  color: var(--paper);
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--soft-black);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}

.primary-btn:hover {
  background: transparent;
  color: var(--soft-black);
}

.side-drawer[data-cart-drawer] {
  left: auto;
  right: 0;
  transform: translateX(105%);
  z-index: 100;
}

.side-drawer[data-cart-drawer].is-open {
  transform: translateX(0);
}

/* ==========================================================================
   RTL Support
   ========================================================================== */
[dir="rtl"] body {
  font-family: var(--sans);
}

[dir="rtl"] .side-drawer:not([data-cart-drawer]) {
  left: 0;
  right: auto;
  transform: translateX(-105%);
  box-shadow: 22px 0 70px rgba(23, 20, 18, 0.18);
}

[dir="rtl"] .side-drawer.is-open {
  transform: translateX(0);
}

[dir="rtl"] .side-drawer[data-cart-drawer] {
  left: 0;
  right: auto;
  transform: translateX(-105%);
}

[dir="rtl"] .side-drawer[data-cart-drawer].is-open {
  transform: translateX(0);
}

[dir="rtl"] .drawer-nav a:hover {
  transform: translateX(-8px);
}

[dir="rtl"] .underlined-link,
[dir="rtl"] .text-link,
[dir="rtl"] .eyebrow,
[dir="rtl"] .announcement,
[dir="rtl"] .filter-group p,
[dir="rtl"] th {
  letter-spacing: 0.04em;
}

[dir="rtl"] .accordion-panel p {
  padding: 0 calc(3.2rem + 1.2rem) 1.7rem 0;
}

/* ==========================================================================
   Responsive System
   ========================================================================== */
@media (max-width: 1180px) {
  .category-grid,
  .admin-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .looks-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid,
  .shop-section .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-grid.small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .presence-code {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 74px;
  }

  .header-nav {
    padding: 0 1rem;
  }

  .header-cluster {
    gap: 0.3rem;
  }

  .icon-action {
    width: 2.25rem;
    height: 2.25rem;
  }

  .header-logo img {
    width: 136px;
  }

  .hero-section {
    height: clamp(360px, 54vh, 520px);
    min-height: 0;
  }

  .hero-image {
    object-position: 56% center;
  }

  .collection-head {
    display: grid;
    align-items: start;
  }

  .looks-grid,
  .category-grid,
  .admin-card-grid,
  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid,
  .product-grid.small,
  .shop-section .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .commerce-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  #home-view .shop-section .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sort-row {
    justify-content: flex-start;
  }

  .admin-view.is-active {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .admin-sidebar img,
  .admin-sidebar p,
  .admin-sidebar .underlined-link {
    grid-column: 1 / -1;
  }

  .admin-login-form {
    grid-template-columns: 1fr;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

  .presence-code {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .presence-code .split-copy {
    min-height: 42vh;
    padding: 1.1rem;
  }

  .presence-code .editorial-image img {
    height: 42vh;
    min-height: 320px;
  }

  .presence-code .code-icon {
    width: clamp(44px, 12vw, 74px);
  }

  .presence-code .split-copy h1 {
    font-size: clamp(1.25rem, 5vw, 2.3rem);
  }

  .looks-grid,
  .detail-grid,
  .shop-section .product-grid,
  .product-grid.small,
  .footer-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .category-products .product-grid,
  .category-grid,
  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .collection-head > .underlined-link {
    position: static;
  }
}

@media (max-width: 520px) {
  .side-drawer {
    padding: 1.4rem;
  }

  .announcement {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .hero-logo {
    width: min(64vw, 240px);
  }

  .hero-home-icon {
    width: 32px;
  }

  #home-view .shop-section .filter-panel {
    grid-template-columns: 1fr;
  }

  .content-band,
  .collection-section,
  .details-section,
  .category-entry,
  .shop-section,
  .product-detail-shell,
  .category-hero-copy {
    padding-inline: 1rem;
  }

  .collection-section,
  .details-section,
  .shop-section {
    padding-block: 2rem;
  }

  .presence-code {
    grid-template-columns: 1fr;
  }

  .presence-code .split-copy {
    min-height: auto;
    padding-block: 1.8rem;
  }

  .presence-code .editorial-image img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .looks-grid {
    grid-template-columns: 1fr;
  }

  .shop-section .product-grid,
  .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .product-title {
    font-size: 0.78rem;
  }

  .product-price,
  .product-sizes {
    font-size: 0.52rem;
  }

  .product-card {
    gap: 0.28rem;
  }

  .color-dots {
    gap: 0.25rem;
  }

  .color-dot {
    width: 0.44rem;
    height: 0.44rem;
  }

  .notes-section {
    grid-template-columns: 1fr;
  }

  .notes-copy p {
    max-width: none;
    text-align: center;
  }

  .accordion-trigger {
    grid-template-columns: 1fr auto;
  }

  .accordion-number {
    display: none;
  }

  .accordion-panel p,
  [dir="rtl"] .accordion-panel p {
    padding-inline: 0;
  }
}

/* ==========================================================================
   Visual Redesign Overrides
   ========================================================================== */
:root {
  --primary-beige: #C0AF9D;
  --secondary-beige: #A79686;
  --soft-black: #140A0A;
  --muted-brown: #140A0A;
  --ivory: #FFFFFF;
  --paper: #FFFFFF;
  --warm-beige: #C0AF9D;
  --stone: #A79686;
  --line: rgba(20, 10, 10, 0.16);
  --line-dark: rgba(20, 10, 10, 0.18);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: #FFFFFF;
  color: #140A0A;
}

h1,
h2,
h3,
.drawer-title,
.footer-line {
  color: #140A0A;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
}

.side-drawer {
  background: #FFFFFF;
}

.hero-section {
  height: clamp(900px, 92vh, 1000px);
  color: #FFFFFF;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  animation: none;
}

.hero-overlay {
  background: rgba(20, 10, 10, 0.16);
}

.hero-content {
  gap: 1.35rem;
}

.hero-shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 16px 32px;
  border-radius: 4px;
  background: #C0AF9D;
  color: #140A0A;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-shop-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.presence-code {
  width: min(1180px, calc(100% - 48px));
  min-height: auto;
  margin: 96px auto;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: 0;
  border-radius: 32px;
  background: #C0AF9D;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.08), 0 -13px 30px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.presence-code .split-copy {
  min-height: 520px;
  padding: 64px;
}

.presence-code .editorial-image {
  padding: 32px;
  background: #C0AF9D;
}

.presence-code .editorial-image img {
  height: 100%;
  min-height: 420px;
  border-radius: 24px;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.12);
  object-fit: cover;
}

.presence-code .editorial-image:hover img,
.product-image-wrap img,
.detail-card img,
.look-card img,
.category-card img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.code-icon {
  width: 48px;
}

.content-band,
.collection-section,
.details-section,
.category-entry,
.shop-section,
.category-product-sections {
  padding: 96px 64px;
  background: #FFFFFF;
}

.details-section .section-heading {
  margin-bottom: 48px;
}

.detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.detail-card {
  border-radius: 12px;
  background: #FFFFFF;
}

.detail-card img {
  aspect-ratio: 1;
  border-radius: 12px;
}

.detail-card p {
  background: #FFFFFF;
  color: #140A0A;
}

.category-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 3rem);
  min-height: 60px;
  padding: 0 24px;
  background: #A79686;
}

.category-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 18px;
  border-radius: 999px;
  color: #140A0A;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.category-product-sections {
  display: grid;
  gap: 0;
}

.category-showcase {
  scroll-margin-top: calc(var(--header-height) + 84px);
}

.category-showcase-head {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  margin-bottom: 32px;
  text-align: center;
}

.category-showcase-head h2 {
  font-size: clamp(2.2rem, 4vw, 4.8rem);
}

.category-preview-grid,
.shop-section .product-grid,
.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  border-radius: 12px;
  background: #FFFFFF;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.product-image-wrap {
  border-radius: 12px;
  background: #FFFFFF;
}

.product-image-wrap img {
  object-fit: cover;
}

.product-card:hover .product-image-wrap img {
  transform: none;
  filter: none;
}

.product-meta {
  padding: 8px 4px 2px;
}

.category-empty {
  grid-column: 1 / -1;
  text-align: center;
}

.content-band {
  padding-top: 96px;
}

.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 96px auto 32px;
  border-radius: 32px;
  background: #C0AF9D;
  color: #140A0A;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.08), 0 -13px 30px rgba(0, 0, 0, 0.04);
}

.site-footer img {
  width: 48px;
}

.footer-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer-columns a,
.footer-sub,
.copyright {
  color: #140A0A;
}

@media (max-width: 820px) {
  .hero-section {
    height: clamp(480px, 72vh, 620px);
  }

  .presence-code {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    margin: 48px auto;
  }

  .presence-code .split-copy {
    min-height: auto;
    padding: 24px;
  }

  .presence-code .editorial-image {
    padding: 24px;
  }

  .presence-code .editorial-image img {
    min-height: 0;
    aspect-ratio: 1;
  }

  .content-band,
  .collection-section,
  .details-section,
  .category-entry,
  .shop-section,
  .category-product-sections {
    padding: 48px 24px;
  }

  .category-bar {
    justify-content: space-between;
    gap: 0.35rem;
    min-height: 56px;
    padding-inline: 12px;
  }

  .category-bar a {
    min-height: 56px;
    padding: 0 8px;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .category-preview-grid,
  .shop-section .product-grid,
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-products {
    position: relative;
  }

  .category-products .collection-head {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: start;
  }

  .category-products .collection-head > .underlined-link {
    justify-self: start;
  }

  .category-products .sort-row {
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.9rem;
  }

  .filter-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #FFFFFF;
    color: #140A0A;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .category-products .commerce-layout {
    display: block;
  }

  .category-products .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .category-products .product-title {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
  }

  .category-products .product-price,
  .category-products .product-sizes {
    font-size: 0.58rem;
  }

  .category-products .filter-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 95;
    display: block;
    width: min(84vw, 340px);
    margin: 0;
    padding: 1.25rem;
    background: #FFFFFF;
    box-shadow: 18px 0 52px rgba(20, 10, 10, 0.18);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 360ms var(--ease);
  }

  .category-products .filter-panel.is-open {
    transform: translateX(0);
  }

  .category-filter-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
  }

  .category-filter-drawer-head p {
    color: #140A0A;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .category-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 94;
    display: block;
    background: rgba(20, 10, 10, 0.36);
    opacity: 0;
    transition: opacity 260ms var(--ease);
  }

  .category-filter-backdrop.is-open {
    opacity: 1;
  }

  .category-preview-card.mobile-extra {
    display: none;
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: calc(100% - 32px);
    margin-block: 48px 24px;
  }
}
