/* Страница товара - стили */

* {
    padding: 0;
    margin: 0;
    font-family: Arial, sans-serif;
    font-weight: 400;
    letter-spacing: -.03em;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

/* Глобальные мобильные исправления для хедера */
@media (max-width: 768px) {
    .nav-links {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
}

body {
    --wp--preset--color--black: #000000;
    --wp--preset--color--white: #ffffff;
    --woocommerce: #7F54B3;
    --wc-green: #7ad03a;
    --wc-red: #a00;
    --wc-orange: #ffba00;
    --wc-blue: #2ea2cc;
    --wc-primary: #7F54B3;
    --wc-primary-text: white;
    --wc-secondary: #e9e6ed;
    --wc-secondary-text: #515151;
    --wc-highlight: #b3af54;
    --wc-content-bg: #fff;
    --wc-subtext: #767676;
    
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-weight: 400;
    letter-spacing: -.03em;
}


/* Хлебные крошки */
.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #1d1d1b;
}

/* Контейнер товара */
.product-container {
    background: white;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* Изображения товара */
.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Предотвращение переполнения на всех экранах */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.image-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #1d1d1b;
}

/* Информация о товаре */
.product-title {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 10px;
}

.product-code {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Секция цен */
.price-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.current-price {
    font-size: 42px;
    font-weight: bold;
    color: #1d1d1b;
}

.original-price {
    font-size: 28px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #1d1d1b;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* Статус товара */
.stock-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 16px;
}

.stock-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.in-stock { background: #4caf50; }
.low-stock { background: #ff9800; }
.out-of-stock { background: #f44336; }

/* Выбор размера */
.size-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    padding: 12px 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    font-size: 16px;
}

.size-option:hover {
    border-color: #1d1d1b;
}

.size-option.selected {
    background: #1d1d1b;
    color: white;
    border-color: #1d1d1b;
}

/* Добавление в корзину */
.add-to-cart-section {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.quantity-selector {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    padding: 0 20px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

.quantity-btn:hover {
    background: #f5f5f5;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 16px;
}

.add-to-cart {
    flex: 1;
    padding: 16px;
    background: #1d1d1b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-cart:hover {
    background: #2a2a28;
}

/* Вкладки товара */
.product-tabs {
    border-top: 1px solid #e5e5e5;
    padding-top: 40px;
}

.tabs {
    display: flex;
    gap: 40px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 30px;
}

.tab {
    padding: 15px 0;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 16px;
}

.tab.active {
    color: #1d1d1b;
    border-bottom-color: #1d1d1b;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

.description-content {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* Список описания товара */
.product-description-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-description-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.product-description-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
}

/* Технические характеристики */
.attributes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.attribute-label {
    font-weight: 500;
    color: #666;
}

/* Похожие товары */
.related-products {
    margin: 60px 0;
}

.related-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-product {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.related-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.related-info {
    padding: 15px;
}

.related-name {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.related-price {
    font-size: 18px;
    font-weight: bold;
    color: #1d1d1b;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Подвал */
.footer {
    background: #1d1d1b;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 80px;
}

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

.footer-section h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #fff;
}

.footer-contact {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact strong {
    color: #fff;
    display: block;
    margin-bottom: 5px;
}

.footer-hours {
    background: #2a2a28;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.footer-hours h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.footer-hours p {
    font-size: 13px;
    color: #999;
    margin: 5px 0;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Адаптивность */

/* Планшеты */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .product-container {
        padding: 30px;
    }
    
    .product-layout {
        gap: 40px;
    }
    
    .product-title {
        font-size: 32px;
    }
    
    .current-price {
        font-size: 36px;
    }
    
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }
    
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Убедимся что навигация скрыта на мобильном */
    .header .nav-links,
    nav.nav-links,
    .header-content .nav-links {
        display: none !important;
    }
    
    .header .mobile-menu-btn,
    .header-content .mobile-menu-btn,
    button.mobile-menu-btn {
        display: flex !important;
    }
    
    /* Дополнительно убеждаемся что хедер работает правильно на мобильном */
    .header {
        padding: 15px 0;
    }
    
    .header .container {
        padding: 0 15px;
    }
    
    .header .logo {
        font-size: 28px;
    }
    
    /* Принудительно скрыть навигацию с максимальной специфичностью */
    body .header .header-content .nav-links {
        display: none !important;
        visibility: hidden !important;
    }
    
    body .header .header-content .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .breadcrumb {
        padding: 10px 0;
        font-size: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .product-container {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 0;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-images {
        position: static;
    }
    
    .main-image {
        margin-bottom: 15px;
    }
    
    .image-thumbnails {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .product-title {
        font-size: 24px;
        margin-bottom: 8px;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    .product-code {
        margin-bottom: 12px;
        font-size: 13px;
    }
    
    .price-section {
        margin-bottom: 15px;
        padding-bottom: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .current-price {
        font-size: 28px;
    }
    
    .original-price {
        font-size: 20px;
    }
    
    .discount-badge {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .stock-status {
        margin-bottom: 20px;
    }
    
    .size-section {
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .size-options {
        gap: 8px;
    }
    
    .size-option {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 40px;
        text-align: center;
    }
    
    .add-to-cart-section {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .quantity-selector {
        align-self: flex-start;
        border: 1px solid #ddd;
    }
    
    .quantity-btn {
        padding: 0 12px;
        font-size: 16px;
        height: 44px;
        min-width: 44px;
    }
    
    .quantity-input {
        width: 60px;
        height: 44px;
        font-size: 16px;
    }
    
    .add-to-cart {
        padding: 16px;
        font-size: 16px;
        width: 100%;
    }
    
    .product-tabs {
        padding-top: 30px;
    }
    
    .tabs {
        gap: 20px;
        margin-bottom: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        white-space: nowrap;
        padding: 12px 0;
        font-size: 15px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .related-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .attributes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .attribute-item {
        flex-direction: column;
        gap: 5px;
        padding: 12px 0;
    }

    /* Список описания на мобильных */
    .product-description-list li {
        padding-left: 20px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .product-description-list li:before {
        font-size: 14px;
    }
}

/* Малые мобильные устройства */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    .product-container {
        padding: 12px;
        border-radius: 0;
        margin-bottom: 10px;
    }
    
    .breadcrumb {
        font-size: 11px;
        padding: 8px 0;
    }
    
    .product-title {
        font-size: 20px;
        line-height: 1.2;
        margin-bottom: 6px;
    }
    
    .product-code {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .current-price {
        font-size: 24px;
    }
    
    .original-price {
        font-size: 18px;
    }
    
    .discount-badge {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .size-options {
        gap: 6px;
    }
    
    .size-option {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .quantity-btn {
        padding: 0 10px;
        font-size: 16px;
        min-width: 36px;
        height: 40px;
    }
    
    .quantity-input {
        width: 50px;
        height: 40px;
        font-size: 14px;
    }
    
    .add-to-cart {
        padding: 14px;
        font-size: 15px;
    }
    
    .tabs {
        gap: 10px;
        padding: 0 5px;
    }
    
    .tab {
        font-size: 13px;
        padding: 8px 5px;
        min-width: 70px;
        text-align: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .related-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .related-info {
        padding: 12px;
    }
    
    .related-name {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .related-price {
        font-size: 16px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .product-container {
        padding: 10px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .current-price {
        font-size: 22px;
    }
    
    .original-price {
        font-size: 16px;
    }
    
    .size-option {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }
    
    .image-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .tabs {
        gap: 8px;
        font-size: 12px;
    }
    
    .tab {
        font-size: 12px;
        min-width: 60px;
        padding: 6px 2px;
    }
    
    /* Убеждаемся что на очень маленьких экранах хедер тоже правильный */
    body .header .header-content .nav-links {
        display: none !important;
        visibility: hidden !important;
    }
    
    body .header .header-content .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
    }
}