/*
Theme Name: NetParts Theme
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: Полноценная тема для скупки радиодеталей в стиле Netflix. Не требует плагинов.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netparts
Tags: e-commerce, dark, custom-menu, featured-images, theme-options
*/

:root {
    --bg-color: #141414;
    --card-bg: #1f1f1f;
    --primary-red: #e50914;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --accent-green: #46d369;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 4%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, rgba(0,0,0,0));
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}
header.scrolled { background-color: var(--bg-color); }

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-red);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
}
.logo img { max-height: 50px; }

.header-info {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
}
.contact-btn {
    background-color: transparent;
    border: 1px solid var(--text-white);
    color: var(--text-white);
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.2s;
}
.contact-btn.wa { border-color: #25D366; color: #25D366; }
.contact-btn.tg { border-color: #0088cc; color: #0088cc; }
.contact-btn:hover { background-color: rgba(255,255,255,0.1); }

/* Hero */
.hero {
    height: 80vh;
    background: url('https://images.unsplash.com/photo-1518770660439-4636190af475?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 4%;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--bg-color) 10%, transparent 90%);
}
.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero-title { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.1; }
.hero-desc { font-size: 1.2rem; margin-bottom: 30px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-btn {
    background-color: var(--primary-red);
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Categories */
.category-section { padding: 20px 4%; margin-bottom: 40px; }
.category-title { font-size: 1.4rem; margin-bottom: 15px; font-weight: 500; }
.row-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
}
.row-container::-webkit-scrollbar { display: none; }

.card {
    min-width: 250px;
    height: 140px;
    background-color: #333;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
}
.card:hover { transform: scale(1.1); z-index: 100; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card-info {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.card:hover .card-info { opacity: 1; }
.card-title { font-size: 0.9rem; font-weight: bold; }

/* Single Page */
.modal-content {
    max-width: 900px;
    margin: 0 auto;
    background: #181818;
    display: flex;
    flex-wrap: wrap;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}
.modal-left { flex: 1; min-width: 300px; }
.main-image { width: 100%; height: 400px; object-fit: cover; }
.modal-right { flex: 1; padding: 30px; min-width: 300px; }
.modal-title { font-size: 2rem; margin-bottom: 10px; }
.modal-meta { color: var(--text-gray); margin-bottom: 20px; font-size: 0.9rem; }
.price-tag { font-size: 1.5rem; color: var(--accent-green); font-weight: bold; margin-bottom: 20px; display: block; }
.metals-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9rem; }
.metals-table td { padding: 8px 0; border-bottom: 1px solid #333; }
.metals-table td:first-child { color: var(--text-gray); }
.metals-table td:last-child { text-align: right; font-weight: bold; }

.action-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-sell {
    display: block;
    width: 100%;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: 0.2s;
}
.btn-phone { background-color: var(--primary-red); color: white; }
.btn-wa { background-color: #25D366; color: white; }
.btn-tg { background-color: #0088cc; color: white; }
.btn-sell:hover { opacity: 0.9; }

footer { padding: 50px 4%; text-align: center; color: #555; font-size: 0.8rem; }

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .header-info span { display: none; }
    .modal-content { flex-direction: column; }
    .main-image { height: 250px; }
}

/* Стили для страницы категории */
.taxonomy-radio_part_category .hero {
    background-position: center 30%;
}

.taxonomy-radio_part_category .row-container {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.category-seo-block {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #1f1f1f;
    border-radius: 8px;
}

.category-seo-block h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
}

.category-seo-block p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* Улучшения для главной и архивов */
#app-container {
    padding-bottom: 60px;
}

.category-section h3 a:hover {
    color: var(--primary-red) !important;
    transition: 0.3s;
}

/* Анимация для карточек */
.card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.card:hover {
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
}

/* Кнопки в Hero */
.hero-btn {
    background-color: var(--primary-red);
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}

.hero-btn:hover {
    background-color: #ff0f1f;
    transform: translateY(-2px);
}

/* SEO блок */
.category-section[style*="max-width: 900px"] {
    animation: fadeIn 0.5s ease-in;
}

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

/* Адаптив для архивов */
@media (max-width: 768px) {
    .hero { height: 60vh !important; }
    .hero-title { font-size: 2rem !important; }
    .card { min-width: 160px !important; height: 100px !important; }
}

/* ========== Улучшенная страница товара (Netflix Style) ========== */

/* Анимация появления */
.product-hero {
    animation: fadeIn 0.6s ease-out;
}

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

/* Кнопка назад */
.back-btn:hover {
    opacity: 1;
    color: var(--primary-red) !important;
}

/* Постер товара */
.product-poster {
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-poster:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(229, 9, 20, 0.3);
}

/* Заголовок товара */
.product-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Карточки похожих товаров */
.related-card:hover .card {
    transform: scale(1.08);
}

.related-card:hover .card {
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.5);
}

/* Металлы - иконки */
.metal-item {
    transition: transform 0.2s, background 0.2s;
}

.metal-item:hover {
    transform: translateX(5px);
    background: #2a2a2a;
}

/* Кнопки - ховер эффекты */
.btn-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-phone:hover {
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

/* Адаптив для мобильной версии */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .product-title {
        font-size: 2rem !important;
    }
    
    .hero-content-wrapper {
        padding-top: 100px !important;
    }
    
    .metals-grid {
        grid-template-columns: 1fr !important;
    }
    
    .action-buttons > div {
        grid-template-columns: 1fr !important;
    }
}

/* Скроллбар для горизонтального скролла */
.row-container::-webkit-scrollbar {
    height: 6px;
}

.row-container::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.row-container::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

/* Улучшенные хлебные крошки */
.breadcrumbs a:hover {
    color: var(--primary-red) !important;
}

/* ========== Страница "Вид" (single-radio_type.php) ========== */

/* Hero секция */
.type-hero {
    animation: fadeIn 0.6s ease-out;
}

.type-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.type-subtitle {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Кнопка назад */
.back-btn:hover {
    color: var(--primary-red) !important;
    transform: translateX(-5px);
}

/* Карточки деталей */
.part-card-link:hover .card {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.5);
}

/* Скроллбар для горизонтального скролла */
.parts-section .row-container::-webkit-scrollbar {
    height: 6px;
}

.parts-section .row-container::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.parts-section .row-container::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

/* SEO и Контакты блоки */
.seo-section, .contact-section {
    animation: fadeIn 0.5s ease-in;
}

/* Адаптив для мобильной версии */
@media (max-width: 900px) {
    .type-title {
        font-size: 2.2rem !important;
    }
    
    .type-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-content-wrapper {
        padding-top: 100px !important;
    }
    
    .card {
        min-width: 220px !important;
        height: 140px !important;
    }
}

/* Плавное появление */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Хлебные крошки */
.breadcrumbs a:hover {
    color: var(--primary-red) !important;
}

/* ========== Страница "Категория" (single-radio_category.php) ========== */

/* Hero секция */
.category-hero {
    animation: fadeIn 0.6s ease-out;
}

.category-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.category-subtitle {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Кнопка назад */
.back-btn:hover {
    color: var(--primary-red) !important;
    transform: translateX(-5px);
}

/* Карточки видов */
.type-card-link:hover .card {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.5);
}

/* Карточки деталей */
.part-card-link:hover .card {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.5);
}

/* Скроллбар для горизонтального скролла */
.types-section .row-container::-webkit-scrollbar,
.parts-section .row-container::-webkit-scrollbar {
    height: 6px;
}

.types-section .row-container::-webkit-scrollbar-track,
.parts-section .row-container::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.types-section .row-container::-webkit-scrollbar-thumb,
.parts-section .row-container::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

/* SEO и Контакты блоки */
.seo-section, .contact-section {
    animation: fadeIn 0.5s ease-in;
}

/* Адаптив для мобильной версии */
@media (max-width: 900px) {
    .category-title {
        font-size: 2.5rem !important;
    }
    
    .category-subtitle {
        font-size: 1.1rem !important;
    }
    
    .hero-content-wrapper {
        padding-top: 100px !important;
    }
    
    .card {
        min-width: 220px !important;
        height: 140px !important;
    }
}

/* Плавное появление */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Увеличенный заголовок для категории (верхний уровень) */
@media (min-width: 1200px) {
    .category-title {
        font-size: 4.5rem;
    }
}