/* ==========================================================================
   MoreGlassOptics — base, layout and home page
   Mobile-first. Square corners are the brand rule (radius 0), except the
   kids section which uses its own playful tokens.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/comfortaa-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/comfortaa-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --c-bg: #ffffff;
  --c-surface: #f4f5f7;
  --c-surface-2: #eceff2;
  --c-ink: #111418;
  --c-ink-2: #2b3138;
  --c-muted: #5d6671;
  --c-line: #e1e5ea;
  --c-brand: #0f2a4a;
  --c-brand-ink: #ffffff;
  --c-accent: #1f5eff;
  --c-sale: #d81f2a;
  --c-sale-dark: #a3121b;
  --c-highlight: #ffd23f;
  --c-success: #127a3f;
  --c-focus: #1f5eff;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-kids: "Comfortaa", var(--font);

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --fs-3xl: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --gutter: 16px;
  --container: 1320px;
  --radius: 0;
  --header-h: 64px;
  --shadow: 0 10px 30px rgb(17 20 24 / 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --card-w: 46vw;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --header-h: 76px;
    --card-w: 30vw;
  }
}

/* ---------- reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  overflow-x: clip;
}
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
ul[class],
ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.screen-reader-text {
  position: absolute !important; /* utility: must win over component rules */
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  inset-block-start: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--c-ink);
  color: #fff;
}
.skip-link:focus {
  inset-block-start: var(--space-4);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container .container {
  padding-inline: 0;
}
.container--narrow {
  max-width: 860px;
}
.site-main {
  min-height: 50vh;
  padding-block-end: var(--space-8);
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: var(--c-ink);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.button:hover {
  background: var(--c-brand);
  border-color: var(--c-brand);
}
.button--primary {
  background: var(--c-brand);
  border-color: var(--c-brand);
}
.button--primary:hover {
  background: var(--c-ink);
  border-color: var(--c-ink);
}
.button--outline {
  background: transparent;
  color: var(--c-ink);
}
.button--outline:hover {
  background: var(--c-ink);
  color: #fff;
}
.button--block {
  width: 100%;
}
.button:disabled,
.button.loading {
  opacity: 0.6;
  cursor: progress;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.icon-button--bordered {
  border: 1px solid var(--c-line);
  background: #fff;
}
.icon-button--bordered:hover {
  border-color: var(--c-ink);
}

.eyebrow {
  margin-block-end: var(--space-2);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.96);
  border-block-end: 1px solid var(--c-line);
}
.admin-bar .site-header {
  inset-block-start: var(--wp-admin--admin-bar--height, 0);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--header-h);
}
.logo {
  display: inline-flex;
  align-items: baseline;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.logo__strong {
  font-weight: 800;
}
.logo__light {
  font-weight: 300;
  color: var(--c-muted);
}
.logo--inverse .logo__light {
  color: #a9b4c2;
}
.primary-nav {
  display: none;
  margin-inline-start: auto;
}
.primary-nav__list {
  display: flex;
  gap: var(--space-5);
}
.primary-nav__list a {
  position: relative;
  display: block;
  padding-block: var(--space-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.primary-nav__list a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 2px;
  background: var(--c-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.primary-nav__list a:hover::after,
.primary-nav__list .current-menu-item > a::after {
  transform: scaleX(1);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-inline-start: auto;
}
.header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.header-action__label {
  /* Visually hidden on phones but still part of the link's accessible name. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.header-action--account {
  display: none;
}
.header-cart__count {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-start: 22px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--c-sale);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.header-cart__count[data-count="0"] {
  background: var(--c-surface-2);
  color: var(--c-muted);
}
.lang-switch {
  position: relative;
  display: none;
}
.lang-switch summary {
  list-style: none;
}
.lang-switch summary::-webkit-details-marker {
  display: none;
}
.lang-switch__menu {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 8px);
  min-width: 200px;
  padding: var(--space-2) 0;
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow);
}
.lang-switch__menu a {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.lang-switch__menu a:hover,
.lang-switch__menu a[aria-current="true"] {
  background: var(--c-surface);
}
.lang-switch__code {
  min-width: 2ch;
  font-weight: 800;
}

@media (min-width: 640px) {
  .lang-switch,
  .header-action--account {
    display: block;
  }
  .header-action--account {
    display: inline-flex;
  }
}
@media (min-width: 1100px) {
  .primary-nav {
    display: block;
  }
  .header-actions {
    margin-inline-start: var(--space-4);
  }
  .header-action__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  .header-cart__count {
    position: static;
  }
  .menu-toggle {
    display: none;
  }
}

/* ---------- drawer (mobile menu) ---------- */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(88vw, 380px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: var(--space-4) var(--space-5);
  border: 0;
  background: #fff;
  overflow-y: auto;
}
.drawer::backdrop {
  background: rgb(17 20 24 / 0.45);
}
.drawer[open] {
  animation: drawer-in 0.25s var(--ease);
}
@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--space-5);
}
.drawer__list a {
  display: block;
  padding: var(--space-3) 0;
  border-block-end: 1px solid var(--c-line);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-decoration: none;
}
.drawer__list--secondary {
  margin-block-start: var(--space-5);
}
.drawer__list--secondary a {
  font-size: var(--fs-md);
  font-weight: 600;
}
.drawer-lang {
  position: relative;
  margin-block-start: var(--space-6);
}
.drawer-lang__current {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding-inline: var(--space-4);
  border: 1px solid var(--c-line);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.drawer-lang__current::-webkit-details-marker {
  display: none;
}
.drawer-lang__label {
  flex: 1;
}
.drawer-lang[open] .drawer-lang__current svg:last-child {
  transform: rotate(180deg);
}
.drawer-lang__menu {
  border: 1px solid var(--c-line);
  border-block-start: 0;
}
.drawer-lang__menu a {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
}
.drawer-lang__menu a[aria-current="true"] {
  background: var(--c-surface);
  font-weight: 700;
}

/* ---------- category strip ---------- */
.category-strip {
  border-block-end: 1px solid var(--c-line);
  background: #fff;
}
.category-strip__list {
  display: flex;
  gap: var(--space-2);
  padding-block: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 75%, transparent);
}
.category-strip__list::-webkit-scrollbar {
  display: none;
}
.category-strip__list li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.category-strip__list a {
  display: block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--c-line);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.category-strip__list a:hover,
.category-strip__list .current-menu-item > a {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}
.category-strip__list .menu-item--sale > a {
  border-color: var(--c-sale);
  color: var(--c-sale);
}
.category-strip__list .menu-item--sale > a:hover {
  background: var(--c-sale);
  color: #fff;
}
/* The strip spans the full screen width so every category fits in one row on desktop. */
.category-strip > .container {
  max-width: none;
}
@media (min-width: 1100px) {
  .category-strip__list {
    justify-content: space-between;
    mask-image: none;
  }
  .category-strip__list li {
    flex: 1 1 auto;
  }
  .category-strip__list {
    gap: 6px;
  }
  .category-strip__list a {
    padding-inline: 10px;
    text-align: center;
  }
}

/* ---------- sections ---------- */
.section {
  padding-block-start: var(--space-7);
}
@media (min-width: 768px) {
  .section {
    padding-block-start: var(--space-8);
  }
}
.section-head {
  display: flex;
  flex-wrap: wrap; /* long titles push the "view all" link to its own line on phones */
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-block-end: var(--space-5);
}
.section-title {
  font-size: var(--fs-2xl);
}
.section-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
  border-block-end: 1px solid currentColor;
  padding-block-end: 2px;
}

/* ---------- product grid ---------- */
.product-grid {
  display: grid;
  gap: var(--space-5) var(--space-4);
}
/* Rows scroll horizontally on small screens so every card stays reachable. */
.product-grid--row,
.product-grid--rows-2 {
  grid-auto-flow: column;
  grid-auto-columns: var(--card-w);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  padding-block-end: var(--space-3);
  scrollbar-width: thin;
}
.product-grid--rows-2 {
  grid-template-rows: auto auto;
}
.product-grid--row > *,
.product-grid--rows-2 > * {
  scroll-snap-align: start;
}
.product-grid--catalog {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Phones: deals, kids and seasonal hit show 4 cards as a 2 × 2 mosaic instead of a scrolling row. */
@media (max-width: 767px) {
  .deals__grid,
  .kids__grid,
  .product-section--season .product-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-columns: auto;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-block-end: 0;
    gap: var(--space-4) var(--space-3);
  }
  .deals__grid > :nth-child(n + 5),
  .kids__grid > :nth-child(n + 5),
  .product-section--season .product-grid > :nth-child(n + 5) {
    display: none;
  }
}
@media (min-width: 768px) {
  .product-grid--catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .product-grid--row,
  .product-grid--rows-2 {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-columns: auto;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-block-end: 0;
  }
  .product-grid--catalog {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- product card ---------- */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}
.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--c-surface);
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card__img {
  transform: scale(1.04);
}
.product-card__title {
  margin-block: var(--space-3) var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}
.product-card__title a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}
.product-card__title a:hover {
  text-decoration: underline;
}
/* The whole card is one big tap target (the title link is stretched over it);
   the "Buy" button stays above it. */
.product-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.product-card__title a:focus-visible {
  outline: none;
}
.product-card__title a:focus-visible::after {
  outline: 2px solid var(--c-ink);
  outline-offset: 2px;
}
.product-card__footer .button {
  position: relative;
  z-index: 2;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-block-start: auto;
}
.product-card__price {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-weight: 800;
  font-size: var(--fs-md);
  line-height: 1.2;
}
.product-card__price del {
  order: -1;
  color: var(--c-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.product-card__price ins {
  color: var(--c-sale);
  text-decoration: none;
}
.button--buy {
  flex: 0 0 auto;
  min-height: 38px;
  padding-inline: var(--space-4);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.button--buy.added {
  background: var(--c-success);
  border-color: var(--c-success);
}
.added_to_cart {
  display: none;
}
.badge {
  position: absolute;
  inset-block-start: var(--space-2);
  padding: 2px var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1.6;
}
.badge--sale {
  inset-inline-start: var(--space-2);
  background: var(--c-sale);
  color: #fff;
}
.badge--3d {
  inset-inline-end: var(--space-2);
  background: #fff;
  border: 1px solid var(--c-ink);
  color: var(--c-ink);
}
@media (max-width: 420px) {
  .product-card__footer {
    flex-wrap: wrap;
  }
  .button--buy {
    width: 100%;
  }
}

