/**
 * Стили для кастомных сниппетов WooCommerce
 * 
 * @package IkeanadomChildTheme
 * @since 1.0.0
 */

/* ========================================================================
   ОБЩИЕ СТИЛИ
   ======================================================================== */

.ikeanadom-product-info {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.ikeanadom-product-info .delivery-info,
.ikeanadom-product-info .warranty-info {
    display: flex;
    align-items: center;
    margin: 8px 0;
    color: #333;
}

.ikeanadom-product-info i {
    margin-right: 8px;
    color: #007cba;
    width: 16px;
}

/* ========================================================================
   БЕЙДЖИ ТОВАРОВ
   ======================================================================== */

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}

.product-badge.new-badge {
    background: #28a745;
    color: white;
}

.product-badge.sale-badge {
    background: #dc3545;
    color: white;
}

/* ========================================================================
   БЫСТРЫЙ ПРОСМОТР
   ======================================================================== */

.quick-view-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.woocommerce-loop-product__link:hover .quick-view-wrapper {
    opacity: 1;
}

.quick-view-btn {
    background: rgba(0, 124, 186, 0.9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-view-btn:hover {
    background: #005a8b;
    transform: scale(1.05);
}

/* ========================================================================
   МОДАЛЬНЫЕ ОКНА
   ======================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    margin: 50px auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* ========================================================================
   КОРЗИНА
   ======================================================================== */

.cart-savings-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.savings-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.savings-content i {
    font-size: 20px;
    color: #28a745;
}

.delivery-progress-bar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.5s ease;
}

.cart-recommended-products {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.recommended-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.recommended-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recommended-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.recommended-item .product-title {
    display: block;
    margin: 10px 0 5px;
    font-size: 14px;
    font-weight: 500;
}

.recommended-item .product-price {
    color: #007cba;
    font-weight: bold;
}

/* ========================================================================
   КНОПКИ И ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ
   ======================================================================== */

.wishlist-btn {
    background: white;
    border: 2px solid #dee2e6;
    color: #6c757d;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    border-color: #dc3545;
    color: #dc3545;
}

.wishlist-btn.active i {
    color: #dc3545;
}

.quick-order-btn {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 15px 0;
}

.quick-order-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

/* ========================================================================
   ПРОКРУТКА НАВЕРХ
   ======================================================================== */

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007cba;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #005a8b;
    transform: translateY(-3px);
}

/* ========================================================================
   ХЛЕБНЫЕ КРОШКИ
   ======================================================================== */

.custom-breadcrumbs {
    margin: 20px 0;
    padding: 10px 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #007cba;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #6c757d;
}

/* ========================================================================
   УВЕДОМЛЕНИЯ (TOAST)
   ======================================================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #28a745;
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================================================
   ЗАГРУЗЧИК
   ======================================================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================================
   АДАПТИВНОСТЬ
   ======================================================================== */

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .breadcrumb-list {
        font-size: 14px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
} 