/* product.css – стили только для страницы выбора товара по размеру */

/* === Навигация по размерам (prev / next) === */
.size-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    text-decoration: none;
    color: var(--dark-blue, #2c3e50);
    z-index: 60;
    transition: 0.2s;
}
.size-nav-btn:hover {
    background: rgba(0,0,0,0.2);
}
.size-nav-btn.prev {
    left: 5px;
}
.size-nav-btn.next {
    right: 5px;
}
.size-nav-btn.disabled {
    opacity: 0.2;
    pointer-events: none;
}

/* === Карточки и сетка товаров === */
.product-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    flex: 1;
    padding-bottom: 10px;
    scrollbar-width: thin;
    justify-content: center;
}
.product-grid::-webkit-scrollbar {
    height: 6px;
}
.product-grid::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

.card {
    min-width: 280px;
    width: 280px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border, rgba(255,255,255,0.3));
    backdrop-filter: blur(4px);
    transition: 0.2s;
}
.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.5);
}
.card-img-wrapper {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    margin-bottom: 12px;
}
.card-img-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.card h3 {
    font-size: 22px;
    text-align: center;
    color: var(--dark-blue, #2c3e50);
    margin-bottom: 8px;
}
.card .description {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
}
.price-box {
    text-align: center;
    margin: 10px 0;
}
.price {
    font-size: 28px;
    font-weight: bold;
    color: #c0392b;
}
.qty-input {
    width: 100%;
    padding: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid var(--dark-blue, #2c3e50);
    border-radius: 12px;
    margin: 8px 0;
}
.buy-btn {
    width: 100%;
    padding: 14px;
    background: var(--dark-blue, #2c3e50);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.buy-btn:hover {
    opacity: 0.9;
    transform: scale(0.98);
}
.buy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === Специфичные кнопки на карточке === */
.card-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 10px;
    transition: 0.3s;
    width: 100%;
    height: 40px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}
.card-back-btn:hover {
    background: #e0e0e0;
}
.back-to-calc-in-card {
    width: 100%;
    height: 40px;
    font-size: 14px;
    margin-top: 8px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}
.back-to-calc-in-card:hover {
    background: #27ae60;
    transform: scale(1.02);
}
.discount-percent {
    font-size: 14px;
    font-weight: bold;
    color: #e67e22;
    margin-top: 5px;
}

/* === Адаптив для карточек и навигации (мобильные) === */
@media (max-width: 768px) {
    .size-nav-btn {
        width: 40px;
        height: 60px;
        font-size: 30px;
    }
    .card .description {
        min-height: 55px;
        font-size: 13px;
    }
    .card {
        min-width: 260px;
        width: 260px;
    }
    .product-grid {
        justify-content: flex-start !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        gap: 15px !important;
    }
    .product-grid .card {
        flex: 0 0 auto !important;
        scroll-snap-align: start !important;
    }
	

    .card {
        min-width: 240px;
        width: 240px;
    }
	body .container {
        position: fixed;
        top: 50px;  /* оставляем как есть, меню сверху */
        left: 0 !important;
        right: 0;
        bottom: 50px;  /* отступ от нижних кнопок 20px */
        width: 100% !important;
        transform: none ;
        border-radius: 0 !important;
        padding: 15px !important;
        overflow-y: visible;
        height: calc(100vh - 85px - 20px);  /* ← автоматический расчёт */
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
        mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
        opacity: 0.85;
    }
    
    .product-grid {
        padding-bottom: 20px;
    }
}