/* Общие стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #ffffff;
    /* Flex-цепочка: header + main(flex:1) + footer — линии cart-grid доходят до footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Хедер */
.header {
    padding: 0;
    background: #ffffff;
    color: #000000;
}



.header a {
    text-decoration: none;
    color: #000000;
    transition: opacity 0.2s;
}

.header a:hover {
    opacity: 0.45;
}



/* ════════════════════════════════
   WISHLIST — глобальные стили
════════════════════════════════ */

/* Кнопка флажка на карточке (правый верхний угол) */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 30;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    transition: opacity 0.15s;
}
.wishlist-btn:hover { opacity: 0.5; }
.wishlist-btn svg {
    width: 20px;
    height: 20px;
    stroke: #111;
    stroke-width: 1.4;
    fill: none;
    transition: fill 0.15s;
}
.wishlist-btn.active svg { fill: #111; }

/* Drawer overlay */
.wl-size-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 400; opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.wl-size-overlay.open { opacity: 1; pointer-events: auto; }

/* Drawer panel */
.wl-size-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 340px; max-width: 95vw;
    background: #fff;
    z-index: 401;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.wl-size-drawer.open { transform: translateX(0); }

.wl-size-head {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #000;
    flex-shrink: 0;
}
.wl-size-title {
    font-size: 0.72em; letter-spacing: 0.2em;
    text-transform: uppercase; font-weight: 700; color: #111;
}
.wl-size-close {
    background: none; border: none;
    font-size: 1.1em; cursor: pointer;
    color: #777; padding: 4px;
    transition: color 0.15s; line-height: 1;
}
.wl-size-close:hover { color: #000; }

.wl-size-list {
    flex: 1; overflow-y: auto;
    padding: 8px 0;
}
.wl-size-item {
    display: block; width: 100%;
    padding: 14px 24px;
    background: none; border: none;
    font-family: inherit;
    font-size: 0.82em; letter-spacing: 0.1em;
    text-transform: uppercase; color: #111;
    text-align: left; cursor: pointer;
    transition: background 0.12s;
}
.wl-size-item:hover { background: #f5f5f5; }
.wl-size-item.oos {
    color: #bbb;
    text-decoration: line-through;
    pointer-events: none; cursor: default;
}

/* Новые поступления — карточки: изображения без белого фона */
.na-card .era-card__img {
    object-fit: contain !important;
    mix-blend-mode: multiply;
}

/* Стрелки карусели — внутри контейнера */
.new-arrivals {
    position: relative;
    padding-left: 8%;
    padding-right: 8%;
}

.new-arrivals__nav--prev { left: 2%; }
.new-arrivals__nav--next { right: 2%; }
.footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #000;
    background: #ffffff;
    color: #000000;
    flex-shrink: 0;
}

/* Карточки товаров */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 20px;
}

.product {
    border: 1px solid #000;
    border-radius: 15px;
    padding: 20px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin-bottom: 15px;
}

.placeholder-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.product-name {
    font-weight: 600;
    font-size: 1.3em;
    color: #333;
}

.product-price {
    color: #e63946;
    font-size: 1.2em;
    margin: 15px 0;
    font-weight: bold;
}

.product-count {
    color: #666;
    font-size: 0.95em;
}

/* Кнопки */
.buy-btn {
    background: #000;
    color: white;
    padding: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 8px;
    transition: background 0.3s;
}

.buy-btn:hover {
    background: #333;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

.modal-content {
    position: relative;
    text-align: center;
    font-size: 1.1em;
}

.close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Формы (логин/регистрация) */
.content {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    z-index: 2;
}

input:not(#searchInput):not(#floatingSearchInput) {
    width: 100%;
    padding: 8px 35px;
    box-sizing: border-box;
    border: 1px solid #000;
    border-radius: 4px;
}

.error {
    color: red;
    margin-bottom: 15px;
}

.success {
    color: green;
    margin-bottom: 15px;
}

/* Стили корзины */
.cart-items {
    display: block;
}

.cart-item {
    border-bottom: 1px solid #000;
    background: white;
    box-shadow: none;
}

.remove-btn {
    background: #ff4444;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.remove-btn:hover {
    background: #cc0000;
}

.category-dropdown {
    position: relative;
    display: inline-block;
}

.category-dropdown .dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
}

.category-dropdown:hover .dropdown-content {
    display: block;
}

.category-dropdown .dropdown-content a {
    color: #222;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
}

.category-dropdown .dropdown-content a:hover {
    background: #eee;
}

.cart-badge {
    display: inline-block;
    background: #000;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 14px;
    margin-left: 3px;
    vertical-align: middle;
}

.product {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.product.visible {
    opacity: 1;
    transform: translateY(0);
}

#toTop {
    display: none;
    position: fixed;
    bottom: 35px;
    right: 35px;
    z-index: 100;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.6em;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,0,0,0.14);
    transition: background 0.3s;
}

#toTop:hover { background: #444; }

/* ── Hero Section (Video Banner) ── */
.hero-section {
    position: relative;
    width: 100%;
    height: calc(100vh - 52px);
    overflow: hidden;
    background-color: #000;
    border-bottom: 1px solid #000;
    box-sizing: border-box;
    flex-shrink: 0;
}

.hero-section video {
    position: absolute;
    top: 0;
    left: 0;
    width: 103%;
    height: 103%;
    object-fit: cover;
    z-index: 1;
    display: block;
}

/* Тёмная маска поверх видео */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
    pointer-events: none;
}

/* Текст: левый нижний угол, строго внутри секции */
.hero-overlay-content {
    position: absolute;
    bottom: 10%;
    left: 5%;
    text-align: left;
    z-index: 3;
}

.hero-overlay-content h1 {
    color: #ffffff !important;
    font-size: 3rem !important;
    letter-spacing: 5px !important;
    font-weight: 700 !important;
    margin: 0 0 12px 0 !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
    font-family: Arial, sans-serif !important;
    text-shadow: none !important;
}

.hero-overlay-content p {
    color: #ffffff !important;
    font-size: 1rem !important;
    letter-spacing: 3px !important;
    opacity: 0.8;
    margin: 0 !important;
    text-transform: uppercase !important;
    font-family: Arial, sans-serif !important;
    font-weight: 400 !important;
}

/* hero-scroll удалён */

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
}

.hero-scroll-hint svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .hero-section {
        height: calc(100vh - 52px);
    }
    .hero-overlay-content h1 {
        font-size: 1.8rem !important;
        letter-spacing: 3px !important;
    }
    .hero-overlay-content p {
        font-size: 0.85rem !important;
        letter-spacing: 2px !important;
    }
}
