/* ---------- Base ---------- */
:root {
  --black: #111111;
  --white: #ffffff;
  --grey-100: #f5f5f5;
  --grey-200: #e6e6e6;
  --grey-400: #b3b3b3;
  --grey-600: #6b6b6b;
  --line: #e6e6e6;
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] { display: none !important; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 2rem;
  border: 1px solid var(--black);
  background: none;
  color: var(--black);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--white); color: var(--black); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 24px;
  width: auto;
  display: block;
}
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-600);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--black); }
.cart-btn {
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
}

/* ---------- Catalog ---------- */
.catalog {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}
.catalog-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 460px;
}
.card-media {
  background: var(--grey-100);
  border: 1px solid var(--line);
}
.card-main {
  width: 100%;
  height: auto;
  background: var(--white);
  display: block;
}
.card-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  border-top: 1px solid var(--line);
}
.thumb {
  padding: 0;
  width: 56px;
  height: 56px;
  border: 1px solid var(--grey-200);
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb:hover { border-color: var(--grey-400); }
.thumb.is-active { border-color: var(--black); }

.card-info { padding-top: 1rem; }
.card-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.card-price {
  font-size: 1.05rem;
  color: var(--grey-600);
  margin-bottom: 0.85rem;
}
.card-desc {
  color: var(--grey-600);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.card-sizes { display: flex; gap: 0.5rem; margin-bottom: 1.1rem; }
.card-msg {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--grey-600);
  min-height: 1.1em;
}

/* ---------- Size selector ---------- */
.size {
  font-family: inherit;
  min-width: 48px;
  padding: 0.6rem 0;
  border: 1px solid var(--grey-200);
  background: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.size:hover { border-color: var(--black); }
.size.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 3rem 1.5rem;
}
.footer-brand {
  display: inline-block;
  margin-bottom: 1rem;
}
.footer-logo {
  height: 30px;
  width: auto;
  display: block;
}
.footer-contact { margin-bottom: 0.5rem; }
.footer-contact a {
  color: var(--grey-400);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}
.footer-contact a:hover { color: var(--white); }
.footer-copy { color: var(--grey-600); font-size: 0.8rem; letter-spacing: 0.06em; }

/* ---------- Cart ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(380px, 90vw);
  background: var(--white);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--black);
}
.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-empty { color: var(--grey-400); font-size: 0.9rem; }
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-meta { color: var(--grey-600); font-size: 0.8rem; margin-top: 0.2rem; }
.qty-control {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  border: 1px solid var(--grey-200);
}
.qty-btn {
  width: 26px;
  height: 26px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--black);
}
.qty-btn:disabled { color: var(--grey-400); cursor: not-allowed; }
.qty-value {
  min-width: 30px;
  text-align: center;
  font-size: 0.85rem;
  line-height: 26px;
  border-left: 1px solid var(--grey-200);
  border-right: 1px solid var(--grey-200);
}
.cart-item-price { font-size: 0.9rem; white-space: nowrap; }
.cart-item-remove {
  display: block;
  margin-top: 0.4rem;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--grey-400);
  text-decoration: underline;
  cursor: pointer;
}
.cart-foot { padding: 1.5rem; border-top: 1px solid var(--line); }
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem;
}
.notfound-code {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.notfound p { color: var(--grey-600); }

/* ---------- Order success ---------- */
.order-success {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.order-success-inner {
  max-width: 460px;
  text-align: center;
}
.success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 1.5rem;
}
.order-success h2 {
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.order-success p {
  color: var(--grey-600);
  margin-bottom: 2rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .catalog-grid { gap: 2.5rem; }
  .nav { gap: 1rem; }
  .nav a, .cart-btn { font-size: 0.72rem; }
}
