/* ─── Giriş uyarı metninin CTA buton dışına taşmaması için ───────────────
   Sorun: .product-item-cta height:40px sabit — iki satırlı metin dışarı taşıyordu.
   Çözüm: height:auto + min-height:40px + flex ile içerik her zaman kutu içinde kalır,
   buton gerektiğinde üste doğru büyür (altta zaten bottom:20px var). */
.product-item-cta {
    height: auto !important;
    min-height: 40px !important;
    line-height: 1.35 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
}

/* Product detail side layout fix */
.product-hero-2 {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.product-hero-2 .product-left {
    float: none;
    width: auto;
    flex: 1 1 0;
    min-width: 0;
}

.product-hero-2 .product-right {
    float: none;
    width: 50%;
    max-width: 620px;
    flex: 0 0 50%;
    margin-left: 0;
}

/* Sadece detay sayfasındaki square slider daralmasını düzelt */
.product-hero-2 .slider-product.square .slick-list {
    width: calc(100% - 72px);
}

/* Thumbnail kolonu sağda düzgün dursun */
.product-hero-2 .slider-product.square ul.slick-dots {
    width: 60px;
    right: 0;
}

/* Görsel alanı taşmasın */
.product-hero-2 .slider-product.square {
    width: 100%;
}

@media only screen and (max-width:1023px) {
    .product-hero-2 {
        display: block !important;
        gap: 0 !important;
    }

    .product-hero-2 .product-left,
    .product-hero-2 .product-right {
        float: left !important;
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        margin-left: 0 !important;
    }

    .product-hero-2 .slider-product.square {
        width: 100% !important;
        margin-bottom: 20px !important;
    }
}

@media only screen and (max-width:767px) {
    .product-hero-2 .slider-product.square .slick-list {
        width: 100% !important;
    }

    .product-hero-2 .slider-product.square ul.slick-dots {
        position: relative !important;
        width: 100% !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 12px !important;
        display: flex !important;
        flex-flow: row wrap !important;
        gap: 8px !important;
    }

    .product-hero-2 .slider-product.square ul.slick-dots li {
        width: 40px !important;
        margin-bottom: 0 !important;
    }
}


/* =========================================================
   TECE MARKET - CUSTOM OVERRIDES
   1) Checkout validation warning readability (Light + Dark)
   2) Product CTA price / box / roll information spacing
   ========================================================= */

/* ---------------------------------------------------------
   1) CHECKOUT - VALIDATION WARNING
   custom.css, dark.css'ten sonra yüklendiği için iki temada
   da aynı yüksek kontrastlı uyarı görünümünü korur.
   --------------------------------------------------------- */
.shopping-content .cart-box:has(> .text-danger) {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #7f1d1d !important;
}

.shopping-content .cart-box > .text-danger,
.shopping-content .cart-box > .text-danger strong,
.shopping-content .cart-box > .text-danger ul,
.shopping-content .cart-box > .text-danger li,
.shopping-content .cart-box > .text-danger p,
.shopping-content .cart-box > .text-danger span,
.shopping-content .cart-box > .text-danger small {
    color: #7f1d1d !important;
    opacity: 1 !important;
}

.shopping-content .cart-box > .text-danger strong {
    font-weight: 700;
    line-height: 20px;
}

.shopping-content .cart-box > .text-danger ul {
    float: none !important;
    display: block !important;
    margin: 4px 0 0 !important;
    padding-left: 20px !important;
}

.shopping-content .cart-box > .text-danger li {
    float: none !important;
    display: list-item !important;
    width: 100%;
    margin: 2px 0;
    line-height: 20px;
    list-style: disc;
}

/* ---------------------------------------------------------
   2) PRODUCT DETAIL - YEŞİL SEPET / FİYAT ALANI
   Birim fiyat, toplam, koli içeriği ve stok satırlarını
   daha ferah ve okunabilir hale getirir.
   --------------------------------------------------------- */
@media (min-width: 769px) {
    .product-cta {
        min-height: 76px;
        padding: 9px 10px !important;
        gap: 12px !important;
    }

    .product-cta-add {
        min-width: 145px;
    }

    .product-cta-add a {
        min-height: 56px;
        height: auto !important;
        padding: 8px 14px !important;
        line-height: 22px;
    }

    .product-cta-price {
        min-width: 190px;
        font-size: 14px;
        line-height: 22px !important;
        white-space: nowrap;
    }

    .product-cta-price section {
        min-height: 21px;
        line-height: 21px;
    }

    .product-cta-price strong {
        font-size: 15px;
        font-weight: 700;
    }

    .product-cta-quantity {
        width: 108px !important;
        min-width: 108px;
    }

    .product-cta-quantity .select {
        height: 60px !important;
        line-height: 60px;
    }

    .product-cta-quantity small {
        bottom: 6px !important;
    }
}

/* Orta ekranlarda taşma olmaması için biraz sıkıştır */
@media (min-width: 769px) and (max-width: 1280px) {
    .product-cta {
        gap: 8px !important;
    }

    .product-cta-add {
        min-width: 125px;
    }

    .product-cta-price {
        min-width: 170px;
        font-size: 13px;
        line-height: 20px !important;
    }

    .product-cta-price section {
        line-height: 20px;
    }

    .product-cta-price strong {
        font-size: 14px;
    }

    .product-cta-quantity {
        width: 100px !important;
        min-width: 100px;
    }
}

/* Mobilde yalnızca okunabilirliği artır, mevcut mobil dizilimi bozma */
@media (max-width: 768px) {
    .product-cta-price {
        font-size: 14px;
        line-height: 21px !important;
    }

    .product-cta-price section {
        line-height: 21px;
    }

    .product-cta-price strong {
        font-size: 15px;
    }
}

/* ---------------------------------------------------------
   3) PRODUCT DETAIL - KOLI SELECT HIZALAMA
   Sağdaki miktar select'inin yeşil alan dışına taşmasını önler.
   --------------------------------------------------------- */
@media (min-width: 769px) {
    .product-cta {
        gap: 10px !important;
        overflow: hidden;
    }

    .product-cta-add {
        min-width: 125px !important;
    }

    .product-cta-price {
        flex: 1 1 175px !important;
        min-width: 165px !important;
        white-space: nowrap;
    }

    .product-cta-quantity {
        flex: 0 0 96px !important;
        width: 96px !important;
        min-width: 96px !important;
        margin-left: 2px;
    }

    .product-cta-quantity .select {
        width: 100% !important;
        height: 60px !important;
        padding: 0 28px 13px 8px !important;
        font-size: 23px !important;
        line-height: 46px !important;
        text-align: center !important;
        text-align-last: center !important;
        background-position: right 10px center !important;
        background-size: auto 7px !important;
        box-sizing: border-box;
    }

    .product-cta-quantity small {
        left: 8px !important;
        right: 28px !important;
        bottom: 6px !important;
        font-size: 11px !important;
        line-height: 13px;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1280px) {
    .product-cta-add {
        min-width: 112px !important;
    }

    .product-cta-price {
        min-width: 155px !important;
        font-size: 12.5px;
    }

    .product-cta-quantity {
        flex-basis: 90px !important;
        width: 90px !important;
        min-width: 90px !important;
    }

    .product-cta-quantity .select {
        font-size: 21px !important;
        padding-right: 25px !important;
        background-position: right 8px center !important;
    }

    .product-cta-quantity small {
        right: 25px !important;
    }
}
