/**
 * Favori ve Karşılaştırma Butonları Stilleri
 */

/* Favori ve Karşılaştırma Butonları */
.favorite-btn, .compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.favorite-btn:hover, .compare-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    text-decoration: none;
}

.favorite-btn:disabled, .compare-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

/* Favori Butonu */
.favorite-btn i {
    font-size: 14px;
    transition: color 0.2s ease;
}

.favorite-btn.active {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.favorite-btn.active i {
    color: #dc2626;
}

.favorite-btn.active:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* Karşılaştırma Butonu */
.compare-btn i {
    font-size: 14px;
    transition: color 0.2s ease;
}

.compare-btn.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.compare-btn.active i {
    color: #2563eb;
}

.compare-btn.active:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

/* Header Z-Index Fix */
header.fixed-header {
    z-index: 1000 !important;
}

/* Sidebar Z-Index - Mobile */
@media (max-width: 1199px) {
    .custom-row .sidebar-col {
        z-index: 1100 !important;
    }
    
    .category-menu {
        z-index: 1100 !important;
    }
}

/* Grid Item Height Fix */
.row > div {
    display: flex;
    flex-direction: column;
}

/* Ürün Kartlarında Butonlar */
.product-box {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.product-box .product-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    max-width: 100%;
}

.product-box .product-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-box:hover .product-actions {
    opacity: 1;
}

.product-box .product-actions .favorite-btn,
.product-box .product-actions .compare-btn {
    padding: 6px 8px;
    font-size: 12px;
    min-width: auto;
    justify-content: center;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-box .product-actions .btn-text {
    display: none;
}

.product-box .product-actions i {
    font-size: 14px;
}

/* Modern Product Card için özel ayarlar */
.modern-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.modern-product-card .product-actions {
    z-index: 10 !important;
}

.modern-product-card .product-image {
    position: relative;
    z-index: 0;
    flex-shrink: 0;
}

.modern-product-card .product-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header Contact-Box Stilleri (Favori, Karşılaştırma, WhatsApp, Telefon) */
.contact-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-width: 140px;
}

.contact-box:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.contact-detail h6 {
    margin: 0;
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.2;
}

.contact-detail h5 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
}

/* Favori Kutusu - Kırmızı */
.favorites-box .contact-icon {
    background: #fef2f2;
    color: #dc2626;
}

.favorites-box:hover .contact-icon {
    background: #fee2e2;
}

.favorites-box .contact-icon i {
    font-size: 16px;
}

/* Karşılaştırma Kutusu - Mavi */
.compare-box .contact-icon {
    background: #eff6ff;
    color: #2563eb;
}

.compare-box:hover .contact-icon {
    background: #dbeafe;
}

.compare-box .contact-icon i {
    font-size: 16px;
}

/* Telefon Kutusu - Yeşil */
.phone-contact .contact-icon {
    background: #d1fae5;
    color: #059669;
}

.phone-contact:hover .contact-icon {
    background: #a7f3d0;
}

.phone-contact .contact-icon svg,
.phone-contact .contact-icon i {
    width: 16px;
    height: 16px;
}

/* İletişim Kutusu - Turuncu */
.contact-link-box .contact-icon {
    background: #ffedd5;
    color: #ea580c;
}

.contact-link-box:hover .contact-icon {
    background: #fed7aa;
}


/* Header Sayaçları */
.header-counters {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-counter {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.header-counter:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    text-decoration: none;
}

.header-counter .counter-badge {
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 0;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header-counter.favorites .counter-badge {
    background: #dc2626;
}

.header-counter.compare .counter-badge {
    background: #2563eb;
}

/* Bildirimler */
.favorites-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.favorites-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-notification i {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-box,
    .modern-product-card {
        overflow: visible;
        display: flex;
        flex-direction: column;
    }

    .product-box .product-image {
        flex-shrink: 0;
        order: 1;
    }

    .product-box .product-detail {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        order: 2;
    }

    .product-box .product-actions {
        position: static;
        opacity: 1;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 8px;
        padding: 0;
        background: transparent;
        border-radius: 0;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
        order: 3;
    }
    
    .product-box .product-actions .btn-text {
        display: none;
    }

    .product-box .product-actions .favorite-btn,
    .product-box .product-actions .compare-btn {
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        padding: 8px;
        font-size: 12px;
        flex: 1;
        justify-content: center;
        min-width: 0;
        max-width: calc(50% - 3px);
        border-radius: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
    }

    .product-box .product-actions .favorite-btn i,
    .product-box .product-actions .compare-btn i {
        font-size: 14px;
        margin: 0;
    }
    
    .header-counter {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .header-counter .btn-text {
        display: none;
    }

    .contact-box {
        min-width: 80px;
        padding: 6px 8px;
    }

    .contact-icon {
        width: 28px;
        height: 28px;
    }

    .contact-icon i {
        font-size: 14px;
    }

    .contact-detail h6 {
        font-size: 9px;
        white-space: nowrap;
    }

    .contact-detail h5 {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Keep only first 3 boxes on mobile (favorites, compare, phone) */
    .right-side-menu .right-side:nth-child(4) {
        display: none;
    }
    
    .right-side-menu {
        gap: 4px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .product-box .product-actions {
        padding: 0;
        gap: 4px;
        margin-top: 6px;
    }

    .product-box .product-actions .favorite-btn,
    .product-box .product-actions .compare-btn {
        padding: 6px;
        font-size: 11px;
        max-width: calc(50% - 2px);
        white-space: nowrap;
        overflow: hidden;
        box-sizing: border-box;
    }

    .product-box .product-actions .btn-text {
        display: none;
    }

    .product-box .product-actions .favorite-btn i,
    .product-box .product-actions .compare-btn i {
        font-size: 13px;
        margin: 0;
    }

    .contact-box {
        min-width: 70px;
        padding: 4px 6px;
    }

    .contact-icon {
        width: 26px;
        height: 26px;
    }

    .contact-icon i,
    .contact-icon svg {
        width: 13px;
        height: 13px;
        font-size: 13px;
    }

    .contact-detail h6 {
        font-size: 8px;
    }

    .contact-detail h5 {
        font-size: 10px;
        font-weight: 700;
    }

    /* Simplify contact boxes on very small screens */
    .favorites-box .contact-detail h5::before {
        content: "";
    }

    .compare-box .contact-detail h5::before {
        content: "";
    }

    .header-counter {
        padding: 5px 8px;
        font-size: 12px;
        gap: 4px;
    }

    .header-counter .counter-badge {
        font-size: 9px;
        padding: 0;
        width: 16px;
        height: 16px;
        min-width: 16px;
        max-width: 16px;
    }

    .mobile-nav-links .badge {
        width: 18px;
        height: 18px;
        min-width: 18px;
        max-width: 18px;
        font-size: 9px;
    }
}

/* Ürün Detay Sayfası Butonları */
.favorite-btn-detail, .compare-btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: white;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 36px;
    height: 36px;
}

.favorite-btn-detail:hover, .compare-btn-detail:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    text-decoration: none;
    transform: scale(1.1);
}

.favorite-btn-detail.active {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.favorite-btn-detail.active:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.compare-btn-detail.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.compare-btn-detail.active:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.product-detail-actions .favorite-btn,
.product-detail-actions .compare-btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
}

/* Karşılaştırma Sayfası */
.compare-page {
    padding: 20px 0;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.compare-table th,
.compare-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.compare-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.compare-table .product-cell {
    text-align: center;
    vertical-align: top;
}

.compare-table .product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto 8px;
}

.compare-table .product-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.compare-table .product-price {
    color: #dc2626;
    font-weight: 600;
    font-size: 16px;
}

/* Favori Listesi */
.favorites-page {
    padding: 20px 0;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.favorites-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.favorites-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.favorites-item .product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.favorites-item .product-info {
    padding: 16px;
}

.favorites-item .product-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.favorites-item .product-price {
    color: #dc2626;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 12px;
}

.favorites-item .product-actions {
    display: flex;
    gap: 8px;
}

.favorites-item .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.favorites-item,
.compare-table {
    animation: fadeInUp 0.3s ease;
}

/* Modal Styles */
.favorites-modal-overlay,
.compare-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.favorites-modal-content,
.compare-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.favorites-modal-content .favorites-grid {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.compare-table-container {
    padding: 24px;
    max-height: 70vh;
    overflow: auto;
}

.compare-table {
    width: 100%;
    min-width: 600px;
}

/* SweetAlert2 Custom Styles */
.compare-popup {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.compare-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.compare-product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.compare-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.compare-product-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.compare-product-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.compare-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #6262a6;
    margin-bottom: 10px;
}

.compare-table-container {
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.compare-table th {
    background: #f9fafb;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    min-width: 150px;
}

.compare-table td {
    padding: 12px;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}

.compare-table tr:hover {
    background: #f9fafb;
}

.compare-table .btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare-table .btn-primary {
    background: #6262a6;
    color: white;
}

.compare-table .btn-primary:hover {
    background: #4a4a8a;
}

.compare-table .btn-danger {
    background: #dc2626;
    color: white;
}

.compare-table .btn-danger:hover {
    background: #b91c1c;
}

/* Mobile Menu Styles for Favorites and Compare */
.mobile-bottom-section {
    background: #f9fafb;
    padding: 16px 12px;
    margin: 0 -12px;
    border-radius: 16px 16px 0 0;
}

.mobile-currency-selector {
    background: transparent;
    padding: 0;
}

.mobile-currency-selector h6 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-left: 8px;
}

.mobile-currency-selector .currency-btn {
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
}

.mobile-bottom-section .mobile-nav-links {
    margin-bottom: 16px;
}

.mobile-navigation h6 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-left: 8px;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin-bottom: 4px;
}

.mobile-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #374151;
}

.mobile-nav-link:hover {
    background: #f3f4f6;
    text-decoration: none;
    color: #374151;
}

.mobile-nav-link .mobile-nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-nav-link:hover .mobile-nav-icon {
    transform: scale(1.05);
}

.mobile-nav-link span {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-links .badge {
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    line-height: 1;
}

.mobile-nav-links .compare-count-text.badge {
    background: #2563eb;
}

.mobile-nav-links .favorites-count-text.badge {
    background: #dc2626;
}

/* WhatsApp Floating Action Button */
.whatsapp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1050;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-fab:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

.whatsapp-fab svg {
    width: 32px;
    height: 32px;
}

/* WhatsApp FAB Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

.whatsapp-fab {
    animation: pulse 2s infinite;
}

.whatsapp-fab:hover {
    animation: none;
}

/* Responsive FAB */
@media (max-width: 768px) {
    .whatsapp-fab {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .whatsapp-fab svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .whatsapp-fab {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .whatsapp-fab svg {
        width: 26px;
        height: 26px;
    }
}


/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .favorite-btn, .compare-btn {
        background: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }
    
    .favorite-btn:hover, .compare-btn:hover {
        background: #4b5563;
        border-color: #6b7280;
        color: #f3f4f6;
    }
    
    .header-counter {
        background: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }
    
    .header-counter:hover {
        background: #4b5563;
        border-color: #6b7280;
        color: #f3f4f6;
    }

    .favorites-modal-content,
    .compare-modal-content {
        background: #374151;
        color: #f3f4f6;
    }

    .modal-header {
        background: #4b5563;
        border-color: #6b7280;
    }

    .modal-header h3 {
        color: #f3f4f6;
    }

    .compare-table th {
        background: #4b5563;
        color: #f3f4f6;
        border-color: #6b7280;
    }

    .compare-table td {
        border-color: #6b7280;
        color: #d1d5db;
    }
}
