@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --accent: #E5000D;
  --accent-dark: #C6000B;
  --bg: #FFFFFF;
  --bg-secondary: #F5F6F8;
  --text: #14161A;
  --text-secondary: rgba(20,22,26,0.62);
  --text-muted: rgba(20,22,26,0.4);
  --border: rgba(20,22,26,0.14);
  --surface: rgba(20,22,26,0.035);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; color: var(--text); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo img { height: 40px; width: auto; display: block; }

.search-box {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
}
.search-input {
  flex: 1;
  height: 44px;
  border: 2px solid var(--accent);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  background: var(--bg-secondary);
}
.search-input:focus { background: var(--bg); }
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  height: 44px;
  background: #E5000D;
  color: #fff;
  border-radius: 0 8px 8px 0;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
}
.search-btn:hover { background: #C6000B; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text);
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #E5000D;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== NAV ===== */
.main-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.catalog-btn {
  background: #E5000D;
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.catalog-btn:hover { background: #C6000B; }
.nav-link {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  transition: all .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); background: var(--surface); }

/* ===== FOOTER ===== */
.site-footer {
  background: #14161A;
  color: #fff;
  padding: 48px 0 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 13px;
  color: #888;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #888;
}

/* ===== MOBILE ===== */
.mobile-only { display: none; }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .search-box { max-width: none; }
  .mobile-only { display: flex; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions .icon-btn:not(.cart-btn) { display: none; }
}

.btn-primary, .btn.btn-primary, a.btn-primary { background: #E5000D !important; color: #fff !important; border-color: #E5000D !important; }
.btn-primary:hover { background: #C6000B !important; }
.search-box { max-width: 100% !important; width: 100% !important; }
.search-input { width: 100% !important; }

/* === OZON FIXES === */
.btn-primary,.btn.btn-primary,a.btn-primary{background:#E5000D!important;color:#fff!important;border-color:#E5000D!important;border-radius:8px!important;padding:14px 32px!important;font-size:16px!important;font-weight:600!important;text-decoration:none!important;display:inline-block!important;}
.btn-primary:hover{background:#C6000B!important;}
.search-box{width:100%!important;max-width:600px!important;display:flex!important;align-items:center!important;}
.search-input{flex:1!important;height:44px!important;border:2px solid #E5000D!important;border-right:none!important;border-radius:8px 0 0 8px!important;padding:0 16px!important;font-size:14px!important;outline:none!important;background:#F5F6F8!important;}
.search-input:focus{background:#fff!important;}
.search-btn{height:44px!important;background:#E5000D!important;color:#fff!important;border-radius:0 8px 8px 0!important;padding:0 20px!important;font-size:14px!important;font-weight:600!important;border:none!important;cursor:pointer!important;}
.search-btn:hover{background:#C6000B!important;}

.ozon-header-nav {
  width: 100%;
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ozon-header-nav-link {
  padding: 7px 14px;
  border-radius: 8px;
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition: background .15s;
}
.ozon-header-nav-link:hover,
.ozon-header-nav-link[aria-current="page"] {
  background: rgba(255,255,255,0.18);
}

.brands-page {
  min-height: 60vh;
  padding: 24px 0 56px;
  background: #F5F6F8;
  color: #14161A;
}
.brands-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.brands-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #6B6B6B;
  font-size: 13px;
}
.brands-breadcrumbs a:hover { color: #E5000D; }
.brands-title {
  margin-bottom: 28px;
  color: #14161A;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}
.brands-section + .brands-section { margin-top: 36px; }
.brands-section-heading {
  margin-bottom: 18px;
  color: #14161A;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}
.brands-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.brand-card {
  min-width: 0;
  aspect-ratio: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  color: #000000 !important;
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.brand-card:hover {
  border-color: #E5000D;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.brand-card:focus-visible {
  border-color: #E5000D;
  outline: 3px solid rgba(229,0,13,0.2);
  outline-offset: 2px;
}
.brand-card-logo {
  width: 100%;
  height: 80px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-card-logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}
.brand-card-fallback {
  max-width: 100%;
  color: #14161A;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.brand-card-name {
  max-width: 100%;
  color: #000000 !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
@media (max-width: 1024px) {
  .brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .brands-page { padding: 18px 0 36px; }
  .brands-container { padding: 0 12px; }
  .brands-title { margin-bottom: 22px; font-size: 27px; }
  .brands-section-heading { font-size: 21px; }
  .brands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .brand-card { padding: 14px 10px; }
  .brand-card-logo { margin-bottom: 12px; }
  .brand-card-name { font-size: 14px; }
  .ozon-header-nav { padding: 0 14px; }
}

.ozon-header-account {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 7px;
  padding: 8px 0;
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 600;
}
.ozon-header-account svg { width: 22px; height: 22px; }
.ozon-header-account-name {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ozon-account-menu { position: relative; flex-shrink: 0; }
.ozon-header-account-summary { cursor: pointer; list-style: none; user-select: none; }
.ozon-header-account-summary::-webkit-details-marker { display: none; }
.ozon-account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10000;
  min-width: 190px;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.ozon-account-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #14161A !important;
  font-size: 14px;
  font-weight: 500;
}
.ozon-account-dropdown a:hover { background: #F5F6F8; color: #E5000D !important; }

.account-auth-page,
.account-page {
  min-height: 60vh;
  padding: 40px 20px 64px;
  background: #F5F6F8;
  color: #14161A;
}
.account-auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.account-auth-card-wide { max-width: 560px; }
.account-auth-title,
.account-title {
  margin-bottom: 8px;
  color: #14161A;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}
.account-auth-subtitle { margin-bottom: 24px; color: #6B6B6B; font-size: 14px; }
.account-container { width: 100%; max-width: 1100px; margin: 0 auto; }
.account-title { margin-bottom: 24px; }
.account-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 6px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
}
.account-nav a {
  padding: 10px 16px;
  border-radius: 8px;
  color: #14161A !important;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.account-nav a:hover { background: #F5F6F8; }
.account-nav a.active { background: #FFF0F1; color: #E5000D !important; }
.account-card {
  padding: 28px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.account-form { margin-top: 20px; }
.account-field { margin-bottom: 18px; }
.account-field label {
  display: block;
  margin-bottom: 7px;
  color: #14161A;
  font-size: 14px;
  font-weight: 600;
}
.account-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: #FFFFFF;
  border: 1px solid #CFCFD4;
  border-radius: 8px;
  color: #14161A;
  font: inherit;
  font-size: 15px;
  outline: none;
}
.account-field input:focus { border-color: #E5000D; box-shadow: 0 0 0 3px rgba(229,0,13,0.1); }
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  background: #E5000D;
  border: 1px solid #E5000D;
  border-radius: 8px;
  color: #FFFFFF !important;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.account-btn:hover { background: #C6000B; border-color: #C6000B; }
.account-btn-block { width: 100%; }
.account-btn-secondary { background: #FFFFFF; border-color: #E0E0E0; color: #14161A !important; }
.account-btn-secondary:hover { background: #F5F6F8; border-color: #CFCFD4; }
.account-btn-remove { background: #FFFFFF; color: #E5000D !important; }
.account-btn-remove:hover { background: #E5000D; color: #FFFFFF !important; }
.account-error {
  margin: 16px 0;
  padding: 12px 14px;
  background: #FFF0F1;
  border: 1px solid #FFB8BD;
  border-radius: 8px;
  color: #A30009;
  font-size: 14px;
}
.account-success {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #ECFDF3;
  border: 1px solid #A6F4C5;
  border-radius: 8px;
  color: #067647;
  font-size: 14px;
}
.account-auth-footer { margin-top: 22px; color: #6B6B6B; font-size: 14px; text-align: center; }
.account-auth-footer a { color: #E5000D !important; font-weight: 600; }
.account-empty { padding: 44px 20px; color: #6B6B6B; text-align: center; }
.account-empty p { margin-bottom: 18px; }
.account-orders-card { padding: 0; overflow: hidden; }
.account-orders-scroll { overflow-x: auto; }
.account-orders-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.account-orders-table th,
.account-orders-table td { padding: 16px 20px; border-bottom: 1px solid #ECECEF; text-align: left; }
.account-orders-table th { background: #F8F8FA; color: #6B6B6B; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.account-orders-table td { color: #14161A; font-size: 14px; }
.account-orders-table tr:last-child td { border-bottom: 0; }
.account-order-number { font-weight: 700; }
.account-order-total { font-weight: 700; white-space: nowrap; }
.account-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.account-status-pending { background: #FFF4DB; color: #8A5200; }
.account-status-paid { background: #ECFDF3; color: #067647; }
.account-status-cancelled,
.account-status-refunded { background: #FFF0F1; color: #A30009; }
.account-favorites-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.account-favorite-card {
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
}
.account-favorite-image { height: 140px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; }
.account-favorite-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.account-favorite-placeholder { color: #6B6B6B; font-size: 20px; font-weight: 700; text-align: center; }
.account-favorite-vendor { margin-bottom: 5px; color: #6B6B6B; font-size: 12px; }
.account-favorite-name { margin-bottom: 8px; color: #14161A !important; font-size: 15px; font-weight: 600; line-height: 1.35; }
.account-favorite-desc { margin-bottom: 12px; color: #6B6B6B; font-size: 12px; line-height: 1.4; }
.account-favorite-price { margin-top: auto; margin-bottom: 14px; color: #14161A; font-size: 20px; font-weight: 800; }
.account-favorite-card .account-btn { width: 100%; }
@media (max-width: 900px) {
  .account-favorites-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ozon-header-account-name { display: none; }
  .account-auth-page,
  .account-page { padding: 24px 12px 40px; }
  .account-auth-card,
  .account-card { padding: 22px 18px; }
  .account-auth-title,
  .account-title { font-size: 26px; }
  .account-nav { overflow-x: auto; }
  .account-favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .account-favorite-card { padding: 12px; }
  .account-favorite-image { height: 110px; }
}
