/**
 * KY Ürün Yönetimi - Frontend Stilleri
 */

/* CSS Değişkenleri */
:root {
    --kyuy-primary: #25D366;
    --kyuy-primary-dark: #128C7E;
    --kyuy-text: #1a1a1a;
    --kyuy-text-light: #6c757d;
    --kyuy-bg: #ffffff;
    --kyuy-border: #e5e5e5;
    --kyuy-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --kyuy-radius: 12px;
}

/* Kategori Filtresi - Tema Çakışması Önleme */
.kyuy-category-filter {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 0 0 40px 0 !important;
    padding: 30px 20px !important;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid #eaeaea !important;
    border-bottom: 1px solid #eaeaea !important;
    box-shadow: none !important;
}

.kyuy-category-filter .kyuy-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 14px 28px !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #444444 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    min-height: auto !important;
    height: auto !important;
}

.kyuy-category-filter .kyuy-filter-btn:hover {
    background: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
    color: #1a365d !important;
    box-shadow: none !important;
}

.kyuy-category-filter .kyuy-filter-btn.active {
    background: #1a365d !important;
    border-color: #1a365d !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3) !important;
}

.kyuy-category-filter .kyuy-filter-btn.active:hover {
    background: #15294a !important;
    border-color: #15294a !important;
    color: #ffffff !important;
}

.kyuy-category-filter .kyuy-filter-btn.active .kyuy-filter-count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.kyuy-category-filter .kyuy-filter-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    background: #f0f0f0 !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #777777 !important;
    line-height: 1 !important;
}

/* Products Wrapper */
.kyuy-products-wrapper {
    position: relative;
}

.kyuy-products.kyuy-loading-fade {
    opacity: 0.5;
    pointer-events: none;
}

.kyuy-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.kyuy-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--kyuy-primary);
    border-radius: 50%;
    animation: kyuy-spin 0.8s linear infinite;
}

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

/* Ürün Grid */
.kyuy-products {
    display: grid;
    gap: 30px;
    margin: 30px 0;
    align-items: start;
}

.kyuy-columns-1 {
    grid-template-columns: 1fr;
    max-width: 500px;
}

.kyuy-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.kyuy-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.kyuy-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Temel Kart Stilleri */
.kyuy-product-card {
    background: var(--kyuy-bg);
    border-radius: var(--kyuy-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kyuy-product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kyuy-product-image {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-height: 350px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kyuy-product-image img.kyuy-img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.kyuy-product-card:hover .kyuy-product-image img.kyuy-img {
    transform: scale(1.05);
}

.kyuy-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.kyuy-no-image svg {
    width: 60px;
    height: 60px;
    color: #ccc;
}

.kyuy-discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #dc3545;
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.kyuy-product-content {
    padding: 20px;
}

.kyuy-product-category {
    display: inline-block;
    font-size: 12px;
    color: var(--kyuy-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kyuy-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.kyuy-product-title a {
    color: var(--kyuy-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.kyuy-product-title a:hover {
    color: var(--kyuy-primary-dark);
}

.kyuy-product-description {
    color: var(--kyuy-text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kyuy-product-price {
    margin-bottom: 18px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.kyuy-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 15px;
    font-weight: 400;
}

.kyuy-current-price {
    font-size: 24px;
    font-weight: 700;
    color: #1a365d;
    letter-spacing: -0.5px;
}

/* WhatsApp Butonu */
.kyuy-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-top: auto;
}

.kyuy-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    text-decoration: none;
}

.kyuy-whatsapp-btn .kyuy-wa-icon {
    flex-shrink: 0;
}

.kyuy-icon-right {
    flex-direction: row-reverse;
}

/* Modern Stil */
.kyuy-style-modern .kyuy-product-card {
    box-shadow: var(--kyuy-shadow);
    border: none;
}

.kyuy-style-modern .kyuy-product-card:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.kyuy-style-modern .kyuy-product-image {
    border-radius: var(--kyuy-radius) var(--kyuy-radius) 0 0;
}

/* Klasik Stil */
.kyuy-style-classic .kyuy-product-card {
    border-radius: 0;
    border: 1px solid var(--kyuy-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kyuy-style-classic .kyuy-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kyuy-style-classic .kyuy-product-image {
    border-radius: 0;
}

.kyuy-style-classic .kyuy-discount-badge {
    border-radius: 0;
}

.kyuy-style-classic .kyuy-whatsapp-btn {
    border-radius: 0;
}

/* Minimal Stil */
.kyuy-style-minimal .kyuy-product-card {
    background: transparent;
    border-radius: 0;
}

.kyuy-style-minimal .kyuy-product-image {
    border-radius: 0;
    border: 1px solid var(--kyuy-border);
}

.kyuy-style-minimal .kyuy-product-content {
    padding: 20px 0;
}

.kyuy-style-minimal .kyuy-whatsapp-btn {
    background: transparent !important;
    border: 2px solid var(--kyuy-primary);
    color: var(--kyuy-primary) !important;
    border-radius: 0;
}

.kyuy-style-minimal .kyuy-whatsapp-btn:hover {
    background: var(--kyuy-primary) !important;
    color: #fff !important;
}

.kyuy-style-minimal .kyuy-whatsapp-btn .kyuy-wa-icon {
    fill: currentColor;
}

/* Şık (Elegant) Stil */
.kyuy-style-elegant .kyuy-product-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.kyuy-style-elegant .kyuy-product-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
}

.kyuy-style-elegant .kyuy-product-image {
    border-radius: 16px 16px 0 0;
}

.kyuy-style-elegant .kyuy-product-content {
    padding: 25px;
}

.kyuy-style-elegant .kyuy-product-title {
    font-size: 20px;
}

.kyuy-style-elegant .kyuy-whatsapp-btn {
    border-radius: 8px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
}

/* Ürün Bulunamadı */
.kyuy-no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: var(--kyuy-radius);
    color: var(--kyuy-text-light);
    font-size: 16px;
}

/* Tek Ürün Sayfası */
.kyuy-single-product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.kyuy-single-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.kyuy-single-gallery {
    position: sticky;
    top: 30px;
}

.kyuy-main-image {
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    border-radius: var(--kyuy-radius);
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kyuy-main-image img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.kyuy-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.kyuy-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.kyuy-thumb:hover,
.kyuy-thumb.active {
    border-color: var(--kyuy-primary);
}

.kyuy-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kyuy-single-info {
    padding-top: 10px;
}

.kyuy-single-category {
    display: inline-block;
    font-size: 13px;
    color: var(--kyuy-primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 500;
}

.kyuy-single-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--kyuy-text);
    line-height: 1.3;
}

.kyuy-single-code {
    color: var(--kyuy-text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.kyuy-single-price {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.kyuy-single-price .kyuy-old-price {
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

.kyuy-single-price .kyuy-current-price {
    font-size: 32px;
}

.kyuy-single-description {
    margin-bottom: 30px;
}

.kyuy-single-description h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--kyuy-text);
}

.kyuy-single-description-content {
    color: var(--kyuy-text-light);
    line-height: 1.8;
    font-size: 15px;
}

.kyuy-single-description-content p {
    margin-bottom: 15px;
}

.kyuy-single-whatsapp {
    margin-top: 30px;
}

.kyuy-single-whatsapp .kyuy-whatsapp-btn {
    font-size: 18px;
    padding: 18px 40px;
}

/* Responsive */
@media (max-width: 1024px) {
    .kyuy-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .kyuy-single-content {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .kyuy-columns-3,
    .kyuy-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kyuy-products {
        gap: 20px;
    }
    
    .kyuy-single-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .kyuy-single-gallery {
        position: static;
    }
    
    .kyuy-single-title {
        font-size: 26px;
    }
    
    .kyuy-single-price .kyuy-current-price {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .kyuy-columns-2,
    .kyuy-columns-3,
    .kyuy-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .kyuy-product-content {
        padding: 15px;
    }
    
    .kyuy-product-title {
        font-size: 16px;
    }
    
    .kyuy-current-price {
        font-size: 20px;
    }
    
    .kyuy-whatsapp-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}
