:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --ink: #161815;
  --muted: #535750;
  --border: #dddfd7;
  --navy: #123c54;
  --orange: #ff8547;
  --rust: #a13813;
  --gutter: clamp(16px, 4vw, 64px);
  font-family: system-ui, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid #0077ac;
  outline-offset: 4px;
}

.wrap {
  width: min(calc(100% - var(--gutter) * 2), 1280px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 12px auto auto 12px;
  padding: 10px 16px;
  color: white;
  background: var(--navy);
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.header-inner {
  min-height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
}

.brand {
  display: block;
  width: fit-content;
  border-radius: 6px;
}

.brand-mark {
  position: relative;
  display: block;
  width: 68px;
  height: 61px;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.brand-mark img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 126px;
  height: 126px;
  max-width: none;
  transform: translate(-50%, -50%);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 36px);
  font-size: 0.875rem;
  font-weight: 600;
}

.main-nav a {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  color: var(--muted);
  white-space: nowrap;
}

.main-nav a:hover, .main-nav [aria-current] { color: var(--ink); }

.main-nav [aria-current]::after {
  position: absolute;
  inset: auto 0 3px;
  height: 2px;
  background: var(--orange);
  content: "";
}

.button {
  display: inline-flex;
  min-height: 47px;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.link-icon {
  flex: none;
  width: 1.2em;
  height: 1.2em;
}

.button-light-outline .link-icon { filter: brightness(0) invert(1); }

.button-header {
  justify-self: end;
  min-height: 42px;
  border-color: var(--border);
  background: #fff;
}

.button-header:hover { border-color: var(--navy); color: var(--navy); }
.button-accent { background: var(--orange); color: #201108; }
.button-accent:hover { background: #ffab7a; }
.button-light-outline { border-color: #ffffff52; color: #fff; }
.button-light-outline:hover { border-color: #fff; background: #ffffff18; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(490px, 43vw, 600px);
  overflow: hidden;
  border-radius: 24px;
  background: #080807;
  color: white;
}

.hero-image {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: 63% center;
  mask-image: linear-gradient(to right, transparent, #0003 17%, #000 45%);
}

.hero-copy {
  width: min(64%, 690px);
  padding: clamp(32px, 5.5vw, 80px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-light { color: #ffb389; }

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.hero h1, .catalog-intro h1 {
  font-size: clamp(3.15rem, 6.25vw, 6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 { margin-block: 19px 25px; }
.hero h1 em { color: var(--orange); font-style: normal; }

.hero-description {
  max-width: 31ch;
  color: #dedbd6;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-caption {
  position: absolute;
  right: 22px;
  bottom: 20px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #120a06e6;
  color: #f3e8e2;
  font-size: 0.7rem;
  line-height: 1.4;
}

.section { margin-block: clamp(54px, 7vw, 98px); }

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

.section-heading h2, .visit-section h2, .contact-card h2 {
  font-size: clamp(2rem, 4vw, 3.65rem);
  font-weight: 780;
  line-height: 1.03;
  letter-spacing: -0.068em;
}

.section-heading h2, .visit-section h2, .contact-card .eyebrow + h2 { margin-top: 9px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  width: fit-content;
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #a3a59e;
}

.text-link:hover { color: var(--rust); text-decoration-color: currentColor; }

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

.category-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: clamp(252px, 29vw, 375px);
  overflow: hidden;
  border: 1px solid #1618150d;
  border-radius: 19px;
}

.category-card h3 {
  position: relative;
  z-index: 1;
  padding: clamp(15px, 2.25vw, 30px);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.category-card:hover h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.category-card img {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 80%;
  object-fit: contain;
  transition: transform 220ms ease;
}

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

.category-iphone, .product-image-iphone {
  background: radial-gradient(ellipse at bottom, #362118, #12100f 76%);
  color: #fff;
}

.category-iphone img, .product-image-iphone img { mix-blend-mode: screen; }
.category-mac, .product-image-mac { background: #e4eef1; }
.category-audio, .product-image-audio { background: #ebe8e0; }
.category-mac img, .category-audio img, .product-image-mac img, .product-image-audio img, .product-image-watch img { mix-blend-mode: multiply; }
.category-mac img, .category-audio img, .product-image-mac img, .product-image-audio img, .product-image-watch img { filter: brightness(1.035); }
.category-mac img { height: 75%; padding-inline: 10px; }
.category-audio img { height: 78%; }

.visit-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: clamp(50px, 7vw, 94px);
}

.trade-panel, .visit-panel {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: clamp(23px, 4.5vw, 58px);
  border-radius: 20px;
}

.trade-panel { background: #f2e7dd; }
.visit-panel { background: var(--navy); color: #fff; }
.visit-section h2 { max-width: 15ch; font-size: clamp(1.9rem, 3.35vw, 3.1rem); }

.trade-panel > p:not(.eyebrow), .visit-panel address {
  margin-block: 15px 21px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.trade-panel > p:not(.eyebrow) { max-width: 38ch; color: var(--muted); }
.visit-panel address { color: #e0edf4; }
.trade-panel .text-link, .visit-panel .button { margin-top: auto; }

.site-footer { border-top: 1px solid var(--border); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-block: 28px 34px;
}

.footer-name { margin-bottom: 4px; font-weight: 800; letter-spacing: -0.035em; }
.footer-detail { color: var(--muted); font-size: 0.8rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-inner nav a { padding-block: 7px; font-size: 0.85rem; font-weight: 650; }
.footer-inner nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.catalog-main { margin-bottom: clamp(48px, 6vw, 86px); }

.catalog-intro {
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid #eadfd6;
  border-radius: 22px;
  background: radial-gradient(ellipse at 95% 140%, #f2bf9e, transparent 66%), #f4ebe3;
}

.catalog-intro h1 { margin-block: 10px 17px; }
.catalog-intro > p:last-child { max-width: 47ch; color: var(--muted); line-height: 1.55; }

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 26px 19px;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding-inline: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  font-size: 0.82rem;
  font-weight: 650;
}

.category-nav a:hover { border-color: var(--navy); color: var(--navy); }
.category-nav, .category-nav a, .visit-section { scroll-margin-top: 18px; }

.category-nav a[aria-current],
.catalog-main:not(.filters-enhanced) .category-nav a:target,
.catalog-main:not(.filters-enhanced) .category-nav:not(:has(a:target)) a:first-child {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.catalog-main:not(.filters-enhanced):has(#iphone:target) .product-grid > :not([data-category="iphone"]),
.catalog-main:not(.filters-enhanced):has(#macbook:target) .product-grid > :not([data-category="macbook"]),
.catalog-main:not(.filters-enhanced):has(#audio:target) .product-grid > :not([data-category="audio"]),
.catalog-main:not(.filters-enhanced):has(#ipad:target) .product-grid > :not([data-category="ipad"]),
.catalog-main:not(.filters-enhanced):has(#apple-watch:target) .product-grid > :not([data-category="apple-watch"]),
.catalog-main:not(.filters-enhanced):has(#acessorios:target) .product-grid > :not([data-category="acessorios"]),
.product-grid > [hidden] {
  display: none;
}

.product-card, .contact-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
}

.product-image {
  display: grid;
  aspect-ratio: 1.5;
  place-items: center;
  overflow: hidden;
}

.product-image img {
  width: 90%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.product-image-ipad { background: #e7edf6; }
.product-image-watch { background: #eeece7; }
.product-image-watch img, .product-image-ipad img { width: 76%; }
.product-image-iphone-lineup { background: #fff; }
.product-image-iphone-lineup img { width: 88%; height: 86%; }

.product-copy {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: clamp(17px, 2.4vw, 26px);
}

.product-copy h2 {
  margin-block: 6px 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.product-link {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  gap: 7px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.product-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: clamp(22px, 3.5vw, 42px);
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.contact-card h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); }
.contact-card > p:not(.eyebrow) { margin-block: 12px 22px; color: #e0edf4; line-height: 1.55; }
.catalog-note { margin-top: 19px; color: var(--muted); font-size: 0.8rem; }
.catalog-promotions { margin-top: clamp(26px, 5vw, 54px); scroll-margin-top: 18px; }

.offer-intro { padding-block: clamp(26px, 3.6vw, 50px); }
.offer-intro > p:last-child { max-width: 56ch; }

.offer-empty {
  display: none;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  color: var(--muted);
}

.catalog-main:not(.filters-enhanced):has(#iphone:target) .offer-grid:not(:has(> [data-category="iphone"])) + .offer-empty,
.catalog-main:not(.filters-enhanced):has(#macbook:target) .offer-grid:not(:has(> [data-category="macbook"])) + .offer-empty,
.catalog-main:not(.filters-enhanced):has(#audio:target) .offer-grid:not(:has(> [data-category="audio"])) + .offer-empty,
.catalog-main:not(.filters-enhanced):has(#ipad:target) .offer-grid:not(:has(> [data-category="ipad"])) + .offer-empty,
.catalog-main:not(.filters-enhanced):has(#apple-watch:target) .offer-grid:not(:has(> [data-category="apple-watch"])) + .offer-empty,
.catalog-main:not(.filters-enhanced):has(#acessorios:target) .offer-grid:not(:has(> [data-category="acessorios"])) + .offer-empty,
.filters-enhanced .offer-empty:not([hidden]) {
  display: block;
}

.offer-details {
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.875rem;
}

.offer-details dd { margin: 0; }

.offer-details > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.offer-original { color: var(--muted); }

.offer-current {
  margin-top: 3px;
  color: #116c43;
  font-weight: 750;
}

.offer-current dd {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  letter-spacing: -0.04em;
}

.offer-battery {
  justify-content: space-between;
  margin-top: 13px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #eef2ef;
}

.offer-battery dd { font-weight: 750; }

@media (max-width: 900px) {
  .hero-copy { width: 70%; }
  .hero-image { width: 72%; }
  .category-grid, .product-grid { gap: 12px; }
}

@media (max-width: 690px) {
  .header-inner { min-height: 70px; column-gap: 8px; }
  .main-nav { font-size: 0.81rem; }
  .button-header { padding-inline: 11px; gap: 5px; font-size: 0.8rem; }
  .hero { flex-direction: column; align-items: stretch; min-height: 0; border-radius: 19px; }
  .hero-copy { position: relative; order: -1; width: 100%; padding: 34px 24px 8px; }
  .hero h1 { font-size: clamp(3rem, 10.2vw, 4.45rem); margin-block: 13px 17px; }
  .hero-image {
    position: relative;
    width: 100%;
    height: clamp(200px, 53vw, 330px);
    margin-top: -25px;
    object-position: center 38%;
    mask-image: linear-gradient(to bottom, transparent, #000 32%);
  }
  .hero-caption { right: 12px; bottom: 12px; }
  .actions { margin-top: 20px; }
  .section-heading { flex-wrap: wrap; }
  .section-heading .text-link { min-height: 27px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { min-height: 224px; }
  .category-iphone { grid-column: 1 / -1; min-height: 266px; }
  .category-iphone img { height: 88%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-section { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 420px) {
  .header-inner { grid-template-columns: 48px 1fr auto; }
  .brand-mark { width: 48px; height: 49px; }
  .brand-mark img { width: 94px; height: 94px; }
  .main-nav { gap: 11px; }
  .button-header { min-height: 39px; }
  .category-card { min-height: 194px; }
  .category-iphone { min-height: 240px; }
  .product-grid { grid-template-columns: 1fr; }
  .offer-intro h1 { font-size: clamp(2.25rem, 11vw, 3.15rem); }
}

@media (max-width: 390px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    row-gap: 2px;
    padding-block: 4px 7px;
  }

  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 22px;
  }

  .main-nav a { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
