/* ============================================================
   MAISON — Luxury Jewelry Storage Brand
   Global Stylesheet
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* --- CSS Reset / Normalize --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  font-weight: normal;
}

p {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* --- CSS Variables --- */
:root {
  /* Colors */
  --color-bg: #FFFFFF;
  --color-text: #1a1a1a;
  --color-text-dim: #666666;
  --color-brand: #8B7355;
  --color-accent: #B76E79;
  --color-footer-bg: #F5F0EB;
  --color-badge-bg: #EDE8E2;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-medium: rgba(0, 0, 0, 0.12);
  --color-overlay: rgba(0, 0, 0, 0.35);
  --color-overlay-hover: rgba(0, 0, 0, 0.5);
  --color-white: #FFFFFF;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-padding: 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 30px;
}


/* ============================================================
   BASE STYLES
   ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

img {
  height: auto;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.heading-xl {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.heading-lg {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.heading-md {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 500;
  line-height: 1.3;
}

.heading-sm {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  text-align: center;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.005em;
}

.body-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-dim);
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 500;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.pill-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1.5px solid transparent;
  line-height: 1;
}

.pill-btn--primary {
  background-color: var(--color-text);
  color: var(--color-white);
  border-color: var(--color-text);
}

.pill-btn--primary:hover {
  background-color: transparent;
  color: var(--color-text);
}

.pill-btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.pill-btn--outline:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

.pill-btn--white {
  background-color: var(--color-white);
  color: var(--color-text);
  border-color: var(--color-white);
}

.pill-btn--white:hover {
  background-color: transparent;
  color: var(--color-white);
}

.pill-btn--brand {
  background-color: var(--color-brand);
  color: var(--color-white);
  border-color: var(--color-brand);
}

.pill-btn--brand:hover {
  background-color: transparent;
  color: var(--color-brand);
}

.pill-btn--sm {
  padding: 10px 24px;
  font-size: 12px;
}

.pill-btn--lg {
  padding: 16px 44px;
  font-size: 14px;
}


/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-block;
  padding: 5px 14px;
  background-color: var(--color-badge-bg);
  color: var(--color-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.badge--accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.badge--brand {
  background-color: var(--color-brand);
  color: var(--color-white);
}


/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */

.announcement-bar {
  background-color: var(--color-brand);
  color: var(--color-white);
  text-align: center;
  padding: 10px var(--container-padding);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.announcement-bar a {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.announcement-bar a:hover {
  opacity: 0.85;
}


/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.site-header__nav a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition-fast);
  position: relative;
}

.site-header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width var(--transition-base);
}

.site-header__nav a:hover::after {
  width: 100%;
}

.site-header__logo {
  flex: 1;
  text-align: center;
}

.site-header__logo a {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: flex-end;
}

.site-header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text);
  transition: opacity var(--transition-fast);
}

.site-header__icon:hover {
  opacity: 0.6;
}

.site-header__icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* Mobile menu toggle */
.site-header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.site-header__menu-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}


/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  max-width: 680px;
  padding: var(--space-3xl) var(--container-padding);
}

.hero__heading {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

.hero__subtext {
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  opacity: 0.92;
}


/* ============================================================
   CATEGORY GRID
   ============================================================ */

.category-section {
  padding: var(--space-3xl) 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.category-card__image {
  aspect-ratio: 1 / 1.2;
  overflow: hidden;
}

.category-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-card:hover .category-card__image img {
  transform: scale(1.06);
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-lg);
  transition: background var(--transition-base);
}

.category-card:hover .category-card__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.category-card__name {
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  padding-bottom: var(--space-sm);
}


/* ============================================================
   PRODUCT GRID
   ============================================================ */

.product-section {
  padding: var(--space-3xl) 0;
  background-color: var(--color-bg);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.product-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
  position: relative;
}

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

.product-card__link {
  display: block;
}

.product-card__image-wrap {
  position: relative;
  overflow: hidden;
}

.product-card__image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #f8f7f5;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.product-card__body {
  padding: 16px 16px 20px;
}

.product-card__name {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 10px;
}

.product-card__swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.is-selected {
  border: 2px solid var(--color-text);
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 3.5px var(--color-text);
}

.product-card__price {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}

.product-card__price--sale {
  color: var(--color-accent);
}

.product-card__price--compare {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-dim);
  text-decoration: line-through;
  margin-left: 8px;
}


/* ============================================================
   BRAND STORY SECTION
   ============================================================ */

.brand-story {
  padding: var(--space-3xl) 0;
}

.brand-story__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 520px;
}

.brand-story__row + .brand-story__row {
  margin-top: 0;
}

.brand-story__image {
  overflow: hidden;
}

.brand-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-story__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl) var(--space-3xl);
  background-color: var(--color-footer-bg);
}

.brand-story__heading {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.brand-story__body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-dim);
  max-width: 460px;
}

.brand-story__row--reverse .brand-story__text {
  order: -1;
}


/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--color-footer-bg);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.site-footer__column h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.site-footer__column ul li {
  margin-bottom: 12px;
}

.site-footer__column ul li a {
  font-size: 14px;
  color: var(--color-text-dim);
  transition: color var(--transition-fast);
}

.site-footer__column ul li a:hover {
  color: var(--color-text);
}

.site-footer__bottom {
  border-top: 1px solid var(--color-border-medium);
  padding-top: var(--space-lg);
  text-align: center;
}

.site-footer__copy {
  font-size: 13px;
  color: var(--color-text-dim);
}


/* ============================================================
   PRODUCT PAGE — DETAIL
   ============================================================ */

.product-detail {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.product-detail__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.product-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-detail__main-image {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #f8f7f5;
}

.product-detail__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__thumbnails {
  display: flex;
  gap: var(--space-sm);
}

.product-detail__thumb {
  width: 72px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.product-detail__thumb.is-active,
.product-detail__thumb:hover {
  border-color: var(--color-text);
}

.product-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__info {
  padding-top: var(--space-md);
}

.product-detail__breadcrumb {
  font-size: 12px;
  color: var(--color-text-dim);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.02em;
}

.product-detail__breadcrumb a {
  color: var(--color-text-dim);
  transition: color var(--transition-fast);
}

.product-detail__breadcrumb a:hover {
  color: var(--color-text);
}

.product-detail__breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}

.product-detail__name {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.product-detail__price {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.product-detail__desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-dim);
  margin-bottom: var(--space-xl);
}

.product-detail__option-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.product-detail__swatches {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-xl);
}

.product-detail__actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.product-detail__qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.product-detail__qty button {
  width: 44px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-text);
  transition: background-color var(--transition-fast);
}

.product-detail__qty button:hover {
  background-color: var(--color-badge-bg);
}

.product-detail__qty input {
  width: 40px;
  height: 48px;
  text-align: center;
  border: none;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  -moz-appearance: textfield;
}

.product-detail__qty input::-webkit-inner-spin-button,
.product-detail__qty input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-detail__features {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-xl);
}

.product-detail__features ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-detail__features li {
  font-size: 14px;
  color: var(--color-text-dim);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.product-detail__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-badge-bg);
  border: 1px solid var(--color-border-medium);
}


/* ============================================================
   UTILITIES
   ============================================================ */

.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;
}

.text-center {
  text-align: center;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet — max 1024px */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .brand-story__row {
    min-height: 420px;
  }

  .brand-story__text {
    padding: var(--space-xl) var(--space-2xl);
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .product-detail__layout {
    gap: var(--space-xl);
  }
}

/* Mobile — max 768px */
@media (max-width: 768px) {
  :root {
    --container-padding: 16px;
  }

  .site-header__nav {
    display: none;
  }

  .site-header__menu-toggle {
    display: flex;
  }

  .site-header__logo {
    flex: unset;
  }

  .site-header__inner {
    height: 60px;
  }

  .hero {
    min-height: 480px;
  }

  .hero__heading {
    font-size: 32px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .category-card__image {
    aspect-ratio: 16 / 9;
  }

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

  .product-card__body {
    padding: 12px 12px 16px;
  }

  .product-card__name {
    font-size: 13px;
  }

  .color-swatch {
    width: 24px;
    height: 24px;
  }

  .brand-story__row {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .brand-story__row--reverse .brand-story__text {
    order: unset;
  }

  .brand-story__image {
    aspect-ratio: 16 / 10;
  }

  .brand-story__text {
    padding: var(--space-xl) var(--container-padding);
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .product-detail__layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .section-title {
    margin-bottom: var(--space-lg);
  }

  .pill-btn {
    padding: 12px 28px;
  }
}

/* Small mobile — max 480px */
@media (max-width: 480px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .hero__heading {
    font-size: 28px;
  }

  .hero__subtext {
    font-size: 14px;
  }

  .category-section {
    padding: var(--space-2xl) 0;
  }

  .product-section {
    padding: var(--space-2xl) 0;
  }

  .brand-story {
    padding: var(--space-2xl) 0;
  }
}
