:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --bg: #EADBCC;
  --text: #1B293B;
  --muted: #6b7280;
  --accent: #C1A26B;
  --card: #F7EFE3;
  --border: #D29E6B;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 0.5rem 0.8rem 0.35rem;
  background: rgba(234, 219, 204, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(27, 41, 59, 0.12);
  transform: translateY(-120%);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

body.scrolled .site-header {
  transform: translateY(0);
}

body.page-body .site-header {
  transform: translateY(0) !important;
}

body.page-body .site-header__brand img {
  width: 240px;
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.desktop-nav {
  display: flex;
}

.mobile-controls {
  display: none;
  justify-self: end;
  position: relative;
}

.mobile-menu__toggle {
  border: 0;
  background: transparent;
  padding: 0.35rem;
  cursor: pointer;
}

.mobile-menu__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 999px;
}

.mobile-menu__nav {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  flex-direction: column;
  align-items: stretch;
  background: #f7efe3;
  padding: 0.7rem;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(27, 41, 59, 0.14);
  min-width: 220px;
  z-index: 30;
  gap: 0.6rem;
}

.mobile-controls.is-open .mobile-menu__nav {
  display: flex;
}

.mobile-menu__group {
  display: grid;
  gap: 0.2rem;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  background: rgba(209, 158, 107, 0.16);
}

.mobile-menu__group--actions {
  background: rgba(27, 41, 59, 0.06);
}

.mobile-menu__label {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.mobile-menu__nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  width: 100%;
}

.mobile-menu__nav a:hover {
  background: #D29E6B;
}

.site-header__side {
  display: flex;
  justify-content: flex-start;
}

.site-header__side--right {
  justify-content: flex-end;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.dropdown {
  position: relative;
}

.dropdown__toggle {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.dropdown__toggle:hover,
.dropdown:hover .dropdown__toggle {
  background: #D29E6B;
  color: #1B293B;
  transform: translateY(-1px);
}

.cart-icon {
  padding: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  display: none;
  min-width: 200px;
  width: max-content;
  padding: 0.5rem;
  border-radius: 12px;
  background: #F7EFE3;
  box-shadow: 0 12px 30px rgba(27, 41, 59, 0.12);
  animation: fadeIn 0.2s ease;
}

[hidden] {
  display: none !important;
}

.dropdown.is-open .dropdown__menu {
  display: grid;
  gap: 0.3rem;
}

.dropdown__menu a {
  display: block;
  width: 100%;
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: transparent;
  white-space: nowrap;
}

.dropdown__menu a:hover {
  background: #f3f4f6;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.2rem;
}

.site-header__brand img {
  width: 240px;
  height: auto;
  display: block;
  margin-top: 0.15rem;
}

body:not(.page-body) .hero__logo {
  width: min(90vw, 560px);
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: url('assets/img/background.jpg') center/cover no-repeat;
  background-attachment: scroll;
}

.hero__content {
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__logo {
  width: min(90vw, 560px);
  height: auto;
  display: block;
  margin: 2rem auto 5rem;
  transform: translateY(0) scale(1);
  opacity: 1;
  will-change: transform, opacity;
  transition: transform 0.15s linear, opacity 0.15s linear;
  border-radius: 20px;
}

body.scrolled .hero__logo {
  transform: translateY(-18vh) scale(0.55);
  opacity: 0.2;
}

.section-heading {
  padding: 4rem 2rem 1rem;
  text-align: center;
  background: var(--bg);
}

.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.3;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer {
  background: rgba(27, 41, 59, 0.95);
  color: #f7efe3;
  padding: 3rem 1.25rem;
  margin-top: 2rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 0.8rem;
  color: #f7efe3;
}

.site-footer p,
.site-footer li {
  color: #e9dccd;
  line-height: 1.6;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.site-footer a {
  color: #f7efe3;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(27, 41, 59, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(27, 41, 59, 0.12);
}

.card img {
  transition: transform 0.35s ease;
}

.card:hover img {
  transform: scale(1.03);
}

.card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card__body {
  padding: 1rem 1rem 0.5rem;
}

.card h3 {
  margin: 0 0 0.3rem;
}

.card p {
  color: #4b5563;
  margin: 0 0 0.8rem;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.card__price {
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.card__button,
.qty-btn,
.remove-btn,
.checkout-btn,
.back-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.card__button {
  background: var(--accent);
  color: white;
  padding: 0.6rem 0.95rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.45rem 0.7rem;
  }

  .site-header__inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-controls {
    display: flex;
    justify-self: end;
  }

  .site-header__brand {
    justify-self: center;
  }

  .site-header__brand img {
    width: 240px;
  }

  .hero__content {
    padding: 1.25rem;
  }

  .hero__logo {
    width: min(86vw, 420px);
    margin: 1.5rem auto 3rem;
  }

  .section-heading {
    padding: 3rem 1.25rem 1rem;
  }

  .section-heading h2 {
    font-size: 1.4rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    padding: 1rem 1.25rem 3rem;
    gap: 1rem;
  }

  .site-footer {
    padding: 2rem 1.25rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.card__button:hover,
.qty-btn:hover,
.remove-btn:hover,
.checkout-btn:hover,
.back-link:hover {
  transform: translateY(-1px);
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 1.25rem 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--accent);
  background: #EADBCC;
  color: #1B293B;
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
}

.product-detail-card,
.cart-summary,
.cart-panel,
.checkout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(27, 41, 59, 0.08);
  animation: fadeIn 0.25s ease;
}

.product-detail-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 1.5rem;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.product-gallery__main {
  position: relative;
  border-radius: 20px;
  background: #f1e7d8;
  padding: 0.9rem;
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(27, 41, 59, 0.75);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(27, 41, 59, 0.18);
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 2;
}

.product-gallery__nav:hover {
  transform: translateY(-50%) scale(1.04);
  background: rgba(27, 41, 59, 0.92);
}

.product-gallery__nav--prev {
  left: 0.8rem;
}

.product-gallery__nav--next {
  right: 0.8rem;
}

.product-detail__image {
  border-radius: 16px;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.product-gallery__thumb {
  border: 2px solid transparent;
  border-radius: 14px;
  background: #f7efe3;
  padding: 0.3rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-gallery__thumb:hover,
.product-gallery__thumb.is-active {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.product-gallery__thumb img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 10px;
  background: #fdf8f0;
}

.product-gallery__extra {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-gallery__thumbs--extra .product-gallery__thumb img {
  width: 72px;
  height: 72px;
}

.product-detail__content h2 {
  margin-top: 0;
  font-size: 2rem;
}

.product-detail__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.product-detail__price {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}

.product-detail__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.product-detail__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent);
  color: white;
  padding: 0.7rem 1rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: none;
}

.product-detail__actions .btn:hover {
  transform: translateY(-1px);
  background: #b68f52;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.5rem;
}

.cart-panel {
  padding: 1.25rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item__content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.cart-item__image {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
  background: #fdf8f0;
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item__title {
  margin: 0 0 0.25rem;
}

.cart-item__meta {
  color: #4b5563;
  margin: 0;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.qty-btn,
.remove-btn {
  background: #EADBCC;
  color: #1B293B;
  padding: 0.45rem 0.7rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cart-summary {
  padding: 1.25rem;
  height: fit-content;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 0.8rem 0;
  color: var(--muted);
}

.summary-row--total {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.checkout-btn {
  display: inline-block;
  color: white;
  background: var(--accent);
  padding: 0.8rem 1rem;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 1rem;
}

.cart-menu {
  right: 0;
  left: auto;
  min-width: 260px;
}

.cart-menu__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.2rem;
  color: var(--text);
}

.cart-menu__image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  background: #fdf8f0;
}

.cart-menu__details {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.cart-menu__details small {
  color: var(--muted);
}

.cart-menu__empty {
  color: #4b5563;
  padding: 0.5rem 0.25rem;
}

.cart-menu__link {
  margin-top: 0.4rem;
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.checkout-card {
  padding: 1.5rem;
}

.checkout-grid {
  display: grid;
  gap: 1rem;
}

.checkout-grid input,
.checkout-grid textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
}

.checkout-grid button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 0.9rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.success-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: #dcfce7;
  color: #166534;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header__inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .site-header__side,
  .site-header__side--right {
    justify-content: center;
  }

  .product-detail-card,
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    padding: 1rem 1rem 3rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-shell {
    padding-top: 8rem;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
