/* MOTOR: ürün kartı stilleri. Kaynak: storefront/partials/product-card.blade.php
   Partial'daki @once bloğu bazı sayfalarda tetiklenmediği için buraya alındı. */
/* === Product Card — pc- prefix ile tema çakışması önlenir === */
/* Equal height: kart row icindeki tum kartlar ayni yukseklikte */
.pc-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.pc-card .pc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pc-card .pc-title {
    min-height: 2.6em; /* 2 satir icin yer ayir */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-card .pc-btn-cart,
.pc-card .pc-btn-disabled {
    margin-top: auto; /* butonu kartin altina sabitle */
}
.pc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.pc-image {
    position: relative !important;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
}
.pc-image > a {
    display: block;
    width: 100%;
    height: 100%;
}
.pc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.pc-card:hover .pc-image img {
    transform: scale(1.05);
}

.pc-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    color: #ddd;
}

/* Badges */
.pc-badge {
    position: absolute !important;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    line-height: 1.4;
}
.pc-badge-sale {
    top: 10px;
    background: #ef4444;
}
.pc-badge-campaign {
    top: 10px;
    background: var(--primary-color, #8b5cf6);
}
.pc-badge-new {
    top: auto;
    bottom: 10px;
    background: var(--secondary-color, #22c55e);
}
.pc-badge-oos {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    font-size: 0.8rem;
    padding: 6px 16px;
}

/* 18+ urun: gorseli blurla + sol ust "+18" rozeti */
.pc-card.pc-adult .pc-image img,
.pc-card.pc-adult .pc-placeholder {
    filter: blur(16px);
}
.pc-badge-18 {
    top: 10px;
    left: 10px;
    background: #111827;
    font-size: 0.78rem;
    z-index: 5;
}
.pc-card.pc-adult .pc-badge-sale,
.pc-card.pc-adult .pc-badge-campaign {
    top: 42px;
}

/* Action buttons */
.pc-actions {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.3s;
    z-index: 3;
}
.pc-card:hover .pc-actions {
    opacity: 1;
    transform: translateX(0);
}

.pc-action-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #fff !important;
    color: #555 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 0 !important;
    font-size: 13px;
    line-height: 1;
}
.pc-action-btn:hover {
    background: var(--primary-color, #222) !important;
    color: #fff !important;
}
.pc-action-btn.active {
    background: #ef4444 !important;
    color: #fff !important;
}

/* Card info */
.pc-info {
    padding: 14px 16px 16px;
}

.pc-category {
    font-size: 0.7rem;
    color: #999;
    text-decoration: none;
    letter-spacing: 0.3px;
    display: block;
    margin-bottom: 4px;
}
.pc-category:hover {
    color: #222;
}

.pc-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}
.pc-title a {
    color: #222;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-title a:hover {
    color: #666;
}

/* Rating */
.pc-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}
.pc-stars {
    display: flex;
    gap: 1px;
}
.pc-stars i {
    color: #f59e0b;
    font-size: 0.65rem;
}
.pc-rating-count {
    font-size: 0.7rem;
    color: #aaa;
}

/* Price */
.pc-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}
.pc-price-current {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
}
.pc-price-old {
    font-size: 0.8rem;
    color: #aaa;
    text-decoration: line-through;
}

/* Tags */
.pc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}
.pc-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    background: #f5f5f5;
    color: #555;
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.5;
}
.pc-tag:hover {
    background: var(--primary-color, #222);
    color: #fff;
    text-decoration: none;
}

/* Buttons */
.pc-btn-cart {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    background: var(--primary-color, #222);
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.3s;
}
.pc-btn-cart:hover {
    background: color-mix(in srgb, var(--primary-color, #222) 80%, #000);
}

.pc-btn-disabled {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    background: #e5e7eb;
    color: #9ca3af;
    border: none;
    border-radius: 0;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .pc-actions {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    .pc-title {
        font-size: 0.85rem;
    }
    .pc-price-current {
        font-size: 1rem;
    }
}

/* EŞİT YÜKSEKLİK — etiketi olan ürün kartı uzayıp "Sepete Ekle" hizasını
   bozuyordu (ölçüm: 578px'e karşı 525px, düğme farkı 53px). Kartın içi
   zaten doğru kurulu (.pc-info flex:1, düğme margin-top:auto); eksik olan
   kartın SÜTUN yüksekliğini doldurmasıydı. */
.pc-wrap{height:100%}
.pc-card{height:100%}

/* ═══ KOMBİN / SET (24 Eyl 2026) ═══════════════════════════════════════
   Motor "Kombinler/Setler" bölümü (storefront/partials/kombin-bolumu) + kartın
   kombin kipi. 🔴 BURADA durmak ZORUNDA: partial içindeki @once <style> tek
   dosyalı temalarda (vera, ludo, nuans, taki-aksesuar, petshop-yeni) HİÇ
   basılmıyordu → parça kutuları dev kare, kartlar tam genişlik alt alta. */
.pc-card .pc-badge.pc-badge-set { background: #111827; }

.pc-kombin-parcalar {
    display: flex; gap: 6px; width: 100%;
    align-items: flex-start; margin: 2px 0 8px;
}
.pc-kombin-parca {
    position: relative; flex: 0 0 auto;
    width: calc((100% - 12px) / 3); aspect-ratio: 1;
    border: 1px solid rgba(0,0,0,.08); border-radius: 6px;
    overflow: hidden; background: #f5f5f5; display: block;
}
.pc-kombin-parca img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.pc-kombin-adet {
    position: absolute; right: 3px; bottom: 3px; padding: 0 4px;
    font-size: 10px; font-weight: 700; line-height: 16px;
    background: rgba(255,255,255,.92); color: #111; border-radius: 3px;
}
.pc-kombin-fazla {
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #555;
}
.pc-kombin-parcalar:has(.pc-kombin-fazla) .pc-kombin-parca { width: calc((100% - 18px) / 4); }
.pc-kombin-etiket {
    display: block; font-size: 10.5px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    opacity: .6; margin-bottom: 2px;
}
/* EŞİT KART (24 Eyl): başlığı 1 satır olan kartta şerit+fiyat+düğme yukarıda
   kalıyordu (dypetra ölçümü: 24px). Alt grup (.pc-kombin-alt = şerit → fiyat →
   düğme) kartın DİBİNE sabitlenir; başlık/kategori/puan farkını üstteki boşluk
   yutar. Kombin kartında etiket basılmaz (alt grubu uzatırdı). */
.pc-card.pc-kombin-kart .pc-info { display: flex; flex-direction: column; flex: 1 1 auto; }
.pc-kombin-alt { margin-top: auto; display: flex; flex-direction: column; width: 100%; }
.pc-card .pc-kombin-alt .pc-btn-cart,
.pc-card .pc-kombin-alt .pc-btn-disabled { margin-top: 0; }

/* ═══ TEMA SET KARTI SÖZLEŞMESİ (24 Eyl, 2. tur) ═══════════════════════════
   "Setler tüm temaların derisiyle yazılmalı, ortak bir şey olmamalı" → kartı TEMA
   çizer (components/.../kombin_karti), motor yalnız bu YAPI kancalarını verir.
   Kancaların RENK/YAZI kuralı YOK; şerit çerçevesi currentColor'dan türer,
   köşe --fk-kmb-kose ile temadan gelir. Hiza: alt grup kartın dibine sabit. */
.fk-kombin-izgara > .fk-kmb-kart { min-width: 0; }
.fk-kmb-kart { height: 100%; display: flex; flex-direction: column; }
.fk-kmb-govde { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.fk-kmb-alt { margin-top: auto; display: flex; flex-direction: column; width: 100%; }
.fk-kmb-parcalar {
    display: flex; gap: 6px; width: 100%;
    align-items: flex-start; margin: 10px 0 8px;
}
.fk-kmb-parca {
    position: relative; flex: 0 0 auto;
    width: calc((100% - 12px) / 3); aspect-ratio: 1;
    border-radius: var(--fk-kmb-kose, 6px); overflow: hidden; display: block;
    border: 1px solid rgba(0, 0, 0, .08);
    border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    background: color-mix(in srgb, currentColor 4%, transparent);
}
.fk-kmb-parca img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.fk-kmb-parcalar:has(.fk-kmb-fazla) .fk-kmb-parca { width: calc((100% - 18px) / 4); }
.fk-kmb-fazla { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.fk-kmb-adet {
    position: absolute; right: 3px; bottom: 3px; padding: 0 4px;
    font-size: 10px; font-weight: 700; line-height: 16px;
    background: rgba(255, 255, 255, .92); color: #111; border-radius: 3px;
}
.fk-kmb-etiket { display: block; font-size: 11.5px; letter-spacing: .02em; opacity: .65; margin-bottom: 2px; }
.fk-kmb-eski { text-decoration: line-through; opacity: .55; font-weight: 400; font-size: .85em; }
.fk-kmb-dugme { margin-top: 12px; }
.fk-kmb-dugme[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.fk-kombin-bas { text-align: center; margin: 0 auto 28px; max-width: 640px; }
.fk-kombin-baslik { margin: 0; }
.fk-kombin-alt { margin: 8px 0 0; opacity: .7; font-size: 15px; line-height: 1.5; }
.fk-kombin-bos { text-align: center; padding: 32px 0; opacity: .6; }
.fk-kombin-izgara {
    display: grid; gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 991px) { .fk-kombin-izgara { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    .fk-kombin-bas { margin-bottom: 18px; }
    .fk-kombin-izgara {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%;
        gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none;
    }
    .fk-kombin-izgara::-webkit-scrollbar { display: none; }
    .fk-kombin-izgara > * { scroll-snap-align: start; }
}
