/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 16px;
}

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

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #8B4513;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #A0522D;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    font-size: 1rem;
    line-height: 1;
    white-space: nowrap;
}

.btn i {
    font-size: 0.9em;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: #8B4513;
    color: white;
    border-color: #8B4513;
}

.btn-primary:hover {
    background-color: #A0522D;
    border-color: #A0522D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.2);
}

.btn-secondary {
    background-color: #228B22;
    color: white;
    border-color: #228B22;
}

.btn-secondary:hover {
    background-color: #2E8B57;
    border-color: #2E8B57;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: #8B4513;
    border-color: #8B4513;
}

.btn-outline:hover {
    background-color: #8B4513;
    color: white;
}

.btn-light {
    background-color: white;
    color: #8B4513;
    border-color: white;
}

.btn-light:hover {
    background-color: #f8f5f0;
    border-color: #f8f5f0;
}

.btn-outline-light {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: #8B4513;
}

/* ===== HEADER ===== */
.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: #f8f5f0;
    padding: 8px 0;
    font-size: 0.9rem;
}

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

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

.header-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.header-contact i {
    color: #8B4513;
}

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

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B4513;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.main-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #8B4513;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #8B4513;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-badge.featured {
    background-color: #ffd700;
    color: #333;
}

.product-badge.out-of-stock {
    background-color: #666;
    color: white;
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

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

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #8B4513;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.wood-type,
.grade,
.dimensions {
    padding: 2px 6px;
    background-color: #f5f5f5;
    border-radius: 3px;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.product-pricing {
    margin-bottom: 1.5rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.price-label {
    color: #666;
}

.price-value {
    font-weight: 700;
    color: #228B22;
    font-size: 1.1rem;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #333;
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #8B4513;
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact i {
    color: #8B4513;
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

/* ===== COOKIE NOTICE ===== */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem;
    z-index: 1200;
    display: none;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text a {
    color: #D2B48C;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input {
    flex-shrink: 0;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .header-main .container {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        display: none;
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-btn {
        display: block;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 10px 20px;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    .header-contacts {
        flex-direction: column;
        gap: 5px;
        font-size: 0.8rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }
}

/* Быстрый просмотр */
.quick-view-content {
    max-width: 1000px !important;
    width: 95%;
    padding: 0 !important;
    overflow: hidden;
}

.quick-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.quick-view-images {
    padding: 2rem;
    background: #f9f9f9;
}

.main-image {
    width: 100%;
    height: 300px;
    margin-bottom: 1rem;
    border-radius: 5px;
    overflow: hidden;
    background: white;
}

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

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.thumbnail {
    width: 100%;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail:hover {
    border-color: #8B4513;
}

.thumbnail.active {
    border-color: #8B4513;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-view-info {
    padding: 2rem;
    background: white;
}

.quick-view-info h2 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.5rem;
}

.quick-view-info .product-meta {
    margin-bottom: 1.5rem;
}

.quick-view-info .product-pricing {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f5f0;
    border-radius: 5px;
}

.quick-view-info .product-description {
    margin-bottom: 1.5rem;
}

.quick-view-info .product-description h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #8B4513;
}

.quick-view-info .product-description p {
    line-height: 1.6;
    color: #666;
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.characteristics-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.characteristics-table td:first-child {
    font-weight: 600;
    color: #333;
    width: 40%;
}

.quick-view-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.quick-view-actions .btn {
    flex: 1;
}

@media (max-width: 768px) {
    .quick-view-grid {
        grid-template-columns: 1fr;
    }

    .quick-view-images {
        padding: 1rem;
    }

    .quick-view-info {
        padding: 1rem;
    }

    .quick-view-actions {
        flex-direction: column;
    }
}