/* ==========================================================================
   Ürün sayfası — sade görünüm
   Geri almak için: bu dosyayı ve product-simple.js'i silip
   .backup_snapshot_20261115_product_sade/product.php'yi geri koymak yeterli.
   ========================================================================== */

/* ---------- Puan + stok: tek, sakin satır ---------- */
.product-info-detail .pd-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
    margin: 0 0 22px;
}
.pd-stock {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; line-height: 1;
    padding: 6px 10px; border-radius: 999px;
}
.pd-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pd-stock--ok  { color: #166534; background: #f0fdf4; }
.pd-stock--low { color: #b45309; background: #fffbeb; }
.pd-stock--out { color: #b91c1c; background: #fef2f2; }

.pd-rating {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: #475569; text-decoration: none;
}
.pd-rating:hover span:last-child { text-decoration: underline; }
.pd-rating strong { color: #1e293b; font-weight: 700; }
.pd-rating__stars {
    position: relative; letter-spacing: 1px; font-size: 14px; line-height: 1;
    color: #e2e8f0;
    background: linear-gradient(90deg, #f59e0b var(--pd-pct, 0%), #e2e8f0 var(--pd-pct, 0%));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Seçenekler: liste yerine kompakt kutucuklar ---------- */
.product-options .option-group { margin-bottom: 20px; }
.product-options .group-label { margin-bottom: 10px; font-size: 14px; }

/* Kartlar 2'li sıralanır; sonda tek kalan kart ortalanır */
.product-options .opt-grid-text {
    display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center;
    gap: 10px;
}
.product-options .opt-grid-text > label {
    display: block; margin: 0;
    flex: 0 0 calc(50% - 5px); max-width: calc(50% - 5px);
}
.product-options .opt-grid-text .opt-card-txt {
    height: 100%; box-sizing: border-box;
    flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
    padding: 14px 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 14px;
    background: #fff; text-align: center;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.product-options .opt-grid-text .opt-card-txt:hover { border-color: #94a3b8; transform: translateY(-1px); }
.product-options .opt-grid-text .opt-card-txt .left {
    flex-direction: column; align-items: center; gap: 8px; width: 100%;
}
.product-options .opt-grid-text .opt-card-txt .left > div:last-child { width: 100%; }
.product-options .opt-grid-text .opt-card-txt .radio-circle,
.product-options .opt-grid-text .opt-card-txt .opt-desc { display: none; }

/* Görsel alanı: seçenek fotoğrafı ya da (fotoğraf yoksa) çizim */
.product-options .opt-grid-text .opt-card-txt .opt-thumb,
.pd-opt-vis {
    width: 76px; height: 76px; flex: none;
    border-radius: 12px; object-fit: cover; background: #f6f8f5;
}
.pd-opt-vis {
    display: flex; align-items: flex-end; justify-content: center;
    color: #2f6b45; overflow: hidden;
}
.pd-opt-vis svg { display: block; transform-origin: 50% 100%; transition: transform .3s ease; }
.product-options .opt-grid-text .opt-card-txt:hover .pd-opt-vis svg { transform: translateY(-2px); }
.pd-opt-vis--icon { align-items: center; }

.product-options .opt-grid-text .opt-card-txt .opt-name {
    font-size: 14px; font-weight: 700; color: #1e293b; line-height: 1.25;
}
.product-options .opt-grid-text .opt-card-txt .opt-name small {
    display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: #64748b;
}
.product-options .opt-grid-text .opt-card-txt .opt-price {
    margin-top: auto; font-size: 12.5px; font-weight: 700; color: #475569;
}
.product-options .opt-grid-text .opt-card-txt .opt-price span { font-size: 12.5px; font-weight: 500; }
.product-options .opt-grid-text .product-option-input:checked + .opt-card-txt {
    border-color: #166534; background: #f0fdf4; box-shadow: 0 0 0 1px #166534;
}
.product-options .opt-grid-text .product-option-input:checked + .opt-card-txt .pd-opt-vis,
.product-options .opt-grid-text .product-option-input:checked + .opt-card-txt .opt-thumb { background: #e3f1e6; }
.product-options .opt-grid-text .product-option-input:checked + .opt-card-txt .opt-price { color: #166534; }

@media (max-width: 380px) {
    .product-options .opt-grid-text .opt-card-txt .opt-thumb, .pd-opt-vis { width: 64px; height: 64px; }
}

/* Kutucuklarda seçim zaten görünüyor: başlık yanındaki tekrar eden ad gizlenir */
.product-options .option-group:has(.opt-grid-text) .selected-opt-display { display: none !important; }

/* Seçili seçeneğin açıklaması: grubun altında tek satır */
.pd-opt-hint {
    margin: 8px 2px 0; font-size: 12.5px; color: #64748b; line-height: 1.4;
    min-height: 0;
}
.pd-opt-hint:empty { display: none; }

/* ---------- Güven satırı ---------- */
.pd-trust {
    list-style: none; margin: 14px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
    font-size: 13px; color: #475569;
}
.pd-trust li { display: inline-flex; align-items: center; gap: 6px; }
.pd-trust svg { color: #166534; flex: none; }

/* ---------- Mobil: alta yapışan Sepete Ekle ---------- */
.pd-sticky { display: none; }
@media (max-width: 768px) {
    .pd-sticky {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 12px; right: 12px; z-index: 99998;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        max-width: 520px; margin: 0 auto;
        padding: 10px 10px 10px 16px; border-radius: 16px;
        background: rgba(255, 255, 255, .97);
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        box-shadow: 0 8px 30px rgba(15, 23, 42, .16); border: 1px solid #e2e8f0;
        transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none;
        transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .25s ease, bottom .35s ease;
    }
    .pd-sticky.is-on { transform: none; opacity: 1; pointer-events: auto; }
    /* Alt menü (dock) görünürken onun üstünde dur */
    .pd-sticky.has-dock { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
    .pd-sticky__info { min-width: 0; flex: 1; }
    .pd-sticky__name {
        font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .pd-sticky__price { font-size: 17px; font-weight: 700; color: #1e293b; }
    .pd-sticky__btn {
        flex: none; border: 0; border-radius: 12px; padding: 13px 18px;
        background: var(--forest, #1a2e1e); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
    }
    .pd-sticky__btn[disabled] { opacity: .5; cursor: not-allowed; }
}
@media (prefers-reduced-motion: reduce) {
    .pd-sticky { transition: none; }
}

/* Yapışkan buton açıkken WhatsApp balonu üstüne binmesin */
@media (max-width: 768px) {
    body.pd-sticky-on .whatsapp-float,
    body.pd-sticky-on #whatsapp-btn,
    body.pd-sticky-on .floating-whatsapp-btn { opacity: 0 !important; pointer-events: none !important; }
}

/* ---------- Benzer ürünler: son satırda kalan kartlar ortada ---------- */
.pd-related .product-grid {
    display: flex !important; flex-wrap: wrap; justify-content: center;
}
.pd-related .product-grid > .product-card { flex: 0 1 calc(25% - 15px); min-width: 220px; }
@media (max-width: 560px) {
    .pd-related .product-grid { gap: 12px !important; }
    .pd-related .product-grid > .product-card { flex-basis: calc(50% - 6px); min-width: 0; }
}

/* ---------- Mobil: Sepete Ekle tam genişlikte, büyük ---------- */
@media (max-width: 600px) {
    #add-to-cart-form div:has(> .btn-add-cart) {
        display: flex !important; flex-wrap: wrap !important; gap: 10px !important;
    }
    #add-to-cart-form div:has(> .btn-add-cart) > .quantity-stepper { order: 1; flex: 1 1 auto; justify-content: space-between; }
    #add-to-cart-form div:has(> .btn-add-cart) > .btn-wishlist-large { order: 2; flex: 0 0 54px; }
    #add-to-cart-form div:has(> .btn-add-cart) > .btn-share-large   { order: 3; flex: 0 0 54px; }
    #add-to-cart-form div:has(> .btn-add-cart) > .btn-add-cart {
        order: 4; flex: 1 1 100% !important; width: 100% !important;
        height: 56px !important; min-height: 56px; font-size: 17px !important; border-radius: 12px !important;
    }
    #add-to-cart-form .quantity-stepper input { flex: 1; }
    .pd-trust { gap: 6px 14px; font-size: 12.5px; }
}

/* Hediye bitki (Kalanchoe) bilgisi */
.pd-giftplant { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 11px 14px; border-radius: 12px;
    background: linear-gradient(135deg, #fdf2f4 0%, #f0fdf4 100%); border: 1px solid #f5d0d8; }
.pd-giftplant__ic { flex: none; width: 44px; height: 44px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center;
    color: #be185d; box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: hidden; }
.pd-giftplant__ic img { width: 100%; height: 100%; object-fit: cover; }
.pd-giftplant__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.pd-giftplant__txt b { color: #1a2e1e; font-size: 14px; }
.pd-giftplant__txt span { color: #475569; font-size: 12.5px; }
.pd-giftplant__tag { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: #166534; background: #dcfce7; padding: 4px 9px; border-radius: 999px; }
@media (max-width: 420px) { .pd-giftplant__tag { display: none; } }
