/*
Theme Name: DOR-A Theme
Theme URI: https://dor-a.ru
Author: Migration Team
Author URI: https://dor-a.ru
Description: Современная тема для каталога ЖБИ, основанная на zhbi5.ru
Version: 1.0
License: GPL v2
Text Domain: dor-a
*/

/* ===== BASE ===== */
:root {
    --primary: #1a5276;
    --primary-dark: #154360;
    --secondary: #e67e22;
    --accent: #27ae60;
    --bg-light: #f8f9fa;
    --bg-dark: #2c3e50;
    --text: #333;
    --text-light: #666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #fff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.header-top {
    background: var(--primary-dark);
    padding: 8px 0;
    font-size: 13px;
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contacts {
    display: flex;
    gap: 24px;
}

.header-contacts a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.header-contacts a:hover { color: #fff; }

.header-main {
    padding: 16px 0;
}

.header-main-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo span {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

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

.btn-primary:hover {
    background: #d35400;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu a {
    display: block;
    padding: 16px 20px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-search {
    display: flex;
    gap: 8px;
}

.nav-search input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 240px;
    font-size: 14px;
}

.nav-search button {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 36px;
    font-weight: 700;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== CATEGORIES ===== */
.categories-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text);
}

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

.category-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

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

.category-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 16px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-count {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== PRODUCTS LIST ===== */
.products-section {
    padding: 60px 0;
}

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

.products-filter {
    display: flex;
    gap: 12px;
}

.products-filter select {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.products-table th {
    background: var(--primary);
    color: white;
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.products-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.products-table tr:hover {
    background: var(--bg-light);
}

.product-name {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.product-name:hover {
    text-decoration: underline;
}

.product-sku {
    color: var(--text-light);
    font-size: 13px;
}

/* ===== PRODUCT CARD (GRID VIEW) ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.product-card-image {
    height: 180px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 48px;
}

.product-card-body {
    padding: 20px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.product-card-meta span {
    background: var(--bg-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-light);
}

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

.product-card-action .btn {
    flex: 1;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
}

/* ===== SINGLE PRODUCT ===== */
.product-single {
    padding: 40px 0;
}

.product-single-header {
    margin-bottom: 32px;
}

.product-single-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-single-sku {
    color: var(--text-light);
    font-size: 14px;
}

.product-single-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-image {
    background: var(--bg-light);
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-details {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.product-details h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.product-specs {
    display: grid;
    gap: 12px;
}

.product-spec {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.product-spec-label {
    color: var(--text-light);
    font-size: 14px;
}

.product-spec-value {
    font-weight: 600;
    font-size: 14px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 24px;
}

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

.footer-brand h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.7;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.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: 13px;
    color: rgba(255,255,255,0.5);
}

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

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination a {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .product-single-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-stats {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .header-main-inner {
        flex-direction: column;
        gap: 16px;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-search {
        width: 100%;
        margin-top: 12px;
    }
    .nav-search input {
        flex: 1;
    }
    .hero-title {
        font-size: 28px;
    }
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Product image styles */
.product-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Archive product image */
.product-card-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
}
