/* ========================================
   ДВЕРСЕН — InSales Theme Styles
   Адаптировано из doors-site React дизайна
   ======================================== */

/* ----- Google Fonts ----- */

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

/* ----- CSS Variables ----- */
:root {
  --color-primary: #1a1a1a;
  --color-secondary: #f5f5f5;
  --color-accent: #ea580c;
  --color-accent-hover: #c2410c;
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-green-600: #16a34a;
  --color-green-700: #15803d;
  --color-red-500: #ef4444;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-orange-50: #fff7ed;
  --color-orange-200: #fed7aa;
  --color-orange-600: #ea580c;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container-max: 1280px;
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--color-primary);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  transition: var(--transition);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 12px 0;
}

.header-logo img {
  height: 28px;
  width: auto;
}

.header-logo:hover {
  opacity: 0.8;
}

/* Search */
.header-search {
  flex: 1;
  max-width: 640px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 14px 56px 14px 20px;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--border-radius);
  background: var(--color-gray-50);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.header-search input:focus {
  border-color: var(--color-gray-400);
  background: var(--color-white);
}

.header-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  background: var(--color-gray-900);
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.header-search button:hover {
  background: var(--color-gray-800);
}

.header-search button svg {
  width: 20px;
  height: 20px;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.header-nav a:hover {
  color: var(--color-gray-600);
}

/* Cart widget */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-widget {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--border-radius-full);
  border: 2px solid var(--color-gray-200);
  font-weight: 600;
  font-size: 14px;
}

.cart-widget:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-300);
}

.cart-widget svg {
  width: 20px;
  height: 20px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  position: absolute;
  top: -4px;
  right: -4px;
}

/* Mobile header */
.mobile-header {
  display: none;
}

.mobile-menu {
  display: none;
}

.desktop-header {
  display: flex;
}

@media (max-width: 1023px) {
  .desktop-header {
    display: none !important;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 8px;
  }

  .mobile-header .header-logo img {
    height: 25px;
  }

  .mobile-search {
    display: block;
    padding: 8px 0 4px;
  }

  .mobile-search input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 2px solid var(--color-gray-200);
    border-radius: 12px;
    font-size: 16px;
    background: var(--color-gray-50);
    outline: none;
  }

  .mobile-search input:focus {
    border-color: var(--color-gray-400);
    background: var(--color-white);
  }

  .mobile-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    background: var(--color-gray-900);
    border-radius: 8px;
    color: white;
  }

  .mobile-search {
    position: relative;
  }

  .mobile-search button svg {
    width: 16px;
    height: 16px;
  }

  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }

  .mobile-menu-toggle:hover {
    background: var(--color-gray-100);
  }

  .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--color-gray-600);
  }

  .mobile-menu {
    display: none;
    border-top: 1px solid var(--color-gray-200);
    padding-top: 12px;
    margin-top: 12px;
  }

  .mobile-menu.is-open {
    display: block;
  }

  .mobile-menu a {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    font-weight: 500;
    color: var(--color-gray-700);
    min-height: 44px;
    border-radius: 8px;
  }

  .mobile-menu a:hover {
    color: var(--color-gray-900);
  }

  .mobile-menu a:active {
    background: var(--color-gray-100);
  }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  padding: 48px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeIn 0.6s ease-in-out;
}

.hero .hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--color-gray-600);
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.6;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 32px;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 16px;
  min-height: 48px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-800));
  color: white;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gray-800), var(--color-gray-700));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  transform: scale(1.03);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-gray-900);
  border: 2px solid var(--color-gray-200);
  box-shadow: var(--shadow-lg);
}

.btn-secondary:hover {
  border-color: var(--color-gray-300);
  box-shadow: var(--shadow-xl);
  transform: scale(1.03);
}

.btn-cart {
  background: var(--color-gray-900);
  color: white;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
}

.btn-cart:hover {
  background: var(--color-gray-800);
}

.btn-buy {
  background: linear-gradient(135deg, var(--color-blue-600), var(--color-blue-700));
  color: white;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  width: 100%;
}

.btn-buy:hover {
  background: linear-gradient(135deg, var(--color-blue-700), #1e3a8a);
}

.btn-checkout {
  background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-800));
  color: white;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 24px;
  width: 100%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.btn-checkout:hover {
  background: linear-gradient(135deg, var(--color-gray-800), var(--color-gray-700));
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .hero {
    padding: 32px 0 48px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

/* ========================================
   CATEGORIES GRID
   ======================================== */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 12px;
}

.section-title p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-gray-600);
  max-width: 640px;
  margin: 0 auto;
}

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

@media (min-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.category-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-100);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.category-card:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-orange-200);
}

.category-card .category-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-600);
  transition: var(--transition);
}

.category-card:hover .category-icon {
  color: var(--color-orange-600);
  transform: scale(1.1);
}

.category-card .category-icon svg {
  width: 48px;
  height: 48px;
}

.category-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-800);
  margin-bottom: 8px;
  line-height: 1.3;
}

.category-card .cat-count {
  font-size: 13px;
  color: var(--color-gray-500);
  font-weight: 500;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-gray-900);
  font-size: 16px;
  margin-top: 32px;
}

.section-link:hover {
  color: var(--color-orange-600);
}

.section-link svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}

.section-link:hover svg {
  transform: translateX(4px);
}

/* ========================================
   PRODUCTS GRID
   ======================================== */
.products-section {
  padding: 48px 0 80px;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 16px;
}

@media (max-width: 767px) {
  .products-header {
    flex-direction: column;
  }
}

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

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* Product Card */
.product-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-100);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.02) translateY(-4px);
}

.product-card-image {
  position: relative;
  height: 256px;
  background: linear-gradient(135deg, var(--color-gray-50), white, var(--color-gray-50));
  overflow: hidden;
}

.product-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 32px;
  transition: transform 0.7s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.1);
}

.product-card-image .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-gray-100), var(--color-gray-50));
}

.product-card-image .no-image svg {
  width: 64px;
  height: 64px;
  color: var(--color-gray-300);
}

.product-card-info {
  padding: 16px 24px;
  flex: 1;
}

.product-card-info .vendor-code {
  font-size: 12px;
  color: var(--color-gray-400);
  margin-bottom: 8px;
  font-weight: 500;
}

.product-card-info h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-gray-800);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.product-card-price {
  margin-bottom: 20px;
}

.product-card-price .price {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-gray-900);
}

.product-card-price .price .currency {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-gray-500);
}

.product-card-price .old-price {
  font-size: 14px;
  color: var(--color-gray-400);
  text-decoration: line-through;
  margin-left: 8px;
}

.product-card-actions {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 640px) {
  .product-card-actions {
    padding: 0 24px 24px;
  }
}

.product-card-actions .actions-row {
  display: flex;
  gap: 8px;
}

.product-card-actions .btn-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

.product-card-actions .btn-cart svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   COLLECTION (CATALOG PAGE)
   ======================================== */
.collection-page {
  padding: 32px 0 64px;
}

.collection-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 24px;
}

.collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.collection-filters select {
  padding: 10px 16px;
  border: 2px solid var(--color-gray-200);
  border-radius: 12px;
  background: var(--color-white);
  font-size: 14px;
  color: var(--color-gray-700);
  outline: none;
  cursor: pointer;
}

.collection-filters select:focus {
  border-color: var(--color-gray-400);
}

/* ========================================
   PRODUCT PAGE
   ======================================== */
.product-page {
  padding: 32px 0 64px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

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

.product-gallery {
  background: linear-gradient(135deg, var(--color-gray-50), white);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 1px solid var(--color-gray-100);
}

.product-gallery img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.product-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-detail h1 {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1.2;
}

.product-detail .vendor-code-label {
  font-size: 13px;
  color: var(--color-gray-400);
  font-weight: 500;
}

.product-price-block {
  padding: 24px;
  background: var(--color-gray-50);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-gray-200);
}

.product-price-block .price {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-gray-900);
}

.product-price-block .price .currency {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-gray-500);
}

.product-price-block .old-price {
  font-size: 16px;
  color: var(--color-gray-400);
  text-decoration: line-through;
  margin-left: 12px;
}

.product-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-description {
  line-height: 1.8;
  color: var(--color-gray-600);
  font-size: 15px;
}

.product-properties {
  border-top: 1px solid var(--color-gray-200);
  padding-top: 24px;
}

.product-properties h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-gray-900);
}

.product-properties table {
  width: 100%;
  border-collapse: collapse;
}

.product-properties td {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray-100);
  font-size: 14px;
}

.product-properties td:first-child {
  color: var(--color-gray-500);
  width: 40%;
}

/* ========================================
   CART PAGE
   ======================================== */
.cart-page {
  padding: 32px 0 64px;
}

.cart-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 32px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .cart-layout {
    grid-template-columns: 2fr 1fr;
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
}

.cart-item-image {
  width: 96px;
  height: 128px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-gray-100);
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}

.cart-item-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}

.cart-item-actions button {
  font-size: 14px;
  color: var(--color-gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-item-actions button:hover {
  color: var(--color-red-500);
}

.cart-item-actions button svg {
  width: 16px;
  height: 16px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
}

.quantity-control button {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-gray-700);
}

.quantity-control button:hover {
  background: var(--color-gray-100);
}

.quantity-control span {
  padding: 0 16px;
  font-weight: 500;
  border-left: 1px solid var(--color-gray-200);
  border-right: 1px solid var(--color-gray-200);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.cart-item-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-top: 12px;
}

/* Cart summary */
.cart-summary {
  background: var(--color-gray-50);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--color-gray-200);
  position: sticky;
  top: 96px;
}

.cart-summary h2 {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
}

.cart-summary .cart-total {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-gray-900);
  padding-top: 16px;
  border-top: 1px solid var(--color-gray-200);
  margin: 16px 0;
}

.cart-empty {
  text-align: center;
  padding: 64px 0;
}

.cart-empty h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cart-empty p {
  color: var(--color-gray-600);
  margin-bottom: 32px;
}

/* ========================================
   ADVANTAGES
   ======================================== */
.advantages-section {
  padding: 48px 0 80px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.advantage-card {
  background: linear-gradient(135deg, white, var(--color-gray-50));
  padding: 40px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-gray-100);
  transition: var(--transition);
}

.advantage-card:hover {
  transform: scale(1.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
  border-color: var(--color-orange-200);
}

.advantage-card .adv-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-orange-50);
  border-radius: 50%;
}

.advantage-card .adv-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-orange-600);
}

.advantage-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-gray-900);
}

.advantage-card p {
  font-size: 16px;
  color: var(--color-gray-600);
  line-height: 1.6;
}

/* Features strip */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.feature-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-100);
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: var(--color-orange-200);
  transform: scale(1.05);
}

.feature-card .feat-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-orange-50);
  border-radius: 50%;
}

.feature-card .feat-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-orange-600);
}

.feature-card h4 {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--color-gray-600);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--color-gray-100);
  border-top: 1px solid var(--color-gray-200);
  margin-top: 48px;
}

.footer-inner {
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
  }
}

.footer-col h3 {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--color-gray-900);
}

.footer-col p {
  font-size: 14px;
  color: var(--color-gray-600);
  line-height: 1.6;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col li a {
  font-size: 14px;
  color: var(--color-gray-600);
  padding: 8px 0;
  display: block;
}

.footer-col li a:hover {
  color: var(--color-gray-900);
}

.footer-bottom {
  border-top: 1px solid var(--color-gray-300);
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-copyright {
  font-size: 14px;
  color: var(--color-gray-600);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-gray-600);
  text-decoration: underline;
}

.footer-links a:hover {
  color: var(--color-gray-900);
}

/* ========================================
   PAGE (static pages)
   ======================================== */
.page-content {
  padding: 32px 0 64px;
  max-width: 800px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--color-gray-900);
}

.page-content p {
  color: var(--color-gray-600);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ========================================
   SEARCH PAGE
   ======================================== */
.search-page {
  padding: 32px 0 64px;
}

.search-page .search-form {
  max-width: 640px;
  position: relative;
  margin-bottom: 32px;
}

.search-page .search-form input {
  width: 100%;
  padding: 16px 56px 16px 24px;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--border-radius);
  font-size: 16px;
  outline: none;
}

.search-page .search-form input:focus {
  border-color: var(--color-gray-400);
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 16px 0;
  font-size: 13px;
  color: var(--color-gray-400);
}

.breadcrumbs a {
  color: var(--color-gray-500);
}

.breadcrumbs a:hover {
  color: var(--color-gray-900);
}

.breadcrumbs .sep {
  color: var(--color-gray-300);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--color-gray-200);
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-gray-700);
  transition: var(--transition);
}

.pagination a:hover {
  border-color: var(--color-gray-400);
  background: var(--color-gray-50);
}

.pagination .current {
  background: var(--color-gray-900);
  color: white;
  border-color: var(--color-gray-900);
}

/* ========================================
   BLOG
   ======================================== */
.blog-page {
  padding: 32px 0 64px;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-100);
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.blog-card-image {
  height: 200px;
  background: var(--color-gray-100);
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 20px;
}

.blog-card-content h3 {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-gray-900);
}

.blog-card-content p {
  font-size: 14px;
  color: var(--color-gray-600);
  line-height: 1.6;
}

.blog-card-content .blog-date {
  font-size: 12px;
  color: var(--color-gray-400);
  margin-top: 12px;
}

/* ========================================
   ARTICLE
   ======================================== */
.article-page {
  padding: 32px 0 64px;
  max-width: 800px;
  margin: 0 auto;
}

.article-page h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.article-page .article-date {
  font-size: 13px;
  color: var(--color-gray-400);
  margin-bottom: 32px;
}

.article-page .article-body {
  line-height: 1.8;
  color: var(--color-gray-700);
}

.article-page .article-body p {
  margin-bottom: 16px;
}

.article-page .article-body img {
  border-radius: 12px;
  margin: 24px 0;
}

.article-page .article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--color-gray-900);
}

.article-page .article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--color-gray-900);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
  text-align: center;
}

.mt-section {
  margin-top: 64px;
}

.mb-section {
  margin-bottom: 64px;
}

.hidden {
  display: 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-width: 0;
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumbs {
  padding: 24px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
  flex-wrap: wrap;
}

.breadcrumbs a {
  text-decoration: none;
  color: #374151;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: #111827;
}

.breadcrumbs .sep {
  color: #d1d5db;
}

/* ========================================
   Collection Page
   ======================================== */
.collection-page {
  padding: 0 0 80px;
  background: #fafafa;
  min-height: 100vh;
}

.collection-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.collection-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #ea580c;
  margin-bottom: 40px;
}

.collection-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1023px) {
  .collection-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.collection-description-wrapper {
  margin-bottom: 32px;
  color: #4b5563;
  line-height: 1.6;
  font-size: 15px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 20px;
  border: 1px solid #f3f4f6;
}

.collection-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

@media (max-width: 640px) {
  .collection-filters-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.filters-summary {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.sorting-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #374151;
}

.sorting-wrapper select {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  transition: all 0.2s;
}

.sorting-wrapper select:hover {
  border-color: #9ca3af;
}

/* Sidebar & Categories */
.collection-sidebar {
  position: sticky;
  top: 100px;
}

@media (max-width: 1023px) {
  .collection-sidebar {
    position: static;
  }
}

.sidebar-block {
  background: white;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-block-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-weight: 800;
  font-size: 20px;
  color: #111827;
  letter-spacing: -0.02em;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.sidebar-block-title:hover {
  background: #fafafa;
}

.sidebar-block-title .icon {
  transition: transform 0.3s ease;
}

.sidebar-block.is-collapsed .sidebar-block-title .icon {
  transform: rotate(180deg);
}

.sidebar-block.is-collapsed .sidebar-block-content {
  display: none;
}

.category-tree, .subcategory-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 2px;
}

.category-link-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 12px;
  transition: all 0.2s;
}

.category-link:hover {
  background: #f9fafb;
}

/* Активная категория верхнего уровня ("Все товары" или выбранная категория) */
.category-tree > .category-item.active > .category-link,
.category-tree > .category-item.active > .category-link-wrapper {
  background: #111827 !important;
  border-radius: 12px;
}

.category-tree > .category-item.active > .category-link,
.category-tree > .category-item.active > .category-link-wrapper .category-link {
  color: white !important;
  font-weight: 600;
}

.category-tree > .category-item.active > .category-link .category-count,
.category-tree > .category-item.active > .category-link-wrapper .category-count {
  color: rgba(255, 255, 255, 0.6);
}

.category-tree > .category-item.active > .category-link-wrapper .submenu-toggle {
  color: white;
}

/* Активная подкатегория */
.sub-item.active > .category-link {
  color: #111827 !important;
  font-weight: 700;
  background: #f3f4f6;
}

.sub-item.active > .category-link .category-count {
  color: #6b7280;
  font-weight: 600;
}

.category-count {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 400;
  white-space: nowrap;
}

.submenu-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-right: -8px;
  transition: transform 0.3s ease, color 0.2s;
  z-index: 2;
  flex-shrink: 0;
}

.submenu-toggle:hover {
  color: #111827;
}

.category-item.is-open > .category-link-wrapper .submenu-toggle {
  transform: rotate(90deg);
}

.subcategory-tree {
  margin-top: 2px;
  padding-left: 16px;
  position: relative;
  display: none;
  overflow: hidden;
}

.category-item.is-open > .subcategory-tree,
.category-item.parent-active > .subcategory-tree {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.subcategory-tree::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 4px;
  bottom: 16px;
  width: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}

.sub-item {
  padding-left: 16px;
  position: relative;
}

.sub-item .category-link {
  font-size: 15px;
  padding: 10px 16px;
  color: #4b5563;
  border-radius: 10px;
}

.sub-item .category-link:hover {
  color: #111827;
  background: #f9fafb;
}

.sidebar-block-content {
  padding: 8px 12px 12px;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  color: #374151;
  font-weight: 500;
  font-size: 16px;
  width: 100%;
  transition: all 0.2s;
  text-decoration: none;
  gap: 8px;
}

.filters-block {
  margin-top: 24px;
}

.filter-group {
  padding: 0 24px 24px;
  border-bottom: 1px solid #f9fafb;
}

.filter-group:last-child {
  border-bottom: none;
}

.filter-group-title {
  font-weight: 700;
  font-size: 13px;
  color: #9ca3af;
  margin: 20px 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #f3f4f6;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  outline: none;
  transition: all 0.2s;
  background: #fdfdfd;
}

.price-input:focus {
  border-color: #111827;
  background: white;
}

.price-sep {
  color: #d1d5db;
  font-weight: 300;
}

.filter-values {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar for Filters */
.filter-values::-webkit-scrollbar {
  width: 4px;
}

.filter-values::-webkit-scrollbar-track {
  background: transparent;
}

.filter-values::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 10px;
}

.filter-values::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  color: #374151;
  transition: all 0.2s;
  padding: 2px 0;
}

.filter-checkbox-item:hover {
  color: #111827;
}

.filter-checkbox-item input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
  background: white;
}

.filter-checkbox-item:hover .checkbox-custom {
  border-color: #d1d5db;
}

.filter-checkbox-item input:checked + .checkbox-custom {
  background: #111827;
  border-color: #111827;
}

.filter-checkbox-item input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sidebar-actions {
  padding: 24px;
  background: #fdfdfd;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-reset-link {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  text-align: center;
}

.filter-reset-link:hover {
  color: #ef4444;
}

/* Hide redundant filter button on desktop */
@media (min-width: 1024px) {
  .collection-filters-bar button[onclick*="filter"],
  .collection-filters-bar .btn-filter,
  .collection-filters-bar a[href*="filter"] {
    display: none !important;
  }
}

.w-full { width: 100%; }
.p-4 { padding: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.cart-empty {
  text-align: center;
  padding: 100px 0;
  background: #f9fafb;
  border-radius: 24px;
  margin-top: 40px;
}

.cart-empty h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #111827;
}

.cart-empty p {
  color: #6b7280;
  margin-bottom: 32px;
}

/* ========================================
   CHECKOUT PAGE (/new_order)
   ======================================== */
.co-page,
#new_order,
.checkout-content,
body.adaptive .page_layout {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Main checkout wrapper */
#new_order {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

@media (min-width: 640px) {
  #new_order {
    padding: 32px 24px 80px;
  }
}

/* Page title */
#new_order h1,
.co-title,
.checkout-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin-bottom: 32px !important;
  letter-spacing: -0.5px;
}

/* Form layout */
#new_order .order-form,
#new_order form {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {

  #new_order .order-form,
  #new_order form {
    grid-template-columns: 1fr 400px;
  }
}

/* Form sections */
#new_order fieldset,
#new_order .form-section,
#new_order .co-section,
.checkout-content fieldset {
  background: white;
  border: 1px solid #f3f4f6;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

#new_order fieldset legend,
#new_order h2,
#new_order h3,
.checkout-content h2,
.checkout-content h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 20px !important;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
  width: 100%;
}

/* Labels */
#new_order label,
.checkout-content label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* All text inputs */
#new_order input[type="text"],
#new_order input[type="email"],
#new_order input[type="tel"],
#new_order input[type="number"],
#new_order input[type="password"],
#new_order textarea,
#new_order select,
.checkout-content input[type="text"],
.checkout-content input[type="email"],
.checkout-content input[type="tel"],
.checkout-content select,
.checkout-content textarea {
  width: 100% !important;
  padding: 14px 16px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-family: 'Inter', sans-serif !important;
  background: #f9fafb !important;
  color: #111827 !important;
  outline: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  margin-bottom: 12px;
  box-sizing: border-box !important;
}

#new_order input:focus,
#new_order textarea:focus,
#new_order select:focus,
.checkout-content input:focus,
.checkout-content textarea:focus,
.checkout-content select:focus {
  border-color: #111827 !important;
  background: white !important;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08) !important;
}

#new_order input::placeholder,
#new_order textarea::placeholder {
  color: #9ca3af;
}

#new_order select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
  cursor: pointer;
}

/* Radio & Checkbox */
#new_order input[type="radio"],
.checkout-content input[type="radio"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  margin-right: 8px;
  border: 2px solid #d1d5db !important;
  border-radius: 50% !important;
  background: #fff !important;
  cursor: pointer !important;
  box-shadow: none !important;
  position: relative !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}
#new_order input[type="radio"]:checked,
.checkout-content input[type="radio"]:checked {
  border-color: #111827 !important;
}
#new_order input[type="radio"]:checked::after,
.checkout-content input[type="radio"]:checked::after {
  content: '' !important;
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #111827 !important;
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
}
#new_order input[type="checkbox"],
.checkout-content input[type="checkbox"] {
  width: auto !important;
  padding: 0 !important;
  margin-right: 8px;
  accent-color: #111827 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Submit button */
#new_order input[type="submit"],
#new_order button[type="submit"],
#new_order .btn,
#new_order .checkout_button,
.checkout-content input[type="submit"],
.checkout-content .co-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px 32px !important;
  background: #111827 !important;
  color: white !important;
  border: none !important;
  border-radius: 16px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.25) !important;
  min-height: 52px !important;
  width: 100%;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.3px;
  margin-top: 12px;
}

#new_order input[type="submit"]:hover,
#new_order button[type="submit"]:hover,
.checkout-content input[type="submit"]:hover {
  background: #1f2937 !important;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.3) !important;
  transform: translateY(-1px);
}

/* Order items table */
#new_order table,
.checkout-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

#new_order table td,
#new_order table th,
.checkout-content table td,
.checkout-content table th {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  vertical-align: middle;
}

#new_order table th,
.checkout-content table th {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
}

#new_order table tr:hover td {
  background: #fafafa;
}

#new_order table img,
.checkout-content table img {
  max-width: 64px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Total row */
#new_order .total,
#new_order .order-total,
#new_order table tfoot td,
.checkout-content .total {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  padding-top: 16px !important;
}

/* Auth section */
#new_order .auth-section,
#new_order .co-auth {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Delivery & Payment options */
#new_order .delivery-variants label,
#new_order .payment-variants label,
#new_order .shipping-method label,
#new_order .payment-method label {
  display: flex !important;
  align-items: center;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
  font-weight: 500;
}

#new_order .delivery-variants label:hover,
#new_order .payment-variants label:hover,
#new_order .shipping-method label:hover,
#new_order .payment-method label:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

/* Error messages */
#new_order .error,
#new_order .errors,
#new_order .field_with_errors,
.checkout-content .error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

#new_order .field_with_errors input,
#new_order .field_with_errors select {
  border-color: #ef4444 !important;
}

/* Toggle tabs (Физ лицо / Организация) */
#new_order .switcher,
#new_order .tabs,
#new_order .client-type-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
}

#new_order .switcher a,
#new_order .switcher label,
#new_order .tabs a,
#new_order .client-type-tabs label {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  color: #6b7280;
  border: none;
  margin: 0;
}

#new_order .switcher a.active,
#new_order .switcher a.current,
#new_order .switcher label.active,
#new_order .tabs a.active,
#new_order .client-type-tabs label.active {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: white;
}

/* Links */
#new_order a:not(.btn):not(.checkout_button):not(input) {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

#new_order a:not(.btn):not(.checkout_button):not(input):hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Required asterisk */
#new_order .required,
#new_order abbr {
  color: #ef4444;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 639px) {
  #new_order {
    padding: 16px 12px 60px;
  }

  #new_order fieldset,
  #new_order .co-section {
    padding: 20px 16px;
    border-radius: 16px;
  }
}

/* Smooth entrance animation */
#new_order {
  animation: checkoutFadeIn 0.5s ease;
}

@keyframes checkoutFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   DELIVERY PAGE MINIMAL
   ======================================== */
.delivery-minimal-page {
  padding: 0 0 60px;
}

.delivery-minimal-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.delivery-meta-title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 24px;
}

/* Поиск */
.delivery-search-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.delivery-search-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: white;
  font-size: 15px;
  color: #111827;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  box-sizing: border-box;
}

.delivery-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.delivery-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.delivery-search-btn:hover {
  background: #1f2937;
}

/* Карта */
.delivery-map-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.delivery-map-minimal {
  width: 100%;
  height: 300px;
}

/* Подсказка */
.delivery-hint-minimal {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  margin-bottom: 32px;
}

.delivery-hint-minimal-icon {
  flex-shrink: 0;
  color: #3b82f6;
  margin-top: 2px;
}

.delivery-hint-minimal-title {
  font-weight: 700;
  font-size: 14px;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.delivery-hint-minimal-text {
  font-size: 13px;
  color: #1d4ed8;
  line-height: 1.5;
}

/* Список зон */
.delivery-zones-list {
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 20px;
}

.delivery-zones-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
  color: #111827;
}

.delivery-zone-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 16px;
}

.delivery-zone-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.delivery-zone-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.delivery-zone-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid;
  flex-shrink: 0;
}

.delivery-zone-name {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
}

.delivery-zone-price {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .delivery-hint-minimal {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
}
/* --- Checkout Overrides --- */
.co-checkout-block--authorization,
[data-field-name="delivery_date"],
[data-field-name="delivery_time"] { 
  display: none !important; 
}
