/**
 * Ürün Detay Sayfası — Özel CSS
 * Dosya: child-theme/assets/css/product-custom.css
 * Bu dosyayı child theme'in functions.php'sinde wp_enqueue_style ile yükleyin.
 *
 * Yükleme örneği (child theme functions.php):
 *   add_action('wp_enqueue_scripts', function() {
 *       if ( is_product() ) {
 *           wp_enqueue_style(
 *               'product-custom',
 *               get_stylesheet_directory_uri() . '/assets/css/product-custom.css',
 *               array('ecomus-style'),
 *               '1.0.0'
 *           );
 *       }
 *   });
 */

/* ────────────────────────────────────────────────────────────
   GENEL: Büyük, okunabilir yazı boyutları (yaşlı kullanıcılar)
   ──────────────────────────────────────────────────────────── 
.single-product .product_title {
    font-size: 26px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

.single-product .price {
    font-size: 28px !important;
    font-weight: 700 !important;
}

.single-product .woocommerce-review-link,
.single-product .woocommerce-product-rating {
    font-size: 15px !important;
}
*/
/* ────────────────────────────────────────────────────────────
   ÜCRETSİZ KARGO BANNER (fiyat altı)
   ──────────────────────────────────────────────────────────── */
.ucretsiz-kargo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eaf3e0;
    border: 1.5px solid #b4d98a;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 10px 0 4px;
}

.ucretsiz-kargo-banner svg {
    width: 22px;
    height: 22px;
    fill: #2d6b1a;
    flex-shrink: 0;
}

.ucretsiz-kargo-banner span {
    font-size: 15px;
    color: #2d5015;
    line-height: 1.4;
}

.ucretsiz-kargo-banner strong {
    font-weight: 700;
}

/* ────────────────────────────────────────────────────────────
   ÜCRETSİZ KARGO BADGE (görsel sol üst)
   ──────────────────────────────────────────────────────────── */
.ucretsiz-kargo-badge {
    position: absolute;
    top: 60px;
    left: 0px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #000;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(45, 122, 45, 0.35);
    letter-spacing: 0.01em;
}

.ucretsiz-kargo-badge svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    flex-shrink: 0;
    position: absolute;
    top: 60px;
    left: 0px;
}

/* Görselin wrapper'ına relative position ekle */
.woocommerce-product-gallery {
    position: relative;
}

/* ────────────────────────────────────────────────────────────
   ÜCRETSİZ KARGO CHİP (sepete ekle butonu yanı/altı)
   ──────────────────────────────────────────────────────────── */
.ucretsiz-kargo-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #000;
    border: 1px solid #b4d98a;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    margin-top: 8px;
}

.ucretsiz-kargo-chip svg {
    width: 14px;
    height: 14px;
    fill: #2d6b1a;
    flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   ÜRÜN ÖLÇÜLERİ (ikon + değer grid)
   ──────────────────────────────────────────────────────────── */
.urun-olculer {
    margin: 16px 0;
}

.olculer-baslik {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.olculer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    background: #f7f7f7;
    border-radius: 10px;

}

.olcu-satir {
    display: flex;
    flex-direction: column;
    align-items: left;
    padding: 4px 14px;
    gap: 2px;
}

.olcu-ayrac {
    width: 1px;
    height: 50px;
    background: #ddd;
    flex-shrink: 0;
}

.olcu-etiket {
    font-size: 11px;
    color: #999;
}

.olcu-deger {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .olcu-satir {
        padding: 4px 10px;
    }
    .olcu-deger {
        font-size: 13px;
    }
}

.olcu-ikon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.55;
    display: flex;
    align-items: center;
}

.olcu-ikon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.olcu-etiket {
    font-size: 13px;
    color: #777;
    flex: 1;
}

.olcu-deger {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

/* Dark mode uyumu */
@media (prefers-color-scheme: dark) {
    .olcu-satir {
        background: rgba(255,255,255,0.05);
        border-color: rgba(255,255,255,0.1);
    }
    .olcu-etiket { color: ##383838; }
    .olcu-deger { color: ##383838; }
    .ucretsiz-kargo-banner { background: rgba(45,122,45,0.15); border-color: rgba(45,122,45,0.4); }
    .ucretsiz-kargo-banner span { color: #000; }
    .ucretsiz-kargo-chip { background: rgba(45,122,45,0.15); border-color: rgba(45,122,45,0.4); color: #000; }
    .ucretsiz-kargo-chip svg { fill: #000; }
}

/* ────────────────────────────────────────────────────────────
   RENK VARYASYONLARİ — Küçük görseller (image swatches)
   Ecomus'un kendi .ecomus-variation-swatches sistemini büyütür
   ──────────────────────────────────────────────────────────── */

/* Swatch kapsayıcı */
.single-product .ecomus-variation-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

/* Her bir renk seçeneği */
.single-product .ecomus-variation-swatches .swatch-image {
    width: 70px !important;
    height: 70px !important;
    border-radius: 8px !important;
    overflow: hidden;
    border: 2px solid transparent !important;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    position: relative;
}

/* Seçili renk */
.single-product .ecomus-variation-swatches .swatch-image.selected,
.single-product .ecomus-variation-swatches .swatch-image:focus {
    border-color: #222 !important;
    transform: scale(1.05);
}

/* Hover efekti */
.single-product .ecomus-variation-swatches .swatch-image:hover {
    border-color: #888 !important;
}

/* Renk adı etiketi (tooltip yerine altına) */
.single-product .ecomus-variation-swatches .swatch-image::after {
    content: attr(data-value);
    display: block;
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-size: 10px;
    text-align: center;
    color: #666;
    white-space: nowrap;
}

/* Swatch sarmalayıcı: etikete yer aç */
.single-product .ecomus-variation-swatches {
    padding-bottom: 24px;
}

/* Renk varyasyonu için seçili görselin vurgulanması */
.woocommerce-variation-availability {
    font-size: 14px;
}

/* ────────────────────────────────────────────────────────────
   SEPETE EKLE BUTONU — Büyük ve belirgin (yaşlı kullanıcılar)
   ──────────────────────────────────────────────────────────── */
.single-product .single_add_to_cart_button {
    font-size: 18px !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    letter-spacing: 0.02em !important;
    min-height: 58px !important;
}

/* Miktar artır/azalt butonları */
.single-product .quantity input {
    font-size: 18px !important;
    height: 52px !important;
    width: 70px !important;
    text-align: center;
}

/* ────────────────────────────────────────────────────────────
   MOBİL UYUM
   ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .single-product .product_title {
        font-size: 22px !important;
    }
    .single-product .price {
        font-size: 24px !important;
    }
    .ucretsiz-kargo-banner {
        padding: 10px 14px;
    }
    .ucretsiz-kargo-banner span {
        font-size: 14px;
    }
    .single-product .ecomus-variation-swatches .swatch-image {
        width: 60px !important;
        height: 60px !important;
    }
}
.whatsapp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25D366;
    border: 1px solid #a8dfc0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    margin-top: 8px;
    transition: background .2s;
}

.whatsapp-chip:hover {
    background: #d0f0e0;
}

.whatsapp-chip svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
