/**
 * VsemShiny Catalog Theme
 *
 * Принцип: карточки товара — оформлены, всё остальное — тихий фон.
 * Chrome наследует общий стиль сайта (#f5f5f5), жёлтый только в карточках и виджете.
 */

/* ═══════════════════════════════════════════
   CHROME — страница, фильтры, тулбар (минимум)
   ═══════════════════════════════════════════ */

body.page-catalog {
    background-color: #f5f5f5;
}

/* H1 — простой, без полос и баннеров */
body.page-catalog .catalog-page-head {
    background: transparent;
    border: none;
    padding: 16px 20px 0;
    max-width: 1400px;
    margin: 0 auto;
}

body.page-catalog .catalog-page-head__inner {
    max-width: none;
    margin: 0;
}

body.page-catalog .catalog-h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    color: #333;
    padding: 0;
    border: none;
    max-width: none;
}

/* Виджет подбора — белая карточка как раньше, без лишнего декора */
body.page-catalog .catalog-quick-pick {
    max-width: 1400px;
    margin: 12px auto 0;
    padding: 0 20px;
}

body.page-catalog .catalog-quick-pick .tire-selector-widget {
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px 18px;
}

body.page-catalog .tire-selector-widget--catalog .widget-header h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: #555;
}

body.page-catalog .tire-selector-widget--catalog .tire-size-card {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    font-weight: 600;
    box-shadow: none !important;
}

body.page-catalog .tire-selector-widget--catalog .tire-size-card:hover,
body.page-catalog .tire-selector-widget--catalog .tire-size-card.active,
body.page-catalog .tire-selector-widget--catalog .tire-size-card.suggested {
    background: #FFC107 !important;
    color: #333 !important;
    border-color: #E6AC00 !important;
    box-shadow: none !important;
    transform: none;
}

body.page-catalog .tire-selector-widget--catalog .custom-input:focus,
body.page-catalog .tire-selector-widget--catalog .custom-select-box.open .custom-input {
    border-color: #FFC107 !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
}

body.page-catalog .tire-selector-widget--catalog .custom-dropdown {
    border-color: #ddd !important;
    border-radius: 6px;
}

/* Сетка страницы */
body.page-catalog .container {
    padding-top: 12px;
}

body.page-catalog .content {
    min-width: 0;
}

/* Сайдбар — как в оригинальном catalog.css */
body.page-catalog .sidebar {
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow: visible;
}

body.page-catalog .sidebar-heading {
    margin: 0 0 16px;
    padding: 0;
    background: none;
    border: none;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}

body.page-catalog .filter-group {
    border-bottom-color: #eee;
}

body.page-catalog .filter-group label,
body.page-catalog .price-input-field label,
body.page-catalog fieldset.filter-fieldset legend {
    color: #555;
    opacity: 1;
}

body.page-catalog .filter-group select,
body.page-catalog .filter-group input[type="number"] {
    border-color: #ddd;
    border-radius: 4px;
}

body.page-catalog .filter-group select:focus,
body.page-catalog .filter-group input[type="number"]:focus {
    border-color: #FFC107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
    outline: none;
}

body.page-catalog .price-slider-track {
    background: #ddd;
}

body.page-catalog .price-slider-range {
    background: #FFC107;
}

body.page-catalog .price-slider-container input[type="range"]::-webkit-slider-thumb,
body.page-catalog .price-slider-container input[type="range"]::-moz-range-thumb {
    border-color: #FFC107;
}

body.page-catalog .btn-reset {
    border-color: #ddd;
    color: #666;
}

body.page-catalog .btn-reset:hover {
    border-color: #FFC107;
    color: #333;
}

body.page-catalog .checkbox-label {
    color: #555;
    opacity: 1;
}

/* Поиск и тулбар — без рамок и полос */
body.page-catalog .catalog-header {
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 10px 14px;
    margin-bottom: 12px;
}

body.page-catalog .search-input {
    border-radius: 6px;
}

body.page-catalog .search-input:focus {
    border-color: #FFC107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

body.page-catalog .search-button:hover {
    color: #E6AC00;
}

body.page-catalog .clear-search-link {
    color: #4CAF50;
    font-weight: 600;
}

body.page-catalog .catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0 14px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    border-radius: 0;
}

body.page-catalog .results-info {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 14px;
    color: #666;
}

body.page-catalog .results-info strong {
    color: #333;
    font-weight: 700;
}

body.page-catalog .sort-controls label {
    color: #666;
    font-size: 13px;
    font-weight: 600;
}

body.page-catalog .sort-controls select {
    border-color: #ddd;
    border-radius: 4px;
}

body.page-catalog .sort-controls select:focus {
    border-color: #FFC107;
    outline: none;
}

body.page-catalog .filter-tag {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 13px;
}

body.page-catalog .filter-tag:hover {
    border-color: #FFC107;
    background: #fffde7;
}

/* Пагинация, прочее */
body.page-catalog .pagination-link {
    background: #fff;
    color: #333;
    border-color: #ddd;
    border-radius: 4px;
}

body.page-catalog .pagination-current,
body.page-catalog .pagination-link:hover {
    background: #FFC107 !important;
    color: #333 !important;
    border-color: #FFC107 !important;
}

body.page-catalog .catalog-intro-text {
    background: #fff;
    border-left: 3px solid #FFC107;
    border-radius: 4px;
    color: #666;
}

body.page-catalog .no-results {
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    color: #666;
}

body.page-catalog .mobile-toggle-btn {
    background: #FFC107;
    color: #333;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

body.page-catalog .mobile-toggle-btn:hover {
    background: #E6AC00;
}

body.page-catalog .sidebar.active .btn-apply-mobile {
    background: #FFC107 !important;
    color: #333 !important;
}


/* ═══════════════════════════════════════════
   PRODUCT CARDS — оформление, которое нравится
   ═══════════════════════════════════════════ */

body.page-catalog .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

body.page-catalog .product-card {
    --card-bg: #fff;
    --card-border: #e5e7eb;
    --card-text: #0f172a;
    --card-muted: #64748b;
    --card-image-bg: #fafafa;
    --card-accent: #ffc107;
    --card-accent-hover: #e6ac00;
    --card-radius: 12px;

    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.page-catalog .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--card-accent);
}

body.page-catalog .product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

body.page-catalog .product-image {
    background: var(--card-image-bg);
    min-height: 200px;
    padding: 12px;
}

body.page-catalog .product-info {
    padding: 14px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

body.page-catalog .product-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

body.page-catalog .product-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--card-text);
    margin: 0;
    flex: 1;
    min-width: 0;
}

body.page-catalog .product-card-rating {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--card-text);
    text-decoration: none;
    white-space: nowrap;
    margin-top: 1px;
}

body.page-catalog .product-card-rating-count {
    color: var(--card-muted);
}

body.page-catalog .product-card-rating:hover .product-card-rating-count {
    color: var(--card-accent-hover);
    text-decoration: underline;
}

body.page-catalog .product-specs {
    gap: 6px;
    flex-wrap: wrap;
}

body.page-catalog .product-specs .tag,
body.page-catalog .product-specs span {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--card-muted);
}

body.page-catalog .product-specs .tag-size {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.45);
    color: var(--card-text);
}

body.page-catalog .product-price {
    margin-top: 4px;
}

body.page-catalog .product-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 6px;
}

body.page-catalog .product-price-sep {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

body.page-catalog .product-price .price-label {
    font-size: 12px;
    color: var(--card-muted);
    font-weight: 500;
    white-space: nowrap;
}

body.page-catalog .product-price .price-label span[itemprop="price"] {
    font-size: 18px;
    font-weight: 800;
    color: var(--card-text);
}

body.page-catalog .product-price-set {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-size: 12px;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

body.page-catalog .product-price-set .set-bracket,
body.page-catalog .product-price-set .set-label,
body.page-catalog .product-price-set .set-price {
    color: var(--card-muted);
    font-weight: 500;
}

body.page-catalog .product-price-set .set-price {
    font-weight: 600;
}

body.page-catalog .product-stock.in-stock {
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

body.page-catalog .product-actions {
    padding: 0 16px 16px;
    margin-top: auto;
}

body.page-catalog .product-actions .btn-buy,
body.page-catalog .btn-buy {
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    background: transparent !important;
    color: var(--card-text) !important;
    border: 2px solid var(--card-accent) !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.page-catalog .product-actions .btn-buy:hover,
body.page-catalog .btn-buy:hover {
    background: var(--card-accent) !important;
    border-color: var(--card-accent) !important;
    color: var(--card-text) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.35);
}


/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    body.page-catalog .catalog-page-head {
        padding: 12px 12px 0;
    }

    body.page-catalog .catalog-h1 {
        font-size: 1.15rem;
    }

    body.page-catalog .catalog-quick-pick {
        padding: 0 12px;
        margin-top: 10px;
    }

    body.page-catalog .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-catalog .sort-controls {
        width: 100%;
        justify-content: space-between;
    }

    body.page-catalog .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-catalog .product-card,
    body.page-catalog .product-actions .btn-buy {
        transition: none;
    }
}
