:root {
  --color-black: #111111;
  --color-black-soft: #1a1a1a;
  --color-white: #ffffff;
  --color-gray: #888888;
  --color-gray-light: #e8e8e8;
  --color-gray-placeholder: #c4c4c4;
  --color-red: #c41e3a;
  --color-red-hover: #a01830;
  --font-main: "Inter", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  color: var(--color-red);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-black);
  color: var(--color-white);
  height: var(--header-height);
  border-bottom: 2px solid var(--color-red);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-placeholder {
  display: inline-block;
  padding: 6px 12px;
  border: 1px dashed var(--color-gray);
  color: var(--color-gray-light);
  font-size: 0.85rem;
}

.nav-desktop {
  display: none;
  gap: 24px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-desktop a.active {
  color: var(--color-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-black-soft);
  border-radius: 4px;
  font-size: 0.85rem;
}

.cart-count {
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.2s, opacity 0.2s;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-black);
  padding: 20px;
  flex-direction: column;
  gap: 16px;
  border-bottom: 2px solid var(--color-red);
  z-index: 99;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  color: var(--color-white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-black-soft);
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .burger {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* Main */
main {
  flex: 1;
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 40px 0 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.page-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-red);
  margin-top: 12px;
}

/* Hero */
.hero {
  background: var(--color-black);
  color: var(--color-white);
  padding: 60px 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero .slogan {
  font-size: 1.1rem;
  color: var(--color-gray-light);
  margin-bottom: 8px;
}

.hero .desc {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--color-gray);
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-red-hover);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-black);
}

.btn-black {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-black:hover {
  background: var(--color-red);
  color: var(--color-white);
}

/* Placeholders */
.placeholder-img {
  background: var(--color-gray-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
  aspect-ratio: 3 / 4;
  width: 100%;
}

.placeholder-img--wide {
  aspect-ratio: 16 / 9;
}

.placeholder-logo {
  width: 120px;
  height: 48px;
  background: var(--color-gray-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-gray);
  border: 1px dashed var(--color-gray);
}

/* Product grid */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

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

@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (min-width: 900px) {
  .product-grid--catalog {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  display: block;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card:hover .product-name {
  color: var(--color-red);
}

.product-name {
  font-weight: 600;
  margin: 12px 0 4px;
  font-size: 0.95rem;
}

.product-price {
  color: var(--color-red);
  font-weight: 700;
}

/* Product page */
.product-layout {
  display: grid;
  gap: 32px;
  padding: 32px 0 48px;
}

@media (min-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.product-gallery .placeholder-img {
  aspect-ratio: 1;
  max-height: 500px;
}

.size-selector {
  margin: 24px 0;
}

.size-selector label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  font-weight: 600;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-btn {
  min-width: 48px;
  padding: 12px 16px;
  border: 2px solid var(--color-black);
  background: var(--color-white);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover,
.size-btn.selected {
  background: var(--color-black);
  color: var(--color-white);
}

.size-btn.selected {
  border-color: var(--color-red);
  box-shadow: inset 0 0 0 2px var(--color-red);
}

.product-desc {
  color: var(--color-gray);
  margin: 16px 0 24px;
}

/* Cart */
.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-gray);
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-gray-light);
  align-items: center;
}

.cart-item .placeholder-img {
  aspect-ratio: 1;
  font-size: 0.65rem;
}

.cart-item-info h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cart-item-meta {
  font-size: 0.85rem;
  color: var(--color-gray);
}

.cart-item-price {
  font-weight: 700;
  color: var(--color-red);
}

.cart-remove {
  background: none;
  border: none;
  color: var(--color-gray);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  margin-top: 8px;
  padding: 0;
}

.cart-remove:hover {
  color: var(--color-red);
}

.cart-summary {
  background: var(--color-black);
  color: var(--color-white);
  padding: 24px;
  margin-top: 24px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.cart-summary .btn-primary {
  width: 100%;
  text-align: center;
}

/* About / Contacts / Legal */
.content-block {
  max-width: 720px;
  margin-bottom: 32px;
}

.content-block p {
  color: var(--color-gray);
  margin: 0 0 16px;
}

.about-layout {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-gray-light);
}

.contact-list strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray);
  margin-bottom: 4px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.social-links a {
  padding: 10px 20px;
  border: 2px solid var(--color-black);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.social-links a:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

.legal-text {
  color: var(--color-gray);
  line-height: 1.7;
}

/* Footer */
.site-footer {
  background: var(--color-black);
  color: var(--color-gray-light);
  padding: 40px 20px 24px;
  margin-top: auto;
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 24px;
  justify-content: center;
}

.footer-nav a {
  color: var(--color-gray-light);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.footer-nav a:hover {
  color: var(--color-red);
}

.footer-brand {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-black-soft);
  color: var(--color-gray);
  font-size: 0.7rem;
}

.footer-brand a {
  color: var(--color-gray);
}

.footer-brand a:hover {
  color: var(--color-red);
}

/* Preview strip */
.preview-badge {
  background: var(--color-red);
  color: var(--color-white);
  text-align: center;
  padding: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
