/**
 * KUK Archive Product Styles
 * Extracted from inline <style> for cacheability and performance.
 *
 * @package Avada-Child-Theme
 * @since 2.0.0
 */

/* ===== HEADING ===== */
.kuk-heading {
    text-align: center;
    padding: 24px 50px 8px;
}
.kuk-heading__title {
    font-size: clamp(24px, 4vw, 40px);
    margin: 0 0 8px;
    line-height: 1.2;
}
.kuk-heading__desc {
    max-width: 800px;
    margin: 0 auto;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .kuk-heading { padding: 16px 16px 4px; }
}

/* ===== INFO BAR ===== */
.kuk-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px 16px;
    gap: 16px;
}
.kuk-info-bar__left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.kuk-info-bar__bc {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}
.kuk-info-bar__bc a { color: #205d2f; text-decoration: none; }
.kuk-info-bar__bc a:hover { text-decoration: underline; }
.kuk-info-bar__count {
    font-size: 12px;
    color: #767676; /* WCAG AA compliant on white */
}

/* Sort wrapper */
.kuk-info-bar__sort { flex-shrink: 0; }
.kuk-info-bar__sort-wrap { position: relative; display: inline-flex; align-items: center; }
.kuk-info-bar__sort-icon { display: none; }
.kuk-info-bar__select {
    font-size: 13px;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 30px 7px 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
    white-space: nowrap;
}
.kuk-info-bar__select:hover { border-color: #205d2f; }
.kuk-info-bar__select:focus { border-color: #205d2f; outline: 2px solid #205d2f; outline-offset: 2px; }

@media (max-width: 768px) {
    .kuk-info-bar { padding: 0 12px 12px; gap: 10px; }
    .kuk-info-bar__bc {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .kuk-info-bar__count { font-size: 11px; }
    .kuk-info-bar__sort-icon {
        display: block;
        color: #333;
        pointer-events: none;
    }
    .kuk-info-bar__sort-wrap {
        width: 44px; /* Apple HIG minimum tap target */
        height: 44px;
        justify-content: center;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
    }
    .kuk-info-bar__select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
        padding: 0;
        border: none;
        font-size: 16px; /* iOS zoom prevention */
    }
}

/* ===== ALT KATEGORİ GRİD ===== */
/* FIX: CLS Prevention — reserve space with min-height and contain */
.kuk-subcat {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 0 50px 20px;
    contain: layout style;
    min-height: 68px; /* Reserve space for 1 row on desktop */
}
.kuk-subcat__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 48px; /* Reserve height to prevent CLS */
}
.kuk-subcat__item:hover {
    border-color: #205d2f;
    box-shadow: 0 2px 8px rgba(32,93,47,0.1);
}
.kuk-subcat__item:focus-visible {
    outline: 2px solid #205d2f;
    outline-offset: 2px;
}
.kuk-subcat__item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    /* CLS fix: explicit aspect-ratio so space is reserved before load */
    aspect-ratio: 1 / 1;
}
.kuk-subcat__item span {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}
.kuk-subcat__item--overflow { display: flex; }
.kuk-subcat__toggle { display: none; }

@media (max-width: 768px) {
    .kuk-subcat {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 16px 12px;
        gap: 8px;
        /* CLS fix: reserve 2 rows on mobile (3 cols × 2 rows = 6 items visible) */
        min-height: 108px;
    }
    .kuk-subcat__item {
        padding: 8px;
        gap: 6px;
        min-height: 44px;
    }
    .kuk-subcat__item img { width: 32px; height: 32px; }
    .kuk-subcat__item span { font-size: 11px; }
    .kuk-subcat__item--overflow { display: none; }
    .kuk-subcat.is-expanded .kuk-subcat__item--overflow { display: flex; }
    .kuk-subcat__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: 1 / -1;
        padding: 10px;
        border: 1px dashed #bbb;
        border-radius: 8px;
        background: none;
        color: #205d2f;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
    }
    .kuk-subcat.is-expanded .kuk-subcat__toggle { border-style: solid; }
}

/* ===== ÜRÜN GRİD ===== */
.kuk-products-section {
    padding: 0 50px;
    max-width: 1660px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .kuk-products-section { padding: 0 8px; }
}

/* Product grid — 5 columns desktop */
.kuk-products-section ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0;
    list-style: none;
    margin: 0;
}
.kuk-products-section ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0;
    float: none !important;
    contain: layout style; /* CLS prevention — isolate layout calculations */
}
.kuk-products-section ul.products::before,
.kuk-products-section ul.products::after {
    display: none !important;
    content: none !important;
}

/* Product card image aspect ratio — prevents CLS */
.kuk-products-section .fusion-product-wrapper .featured-image,
.kuk-products-section .product-images,
.kuk-products-section .fusion-image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    display: block;
    width: 100%;
    background: #fafafa; /* Placeholder color while image loads */
}
.kuk-products-section .fusion-product-wrapper .featured-image img,
.kuk-products-section .product-images img,
.kuk-products-section .attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
}

@media (max-width: 1200px) {
    .kuk-products-section ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}
@media (max-width: 992px) {
    .kuk-products-section ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}
@media (max-width: 600px) {
    .kuk-products-section ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
@media (max-width: 360px) {
    .kuk-products-section ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .kuk-products-section ul.products li.product {
        min-width: 0;
        overflow: hidden;
    }
    .kuk-products-section { padding: 0 4px; }
}

/* ===== PAGINATION (SEO-safe, hidden when JS load-more active) ===== */
.kuk-products-section .woocommerce-pagination {
    padding: 24px 0;
    text-align: center;
}
.kuk-products-section .woocommerce-pagination .page-numbers {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.kuk-products-section .woocommerce-pagination .page-numbers li a,
.kuk-products-section .woocommerce-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}
.kuk-products-section .woocommerce-pagination .page-numbers li a:hover {
    border-color: #205d2f;
    background: #f0f7f3;
}
.kuk-products-section .woocommerce-pagination .page-numbers li span.current {
    background: #205d2f;
    border-color: #205d2f;
    color: #fff;
}

/* JS active: hide pagination, show load more */
.js-load-more-active .woocommerce-pagination {
    display: none;
}

/* Load More Button */
.kuk-load-more {
    display: none;
    justify-content: center;
    padding: 24px 0 40px;
}
.js-load-more-active .kuk-load-more {
    display: flex;
}
.kuk-load-more__btn {
    background: #205d2f;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    transition: background 0.2s, opacity 0.2s;
}
.kuk-load-more__btn:hover { background: #174a24; }
.kuk-load-more__btn:disabled { opacity: 0.6; cursor: wait; }
.kuk-load-more__btn:focus-visible {
    outline: 2px solid #205d2f;
    outline-offset: 2px;
}

/* ===== ALT İÇERİK ===== */
.kuk-bottom {
    padding: 32px 50px 40px;
    max-width: 1560px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .kuk-bottom { padding: 20px 16px 32px; }
}
.kuk-bottom__heading {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Text Collapse */
.kuk-text-collapse {
    max-height: 140px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    line-height: 1.7;
    margin-bottom: 8px;
    position: relative;
}
.kuk-text-collapse::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
    transition: opacity 0.3s;
}
.kuk-text-collapse.is-expanded { max-height: none; }
.kuk-text-collapse.is-expanded::after { opacity: 0; }
@media (max-width: 768px) {
    .kuk-text-collapse { max-height: 200px; }
}
.kuk-read-more-btn {
    cursor: pointer;
    color: #227759;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    margin-bottom: 28px;
    display: inline-block;
}
.kuk-read-more-btn:hover { text-decoration: underline; }
.kuk-read-more-btn:focus-visible {
    outline: 2px solid #227759;
    outline-offset: 2px;
}

/* FAQ */
.kuk-faq__title { font-size: 22px; margin-bottom: 12px; }
.kuk-faq {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .kuk-faq { grid-template-columns: 1fr; }
}
.kuk-faq__item { border-bottom: 1px solid #e0e0e0; }
.kuk-faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    list-style: none;
    gap: 12px;
}
.kuk-faq__q::-webkit-details-marker { display: none; }
.kuk-faq__q:focus-visible {
    outline: 2px solid #205d2f;
    outline-offset: -2px;
}
.kuk-faq__icon { flex-shrink: 0; transition: transform 0.25s; }
.kuk-faq__item[open] .kuk-faq__icon { transform: rotate(45deg); }
.kuk-faq__a { padding: 0 8px 14px; line-height: 1.7; color: #444; }

/* Gallery Carousel */
.kuk-gallery { position: relative; overflow: hidden; margin-top: 32px; }
.kuk-gallery:focus-visible { outline: 2px solid #205d2f; outline-offset: 2px; }
.kuk-gallery__track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
    will-change: transform;
}
.kuk-gallery__slide {
    flex: 0 0 calc(33.333% - 11px);
    border-radius: 8px;
    overflow: hidden;
}
.kuk-gallery__slide img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}
@media (max-width: 1024px) {
    .kuk-gallery__slide { flex: 0 0 calc(50% - 8px); }
}
@media (max-width: 600px) {
    .kuk-gallery__slide { flex: 0 0 100%; }
    .kuk-gallery__slide img { height: 260px; }
}
.kuk-gallery__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    width: 44px; /* Minimum tap target */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 2;
    color: #333;
}
.kuk-gallery__btn:hover { background: #fff; }
.kuk-gallery__btn:disabled { cursor: default; opacity: 0.3; }
.kuk-gallery__btn:focus-visible { outline: 2px solid #205d2f; }
.kuk-gallery__btn--prev { left: 10px; }
.kuk-gallery__btn--next { right: 10px; }

/* Gallery dots */
.kuk-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 4px;
}
.kuk-gallery__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.kuk-gallery__dot.is-active {
    background: #205d2f;
    transform: scale(1.3);
}
.kuk-gallery__dot:hover { background: #174a24; }
.kuk-gallery__dot:focus-visible {
    outline: 2px solid #205d2f;
    outline-offset: 2px;
}

/* Screen reader only utility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}

/* Hide WooCommerce default result count and ordering (we have custom) */
.kuk-products-section .woocommerce-result-count,
.kuk-products-section .woocommerce-ordering {
    display: none !important;
}


/* ===== PRODUCT CARD (content-product.php) ===== */
/* FIX #9: Custom product card — reduced DOM depth, hover states, CLS prevention */

.kuk-product-card__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.kuk-product-card__inner:hover {
    border-color: #205d2f;
    box-shadow: 0 4px 16px rgba(32, 93, 47, 0.1);
    transform: translateY(-2px);
}
.kuk-product-card__inner:focus-within {
    outline: 2px solid #205d2f;
    outline-offset: 2px;
}

/* Image container — aspect ratio prevents CLS */
.kuk-product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
}
.kuk-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.kuk-product-card__inner:hover .kuk-product-card__img {
    transform: scale(1.03);
}

/* Sale badge */
.kuk-product-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.3;
}

/* Video badge (from kuk_add_video_icon_to_archive) */
.kuk-product-card__image .product-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    color: #205d2f;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kuk-product-card__image .product-video-badge svg {
    width: 20px;
    height: 20px;
}

/* Content area */
.kuk-product-card__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
    flex: 1;
}

/* Title */
.kuk-product-card__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kuk-product-card__title a {
    color: #333;
    text-decoration: none;
}
.kuk-product-card__title a:hover {
    color: #205d2f;
}

/* SKU */
.kuk-product-card__sku {
    font-size: 11px;
    color: #767676;
    line-height: 1;
}

/* Rating */
.kuk-product-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
}
.kuk-product-card__rating .star-rating {
    font-size: 12px;
}

/* Price */
.kuk-product-card__price {
    margin-top: auto;
    padding-top: 6px;
}
.kuk-product-card__price .price {
    font-size: 15px;
    font-weight: 600;
    color: #205d2f;
}
.kuk-product-card__price .price del {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}
.kuk-product-card__price .price ins {
    text-decoration: none;
    font-weight: 600;
}

/* Add to cart / price request button */
.kuk-product-card .show-detailprice {
    display: block;
    text-align: center;
    padding: 8px 12px;
    margin: 0 12px 12px;
    border: 1px solid #205d2f;
    border-radius: 6px;
    color: #205d2f;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.kuk-product-card .show-detailprice:hover {
    background: #205d2f;
    color: #fff;
}

/* WooCommerce add to cart button in card */
.kuk-product-card .add_to_cart_button,
.kuk-product-card .product_type_variable {
    display: block;
    text-align: center;
    padding: 8px 12px;
    margin: 0 12px 12px;
    background: #205d2f;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.kuk-product-card .add_to_cart_button:hover,
.kuk-product-card .product_type_variable:hover {
    background: #174a24;
}

/* Hide default WC link open/close wrappers */
.kuk-product-card > .kuk-product-card__inner > a.woocommerce-LoopProduct-link {
    display: contents;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .kuk-product-card__content {
        padding: 8px 8px 10px;
    }
    .kuk-product-card__title {
        font-size: 13px;
    }
    .kuk-product-card__price .price {
        font-size: 14px;
    }
    .kuk-product-card .add_to_cart_button,
    .kuk-product-card .product_type_variable,
    .kuk-product-card .show-detailprice {
        margin: 0 8px 8px;
        padding: 7px 8px;
        font-size: 12px;
    }
}

/* FIX #10: Override Avada's deep nesting — flatten product card */
.kuk-products-section .kuk-product-card .fusion-product-wrapper,
.kuk-products-section .kuk-product-card .fusion-product-content,
.kuk-products-section .kuk-product-card .product-details,
.kuk-products-section .kuk-product-card .product-details-container {
    all: unset;
    display: contents;
}

/* FIX #11: Font loading optimization hint */
.kuk-product-card__title a,
.kuk-product-card__price .price {
    font-display: swap;
}


/* ===== FIX #19: Quick View Overlay ===== */
.kuk-product-card__quickview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
    text-decoration: none;
}
.kuk-product-card__quickview span {
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 4px;
    transform: translateY(8px);
    transition: transform 0.25s ease;
}
.kuk-product-card__inner:hover .kuk-product-card__quickview {
    opacity: 1;
}
.kuk-product-card__inner:hover .kuk-product-card__quickview span {
    transform: translateY(0);
}
/* Hide quick view on touch devices (no hover) */
@media (hover: none) {
    .kuk-product-card__quickview {
        display: none;
    }
}

/* ===== FIX #20: Out-of-Stock Badge ===== */
.kuk-product-card__badge--sale {
    background: #e53935;
}
.kuk-product-card__badge--oos {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #616161;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.3;
}
/* Dim out-of-stock product images */
.kuk-product-card:has(.kuk-product-card__badge--oos) .kuk-product-card__img {
    opacity: 0.7;
    filter: grayscale(0.3);
}


/* ===========================================================
 * VARIATION SWATCHES FOR WOOCOMMERCE — Archive Optimization
 * Plugin: Variation Swatches for WooCommerce
 *
 * NOTE: All swatch rules are consolidated in the "PRODUCT CARD UI/UX OVERHAUL"
 * section below (~line 1160+). Do NOT add duplicate rules here.
 * Accessibility touch target fixes are applied there.
 * =========================================================== */

/* Ensure swatches don't escape the product card */
.kuk-products-section ul.products li.product {
    overflow: hidden;
}

/* Remove any default plugin styles that conflict */
.kuk-products-section .wvs-archive-variations-wrapper::before,
.kuk-products-section .wvs-archive-variations-wrapper::after {
    display: none !important;
    content: none !important;
}


/* ===========================================================
 * PRODUCT CARD UI/UX OVERHAUL
 * Comprehensive redesign — overrides legacy style.css rules.
 * Targets Avada's product structure with .kuk-products-section scope.
 * =========================================================== */

/* ----- CARD CONTAINER ----- */
.kuk-products-section ul.products li.product {
    overflow: visible !important; /* Allow swatches to show beyond card */
    background: #fff;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kuk-products-section ul.products li.product .fusion-product-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.kuk-products-section ul.products li.product .fusion-product-wrapper:hover {
    border-color: #205d2f !important;
    box-shadow: 0 6px 20px rgba(32, 93, 47, 0.12) !important;
    transform: translateY(-3px);
}

/* ----- IMAGE AREA ----- */
.kuk-products-section ul.products li.product .product-images,
.kuk-products-section ul.products li.product .fusion-image-wrapper,
.kuk-products-section ul.products li.product .featured-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fafafa;
    margin: 0 !important;
}

.kuk-products-section ul.products li.product .featured-image img,
.kuk-products-section ul.products li.product .product-images img,
.kuk-products-section ul.products li.product .attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Use contain — products are flowers/objects with white backgrounds */
    object-position: center !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    transition: transform 0.3s ease;
    display: block;
}

.kuk-products-section ul.products li.product .fusion-product-wrapper:hover .featured-image img,
.kuk-products-section ul.products li.product .fusion-product-wrapper:hover .attachment-woocommerce_thumbnail {
    transform: scale(1.05);
}

/* ----- SKU / STOCK CODE BADGE — CRITICAL FIX ----- */
/* Override the legacy "green bar at top" design with a modern subtle badge */
.kuk-products-section ul.products li.product .stock-codeym {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    width: auto !important;
    background: rgba(32, 93, 47, 0.92) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    z-index: 3;
    line-height: 1.4 !important;
    text-align: center !important;
    letter-spacing: 0.3px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ----- CONTENT AREA ----- */
.kuk-products-section ul.products li.product .fusion-product-content {
    height: auto !important;
    padding: 12px 14px 14px !important;
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    background: #fff;
}

.kuk-products-section ul.products li.product .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kuk-products-section ul.products li.product .product-details-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 0 !important;
}

/* ----- PRODUCT TITLE ----- */
.kuk-products-section ul.products li.product .product-title {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    min-height: 2.7em; /* Reserve space for 2 lines — prevents CLS */
}

.kuk-products-section ul.products li.product .product-title a {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #2a2a2a !important;
    text-decoration: none !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.2s ease;
}

.kuk-products-section ul.products li.product .product-title a:hover {
    color: #205d2f !important;
}

/* ----- PRICE ----- */
.kuk-products-section ul.products li.product .fusion-price-rating {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
}

.kuk-products-section ul.products li.product .price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #205d2f !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.kuk-products-section ul.products li.product .price del {
    font-size: 12px !important;
    color: #999 !important;
    font-weight: 400 !important;
    margin-right: 6px;
}

.kuk-products-section ul.products li.product .price ins {
    text-decoration: none !important;
    color: #d32f2f !important;
    font-weight: 700 !important;
}

.kuk-products-section ul.products li.product .woocommerce-Price-amount {
    font-size: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

/* "Fiyat İste" / detail price button */
.kuk-products-section ul.products li.product .show-detailprice {
    display: inline-block !important;
    color: #205d2f !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 0 !important;
    text-decoration: none !important;
    margin: 0 !important;
}

.kuk-products-section ul.products li.product .show-detailprice .price {
    font-size: 16px !important;
    color: #205d2f !important;
}

.kuk-products-section ul.products li.product .show-detailprice.HomePagePrice {
    display: inline-block !important;
    border: 1px solid #205d2f !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    transition: background 0.2s, color 0.2s;
}

.kuk-products-section ul.products li.product .show-detailprice.HomePagePrice:hover {
    background: #205d2f !important;
    color: #fff !important;
}

/* ----- VARIATION SWATCHES (Variation Swatches for WooCommerce plugin) ----- */
/* Accessibility: min 24x24px touch targets with 8px spacing (WCAG 2.5.8) */
.kuk-products-section .wvs-archive-variations-wrapper,
.kuk-products-section ul.products li.product .wvs-archive-variations-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px !important;
    padding: 0 !important;
    margin: 4px 0 0 !important;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    height: 28px;
}

.kuk-products-section .variable-item,
.kuk-products-section .wvs-archive-variations-wrapper .variable-item {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1.5px solid #e0e0e0 !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03) !important;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    background-clip: padding-box !important;
}

.kuk-products-section .variable-item:hover,
.kuk-products-section .variable-item.hover {
    transform: scale(1.15);
    border-color: #205d2f !important;
    box-shadow: 0 2px 6px rgba(32, 93, 47, 0.2) !important;
}

.kuk-products-section .variable-item.selected {
    border-color: #205d2f !important;
    border-width: 2px !important;
}

.kuk-products-section .variable-item .variable-item-span,
.kuk-products-section .variable-item.color-variable-item .variable-item-span-color,
.kuk-products-section .variable-item .variable-item-contents {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    display: block !important;
    background-size: cover !important;
    background-position: center !important;
    border: none !important;
}

.kuk-products-section .image-variable-item img,
.kuk-products-section .image_variable-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    padding: 0 !important;
}

/* "More" indicator */
.kuk-products-section .wvs-archive-variations-wrapper .show-variations-button,
.kuk-products-section .variable-items-more,
.kuk-products-section .wvs-show-variations-button {
    font-size: 9px !important;
    padding: 0 5px !important;
    height: 24px !important;
    min-width: 24px;
    line-height: 24px !important;
    border-radius: 12px !important;
    background: #f0f0f0 !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
    font-weight: 600;
}

/* Disable tooltip on archive (small swatches make it noisy) */
.kuk-products-section .wvs-tooltip,
.kuk-products-section .wvs-tooltip-active {
    display: none !important;
}

/* Disable Avada's separator inside the card (cleaner look) */
.kuk-products-section ul.products li.product .fusion-content-sep,
.kuk-products-section ul.products li.product .fusion-content-sep.sep-double,
.kuk-products-section ul.products li.product .fusion-content-sep.sep-solid {
    display: none !important;
}

/* Hide Avada's empty product-buttons-container if no buttons */
.kuk-products-section ul.products li.product .product-buttons {
    margin: 0 !important;
    padding: 0 !important;
}

.kuk-products-section ul.products li.product .product-buttons-container {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

/* ----- SALE BADGE (WooCommerce default) ----- */
.kuk-products-section ul.products li.product .onsale,
.kuk-products-section ul.products li.product .fusion-woo-badges-wrapper {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: #d32f2f !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    z-index: 3;
    line-height: 1.3 !important;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ----- VIDEO BADGE (kuk_add_video_icon_to_archive) ----- */
.kuk-products-section ul.products li.product .product-video-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 3;
    color: #205d2f;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kuk-products-section ul.products li.product .product-video-badge svg {
    width: 18px;
    height: 18px;
}

/* If both onsale and video badge exist, stack them */
.kuk-products-section ul.products li.product .product-video-badge + .onsale,
.kuk-products-section ul.products li.product .onsale + .product-video-badge {
    top: 48px !important;
}

/* ----- FOCUS STATES (Accessibility) ----- */
.kuk-products-section ul.products li.product .fusion-product-wrapper:focus-within {
    border-color: #205d2f !important;
    outline: 2px solid #205d2f;
    outline-offset: 2px;
}

/* ===========================================================
 * RESPONSIVE BREAKPOINTS
 * =========================================================== */

/* Large Desktop — 5 columns */
@media (min-width: 1201px) {
    .kuk-products-section ul.products li.product .product-title a {
        font-size: 14px !important;
    }
    .kuk-products-section ul.products li.product .price {
        font-size: 16px !important;
    }
}

/* Medium Desktop / Laptop — 4 columns */
@media (max-width: 1200px) and (min-width: 993px) {
    .kuk-products-section ul.products li.product .fusion-product-content {
        padding: 10px 12px 12px !important;
    }
    .kuk-products-section ul.products li.product .product-title a {
        font-size: 14px !important;
    }
    .kuk-products-section ul.products li.product .price {
        font-size: 15px !important;
    }
}

/* Tablet — 3 columns */
@media (max-width: 992px) and (min-width: 601px) {
    .kuk-products-section ul.products li.product .fusion-product-content {
        padding: 10px 12px 12px !important;
    }
    .kuk-products-section ul.products li.product .product-title a {
        font-size: 13px !important;
    }
    .kuk-products-section ul.products li.product .price {
        font-size: 15px !important;
    }
    .kuk-products-section ul.products li.product .stock-codeym {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
}

/* Mobile — 2 columns */
@media (max-width: 600px) {
    .kuk-products-section ul.products {
        gap: 8px !important;
    }
    .kuk-products-section ul.products li.product .fusion-product-wrapper {
        border-radius: 8px !important;
    }
    .kuk-products-section ul.products li.product .featured-image img,
    .kuk-products-section ul.products li.product .product-images img,
    .kuk-products-section ul.products li.product .attachment-woocommerce_thumbnail {
        padding: 8px !important;
    }
    .kuk-products-section ul.products li.product .fusion-product-content {
        padding: 8px 10px 10px !important;
        gap: 6px;
    }
    .kuk-products-section ul.products li.product .product-details-container {
        gap: 4px !important;
    }
    .kuk-products-section ul.products li.product .product-title {
        min-height: 2.6em;
    }
    .kuk-products-section ul.products li.product .product-title a {
        font-size: 12px !important;
        line-height: 1.3 !important;
        font-weight: 500 !important;
    }
    .kuk-products-section ul.products li.product .price {
        font-size: 14px !important;
        font-weight: 700 !important;
    }
    .kuk-products-section ul.products li.product .price del {
        font-size: 10px !important;
    }
    .kuk-products-section ul.products li.product .stock-codeym {
        top: 6px !important;
        left: 6px !important;
        font-size: 9px !important;
        padding: 2px 5px !important;
        letter-spacing: 0.2px;
        border-radius: 3px !important;
    }
    .kuk-products-section ul.products li.product .onsale,
    .kuk-products-section ul.products li.product .fusion-woo-badges-wrapper {
        top: 6px !important;
        right: 6px !important;
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
    .kuk-products-section ul.products li.product .product-video-badge {
        top: 6px !important;
        right: 6px !important;
        width: 26px;
        height: 26px;
    }
    .kuk-products-section ul.products li.product .product-video-badge svg {
        width: 14px;
        height: 14px;
    }
    .kuk-products-section ul.products li.product .show-detailprice {
        font-size: 12px !important;
    }
    .kuk-products-section ul.products li.product .show-detailprice .price {
        font-size: 14px !important;
    }
    .kuk-products-section ul.products li.product .show-detailprice.HomePagePrice {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    /* Variation swatches mobile */
    .kuk-products-section .wvs-archive-variations-wrapper {
        gap: 5px !important;
        height: 18px;
        margin-top: 2px !important;
    }
    .kuk-products-section .variable-item,
    .kuk-products-section .wvs-archive-variations-wrapper .variable-item {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        min-height: 16px !important;
        border-width: 1.5px !important;
    }
    .kuk-products-section .wvs-archive-variations-wrapper .show-variations-button,
    .kuk-products-section .variable-items-more {
        height: 16px !important;
        line-height: 16px !important;
        font-size: 8px !important;
        padding: 0 4px !important;
    }
    /* Disable hover transform on touch */
    .kuk-products-section ul.products li.product .fusion-product-wrapper:hover {
        transform: none;
    }
    .kuk-products-section ul.products li.product .fusion-product-wrapper:hover .featured-image img {
        transform: none;
    }
}

/* Small Mobile — 360px and below */
@media (max-width: 360px) {
    .kuk-products-section ul.products {
        gap: 6px !important;
    }
    .kuk-products-section ul.products li.product .featured-image img,
    .kuk-products-section ul.products li.product .product-images img,
    .kuk-products-section ul.products li.product .attachment-woocommerce_thumbnail {
        padding: 6px !important;
    }
    .kuk-products-section ul.products li.product .fusion-product-content {
        padding: 6px 8px 8px !important;
        gap: 4px;
    }
    .kuk-products-section ul.products li.product .product-title a {
        font-size: 11px !important;
    }
    .kuk-products-section ul.products li.product .price {
        font-size: 13px !important;
    }
    .kuk-products-section .variable-item,
    .kuk-products-section .wvs-archive-variations-wrapper .variable-item {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        min-height: 14px !important;
    }
}

/* ===========================================================
 * LEGACY OVERRIDES — Cancel old style.css conflicts
 * =========================================================== */

/* Cancel the old "green bar across full width" SKU design */
.kuk-products-section ul.products li.product.type-product .stock-codeym {
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    width: auto !important;
    background: rgba(32, 93, 47, 0.92) !important;
}

@media (max-width: 1024px) {
    .kuk-products-section ul.products li.product.type-product .stock-codeym {
        top: 6px !important;
        left: 6px !important;
        font-size: 9px !important;
    }
}

/* Cancel old fixed image height */
.kuk-products-section ul.products li.product.type-product .fusion-product-wrapper a .featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Cancel old fixed content height */
.kuk-products-section ul.products li.product .fusion-product-content {
    height: auto !important;
    min-height: auto !important;
}

/* Hide Avada's "Add to Cart" button if not in stock display */
.kuk-products-section ul.products li.product .added_to_cart {
    display: none !important;
}


/* ===========================================================
 * FINAL OVERRIDES — BULLETPROOF
 * Addresses: SKU/title overlap, More button hiding swatches.
 * Highest specificity to override all legacy + plugin styles.
 * =========================================================== */

/* ----- SKU BADGE — Now rendered inside image area ----- */
/* The SKU hook was moved from woocommerce_after_shop_loop_item_title (which
 * renders inside .fusion-product-content) to woocommerce_before_shop_loop_item_title
 * (which renders inside .featured-image / .product-images). This places the SKU
 * INSIDE the image wrapper, allowing absolute positioning relative to the image. */

/* Make image containers positioning context for the SKU badge */
.kuk-products-section ul.products li.product .product-images,
.kuk-products-section ul.products li.product .fusion-image-wrapper,
.kuk-products-section ul.products li.product .featured-image,
.kuk-products-section ul.products li.product a.product-images {
    position: relative !important;
}

/* SKU badge — overlaid on image, top-left */
body .kuk-products-section ul.products li.product .stock-codeym,
body .kuk-products-section ul.products li.product.type-product .stock-codeym,
body.woocommerce .kuk-products-section ul.products li.product .stock-codeym {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    background: rgba(32, 93, 47, 0.92) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    z-index: 5 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    letter-spacing: 0.3px;
    box-sizing: border-box !important;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* If SKU still ends up in content area (fallback for cases where hook can't
 * be moved), force it back into the card with relative positioning */
.kuk-products-section ul.products li.product .fusion-product-content .stock-codeym,
.kuk-products-section ul.products li.product .product-details .stock-codeym,
.kuk-products-section ul.products li.product .product-details-container .stock-codeym {
    position: static !important;
    display: inline-block !important;
    margin: 0 0 6px 0 !important;
    align-self: flex-start;
    top: auto !important;
    left: auto !important;
}

/* Ensure title gets enough top spacing — defensive */
.kuk-products-section ul.products li.product .product-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure content area doesn't pull SKU absolute over title */
.kuk-products-section ul.products li.product .fusion-product-content {
    position: relative !important;
    overflow: visible !important;
}

/* ----- VARIATION SWATCHES — "MORE" BUTTON FIX ----- */
/* The plugin's "More" button can render as a block element under swatches.
 * Force inline behavior and limit total visible swatches. */

/* Container — single row, controlled overflow */
body .kuk-products-section .wvs-archive-variations-wrapper,
body .kuk-products-section ul.products li.product .wvs-archive-variations-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 0 !important;
    margin: 6px 0 0 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 22px !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
    list-style: none !important;
}

/* Hide ALL "More" / "Show more" / "+N" type buttons — they take swatch space */
/* FIX: Accessibility — also hides orphan <li> that causes "li not in ul" error */
body .kuk-products-section .wvs-archive-variations-wrapper .show-variations-button,
body .kuk-products-section .wvs-archive-variations-wrapper .wvs-show-variations-button,
body .kuk-products-section .wvs-archive-variations-wrapper .variable-items-more,
body .kuk-products-section .wvs-archive-variations-wrapper .woo-variation-swatches-variable-item-more,
body .kuk-products-section .wvs-archive-variations-wrapper .more-variations,
body .kuk-products-section .wvs-archive-variations-wrapper .wvs-more-button,
body .kuk-products-section ul.products li.product .show-variations-button,
body .kuk-products-section ul.products li.product .variable-items-more,
body .kuk-products-section ul.products li.product .woo-variation-swatches-variable-item-more,
body .kuk-products-section ul.products li.product .wvs-show-variations-button {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Hide any text node siblings that might say "More", "Daha", "+N" */
body .kuk-products-section .wvs-archive-variations-wrapper > a,
body .kuk-products-section .wvs-archive-variations-wrapper > span:not(.variable-item):not([class*="variable-item"]) {
    display: none !important;
}

/* Hide swatches that overflow — show only what fits in one row */
body .kuk-products-section .wvs-archive-variations-wrapper .variable-item {
    flex: 0 0 auto !important;
}

/* Smart truncation: limit visible swatches via nth-child on small screens */
@media (max-width: 600px) {
    /* Mobile: max 5 swatches visible */
    body .kuk-products-section .wvs-archive-variations-wrapper .variable-item:nth-child(n+6) {
        display: none !important;
    }
}

@media (min-width: 601px) and (max-width: 992px) {
    /* Tablet (3 col): max 5 swatches */
    body .kuk-products-section .wvs-archive-variations-wrapper .variable-item:nth-child(n+6) {
        display: none !important;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    /* Laptop (4 col): max 6 swatches */
    body .kuk-products-section .wvs-archive-variations-wrapper .variable-item:nth-child(n+7) {
        display: none !important;
    }
}

@media (min-width: 1201px) {
    /* Desktop (5 col): max 6 swatches */
    body .kuk-products-section .wvs-archive-variations-wrapper .variable-item:nth-child(n+7) {
        display: none !important;
    }
}

/* Tiny mobile — only 4 swatches */
@media (max-width: 360px) {
    body .kuk-products-section .wvs-archive-variations-wrapper .variable-item:nth-child(n+5) {
        display: none !important;
    }
}

/* If there are more variations than displayed, add a subtle "..." indicator
 * via CSS pseudo-element on the wrapper itself */
body .kuk-products-section .wvs-archive-variations-wrapper:has(.variable-item:nth-child(n+7))::after {
    content: "+";
    font-size: 11px;
    font-weight: 700;
    color: #205d2f;
    margin-left: 2px;
    line-height: 18px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    body .kuk-products-section .wvs-archive-variations-wrapper:has(.variable-item:nth-child(n+6))::after {
        content: "+";
        font-size: 10px;
        line-height: 16px;
    }
}

/* ----- DEFENSIVE: Ensure content area children don't overlap ----- */
.kuk-products-section ul.products li.product .fusion-product-content > *,
.kuk-products-section ul.products li.product .product-details > *,
.kuk-products-section ul.products li.product .product-details-container > * {
    position: relative !important;
    z-index: 1 !important;
}

/* Swatches always at the bottom of the card content */
.kuk-products-section ul.products li.product .wvs-archive-variations-wrapper {
    margin-top: auto !important;
}

/* ----- SAFETY: prevent any element from overlapping the title ----- */
.kuk-products-section ul.products li.product .product-title {
    position: relative !important;
    z-index: 2 !important;
    background: transparent !important;
}
