/* ============================================
   POWER SHOP — "Dune" Theme
   Desert Light · Mediterranean Warmth
   ============================================ */

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

/* --- Design Tokens --- */
:root {
  /* Palette */
  --sand: #f5f0e6;
  --sand-light: #faf8f2;
  --sand-dark: #ebe4d6;
  --stone: #c2b69e;
  --stone-dark: #a89c84;
  --sienna: #b5562a;
  --sienna-light: #d4703f;
  --sienna-dark: #8f4420;
  --olive: #4a5a3c;
  --olive-light: #5e7350;
  --olive-muted: #6b7a5c;
  --ink: #2c2620;
  --ink-light: #4a4238;
  --gold-rule: #d4c9a8;
  --white: #fffdf8;

  /* Typography */
  --font-display: 'Gambetta', 'Georgia', serif;
  --font-body: 'Archivo', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 6rem;

  /* Sizes */
  --max-width: 1280px;
  --header-height: 72px;
  --border-radius: 3px;

  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(44, 38, 32, 0.06);
  --shadow-card: 0 2px 8px rgba(44, 38, 32, 0.08);
  --shadow-elevated: 0 8px 24px rgba(44, 38, 32, 0.1);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 180ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--sand);
  /* Linen texture overlay */
  background-image:
    url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='40' height='40' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
}

a {
  color: var(--sienna);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--sienna-dark);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, select {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.rule {
  border: none;
  height: 1px;
  background: var(--gold-rule);
  margin: var(--space-xl) 0;
}

.rule--thin {
  background: linear-gradient(to right, transparent, var(--gold-rule), transparent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Staggered Load Animations --- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-rise {
  opacity: 0;
  animation: rise var(--duration-slow) var(--ease-out) forwards;
}

.animate-fade {
  opacity: 0;
  animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }
.delay-5 { animation-delay: 400ms; }
.delay-6 { animation-delay: 480ms; }
.delay-7 { animation-delay: 560ms; }
.delay-8 { animation-delay: 640ms; }

/* HTMX swap transitions */
.htmx-swapping {
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.htmx-settling {
  opacity: 1;
  transition: opacity var(--duration-normal) var(--ease-out);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sand-light);
  border-bottom: 1px solid var(--gold-rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 248, 242, 0.92);
}

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

.header__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.header__logo:hover {
  color: var(--sienna);
}

.header__logo span {
  color: var(--sienna);
  font-style: italic;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--sienna);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover {
  color: var(--sienna);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--active {
  color: var(--sienna);
}

.nav__link--active::after {
  width: 100%;
}

.nav__link--cart {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.nav__link--cart svg {
  width: 18px;
  height: 18px;
}

.nav__cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--sienna);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
}

.nav__link--call {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--olive);
  color: var(--sand-light);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0;
  transition: background var(--duration-fast) var(--ease-out);
}

.nav__link--call::after {
  display: none;
}

.nav__link--call:hover {
  background: var(--olive-light);
  color: var(--sand-light);
}

.nav__link--call svg {
  width: 16px;
  height: 16px;
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-fast);
}

/* ============================================
   HERO / PROMO SLIDER
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sand-dark);
}

.hero__slider {
  display: flex;
  transition: transform var(--duration-slow) var(--ease-out);
}

.hero__slide {
  min-width: 100%;
  position: relative;
}

.hero__slide-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  gap: var(--space-xl);
  min-height: 480px;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
  background: rgba(74, 90, 60, 0.1);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero__title em {
  color: var(--sienna);
  font-style: italic;
}

.hero__description {
  font-size: 1.1rem;
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-lg);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--sienna);
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.hero__cta:hover {
  background: var(--sienna-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.hero__cta svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.hero__cta:hover svg {
  transform: translateX(3px);
}

.hero__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image img {
  max-height: 400px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(44, 38, 32, 0.15));
}

/* Decorative circle behind hero image */
.hero__image::before {
  content: '';
  position: absolute;
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sand-light) 0%, transparent 70%);
  z-index: 0;
}

.hero__image img {
  position: relative;
  z-index: 1;
}

/* Slider controls */
.hero__controls {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 10;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stone);
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.hero__dot--active {
  background: var(--sienna);
  transform: scale(1.3);
}

.hero__dot:hover {
  background: var(--sienna-light);
}

.hero__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  background: var(--sand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.hero__arrow:hover {
  border-color: var(--sienna);
  background: var(--white);
}

.hero__arrow svg {
  width: 16px;
  height: 16px;
  color: var(--ink);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header__overline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-muted);
  margin-bottom: var(--space-sm);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-header__title em {
  color: var(--sienna);
  font-style: italic;
}

.section-header__rule {
  width: 48px;
  height: 2px;
  background: var(--sienna);
  margin: var(--space-md) auto 0;
  border-radius: 1px;
}

/* ============================================
   INTRO TEXT
   ============================================ */
.intro {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.intro__text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.8;
  color: var(--ink-light);
  max-width: 680px;
  margin: 0 auto;
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--stone);
}

.product-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--sand-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
  transition: transform var(--duration-slow) var(--ease-out);
}

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

.product-card__badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--border-radius);
}

.product-card__badge--sale {
  background: var(--sienna);
  color: var(--white);
}

.product-card__badge--new {
  background: var(--olive);
  color: var(--white);
}

.product-card__body {
  padding: var(--space-md) var(--space-md) var(--space-lg);
}

.product-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin-bottom: var(--space-xs);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: var(--space-sm);
}

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

.product-card__name a:hover {
  color: var(--sienna);
}

.product-card__pricing {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.product-card__price {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.product-card__price--old {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--stone-dark);
  text-decoration: line-through;
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.search-bar {
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-subtle);
}

.search-bar__main {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.search-bar__input-wrap {
  flex: 1;
  position: relative;
}

.search-bar__input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  background: var(--sand-light);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--sienna);
  box-shadow: 0 0 0 3px rgba(181, 86, 42, 0.1);
}

.search-bar__input::placeholder {
  color: var(--stone);
}

.search-bar__input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stone);
  pointer-events: none;
}

.search-bar__input-icon svg {
  width: 18px;
  height: 18px;
}

.search-bar__submit {
  padding: 0.85rem 2rem;
  background: var(--sienna);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--border-radius);
  transition: background var(--duration-fast) var(--ease-out);
}

.search-bar__submit:hover {
  background: var(--sienna-dark);
}

.search-bar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--gold-rule);
}

.search-bar__filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.search-bar__filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-dark);
}

.search-bar__select {
  padding: 0.6rem 2rem 0.6rem 0.8rem;
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  background: var(--sand-light);
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a89c84' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  min-width: 180px;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.search-bar__select:focus {
  outline: none;
  border-color: var(--sienna);
}

.search-bar__price-range {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.search-bar__price-input {
  width: 100px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  background: var(--sand-light);
  color: var(--ink);
  text-align: center;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.search-bar__price-input:focus {
  outline: none;
  border-color: var(--sienna);
}

.search-bar__price-sep {
  color: var(--stone);
  font-size: 0.9rem;
}

.search-bar__category-cascade {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.search-bar__currency-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: var(--space-sm);
}

.search-bar__currency {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-light);
}

.search-bar__currency input {
  accent-color: var(--sienna);
}

.search-bar__currency span {
  font-weight: 500;
}

/* Search results */
#search-results {
}

.search-results__count {
  font-size: 0.85rem;
  color: var(--stone-dark);
  margin-bottom: var(--space-lg);
}

.search-results__count strong {
  color: var(--ink);
}

.search-results__empty {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--stone-dark);
}

.search-results__empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.search-results__empty p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
}

#search-results .product-card__name em {
  background-color: #f9d4b0;
  font-style: normal;
  border-radius: 2px;
  padding: 0.05em 0.2em;
}

/* ============================================
   CATEGORIES PAGE
   ============================================ */
.categories-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.category-tree {
  columns: 1;
  column-gap: var(--space-xl);
}

@media (min-width: 768px) {
  .category-tree {
    columns: 2;
  }
}

.category-group {
  break-inside: avoid;
  margin-bottom: var(--space-xl);
}

.category-group__parent {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.category-group__parent:hover {
  border-color: var(--sienna);
  box-shadow: var(--shadow-card);
}

.category-group__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand-dark);
  border-radius: var(--border-radius);
  flex-shrink: 0;
}

.category-group__icon svg {
  width: 20px;
  height: 20px;
  color: var(--sienna);
}

.category-group__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.category-group__children {
  padding: var(--space-sm) 0 0 var(--space-lg);
}

.category-sub {
  margin-bottom: var(--space-xs);
}

.category-sub__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.category-sub__link:hover {
  color: var(--sienna);
  background: rgba(181, 86, 42, 0.04);
}

.category-sub__children {
  list-style: none;
  padding: 0 0 var(--space-xs) var(--space-lg);
  border-left: 1px solid var(--gold-rule);
  margin-left: var(--space-md);
}

.category-leaf__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.85rem;
  color: var(--ink-light);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.category-leaf__link:hover {
  color: var(--sienna);
  background: rgba(181, 86, 42, 0.04);
}


/* ============================================
   PRODUCT PAGE (Single)
   ============================================ */
.product-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

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

.product-page__gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.product-page__main-image {
  aspect-ratio: 1;
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.product-page__main-image img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

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

.product-page__thumb {
  width: 64px;
  height: 64px;
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.product-page__thumb--active,
.product-page__thumb:hover {
  border-color: var(--sienna);
}

.product-page__thumb img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

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

.product-page__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.78rem;
  color: var(--stone-dark);
  margin-bottom: var(--space-lg);
}

.product-page__breadcrumb a {
  color: var(--stone-dark);
}

.product-page__breadcrumb a:hover {
  color: var(--sienna);
}

.product-page__breadcrumb span {
  font-size: 0.65rem;
}

.product-page__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.product-page__name em,
.product-page__description em {
  background-color: #f9d4b0;
  font-style: normal;
  border-radius: 2px;
  padding: 0.05em 0.2em;
}

.product-page__price-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--gold-rule);
}

.product-page__price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sienna);
}

.product-page__price--old {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--stone);
  text-decoration: line-through;
}

.product-page__description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-light);
  margin-bottom: var(--space-lg);
}

.product-page__description p + p {
  margin-top: var(--space-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.9rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background: var(--sienna);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--sienna-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--gold-rule);
}

.btn--outline:hover {
  border-color: var(--sienna);
  color: var(--sienna);
}

/* ============================================
   QUANTITY CONTROL
   ============================================ */
.product-page__purchase {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  background: var(--white);
}

.qty-control__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-light);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.qty-control__btn:hover {
  color: var(--sienna);
  background: var(--sand-dark);
}

.qty-control__input {
  width: 52px;
  height: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--gold-rule);
  border-right: 1px solid var(--gold-rule);
  background: transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  -moz-appearance: textfield;
}

.qty-control__input::-webkit-inner-spin-button,
.qty-control__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-control__input:focus {
  outline: none;
}

.btn--add-to-cart {
  flex: 1;
}

.product-page__cart-message {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--olive);
  background: rgba(74, 90, 60, 0.08);
  border: 1px solid rgba(74, 90, 60, 0.2);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
}

/* ============================================
   PRODUCT TAGS
   ============================================ */
.product-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--gold-rule);
}

.product-page__tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--olive-muted);
  background: rgba(74, 90, 60, 0.08);
  padding: 3px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.product-page__tag:hover {
  background: rgba(74, 90, 60, 0.15);
  color: var(--olive);
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.cart-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.cart-page__empty {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.cart-page__empty p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--stone-dark);
  margin-bottom: var(--space-lg);
}

.cart-page__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
}

.cart-item__image-link {
  flex-shrink: 0;
}

.cart-item__image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--border-radius);
  background: var(--sand-dark);
}

.cart-item__details {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-xs);
}

.cart-item__name:hover {
  color: var(--sienna);
}

.cart-item__price {
  font-size: 0.85rem;
  color: var(--stone-dark);
}

.cart-item__quantity .qty-control__value {
  display: inline-block;
  width: 52px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border-left: 1px solid var(--gold-rule);
  border-right: 1px solid var(--gold-rule);
}

.cart-item__total {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 110px;
  text-align: right;
}

.cart-item__remove {
  padding: var(--space-sm);
  color: var(--stone-dark);
  transition: color var(--duration-fast) var(--ease-out);
}

.cart-item__remove:hover {
  color: var(--sienna);
}

.cart-page__summary {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-md);
  max-width: 320px;
  margin-left: auto;
}

.cart-page__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
}

.cart-page__total span:first-child {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-dark);
}

.cart-page__total span:last-child {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sienna);
}

.cart-page__checkout {
  width: 100%;
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.checkout-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.checkout-page__empty {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.checkout-page__empty p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--stone-dark);
  margin-bottom: var(--space-lg);
}

.checkout-page__layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-lg);
  align-items: start;
}

.checkout-page__section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.checkout-page__form {
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
}

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

.checkout-form__row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.checkout-form__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin-bottom: var(--space-xs);
}

.checkout-form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  background: var(--sand-light);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.checkout-form__textarea {
  resize: vertical;
  font-family: var(--font-body);
  line-height: 1.5;
}

.checkout-form__input:focus {
  outline: none;
  border-color: var(--sienna);
  box-shadow: 0 0 0 3px rgba(181, 86, 42, 0.1);
}

.checkout-page__summary {
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.checkout-page__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--gold-rule);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
}

.checkout-item__name {
  font-size: 0.9rem;
  color: var(--ink);
}

.checkout-item__qty {
  color: var(--stone-dark);
  font-size: 0.85rem;
}

.checkout-item__price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.checkout-page__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-lg);
}

.checkout-page__total span:first-child {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-dark);
}

.checkout-page__total span:last-child {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sienna);
}

.checkout-page__submit {
  width: 100%;
}

.checkout-page__error {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sienna);
  background: rgba(181, 86, 42, 0.08);
  border: 1px solid rgba(181, 86, 42, 0.2);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
}

/* ============================================
   ORDER CONFIRMATION PAGE
   ============================================ */
.confirmation-page {
  padding: var(--space-2xl) 0;
  display: flex;
  justify-content: center;
}

.confirmation-page__card {
  text-align: center;
  max-width: 500px;
  background: var(--white);
  border: 1px solid var(--gold-rule);
  border-radius: var(--border-radius);
  padding: var(--space-2xl) var(--space-xl);
}

.confirmation-page__icon {
  color: var(--olive);
  margin-bottom: var(--space-lg);
}

.confirmation-page__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.confirmation-page__message {
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.confirmation-page__order-id {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stone-dark);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xl);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: var(--stone);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: var(--space-2xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer__info {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--stone);
  margin: 0 0 var(--space-xs);
}

.footer__info a {
  color: var(--sienna-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__info a:hover {
  color: var(--sand);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sand);
  margin-bottom: var(--space-md);
}

.footer__brand span {
  color: var(--sienna-light);
  font-style: italic;
}

.footer__tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--stone-dark);
  max-width: 300px;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  color: var(--stone);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__links a:hover {
  color: var(--sand);
}

.footer__bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding: var(--space-lg) var(--space-lg) 0;
  border-top: 1px solid rgba(194, 182, 158, 0.15);
  text-align: center;
  font-size: 0.8rem;
  color: var(--stone-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .header__inner {
    padding: 0 var(--space-md);
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--sand-light);
    border-bottom: 1px solid var(--gold-rule);
    padding: var(--space-md);
    gap: var(--space-md);
    box-shadow: var(--shadow-elevated);
  }

  .nav--open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__slide-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    min-height: auto;
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__image {
    order: -1;
  }

  .hero__image img {
    max-height: 260px;
  }

  .hero__controls {
    position: static;
    transform: none;
    padding: var(--space-md) 0 var(--space-lg);
    justify-content: center;
  }

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

  .product-page__gallery {
    position: static;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-lg);
    padding: 0 var(--space-md);
  }

  .search-bar__main {
    flex-direction: column;
  }

  .search-bar__filters {
    flex-direction: column;
  }

  .search-bar__price-range {
    flex-wrap: wrap;
  }

  .cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-md);
    padding-right: calc(var(--space-md) + 36px);
  }

  .cart-item__image-link {
    grid-row: 1 / 3;
  }

  .cart-item__image {
    width: 60px;
    height: 60px;
  }

  .cart-item__details {
    grid-column: 2 / -1;
  }

  .cart-item__remove {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
  }

  .cart-item__quantity {
    grid-column: 2;
  }

  .cart-item__total {
    min-width: auto;
    align-self: center;
  }

  .checkout-page__layout {
    grid-template-columns: 1fr;
  }

  .checkout-form__row--half {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

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

  .product-page__actions {
    flex-direction: column;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-item__image-link {
    display: none;
  }

  .cart-item__details {
    grid-column: 1;
  }

  .cart-item__quantity {
    grid-column: 1;
  }

  .cart-item__total {
    grid-column: 1;
    text-align: left;
  }

  .cart-page__summary {
    max-width: none;
  }
}
