:root {
  --orange: #f05a13;
  --orange-dark: #c7460c;
  --ink: #202329;
  --muted: #6b6f78;
  --line: #e5e0da;
  --surface: #ffffff;
  --soft: #f7f3ed;
  --green: #2f8f61;
  --shadow: 0 10px 24px rgba(37, 28, 18, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-main {
  display: grid;
  grid-template-columns: 280px minmax(360px, 1fr) 250px;
  gap: 28px;
  align-items: center;
  max-width: 1420px;
  margin: 0 auto;
  padding: 14px 32px 10px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.brand-logo {
  width: 260px;
  height: 66px;
  object-fit: contain;
  object-position: left center;
}

.search {
  display: grid;
  grid-template-columns: 1fr 54px;
  min-width: 0;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 1px solid #8d939d;
  border-right: 0;
  border-radius: 5px 0 0 5px;
  outline: 0;
}

.search input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 90, 19, 0.13);
}

.search button {
  border: 0;
  border-radius: 0 5px 5px 0;
  color: #fff;
  background: var(--orange);
  font-size: 28px;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.icon-text,
.cart-button {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 10px;
  height: 42px;
  border: 0;
  color: #3b3f46;
  background: transparent;
  white-space: nowrap;
}

.cart-button {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.line-icon {
  display: inline-block;
  position: relative;
  width: 26px;
  height: 26px;
}

.user-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.user-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 18px;
  height: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.cart-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
}

.cart-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 6px;
  height: 2px;
  background: currentColor;
  box-shadow: 5px 18px 0 currentColor, 16px 18px 0 currentColor;
}

.cart-count {
  position: absolute;
  right: -8px;
  top: -3px;
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  line-height: 18px;
}

.cart-count.is-visible {
  display: inline-block;
}

.category-nav {
  display: flex;
  gap: 28px;
  position: relative;
  max-width: 1420px;
  margin: 0 auto;
  padding: 10px 32px 18px;
  overflow-x: visible;
  white-space: nowrap;
}

.category-nav > button,
.nav-item > button {
  border: 0;
  color: #343941;
  background: transparent;
  font-size: 15px;
}

.category-nav > button::after,
.nav-item > button::after {
  content: "⌄";
  margin-left: 7px;
  color: #5a616b;
}

.category-nav > button:last-child::after {
  content: "";
}

.mega-menu {
  position: absolute;
  left: 32px;
  right: 32px;
  top: 43px;
  z-index: 30;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 34px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-item:hover .mega-menu,
.mega-menu:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-menu aside {
  display: grid;
  gap: 10px;
  align-content: start;
}

.mega-menu aside strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.mega-menu aside button {
  border: 0;
  color: #5c5f66;
  background: transparent;
  text-align: left;
}

.mega-menu aside button:hover {
  color: var(--orange);
}

.mega-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.mega-card {
  display: grid;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #5c5f66;
  text-align: center;
}

.mega-card img {
  width: 100%;
  height: 210px;
  border-radius: 6px;
  object-fit: cover;
}

.hero {
  position: relative;
  max-width: 1420px;
  margin: 36px auto 34px;
  padding: 0 32px;
}

.hero-slide {
  display: flex;
  align-items: center;
  min-height: 430px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(245, 238, 226, 0.98) 0%, rgba(245, 238, 226, 0.88) 34%, rgba(245, 238, 226, 0.08) 67%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-copy {
  width: min(460px, 58%);
  margin-left: 84px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  color: #725344;
  font-size: 50px;
  line-height: 1.03;
  text-transform: uppercase;
}

.hero p {
  margin: 0 0 26px;
  color: #4e443c;
  line-height: 1.6;
}

.primary-action,
.checkout-button,
.detail-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--orange);
  font-weight: 800;
}

.primary-action:hover,
.checkout-button:hover,
.add-button:hover,
.detail-add:hover {
  background: var(--orange-dark);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 36px;
}

.hero-next {
  right: 36px;
}

.hero-dots {
  position: absolute;
  right: 50%;
  bottom: 18px;
  display: flex;
  gap: 8px;
  transform: translateX(50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(32, 35, 41, 0.28);
}

.hero-dots button.is-active {
  width: 30px;
  background: var(--orange);
}

.quick-categories {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 12px;
  max-width: 1420px;
  margin: 0 auto 42px;
  padding: 0 32px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 28px;
}

.category-pill {
  display: grid;
  gap: 14px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 800;
  text-align: center;
}

.category-pill img {
  width: 168px;
  height: 168px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.category-pill:hover img {
  transform: translateY(-3px);
}

.category-scroll {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 30px;
  line-height: 1;
}

.shop-layout,
.listing-view,
.detail-view {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 32px 70px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
}

.side-menu {
  position: sticky;
  top: 142px;
  align-self: start;
  padding: 8px 0;
}

.side-menu h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.side-menu button {
  display: block;
  width: 100%;
  padding: 8px 0;
  border: 0;
  color: #5c5f66;
  background: transparent;
  text-align: left;
}

.side-menu button:hover,
.side-menu button.is-active {
  color: var(--orange);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading-secondary {
  margin-top: 38px;
}

.section-heading h2 {
  margin: 0;
  font-size: 24px;
}

.text-link {
  border: 0;
  background: transparent;
  color: #252932;
  font-weight: 700;
}

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

.product-card {
  min-width: 0;
}

.product-link {
  display: grid;
  width: 100%;
  gap: 14px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.product-media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--soft);
  aspect-ratio: 1 / 0.86;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.product-card:hover .product-media img {
  transform: scale(1.035);
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.product-name {
  min-height: 42px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
}

.rating {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 8px;
  color: #ff982f;
  font-size: 15px;
}

.rating span {
  color: #585e67;
  font-size: 14px;
}

.price {
  margin-bottom: 18px;
  color: #222;
  font-size: 17px;
  font-weight: 900;
}

.add-button {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: #f47a00;
  font-weight: 800;
}

.compact-grid .product-card:nth-child(n + 5) {
  display: none;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 24px 0 20px;
  color: #9aa0a9;
  font-size: 14px;
}

.breadcrumb a,
.breadcrumb button,
.breadcrumb strong {
  border: 0;
  color: #252932;
  background: transparent;
  font-weight: 600;
}

.listing-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.filter-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.filter-row {
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-weight: 700;
}

.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.listing-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.listing-head p {
  margin: 0;
  color: #9aa0a9;
}

.sort-box {
  display: grid;
  min-width: 200px;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #252932;
}

.sort-box span {
  font-size: 12px;
}

.sort-box select {
  border: 0;
  outline: 0;
  background: transparent;
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(360px, 560px) minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.detail-gallery {
  display: grid;
  gap: 18px;
}

.detail-image {
  width: 100%;
  border-radius: 8px;
  background: var(--soft);
  object-fit: cover;
  aspect-ratio: 1 / 0.86;
}

.motion-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.motion-card img {
  width: 86px;
  height: 76px;
  border-radius: 6px;
  object-fit: cover;
  animation: productPulse 3s ease-in-out infinite;
}

.motion-card span {
  display: inline-flex;
  width: max-content;
  margin-bottom: 6px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.motion-card strong {
  display: block;
}

@keyframes productPulse {
  0%,
  100% {
    transform: scale(1) translateX(0);
  }
  50% {
    transform: scale(1.12) translateX(4px);
  }
}

.detail-info {
  padding-top: 10px;
}

.detail-group {
  color: var(--orange);
  font-weight: 800;
}

.detail-info h1 {
  margin: 10px 0;
  font-size: 34px;
}

.detail-info p {
  max-width: 620px;
  color: #5c5f66;
  line-height: 1.7;
}

.detail-price {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 22px 0;
}

.detail-price strong {
  font-size: 30px;
}

.detail-price span {
  color: #9aa0a9;
  text-decoration: line-through;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.option-row > span {
  width: 100%;
  font-weight: 800;
}

.option-pill {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.option-pill.is-selected {
  border-color: var(--orange);
  color: var(--orange);
  font-weight: 800;
}

.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.ingredient-list span {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: #5c5f66;
  font-size: 14px;
}

.detail-add {
  min-width: 240px;
}

.related-products {
  margin-top: 48px;
}

.related-products h2 {
  margin: 0 0 18px;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.35);
}

.cart-drawer.is-open {
  display: flex;
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.16);
}

.drawer-header,
.drawer-footer {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

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

.drawer-header h2 {
  margin: 0;
}

.drawer-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  font-size: 24px;
}

.cart-items {
  overflow-y: auto;
  padding: 12px 22px;
}

.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 64px;
  height: 64px;
  border-radius: 5px;
  object-fit: cover;
}

.cart-line strong,
.cart-line span {
  display: block;
}

.cart-line span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.cart-line button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
}

.empty-cart {
  margin: 28px 0;
  color: var(--muted);
  text-align: center;
}

.drawer-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.drawer-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 18px;
}

.checkout-button {
  width: 100%;
}

@media (max-width: 1180px) {
  .header-main {
    grid-template-columns: 240px minmax(260px, 1fr);
  }

  .brand-logo {
    width: 230px;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .category-nav {
    overflow-x: auto;
  }

  .mega-menu {
    display: none;
  }
}

@media (max-width: 1100px) {
  .category-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .category-pill {
    flex: 0 0 158px;
  }

  .shop-layout,
  .listing-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-menu {
    position: static;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .side-menu h2 {
    display: none;
  }

  .side-menu button {
    width: auto;
    white-space: nowrap;
  }

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

@media (max-width: 760px) {
  .header-main,
  .category-nav,
  .hero,
  .quick-categories,
  .shop-layout,
  .listing-view,
  .detail-view {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .brand-logo {
    width: 230px;
    height: 58px;
  }

  .header-actions {
    grid-column: auto;
    justify-content: space-between;
    font-size: 14px;
  }

  .hero {
    margin-top: 22px;
  }

  .hero-slide {
    min-height: 440px;
    background:
      linear-gradient(180deg, rgba(245, 238, 226, 0.98) 0%, rgba(245, 238, 226, 0.82) 44%, rgba(245, 238, 226, 0.12) 100%),
      var(--hero-image);
    background-position: center bottom;
  }

  .hero-copy {
    width: auto;
    margin: 34px 52px 0;
    align-self: flex-start;
  }

  .hero h1 {
    font-size: 36px;
  }

  .quick-categories {
    grid-template-columns: 1fr;
  }

  .category-scroll {
    display: none;
  }

  .product-grid,
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .product-name {
    min-height: 58px;
  }

  .listing-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .search {
    grid-template-columns: 1fr 48px;
  }

  .category-nav {
    gap: 20px;
  }

  .hero-copy {
    margin-left: 24px;
    margin-right: 24px;
  }

  .hero h1 {
    font-size: 30px;
  }

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