/* KKTC Smart Recommendations - Frontend Styles */

/* İlgili Ürünler Shortcode Styles */
.kktc-related-products {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    clear: both;
}

.kktc-related-products h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Product Grid Styles */
.kktc-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.kktc-product-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kktc-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kktc-product-image {
    margin-bottom: 10px;
}

.kktc-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.kktc-product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 5px 0;
    color: #333;
}

.kktc-product-title a {
    color: #333;
    text-decoration: none;
}

.kktc-product-title a:hover {
    color: #0073aa;
}

.kktc-product-price {
    font-size: 16px;
    font-weight: bold;
    color: #27ae60;
    margin: 5px 0;
}

.kktc-product-rating {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.kktc-sales-info {
    margin: 5px 0;
    font-size: 12px;
    color: #e65100;
    font-weight: 600;
}

/* Carousel Styles */
.kktc-products-carousel {
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.kktc-carousel-container {
    position: relative;
}

.kktc-carousel-wrapper {
    overflow: hidden;
}

.kktc-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
}

.kktc-carousel-slide {
    flex: 0 0 auto;
    padding: 0 10px;
}

.kktc-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.kktc-carousel-nav:hover {
    background: rgba(0,0,0,0.9);
}

.kktc-carousel-nav.prev {
    left: 10px;
}

.kktc-carousel-nav.next {
    right: 10px;
}

.kktc-carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Pagination */
.kktc-carousel-pagination {
    text-align: center;
    margin-top: 15px;
}

.kktc-pagination-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.kktc-pagination-dot.active {
    background: #0073aa;
}

/* No Results Message */
.kktc-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Loading State */
.kktc-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.kktc-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: kktc-spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error State */
.kktc-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

/* Brand Page Styles */
.kktc-brand-products {
    margin: 20px 0;
}

.kktc-brand-header {
    text-align: center;
    margin-bottom: 30px;
}

.kktc-brand-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
}

.kktc-brand-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Styles */
.kktc-filters {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
}

.kktc-filter-group {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.kktc-filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.kktc-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Load More Button */
.kktc-load-more {
    text-align: center;
    margin: 30px 0;
}

.kktc-load-more-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.kktc-load-more-btn:hover {
    background: #005177;
}

.kktc-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kktc-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .kktc-related-products {
        padding: 15px;
        margin: 15px 0;
    }
    
    .kktc-carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .kktc-filters {
        padding: 15px;
    }
    
    .kktc-filter-group {
        display: block;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .kktc-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .kktc-product-item {
        padding: 10px;
    }
    
    .kktc-product-title {
        font-size: 12px;
    }
    
    .kktc-product-price {
        font-size: 14px;
    }
    
    .kktc-carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .kktc-carousel-nav.prev {
        left: 5px;
    }
    
    .kktc-carousel-nav.next {
        right: 5px;
    }
}

/* Accessibility */
.kktc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.kktc-product-item:focus,
.kktc-carousel-nav:focus,
.kktc-pagination-dot:focus,
.kktc-load-more-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
/* Trending Products Styles */
.kktc-trending-products {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4f8 100%);
    border-radius: 12px;
    border: 2px solid #e1f5fe;
    position: relative;
}

.kktc-trending-products h3 {
    margin: 0 0 20px 0;
    color: #0277bd;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kktc-trending-products .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0;
}

.trending-product {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.trending-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.trending-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
    animation: pulse 2s infinite;
}

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

.trend-info {
    background: #f0f8ff;
    color: #0277bd;
    padding: 4px 8px;
    font-size: 11px;
    text-align: center;
    border-top: 1px solid #e1f5fe;
    margin-top: 5px;
}

/* Bestselling Products Styles */
.kktc-bestselling-products {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-radius: 12px;
    border: 2px solid #ffcc02;
    position: relative;
}

.kktc-bestselling-products h3 {
    margin: 0 0 20px 0;
    color: #e65100;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kktc-bestselling-products .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0;
}

.kktc-bestselling-products .product {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.kktc-bestselling-products .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(230, 81, 0, 0.2);
}

.kktc-bestselling-products .product::before {
    content: "💰 EN ÇOK SATAN";
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #ffcc02, #ffc107);
    color: #e65100;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .kktc-trending-products .products,
    .kktc-bestselling-products .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .kktc-trending-products,
    .kktc-bestselling-products {
        padding: 15px;
        margin: 15px 0;
    }
    
    .trending-badge,
    .kktc-bestselling-products .product::before {
        font-size: 9px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .kktc-trending-products .products,
    .kktc-bestselling-products .products {
        grid-template-columns: 1fr;
    }
}

@media print {
    .kktc-carousel-nav,
    .kktc-pagination-dot,
    .kktc-load-more-btn {
        display: none;
    }
    
    .kktc-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-badge,
    .kktc-bestselling-products .product::before {
        display: none;
    }
}