/* 
ПРИМІТКА: Стилі карток товарів перенесено до catalog.css для уникнення дублікатів.
Цей файл залишено для можливих майбутніх специфічних стилів продуктів.

Основні стилі карток товарів тепер знаходяться в:
- static/css/catalog.css (секція КАРТКА ТОВАРУ)

Якщо потрібно додати специфічні стилі для окремих сторінок продуктів,
які не стосуються каталогу, додавайте їх тут.
*/

/* Стилі для сторінок товарів (products) - РЕЗЕРВ */
/* Можна використовувати для специфічних стилів детальної сторінки товару */

/* Детальна сторінка товару */
.product-detail {
    margin: 40px 0;
}

/* Схожі товари */
.similar-products {
    margin: 60px 0;
}

.similar-products .section-title {
    margin-bottom: 30px;
}

.similar-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .similar-products {
        margin: 40px 0;
    }
    
    .similar-products .section-title {
        margin-bottom: 20px;
        font-size: 1.5rem;
    }
    
    .similar-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .similar-products .product-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .similar-products {
        margin: 30px 0;
    }
    
    .similar-products .products-grid {
        gap: 10px;
    }
    
    .similar-products .product-card {
        max-width: 100%;
    }
}

.similar-product .product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-gallery {
    position: relative;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #ccc;
    background: #f8f9fa;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.thumbnail:hover {
    border-color: #e91e63;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #e91e63;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.2);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

.product-sku {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: #e91e63;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-detail-price .price-current {
    color: #e91e63;
}

.product-detail-price .price-old {
    font-size: 1.2rem;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
}

.product-detail-price .price-wholesale-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
}

.price-tiers {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.price-tiers h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.price-tiers ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-tiers li {
    font-size: 0.95rem;
    color: #666;
    padding: 8px 0;
}

.tier-price-sale {
    color: #e91e63;
    font-weight: 600;
    font-size: 1.05rem;
}

.tier-price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-left: 8px;
}

.product-card__price-old {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.quantity-btn {
    width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: none;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
}

.quantity-btn:hover {
    background: #e91e63;
    color: #fff;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    background: #fff;
    outline: none;
    -webkit-appearance: textfield;
    appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart {
    flex: 1;
    min-width: 180px;
    height: 44px;
    padding: 0 24px;
    background: linear-gradient(135deg, #e91e63 0%, #f06292 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #c2185b 0%, #e91e63 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-wishlist {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.5rem;
    color: #e91e63;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.btn-wishlist:hover {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
    transform: scale(1.1);
}

.btn-wishlist:active {
    transform: scale(0.95);
}

.btn-wishlist.animate-heart {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.2);
    }
}

.product-stock {
    font-size: 0.95rem;
    margin: 15px 0;
}

.stock-available {
    color: #27ae60;
    font-weight: 500;
}

.stock-unavailable {
    color: #e74c3c;
    font-weight: 500;
}

.product-category-link {
    margin: 20px 0;
}

.btn-back-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back-category svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-back-category:hover {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
    transform: translateX(-4px);
}

.btn-back-category:hover svg {
    transform: translateX(-2px);
}


.attribute-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.attribute-name {
    font-weight: 600;
    color: #333;
    width: 150px;
    flex-shrink: 0;
}

.attribute-value {
    color: #666;
}

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

.product-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
}

.product-tab-btn {
    padding: 15px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
    -webkit-appearance: none;
    appearance: none;
}

.product-tab-btn:hover {
    color: #e91e63;
    background: #fafafa;
}

.product-tab-btn.active {
    color: #e91e63;
    border-bottom-color: #e91e63;
    font-weight: 600;
    background: #fff;
}

.product-tabs-content {
    padding: 30px 0;
}

.product-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.product-tab-panel.active {
    display: block;
}

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

.product-tab-panel .product-description {
    line-height: 1.8;
    color: #666;
    font-size: 1rem;
}

.product-tab-panel .product-attributes {
    max-width: 800px;
}

.product-tab-panel .empty-state-text {
    color: #999;
    font-style: italic;
    padding: 20px 0;
}

/* Адаптивність для детальної сторінки */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        margin: 20px 0;
    }
    
    .product-detail-grid {
        gap: 20px;
    }
    
    .product-info h1 {
        font-size: 1.5rem;
    }
    
    .product-detail-price {
        font-size: 1.5rem;
    }
    
    .product-detail-actions {
        gap: 8px;
    }
    
    .quantity-selector {
        width: auto;
        max-width: fit-content;
        border-radius: 6px;
    }
    
    .quantity-btn {
        width: 36px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .quantity-input {
        width: 50px;
        height: 40px;
        font-size: 0.95rem;
    }
    
    .btn-add-cart {
        flex: 1;
        min-width: 0;
        height: 40px;
        font-size: 0.9rem;
        padding: 0 16px;
        border-radius: 6px;
    }
    
    .btn-wishlist {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .btn-back-category {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .btn-back-category svg {
        width: 14px;
        height: 14px;
    }
    
    .product-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .product-tabs {
        margin: 30px 0;
    }
    
    .product-tabs-nav {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .product-tab-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .product-tabs-content {
        padding: 20px 0;
    }
    
    .attribute-name {
        width: 120px;
        font-size: 0.9rem;
    }
    
    .attribute-value {
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .product-detail-actions {
        gap: 10px;
    }
    
    .btn-add-cart {
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .product-detail-actions {
        gap: 6px;
    }
    
    .quantity-selector {
        border-width: 1.5px;
    }
    
    .quantity-btn {
        width: 34px;
        height: 38px;
    }
    
    .quantity-input {
        width: 45px;
        height: 38px;
    }
    
    .btn-add-cart {
        height: 38px;
        font-size: 0.85rem;
    }
    
    .btn-wishlist {
        width: 38px;
        height: 38px;
    }
    
    .product-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .product-tab-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .btn-back-category span {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-success {
    border-left: 4px solid #27ae60;
}

.notification-success .notification-icon {
    color: #27ae60;
}

.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification-error .notification-icon {
    color: #e74c3c;
}

.notification-content span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

@media (max-width: 768px) {
    .notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        top: 80px;
    }
}

@supports (-webkit-touch-callout: none) {
    .quantity-btn,
    .btn-add-cart,
    .btn-wishlist,
    .product-tab-btn,
    .thumbnail,
    .btn-back-category {
        -webkit-tap-highlight-color: transparent;
    }
    
    .quantity-btn:active,
    .btn-add-cart:active,
    .btn-wishlist:active,
    .btn-back-category:active {
        opacity: 0.8;
    }
    
    .quantity-selector {
        border-width: 1.5px;
    }
    
    .thumbnail:active {
        transform: scale(0.95);
    }
    
    .product-tab-btn:active {
        background: #f0f0f0;
    }
}