/*
Theme Name: CCCP Auction HighLoad
Theme URI: https://cccp.org.ru
Author: CCCP MISAN
Description: Экстремально быстрая тема для аукциона. Никакого жира.
Version: 2.2 (Final Clean)
File: style.css
*/

:root {
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --cccp-red: #c00000;
    --cccp-gold: #d4af37;
    --green: #28a745;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* === Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === Header === */
.main-header {
    background: #fff;
    border-bottom: 2px solid var(--cccp-red);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo .highlight { color: var(--cccp-red); }

.btn-small {
    padding: 6px 12px;
    background: var(--text-main);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}
.btn-small:hover { background: var(--cccp-red); }

/* === Layout: Sidebar + Content === */
.main-layout {
    display: grid;
    /* Контент (1fr) слева, Сайдбар (280px) справа */
    grid-template-columns: 1fr 280px; 
    gap: 40px;
}

/* === Sidebar === */
.sidebar-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    margin-top: 0;
}

/* === MENU: CATALOG (CLEAN & UNIFIED) === */

/* === MENU: CATALOG (CLEAN FIX) === */
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { margin-bottom: 2px; position: relative; list-style: none; }

/* УБИРАЕМ ВСЕ ПСЕВДОЭЛЕМЕНТЫ (Причина конфликта стрелок) */
.cat-list li::after, .cat-list li::before, 
.cat-list a::after, .cat-list a::before { 
    content: none !important; display: none !important; 
}

/* Ссылка */
.cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 35px 8px 10px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}
.cat-list a:hover { background: #f0f0f0; color: var(--cccp-red); }
.cat-list li.current-cat > a { color: var(--cccp-red); font-weight: bold; background: #fff0f0; }

/* Цифра */
.cat-list .count {
    background: #e9ecef;
    color: #666;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

/* Стрелка (ТОЛЬКО ЭТА ДОЛЖНА БЫТЬ) */
.cat-toggle {
    position: absolute;
    top: 0; right: 0;
    width: 40px; height: 100%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #bbb;
    font-size: 10px;
    z-index: 10;
}
.cat-toggle:hover { color: var(--cccp-red); }
.cat-list li.open > .cat-toggle { transform: rotate(180deg); color: var(--cccp-red); }

/* Подменю */
.cat-list .children {
    display: none;
    list-style: none;
    margin: 0;
    padding-left: 15px;
    border-left: 2px solid #f0f0f0;
}
.cat-list li.open > .children { display: block; }


@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }


/* === Grid System (Lots) === */
.page-title {
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 300;
    border-left: 5px solid var(--cccp-red);
    padding-left: 15px;
}

.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* === Lot Card === */
.lot-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eaeaea;
}
.lot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.lot-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #eee;
}
.lot-link { position: absolute; top:0; left:0; right:0; bottom:0; }
.status-badge {
    position: absolute;
    top: 15px; right: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
}
.status-badge.live { background: var(--cccp-red); animation: pulse 2s infinite; }
.status-badge.closed { background: var(--text-muted); }

.lot-details { padding: 20px; }
.lot-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.lot-title a { color: var(--text-main); text-decoration: none; }
.lot-title a:hover { color: var(--cccp-red); }

.lot-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* === Tags (Pills) === */
.lot-meta-cat {
    font-size: 0.8rem;
    color: var(--cccp-red);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 5px;
}
.lot-tags { margin-bottom: 15px; }
.tag-pill {
    display: inline-block;
    background: #f1f1f1;
    color: #555;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: background 0.2s;
}
.tag-pill:hover { background: #e2e2e2; color: #000; }
.tag-pill.small { font-size: 0.8rem; padding: 4px 10px; }

/* === Auction Box (Embedded) === */
.auction-box {
    margin-left: -20px !important;
    margin-right: -20px !important;
    margin-bottom: -20px !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    border-top: 1px solid #eaeaea !important;
    margin-top: 20px !important;
}

/* Цена */
.auction-box h3 {
    margin: 0 0 5px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.price-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 15px;
}
.live-price {
    font-size: 2rem !important;
    color: var(--text-main) !important;
    font-weight: 800 !important;
    line-height: 1;
    font-family: monospace;
    letter-spacing: -1px;
}
.currency { font-size: 1.2rem; font-weight: bold; color: var(--text-muted); }

/* Таймер */
.timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.live-timer {
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

/* Форма ставки */
.bid-form {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}
.bid-form input[type="number"] {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 18px;
    font-weight: bold;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}
.bid-form input[type="number"]:focus { border-color: var(--cccp-red); z-index: 2; }
.bid-form button {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: var(--cccp-red) !important;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s;
}
.bid-form button:hover { background: #900000 !important; }
.bid-form button:disabled { background: #ccc !important; cursor: not-allowed; }

.bid-message {
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 500;
    text-align: center;
}

/* Сообщение "Войдите" */
.login-alert {
    text-align: center;
    padding: 10px;
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.login-alert a {
    color: var(--cccp-red);
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px solid var(--cccp-red);
}
.login-alert a:hover { border-bottom: none; }

/* Footer */
.main-footer {
    border-top: 1px solid #eee;
    padding: 30px 0;
    margin-top: 50px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }


/* === MOBILE & RESPONSIVE === */

/* Скрываем бутерброд на ПК */
.burger-menu-icon, .mobile-menu-overlay { display: none; }

@media (max-width: 900px) {
    /* Меняем сетку на блочную (сайдбар вниз) */
    .main-layout { display: block; }
    .content-area { margin-bottom: 50px; }
    .sidebar { border-top: 1px solid #eee; padding-top: 30px; }
    .auction-grid { grid-template-columns: 1fr; }

    /* Скрываем десктопное меню */
    .desktop-nav { display: none; }

    /* Показываем Бутерброд */
    .burger-menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px; height: 20px;
        cursor: pointer;
        z-index: 3000;
    }
    .burger-menu-icon span {
        display: block; height: 3px; width: 100%;
        background: var(--text-main); border-radius: 3px;
    }

    /* Шторка (Overlay) */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0; right: 0; bottom: 0; left: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        opacity: 0; visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .mobile-menu-overlay.active { opacity: 1; visibility: visible; }

    /* Панель меню */
    .mobile-menu-content {
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 85%; max-width: 320px;
        background: #fff;
        padding: 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .mobile-menu-overlay.active .mobile-menu-content { transform: translateX(0); }

   /* Кнопка Закрыть - СЛЕВА, чтобы не путать с бутербродом справа */
    .close-menu {
        background: #f1f1f1; border: none;
        position: absolute; 
        top: 20px; left: 20px; /* СЛЕВА */
        width: 40px; height: 40px; border-radius: 50%;
        cursor: pointer; color: #333; z-index: 2001;
        display: flex; align-items: center; justify-content: center;
        font-size: 24px; line-height: 1;
    }
    .close-menu:hover { background: var(--cccp-red); color: #fff; }

    /* Стили внутри мобильного меню */
    .mobile-user-actions {
        display: flex; flex-direction: column; gap: 10px; margin-top: 30px;
    }
    .btn-mobile {
        display: block; text-align: center;
        background: var(--cccp-red); color: #fff;
        padding: 12px; text-decoration: none;
        border-radius: 4px; font-weight: bold;
    }
    .link-mobile {
        text-align: center; color: #666;
        text-decoration: none; font-size: 0.9rem;
    }
    
    .mobile-cat-list { list-style: none; padding: 0; }
    .mobile-cat-list li { margin-bottom: 10px; }
    .mobile-cat-list a {
        text-decoration: none; color: var(--text-main);
        font-size: 1.1rem; display: block;
        border-bottom: 1px solid #f0f0f0; padding-bottom: 8px;
    }
}