/* ============================================================
   ÜRÜN KARTI — VipLisans Design System
   includes/product-card.php → vl_product_card() çıktısını biçimlendirir.
   ============================================================ */

.pc {
    --pc-card: #fff; --pc-soft: #f6f6f4; --pc-line: #e8e8e5;
    --pc-ink: #121212; --pc-muted: #6f6f6c; --pc-subtle: #a3a3a0;
    --pc-o: #ff6417; --pc-ok: #0f9d6b;
    --pc-ease: cubic-bezier(.23, 1, .32, 1);

    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 8px;
    border-radius: 22px;
    background: var(--pc-card);
    border: 1px solid var(--pc-line);
    font-family: 'Gilroy', system-ui, -apple-system, sans-serif;
    color: var(--pc-ink);
    transition: border-color .15s ease, box-shadow .3s var(--pc-ease), transform .3s var(--pc-ease);
}
body.dark-mode .pc {
    --pc-card: #141414; --pc-soft: #1c1c1c; --pc-line: rgba(255, 255, 255, .08);
    --pc-ink: #f2f2f2; --pc-muted: #8c8c8c; --pc-subtle: #5e5e5e;
}
.pc--deal { border-color: #ffd2b9; }
@media (hover: hover) and (pointer: fine) {
    .pc:hover { border-color: #ffc4a3; box-shadow: 0 18px 36px -24px rgba(18, 18, 18, .35); transform: translateY(-2px); }
    .pc:hover .pc-img img { transform: scale(1.04); }
    .pc:hover .pc-view { background: var(--pc-ink); border-color: var(--pc-ink); color: #fff; }
    body.dark-mode .pc:hover .pc-view { background: #fff; color: #111; }
}

/* Görsel */
.pc-img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: var(--pc-soft);
    overflow: hidden;
}
.pc-img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 14px 18px 10px;
    mix-blend-mode: multiply;
    background: transparent !important;
    transition: transform .45s var(--pc-ease);
}
body.dark-mode .pc-img img { mix-blend-mode: normal; }
.pc--out .pc-img img { opacity: .55; filter: grayscale(.4); }

/* İndirim şeridi: kartın sol kenarından çıkar */
.pc-off {
    position: absolute; top: 20px; left: -1px; z-index: 3;
    padding: 6px 11px 5px 10px;
    border-radius: 0 12px 12px 0;
    line-height: 1; color: #fff;
    background: linear-gradient(135deg, #ff6417, #e2550c);
    box-shadow: 0 10px 18px -10px rgba(226, 85, 12, .8);
    pointer-events: none;
}
.pc-off b { display: block; font-size: 1.15rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pc-off small { display: block; margin-top: 2px; font-size: .52rem; font-weight: 700; letter-spacing: .12em; opacity: .9; }

.pc-flag {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 9px; border-radius: 999px;
    background: #121212; color: #ffd46b;
    font-size: .68rem; font-weight: 700; line-height: 1.2;
}
.pc-flag i { font-size: .6rem; }

/* Gövde */
.pc-body { display: flex; flex-direction: column; flex: 1; padding: 12px 6px 4px; }
.pc-name {
    margin: 0;
    font-size: .9rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em;
    min-height: 2.7em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-name a { color: var(--pc-ink); text-decoration: none; }
.pc-name a:hover { color: var(--pc-o); }

.pc-meta { margin-top: 6px; min-height: 1.2em; }
.pc-rate { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 600; color: var(--pc-ink); }
.pc-rate i { color: #f5a524; font-size: .72rem; }
.pc-rate small { font-weight: 500; color: var(--pc-muted); font-size: .72rem; }
.pc-rate--none { font-weight: 500; color: var(--pc-subtle); }
.pc-rate--none i { color: var(--pc-subtle); }

.pc-prices { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.pc-now { font-size: 1.32rem; font-weight: 600; line-height: 1; letter-spacing: -.035em; color: var(--pc-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-now small { font-size: .52em; font-weight: 600; color: var(--pc-muted); letter-spacing: 0; margin-left: 3px; }
.pc-old { font-size: .78rem; color: var(--pc-subtle); text-decoration: line-through; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pc-stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .74rem; font-weight: 600; color: var(--pc-ok); }
.pc-stock i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(15, 157, 107, .15); }
.pc-stock.is-out { color: #e5484d; }
.pc-stock.is-out i { box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }

/* Butonlar */
.pc-foot { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; }
.pc-add {
    flex: 1; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 12px;
    border: 0; border-radius: 999px;
    background: var(--pc-o); color: #fff;
    font: inherit; font-size: .86rem; font-weight: 800;
    cursor: pointer; white-space: nowrap;
    box-shadow: 0 10px 24px -10px rgba(255, 100, 23, .8);
    transition: transform .16s var(--pc-ease), box-shadow .16s var(--pc-ease), background-color .15s ease;
}
@media (hover: hover) and (pointer: fine) { .pc-add:not([disabled]):hover { background: #ff7329; } }
.pc-add:active:not([disabled]) { transform: scale(.98); box-shadow: 0 4px 12px -6px rgba(255, 100, 23, .8); }
.pc-add:focus-visible, .pc-view:focus-visible { outline: 2px solid var(--pc-o); outline-offset: 2px; }
.pc-add[disabled] { background: var(--pc-soft); color: var(--pc-subtle); box-shadow: none; cursor: not-allowed; }
.pc-add i { font-size: .82rem; }
.pc-view {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--pc-line);
    background: var(--pc-card); color: var(--pc-ink);
    font-size: .76rem; text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pc-view i { transform: rotate(-45deg); }

/* Bölüm başlığı (ana sayfa) */
.pc-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; font-family: 'Gilroy', system-ui, sans-serif; }
.pc-section-head h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 600; letter-spacing: -.03em; color: var(--pv-ink, #121212); }
.pc-more {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    padding: 8px 8px 8px 16px; border-radius: 999px;
    border: 1px solid var(--pv-line, #e8e8e5); background: var(--pv-card, #fff);
    color: var(--pv-ink, #121212); font-size: .84rem; font-weight: 600; text-decoration: none;
    transition: border-color .15s ease;
}
.pc-more span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--pv-ink, #121212); color: #fff; font-size: .7rem; transition: background-color .15s ease; }
.pc-more:hover { border-color: #ffc4a3; color: var(--pv-ink, #121212); }
.pc-more:hover span { background: var(--pv-o, #ff6417); }
body.dark-mode .pc-more span { background: #fff; color: #111; }

.pc-grid { --bs-gutter-x: 14px; --bs-gutter-y: 14px; }

/* Mobil */
@media (max-width: 767.98px) {
    .pc { padding: 6px; border-radius: 18px; }
    .pc-img { border-radius: 13px; }
    .pc-img img { padding: 10px 12px 8px; }
    .pc-off { top: 14px; padding: 5px 8px 4px 7px; border-radius: 0 10px 10px 0; }
    .pc-off b { font-size: .95rem; }
    .pc-off small { font-size: .46rem; letter-spacing: .08em; }
    .pc-flag { top: 7px; right: 7px; padding: 3px 7px; font-size: .62rem; }
    .pc-body { padding: 10px 4px 2px; }
    .pc-name { font-size: .82rem; }
    .pc-rate { font-size: .7rem; }
    .pc-rate--none { font-size: 0; gap: 0; }
    .pc-rate--none::after { content: 'Yeni ürün'; font-size: .7rem; margin-left: 4px; }
    .pc-now { font-size: 1.1rem; }
    .pc-old { font-size: .7rem; }
    .pc-stock { font-size: .68rem; }
    .pc-add { padding: 9px 8px; font-size: .78rem; gap: 6px; }
    .pc-add-long { display: none; }
    .pc-view { width: 36px; height: 36px; }
    .pc-grid { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }
    .pc-section-head { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
    .pc, .pc-img img { transition: none; }
}
