/* =======================================
   БАЗОВЫЕ НАСТРОЙКИ
   ======================================= */
:root {
    --primary-color: #ffdb4d;
    --bg-color: #f8f9fa;
    --text-color: #333;
}

body { 
    font-family: -apple-system, system-ui, sans-serif; 
    background: var(--bg-color); 
    margin: 0; 
    color: var(--text-color); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
}

/* =======================================
   ШАПКА
   ======================================= */
header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { font-size: 24px; font-weight: 900; text-decoration: none; color: #000; display: flex; align-items: center; }
.logo span { background: var(--primary-color); padding: 2px 8px; border-radius: 6px; margin-left: 5px; }
.nav-links { display: flex; align-items: center; }
.nav-links a { text-decoration: none; color: #666; margin-left: 20px; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: #000; }

/* =======================================
   ПОДВАЛ
   ======================================= */
footer { background: #1a1a1a; color: #fff; padding: 60px 40px; z-index: 10; margin-top: auto; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-section h4 { margin-bottom: 20px; color: var(--primary-color); }
.footer-section p, .footer-section a { color: #ccc; text-decoration: none; font-size: 14px; line-height: 1.8; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #333; font-size: 12px; color: #666; }

.footer-disclaimer {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 20px;
    border-top: 1px solid #333;
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}
.footer-disclaimer b { color: #aaa; }

/* =======================================
   ХЛЕБНЫЕ КРОШКИ
   ======================================= */
.breadcrumbs {
    max-width: 1100px;
    margin: 25px auto 0;
    padding: 0 20px;
    font-size: 14px;
    color: #888;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.breadcrumbs a { color: #666; text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--primary-color); }
.breadcrumbs .separator { color: #ccc; font-size: 13px; }
.breadcrumbs .current { color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }

/* =======================================
   КАРТОЧКА ТОВАРА
   ======================================= */
.product-page-container { 
    max-width: 1100px; 
    margin: 30px auto; 
    background: white; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    display: flex; 
    flex-wrap: wrap; 
    overflow: hidden; 
}

.gallery { flex: 1; min-width: 350px; padding: 30px; background: #fff; box-sizing: border-box; }

/* --- СВАЙП-СЛАЙДЕР В КАРТОЧКЕ --- */
.main-photo-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 12px;
    margin-bottom: 15px;
    background: #fff;
}
.main-photo-slider::-webkit-scrollbar { display: none; }
.slide-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-item img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    cursor: zoom-in;
}

.thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.thumb { width: 70px; height: 70px; border-radius: 8px; cursor: pointer; object-fit: cover; border: 2px solid transparent; transition: 0.2s; flex-shrink: 0; }
.thumb.active { border-color: var(--primary-color); box-shadow: 0 0 8px rgba(255, 219, 77, 0.5); }

.info { flex: 1; min-width: 350px; padding: 40px; border-left: 1px solid #f0f0f0; box-sizing: border-box; }
.info h1 { margin-top: 0; font-size: 28px; }
.price { font-size: 36px; font-weight: 800; color: #000; margin-bottom: 25px; }

.description { line-height: 1.7; color: #555; margin-bottom: 30px; font-size: 15px; border-top: 1px solid #eee; padding-top: 25px; }
.loader-wrap { padding: 100px; text-align: center; color: #999; width: 100%; }

/* =======================================
   КНОПКИ ДЕЙСТВИЙ
   ======================================= */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center; 
}

.buy-btn { 
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color); 
    color: #000; 
    text-decoration: none; 
    padding: 20px; 
    border-radius: 12px; 
    font-weight: bold; 
    font-size: 18px; 
    transition: all 0.2s ease; 
    box-shadow: 0 4px 0 #e2c13a; 
    flex: 1; 
    height: 60px; 
    box-sizing: border-box;
    margin-bottom: 0 !important; 
}
.buy-btn:hover { background: #ffd200; transform: translateY(-2px); }
.buy-btn:active { transform: translateY(2px); box-shadow: none; }

.fav-btn-icon {
    width: 60px; 
    height: 60px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.fav-btn-icon .heart-icon { font-size: 26px; line-height: 1; transition: transform 0.2s ease; }
.fav-btn-icon:hover { border-color: #bbb; background-color: #f9f9f9; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.fav-btn-icon:hover .heart-icon { transform: scale(1.1); }
.fav-btn-icon.active { background-color: #fff0f0; border-color: #ff4d4d; box-shadow: 0 2px 8px rgba(255, 77, 77, 0.15); }
.fav-btn-icon.active:hover { box-shadow: 0 5px 20px rgba(255, 77, 77, 0.25); background-color: #ffe5e5; }

/* =======================================
   БЛОК РАЗМЕРОВ
   ======================================= */
.size-highlight-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    background: #fff9e6;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ffdb4d;
    justify-content: space-around;
}

.size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.size-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.size-value { font-size: 20px; font-weight: 800; color: #333; }

/* =======================================
   КРАСИВЫЕ ХАРАКТЕРИСТИКИ
   ======================================= */
.specs-list { margin-top: 15px; width: 100%; }
.specs-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.4;
}
.specs-key {
    flex: 1;
    color: #777;
    position: relative;
    overflow: hidden;
    margin-right: 8px;
}
.specs-key::after {
    content: " ....................................................................................................................................";
    position: absolute;
    color: #ccc;
    letter-spacing: 2px;
    padding-left: 5px;
}
.specs-key span { background: #fff; position: relative; z-index: 1; padding-right: 5px; }
.specs-value { 
    font-weight: 600; 
    color: #333; 
    text-align: right; 
    max-width: 60%; 
    background: #fff; 
    position: relative; 
    z-index: 1; 
    padding-left: 5px;
}

/* =======================================
   МОДАЛЬНОЕ ОКНО (FULLSCREEN PHOTO)
   ======================================= */
.photo-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
    touch-action: pan-y; /* Для свайпа */
}
.photo-modal.active { display: flex; opacity: 1; }
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}
.photo-modal.active .modal-content { transform: scale(1); }
.close-modal { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }
.modal-nav {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1);
    color: white; border: none; font-size: 40px; padding: 20px; cursor: pointer; transition: 0.3s; user-select: none; border-radius: 5px;
}
.modal-nav:hover { background: rgba(255, 255, 255, 0.2); }
.modal-nav.prev { left: 20px; }
.modal-nav.next { right: 20px; }
.modal-counter { position: absolute; bottom: 20px; color: white; font-size: 14px; background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 20px; }
.photo-modal.single-photo .modal-nav { display: none; }

/* =======================================
   МОБИЛЬНАЯ ВЕРСИЯ (АДАПТИВНОСТЬ)
   ======================================= */
@media (max-width: 800px) { 
    /* Шапка и Крошки */
    header { padding: 15px; flex-direction: column; gap: 15px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .nav-links a { margin-left: 0; }
    .breadcrumbs { margin-top: 15px; padding: 0 15px; font-size: 13px; }
    .breadcrumbs .current { max-width: 150px; }

    /* Общий контейнер товара */
    .product-page-container { flex-direction: column; margin: 0; border-radius: 0; box-shadow: none; width: 100%; max-width: 100vw; overflow: hidden; } 
    
    /* Галерея */
    .gallery { padding: 15px; width: 100%; box-sizing: border-box; overflow: hidden; }
    .slide-item img { max-height: 350px; }
    .thumbnails { padding-bottom: 15px; width: 100%; }
    
    /* Инфо-блок */
    .info { border-left: none; padding: 20px 15px; width: 100%; box-sizing: border-box; overflow: hidden; } 
    .info h1 { font-size: 22px; margin-bottom: 15px; line-height: 1.3; word-wrap: break-word; }
    .price { font-size: 28px; margin-bottom: 20px; }
    
    /* Кнопки */
    .action-buttons { gap: 10px; }
    .buy-btn { padding: 16px; font-size: 16px; height: 55px; }
    .fav-btn-icon { width: 55px; height: 55px; }
    .fav-btn-icon .heart-icon { font-size: 22px; }
    
    /* Описание и характеристики */
    .description { font-size: 14px; padding-top: 20px; word-wrap: break-word; }
    .specs-row { flex-direction: column; margin-bottom: 12px; align-items: flex-start; }
    .specs-key::after { display: none; }
    .specs-value { text-align: left; max-width: 100%; padding-left: 0; color: #000; margin-top: 2px; }

    /* Подвал */
    footer { padding: 40px 20px; width: 100%; box-sizing: border-box; overflow: hidden; }
    .footer-content { text-align: center; gap: 30px; }
    .footer-disclaimer { padding: 20px 10px; text-align: center; }
}

@media (max-width: 480px) {
    /* Дополнительная адаптивность для габаритов на самых маленьких экранах */
    .size-highlight-box {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        padding-left: 40px;
    }
    .size-item {
        align-items: flex-start;
    }
}