/* Common tokens, reset, header, footer and shared price styles. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Onest-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/Onest-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/Onest-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Unbounded-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/Unbounded-Medium.ttf") format("truetype");
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f9;
  --line: #ececf1;
  --text: #17151f;
  --muted: #8d8a99;
  --accent: #FAE100;
  --accent-soft: #fff8b5;
  --accent-ink: #17151f;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(42, 37, 56, 0.12);
  --page-gutter: 50px;
  --page-margin: 150px;
  --page-edge: calc(var(--page-margin) + var(--page-gutter));
  --text-font: "Onest", "Segoe UI", Arial, sans-serif;
  --display-font: "Unbounded", "Onest", "Segoe UI", Arial, sans-serif;
  --store-font: var(--text-font);
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--text-font);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-promo {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 var(--page-gutter);
  background: var(--accent);
  color: #000;
  font-family: var(--store-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 66px;
  padding: 0 var(--page-edge);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  transform: translateY(0);
  transition: transform 180ms ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header .brand,
.site-footer .brand {
  margin-bottom: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-toggle {
  display: none;
}

.site-nav a,
.site-footer a,
.site-footer .footer-contact-placeholder {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-icon,
.cart-open {
  position: relative;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.header-icon svg,
.cart-open svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.cart-open {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: transparent;
}

.cart-open svg path {
  fill: none;
  stroke: currentColor;
}

.header-icon:hover,
.header-icon:focus-visible,
.cart-open:hover,
.cart-open:focus-visible {
  color: #737373;
}

.header-icon:hover svg,
.header-icon:focus-visible svg {
  transform: scale(1.05);
}

.cart-open:hover,
.cart-open:focus-visible {
  background: #f4f4f4;
  color: #000;
  transform: scale(1.05);
}

.header-icon:focus-visible,
.cart-open:focus-visible {
  outline: 2px solid rgba(23, 21, 31, 0.22);
  outline-offset: 3px;
}

.cart-open span {
  position: absolute;
  top: -6px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff563f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.cart-open span[hidden] {
  display: none;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(2, minmax(160px, 0.5fr));
  gap: 34px;
  padding: 42px var(--page-edge);
  background: #111;
  color: #fff;
}

.site-footer div {
  display: grid;
  align-content: start;
  gap: 12px;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: #c9c9c9;
  line-height: 1.6;
}

.site-footer strong {
  color: var(--accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  color: var(--text);
  font-family: var(--display-font);
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  width: 16px;
  height: 21px;
  border-radius: 3px;
  background: var(--accent);
  border: 1px solid rgba(23, 21, 31, 0.08);
  transform: skew(-18deg);
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.section-label {
  color: var(--accent-ink);
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--display-font);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.price-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.current-price {
  color: var(--text);
  font-family: var(--display-font);
  font-weight: 500;
}

.old-price {
  color: var(--muted);
  font-family: var(--display-font);
  font-weight: 500;
  text-decoration: line-through;
}

.discount-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ef3f44;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.discount-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.discount-timer span {
  color: #d7d7d7;
}

.discount-timer .timer-value {
  color: var(--accent);
  font-size: 13px;
}

.muted {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1280px) {
  :root {
    --page-margin: 70px;
    --page-gutter: 36px;
  }

  .site-header {
    gap: 18px;
  }

  .site-nav {
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  :root {
    --page-margin: 0px;
    --page-gutter: 32px;
  }
}

@media (max-width: 920px) {
  .site-header {
      position: sticky;
      flex-wrap: wrap;
      padding: 16px var(--page-edge);
    }
  .site-nav {
      order: 3;
      width: 100%;
      justify-content: space-between;
      gap: 12px;
    }
  .header-actions {
      margin-left: auto;
    }
  .site-footer {
      grid-template-columns: 1fr;
      padding: 32px var(--page-edge);
    }
}

@media (max-width: 560px) {
  :root {
      --page-gutter: 18px;
    }

  body {
      background: #fff;
    }
  h1 {
      font-size: 30px;
    }
  .header-actions {
      width: auto;
      justify-content: flex-end;
    }
  .site-header {
      display: grid;
      grid-template-columns: 34px 34px minmax(0, 1fr) 42px;
      gap: 12px;
      padding-top: 14px;
      padding-bottom: 14px;
      min-height: 64px;
    }
  .mobile-menu-toggle {
      position: relative;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      grid-column: 1;
      grid-row: 1;
      place-items: center;
      width: 34px;
      height: 34px;
      padding: 0;
      border: 0;
      background: transparent;
      color: #000;
    }
  .mobile-menu-toggle span {
      display: block;
      width: 26px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
      transition:
        opacity 160ms ease,
        transform 160ms ease;
    }
  .mobile-menu-toggle span + span {
      margin-top: 6px;
    }
  .site-header.menu-open .mobile-menu-toggle span:nth-child(1) {
      transform: translateY(8px) rotate(45deg);
    }
  .site-header.menu-open .mobile-menu-toggle span:nth-child(2) {
      opacity: 0;
    }
  .site-header.menu-open .mobile-menu-toggle span:nth-child(3) {
      transform: translateY(-8px) rotate(-45deg);
    }
  .site-header .brand {
      grid-column: 3;
      grid-row: 1;
      justify-self: center;
      min-width: 0;
    }
  .site-header .brand span:last-child {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  .header-actions {
      display: contents;
    }
  .header-icon {
      grid-column: 2;
      grid-row: 1;
      justify-self: center;
    }
  .cart-open {
      grid-column: 4;
      grid-row: 1;
      justify-self: end;
    }
  .site-nav {
      display: none;
      grid-column: 1 / -1;
      width: 100%;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      gap: 0;
    }
  .site-header.menu-open .site-nav {
      display: grid;
    }
  .site-nav a {
      min-height: 42px;
      display: flex;
      align-items: center;
      border-bottom: 1px solid var(--line);
      font-size: 15px;
    }
  .site-nav a:last-child {
      border-bottom: 0;
    }
  .cart-open,
    .header-icon {
      flex: 0 0 32px;
    }
}
