/* Modern WooCommerce Tasarım ve Animasyonlar */

/* ============================================
   Toast Bildirimleri
   ============================================ */
.modern-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    z-index: 999999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modern-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.modern-toast .toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.modern-toast-success {
    border-left: 4px solid #4CAF50;
}

.modern-toast-success .toast-icon {
    color: #4CAF50;
}

.modern-toast-error {
    border-left: 4px solid #f44336;
}

.modern-toast-error .toast-icon {
    color: #f44336;
}

.modern-toast-warning {
    border-left: 4px solid #ff9800;
}

.modern-toast-warning .toast-icon {
    color: #ff9800;
}

.modern-toast-info {
    border-left: 4px solid #2196F3;
}

.modern-toast-info .toast-icon {
    color: #2196F3;
}

.modern-toast .toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-family: 'Lovelace-Light', sans-serif;
}

.modern-toast .toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.modern-toast .toast-close:hover {
    color: #333;
}

/* ============================================
   Loading Animasyonları
   ============================================ */
.btn-loader {
    display: inline-block;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

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

button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

/* ============================================
   Sepet Badge
   ============================================ */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #79651f;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    font-family: 'EB Garamond', serif;
    box-shadow: 0 2px 8px rgba(121, 101, 31, 0.4);
    animation: fadeIn 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.cart-badge.bounce {
    animation: bounce 0.6s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

.user_ul li {
    position: relative;
}

/* ============================================
   Buton Animasyonları
   ============================================ */
.add_to_cart_button,
.single_add_to_cart_button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.add_to_cart_button::before,
.single_add_to_cart_button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add_to_cart_button:hover::before,
.single_add_to_cart_button:hover::before {
    width: 300px;
    height: 300px;
}

.add_to_cart_button.added {
    background: #4CAF50 !important;
    transform: scale(1.05);
}

.add_to_cart_button.added::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
}

/* ============================================
   "Sepeti Görüntüle" Butonu (Ürün Detay & Liste)
   ============================================ */
a.added_to_cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #000;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'EB Garamond', serif;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

a.added_to_cart:hover {
    background-color: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Mobilde butonun konumu */
@media (max-width: 768px) {
    a.added_to_cart {
        display: flex;
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}

/* ============================================
   Mini Cart İyileştirmeleri
   ============================================ */
.custom_cart {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mini_cart_item {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(214, 214, 211, 0.3);
    padding: 15px 0;
    position: relative;
}

.mini_cart_item.fade-in {
    opacity: 1;
    transform: translateX(0);
}

.mini_cart_item.removing {
    opacity: 0.5;
    pointer-events: none;
}

.mini_cart_item:hover {
    background: rgba(188, 187, 170, 0.05);
}

.mini_cart_item .remove {
    transition: all 0.3s ease;
    opacity: 0.6;
}

.mini_cart_item .remove:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* ============================================
   Miktar Butonları (Modern)
   ============================================ */
.quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d6d6d3;
    border-radius: 8px;
    padding: 5px;
    background: #fff;
    margin-top: 15px;
}

.qty-btn {
    background: #bcbbaa;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.qty-btn:hover {
    background: #79651f;
    transform: scale(1.1);
}

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

.quantity .qty {
    border: none;
    text-align: center;
    width: 50px;
    font-size: 16px;
    font-weight: bold;
    font-family: 'EB Garamond', serif;
    background: transparent;
}

.quantity .qty:focus {
    outline: none;
}

/* ============================================
   Hızlı Görünüm Modal
   ============================================ */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-view-modal.show {
    opacity: 1;
    visibility: visible;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.quick-view-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #fff;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.quick-view-modal.show .quick-view-content {
    transform: translate(-50%, -50%) scale(1);
}

.quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f44336;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.quick-view-close:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

.quick-view-loader {
    text-align: center;
    padding: 60px 20px;
    color: #79651f;
}

.quick-view-loader i {
    font-size: 48px;
    margin-bottom: 20px;
}

/* ============================================
   Ürün Hover Efektleri
   ============================================ */
.product {
    position: relative;
    transition: all 0.3s ease;
}

.product:hover {
    transform: translateY(-5px);
}
/* Ürün detay sayfasında box shadow ve transform kaldırıldı */
.woocommerce div.product:hover {
    box-shadow: none !important;
    transform: none !important;
}

.product-actions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.quick-view-btn,
.wishlist-btn {
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.quick-view-btn:hover,
.wishlist-btn:hover {
    background: #79651f;
    color: #fff;
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: #f44336;
    color: #fff;
}

/* ============================================
   Scroll Header Animasyonu
   ============================================ */
.hover_header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover_header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hover_header.hide-header {
    transform: none !important;
}

/* ============================================
   Empty Cart Mesajı
   ============================================ */
.empty-cart-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-cart-message i {
    font-size: 64px;
    color: #d6d6d3;
    margin-bottom: 20px;
}

.empty-cart-message p {
    font-size: 18px;
    font-family: 'Lovelace-Light', serif;
    margin-bottom: 20px;
}

.empty-cart-message .btn-shop {
    display: inline-block;
    padding: 12px 30px;
    background: #bcbbaa;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'BatuAndBata', sans-serif;
}

.empty-cart-message .btn-shop:hover {
    background: #79651f;
    transform: scale(1.05);
}

/* ============================================
   Lazy Loading Images
   ============================================ */
img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded {
    opacity: 1;
}

/* ============================================
   Checkout İyileştirmeleri
   ============================================ */
.woocommerce-checkout .form-row {
    margin-bottom: 20px;
    position: relative;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
    transition: all 0.3s ease;
    border: 2px solid #d6d6d3;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
    border-color: #79651f;
    box-shadow: 0 0 0 3px rgba(121, 101, 31, 0.1);
}

/* ============================================
   Loading Overlay
   ============================================ */
body.cart-updating::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

/* ============================================
   Progress Bar (Sepet/Checkout)
   ============================================ */
.cart-progress {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.cart-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #d6d6d3;
    z-index: 0;
}

.cart-progress-step {
    position: relative;
    text-align: center;
    flex: 1;
    z-index: 1;
}

.cart-progress-step.active .step-circle {
    background: #79651f;
    color: #fff;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #d6d6d3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .modern-toast {
        min-width: auto;
        left: 20px;
        right: 20px;
    }
    
    .quick-view-content {
        width: 95%;
        padding: 20px;
    }
    
    .product-actions {
        opacity: 1;
        transform: translateY(0);
    }
    
    .hover_header.hide-header {
        transform: none;
    }
}

@media (max-width: 992px) {
    .hover_header.hide-header { transform: none; }
}

/* ============================================
   Özel Animasyonlar
   ============================================ */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 1s ease infinite;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
