/* ==========================================================================
   DESI CORE: REUSABLE UI COMPONENTS (desi_components.css)
   ========================================================================== */

/* ==========================================================================
   DESI COMPONENT: QUANTITY SELECTOR (.qty)
   Definitive Flexbox Ordering: [ - ] (order 1) | [ 1 ] (order 2) | [ + ] (order 3)
   ========================================================================== */
.qty,
.product-add-buttons .qty {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 44px !important;
    padding: 0 4px !important;
    border: 1px solid var(--desi-border, #ced4da) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

@media (min-width: 768px) {
    .qty,
    .product-add-buttons .qty {
        height: 50px !important;
    }
}

.qty:focus-within,
.product-add-buttons .qty:focus-within {
    border-color: var(--desi-green, #2D7A68) !important;
    box-shadow: 0 0 0 3px rgba(45, 122, 104, 0.12) !important;
}

/* 1. SOL BUTON: EKSİ (-) */
.qty .ti-minus,
.qty .qty-btn-minus,
.qty [class*="minus"],
.qty [data-action="decrease"],
.qty span:has(.lucide-minus),
.qty span:has([uk-icon*="minus"]),
.qty span:first-of-type {
    order: 1 !important;
}

/* 2. ORTA: SAYI INPUT ALANI */
.qty input,
.qty input.form-control,
.qty input[type="number"] {
    order: 2 !important;
    flex: 1 1 auto !important;
    width: 0 !important;
    min-width: 36px !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* 3. SAĞ BUTON: ARTI (+) */
.qty .ti-plus,
.qty .qty-btn-plus,
.qty [class*="plus"],
.qty [data-action="increase"],
.qty span:has(.lucide-plus),
.qty span:has([uk-icon*="plus"]),
.qty span:last-of-type {
    order: 3 !important;
}

/* BUTONLARIN ORTAK GÖRSEL STİLİ */
.qty > span,
.product-add-buttons .qty > span {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #eef2f6 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    .qty > span,
    .product-add-buttons .qty > span {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
    }
}

.qty > span:hover,
.product-add-buttons .qty > span:hover {
    background: var(--desi-green, #2D7A68) !important;
    color: #ffffff !important;
    border-color: var(--desi-green, #2D7A68) !important;
}

.qty > span:active,
.product-add-buttons .qty > span:active {
    transform: scale(0.92);
}

.qty > span svg,
.qty > span [uk-icon],
.qty > span [data-lucide] {
    stroke: currentColor !important;
    color: inherit !important;
    display: block !important;
    pointer-events: none !important;
    width: 16px !important;
    height: 16px !important;
}

.qty > span:hover svg,
.qty > span:hover [uk-icon],
.qty > span:hover [data-lucide] {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

/* Pseudo-element Fallback önleme (çift ikon çıkmaması için) */
.qty > span::before,
.qty > span::after,
.product-add-buttons .qty > span::before,
.product-add-buttons .qty > span::after {
    display: none !important;
    content: none !important;
}


/* ==========================================================================
   HEADER NAVBAR & ICON SCALING
   ========================================================================== */
.uk-navbar-nav > li > a {
    font-family: var(--desi-font-sans, 'Inter', sans-serif) !important;
    font-size: var(--desi-text-base, 0.9375rem) !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 0 16px !important;
    transition: color 0.2s ease !important;
}

.uk-navbar-nav > li > a:hover,
.uk-navbar-nav > li.uk-active > a {
    color: var(--desi-green, #2D7A68) !important;
}

/* ==========================================================================
   HEADER MOBILE / DESKTOP ICONNAV & ALIGNMENT
   İkonları sağa yaslar, logoyu solda tutar, uk-iconnav yapısını parlatır
   ========================================================================== */
/* Sadece Mobilde (<960px): Hamburger ve logoyu solda, ikonları sağda tut */
@media (max-width: 959px) {
    #header-main .uk-navbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    #header-main .uk-navbar-left {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        flex: 0 0 auto !important;
    }

    #header-main .uk-navbar-right {
        display: flex !important;
        align-items: center !important;
        margin-left: auto !important;
        flex: 0 0 auto !important;
    }
}

/* UIkit uk-iconnav Özelleştirmesi */
#header-main .uk-iconnav {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

#header-main .uk-iconnav > li {
    padding-left: 0 !important;
}

#header-main .uk-iconnav > li > a.header-icon-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

#header-main .uk-iconnav > li > a.header-icon-link:hover {
    color: var(--desi-green, #2D7A68) !important;
    background: rgba(45, 122, 104, 0.08) !important;
}

/* Sepet Rozeti (Cart Badge) - Kusursuz Dairesel (18x18) */
#header-main .uk-iconnav .cart-soft-count,
#header-main .uk-iconnav .favourite-soft-count,
#header-main .uk-navbar-right .header-icon-link .uk-badge,
#header-wrapper .uk-iconnav a .cart-soft-count,
#header-wrapper .uk-iconnav a .favourite-soft-count {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    max-height: 18px !important;
    line-height: 18px !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    background: #e30613 !important;
    color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border: 2px solid #ffffff !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
}

@media (max-width: 767px) {
    #header-main .uk-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #header-main .uk-iconnav {
        gap: 6px !important;
    }

    #header-main .uk-iconnav > li > a.header-icon-link {
        width: 36px !important;
        height: 36px !important;
    }
}





/* ==========================================================================
   MASTER CANONICAL PRODUCT CARD (Shared across Showcase & Product List)
   ========================================================================== */
.product-item .uk-card,
.product-item .uk-card-default,
.showcase-catalog-section .product-item .uk-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    outline: none !important;
}

.product-item .uk-card:hover,
.product-item .uk-card-default:hover,
.showcase-catalog-section .product-item .uk-card:hover {
    border-color: var(--desi-primary, #2D7A68) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09) !important;
    transform: translateY(-4px) !important;
    outline: none !important;
}

.product-item .uk-card-media-top,
.showcase-catalog-section .product-item .uk-card-media-top {
    background: #ffffff !important;
    padding: 16px !important;
    border-bottom: 1px solid #f8fafc !important;
}

.product-item .uk-card-body,
.showcase-catalog-section .product-item .uk-card-body {
    padding: 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

.product-item .uk-card-footer,
.showcase-catalog-section .product-item .uk-card-footer {
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 14px 20px !important;
    border-radius: 0 0 16px 16px !important;
}

.product-item .add-favourite-btn,
.showcase-catalog-section .product-item .add-favourite-btn {
    z-index: 2 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s ease !important;
}

.product-item .add-favourite-btn:hover,
.showcase-catalog-section .product-item .add-favourite-btn:hover {
    color: var(--desi-accent, #e11d48) !important;
    border-color: var(--desi-accent, #e11d48) !important;
    transform: scale(1.12) !important;
    background: #ffffff !important;
}

/* Kart Başlığı (Global & Uyumlu) */
.product-item .uk-card-title,
.showcase-catalog-section .product-item .uk-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 8px 0;
    display: block;
    width: 100%;
}

@media (min-width: 960px) {
    .product-item .uk-card-title,
    .showcase-catalog-section .product-item .uk-card-title {
        font-size: 18px;
    }
}

.product-item .desi-brand-prefix,
.showcase-catalog-section .product-item .desi-brand-prefix {
    color: #e11d48 !important;
    font-weight: 900 !important;
    margin-right: 6px;
    display: inline-block;
    letter-spacing: -0.2px;
}

.product-item .desi-model-name,
.showcase-catalog-section .product-item .desi-model-name {
    color: #0f172a !important;
    font-weight: 800 !important;
    display: inline;
    margin-right: 6px;
}

.product-item .desi-title-rest,
.showcase-catalog-section .product-item .desi-title-rest {
    display: block;
    font-weight: 400 !important;
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-top: 4px;
}

/* Feature Chips (Kısa Açıklama Rozetleri - Global & Uyumlu) */
.desi-chips-inline-wrap,
.product-short-desc .desi-chips-inline-wrap,
.product-item .product-short-desc .desi-chips-inline-wrap,
.showcase-catalog-section .product-short-desc .desi-chips-inline-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    align-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 0 !important;
}

.desi-inline-chip,
.product-short-desc .desi-inline-chip,
.product-item .product-short-desc .desi-inline-chip,
.showcase-catalog-section .product-short-desc .desi-inline-chip {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    gap: 5px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}

.desi-inline-chip svg,
.desi-inline-chip [uk-icon],
.product-item .product-short-desc .desi-inline-chip svg,
.product-item .product-short-desc .desi-inline-chip [uk-icon],
.showcase-catalog-section .product-short-desc .desi-inline-chip svg,
.showcase-catalog-section .product-short-desc .desi-inline-chip [uk-icon] {
    color: var(--desi-primary, #2D7A68) !important;
    flex-shrink: 0 !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Footer ve Fiyat */
.showcase-catalog-section .product-item .uk-card-footer {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 14px 20px !important;
    border-radius: 0 0 16px 16px;
}


.showcase-catalog-section .product-item .current-price {
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

@media (min-width: 960px) {
    .showcase-catalog-section .product-item .current-price {
        font-size: 20px;
    }
}

.showcase-catalog-section .product-item .current-price .product-currency {
    font-size: 13px;
    font-weight: 600;
    margin-left: 2px;
}

/* Empty Cart & Button Duplicate Icon Prevention */
.empty-cart-icon > span:not(:first-child),
.empty-cart-icon > svg:not(:first-child),
.empty-cart-card .uk-button-primary > span:not(:first-child):not(:last-child),
.empty-cart-card .uk-button-primary > svg:not(:first-child) {
    display: none !important;
}

.empty-cart-icon::before,
.empty-cart-icon::after,
.empty-cart-icon > span::before,
.empty-cart-icon > span::after,
.empty-cart-card .uk-button-primary::before,
.empty-cart-card .uk-button-primary::after,
.empty-cart-card .uk-button-primary > span::before,
.empty-cart-card .uk-button-primary > span::after {
    display: none !important;
    content: none !important;
}

