/* ============================================================
   1. ОБЩИЕ СБРОСЫ И БАЗА
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    background: #f8f6f4;
    color: #1a1a1a;
    padding-top: 0; /* Хедер сам управляет отступами */
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   2. ХЕДЕР (ЭТАЛОННЫЙ, КАК НА ТОМ САЙТЕ)
   ============================================================ */

/* ----- ПЛАШКА (БЕГУЩАЯ СТРОКА) ----- */
.news-ticker {
    height: 45px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: #b8860b;
    transition: background-color 0.5s ease;
    border-radius: 12px 12px 0 0;
}

.news-ticker .slide {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    padding: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-ticker .slide.active {
    opacity: 1;
    transform: translateY(0);
}

/* ----- МЕНЮ ----- */
.navbar {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    background-color: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 100px;
    display: flex;
    align-items: center;
}

.navbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* ----- ЛОГОТИП ----- */
.logo-box {
    width: 205px;
    height: 55px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.logo-box img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* ----- МЕНЮ (ПК) ----- */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
}

.nav-menu li {
    position: relative;
    cursor: pointer;
    transition: color 0.2s;
    padding: 10px 0;
}

.nav-menu li:hover {
    color: #b8860b;
}

.nav-menu li a {
    text-decoration: none;
    color: inherit;
}

.nav-menu li a.active {
    color: #b8860b;
    border-bottom: 2px solid #b8860b;
}

/* ----- КОНТАКТЫ ----- */
.nav-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-contacts .contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-contacts .contact-item img {
    width: 20px;
    height: 20px;
    display: block;
}

.nav-contacts .email {
    color: #555;
}

.nav-contacts .phone {
    font-weight: bold;
    color: #000;
}

/* ----- СОЦИАЛЬНЫЕ ИКОНКИ ----- */
.social-boxes {
    display: flex;
    gap: 10px;
    margin-left: 5px;
}

.social-box {
    width: 45px;
    height: 45px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    padding: 8px;
}

.social-box:hover {
    background-color: #b8860b;
    border-color: #b8860b;
}

.social-box img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* ----- КОРЗИНА В ХЕДЕРЕ ----- */
.cart-header {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #1a1a1a;
    padding: 6px 12px;
    border-radius: 8px;
    position: relative;
    background: #f8f6f4;
    border: 1px solid #e0d6cc;
    transition: all 0.3s;
}

.cart-header:hover {
    background: #b8860b;
    border-color: #b8860b;
}

.cart-header:hover .cart-count {
    background: #fff;
    color: #b8860b;
}

.cart-header .cart-icon {
    width: 28px;
    height: 28px;
    display: block;
}

.cart-header .cart-count {
    background: #b8860b;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* ----- ВЫПАДАЮЩЕЕ МЕНЮ (Каталог) ----- */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    flex-direction: column;
    gap: 0;
    white-space: nowrap;
    z-index: 1001;
}

.dropdown-menu li {
    padding: 10px 20px;
    font-weight: 400;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li:hover {
    background-color: #fdf6ee;
    color: #b8860b;
}

.dropdown-menu li a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nav-menu li:hover .dropdown-menu {
    display: flex;
}

.has-dropdown > a::after {
    content: " ▾";
    font-size: 12px;
    color: #999;
}

/* ============================================================
   3. КАТАЛОГ (ГЛАВНАЯ)
   ============================================================ */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    min-height: 370px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.product-card img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.product-card .price {
    font-size: 20px;
    font-weight: 700;
    color: #b8860b;
    margin-bottom: 12px;
}

.product-card .btn {
    display: inline-block;
    padding: 8px 24px;
    background: #b8860b;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.product-card .btn:hover {
    background: #a0750a;
}

/* ============================================================
   4. СТРАНИЦА ТОВАРА
   ============================================================ */
.product-page {
    display: flex;
    gap: 50px;
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.product-gallery {
    flex: 0 0 420px;
}

.main-image {
    width: 420px;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f6f4;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.thumbnails img:hover {
    border-color: #b8860b;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.product-info .price-large {
    font-size: 32px;
    font-weight: 700;
    color: #b8860b;
}

.product-info .description {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

.product-info .btn-add {
    padding: 14px 40px;
    background: #b8860b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: fit-content;
    text-decoration: none;
}

.product-info .btn-add:hover {
    background: #a0750a;
}

/* ============================================================
   5. КОРЗИНА
   ============================================================ */
.cart-page {
    margin: 40px 0;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 15px 10px;
    border-bottom: 2px solid #e0d6cc;
    font-weight: 600;
    color: #555;
}

.cart-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f0ece8;
    vertical-align: middle;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty a {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fcfaf8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 30px;
    text-decoration: none;
    color: #333;
}

.cart-qty a:hover {
    background: #b8860b;
    color: #fff;
}

.cart-remove {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

.cart-remove:hover {
    text-decoration: underline;
}

.cart-total {
    text-align: right;
    font-size: 24px;
    font-weight: 700;
    padding: 20px 0;
    border-top: 2px solid #e0d6cc;
    margin-top: 20px;
}

.cart-total span {
    color: #b8860b;
}

.cart-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cart-actions .btn {
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-continue {
    background: #f0ece8;
    color: #333;
}

.btn-continue:hover {
    background: #e0d6cc;
}

.btn-order {
    background: #b8860b;
    color: #fff;
}

.btn-order:hover {
    background: #a0750a;
}

/* ============================================================
   6. ФУТЕР
   ============================================================ */
.footer {
    background: #000000;
    color: #ffffff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-left p {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 300;
}

.footer-link {
    color: #b8860b;
    text-decoration: none;
    font-size: 14px;
    margin-top: 8px;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-phone {
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
}

.footer-phone:hover {
    color: #b8860b;
}

.footer-credit {
    font-size: 14px;
    color: #888;
    font-weight: 300;
}

.footer-marshall {
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

.footer-marshall:hover {
    text-decoration: underline;
}

.footer-right {
    flex-shrink: 0;
    width: 320px;
    height: 70px;
}

.footer-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================================
   7. МОДАЛЬНОЕ ОКНО (ЗАКАЗ)
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 555px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 15px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #e74c3c;
}

.order-details {
    background: #f8f6f4;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.order-details h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.order-details p {
    margin: 4px 0;
    font-size: 14px;
}

.order-details .total-order {
    font-weight: 700;
    font-size: 18px;
    color: #b8860b;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #b8860b;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    font-size: 13px;
    color: #555;
}

.checkbox-group a {
    color: #b8860b;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: #b8860b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.form-submit:hover {
    background: #a0750a;
}

.custom-notification {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 3000;
    text-align: center;
    max-width: 450px;
    border-top: 6px solid #b8860b;
}

.custom-notification p {
    font-size: 16px;
    margin: 10px 0;
}

.custom-notification button {
    padding: 10px 30px;
    background: #b8860b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

.custom-notification button:hover {
    background: #a0750a;
}

/* ============================================================
   8. АДАПТИВНОСТЬ (КАК НА ЭТАЛОННОМ САЙТЕ)
   ============================================================ */

@media (max-width: 992px) {
    .navbar {
        height: auto;
        padding: 15px 20px;
        border-radius: 12px;
    }

    .navbar-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .nav-menu {
        gap: 15px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-contacts {
        gap: 15px;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-ticker {
        height: 40px;
        border-radius: 8px 8px 0 0;
    }
    
    .news-ticker .slide {
        font-size: 12px;
        white-space: normal;
        padding: 0 10px;
    }

    .logo-box {
        width: 150px;
        height: 45px;
    }

    .nav-menu {
        font-size: 13px;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* ====== КОНТАКТЫ В МОБИЛЬНОЙ ВЕРСИИ ====== */
    .nav-contacts {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px 15px !important;
        width: 100% !important;
    }

    .nav-contacts .contact-item {
        flex: 0 0 auto !important;
    }

    .social-boxes {
        margin-left: 0 !important;
        flex: 0 0 auto !important;
    }

    .social-box {
        width: 38px !important;
        height: 38px !important;
        padding: 6px !important;
    }
    
    .cart-header {
        padding: 4px 10px;
    }
    
    .cart-header .cart-icon {
        width: 24px;
        height: 24px;
    }
    
    .cart-header .cart-count {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }

    /* ====== ВЫПАДАЮЩЕЕ МЕНЮ НА МОБИЛЬНЫХ ====== */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding-left: 15px;
        background: transparent;
        min-width: auto;
    }

    .dropdown-menu li {
        padding: 5px 0;
        border-bottom: none;
        font-size: 13px;
    }

    .dropdown-menu li:hover {
        background: transparent;
        color: #b8860b;
    }

    .has-dropdown > a::after {
        content: " ▼";
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-page {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }
    
    .product-gallery {
        flex: unset;
        width: 100%;
        max-width: 420px;
    }
    
    .main-image {
        width: 100%;
        height: auto;
        aspect-ratio: 4/5;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-right {
        width: 200px;
        height: 50px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .product-info h1 {
        font-size: 22px;
    }
    
    .cart-table {
        font-size: 14px;
    }
    
    .cart-product img {
        width: 40px;
        height: 40px;
    }
    
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-actions .btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 8px;
        font-size: 12px;
    }
    
    .nav-menu li {
        padding: 6px 0;
    }

    .nav-contacts .contact-item {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 12px;
    }
    
    .logo-box {
        width: 120px;
        height: 40px;
    }
    
    .category-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .header-contacts-mobile .contact-link {
        font-size: 11px;
    }
}