﻿/* ===========================
   PuzzleSoft E-Ticaret (site.css)
   Beyaz kartlar + tek satır başlık/breadcrumb + rozetler + hover overlay
   =========================== */

/* ---------- Değişkenler ---------- */
:root {
    --ps-bg: #ffffff;
    --ps-border: #eeeeee;
    --ps-shadow-sm: 0 2px 10px rgba(0,0,0,.04);
    --ps-shadow-md: 0 6px 18px rgba(0,0,0,.06);
    --ps-shadow-lg: 0 10px 26px rgba(0,0,0,.10);
    --ps-text: #111111;
    --ps-muted: #6b7280;
    --ps-muted-2: #9aa0a6;
    --ps-accent: #f27a1a;
    --ps-card-radius: 4px;
    --ps-img-radius: 1px;
    --ps-gap-sm: 12px;
    --ps-gap-md: 14px;
    --ps-gap-lg: 16px;
}

/* ---------- Genel kaplar ---------- */
.ps-container {
    max-width: 1200px;
    margin-inline: auto;
    padding: 12px;
    background: var(--ps-bg);
}

.page-wrap {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 8px;
}

/* ---------- Üst başlık & breadcrumb ---------- */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 13px;
    color: var(--ps-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

    .breadcrumb > * {
        display: inline-block;
        max-width: 100%;
    }

        .breadcrumb > * + *::before {
            content: " / ";
            color: #c0c5cc;
            margin: 0 .5rem;
        }

    .breadcrumb a {
        color: var(--ps-muted);
        text-decoration: none;
    }

        .breadcrumb a:hover {
            color: #111;
        }

.page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Ürün grid ---------- */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: var(--ps-gap-sm);
}

@media (min-width:640px) {
    .ps-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: var(--ps-gap-md);
    }
}

@media (min-width:1024px) {
    .ps-grid {
        grid-template-columns: repeat(4,minmax(0,1fr));
        gap: var(--ps-gap-lg);
    }
}

/* ---------- Ürün kartı ---------- */
.prd-card {
    background: #fff;
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-card-radius);
    box-shadow: var(--ps-shadow-md);
    transition: transform .15s ease,box-shadow .15s ease,border-color .15s ease;
    contain: content;
}

    .prd-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--ps-shadow-lg);
    }

.prd-link {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 5px;
}

    .prd-link:focus-visible {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
        border-radius: var(--ps-card-radius);
    }

/* ---------- Görsel alanı + hover overlay ---------- */
.prd-img {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--ps-img-radius);
    overflow: hidden;
    background: #fff;
}

    .prd-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    /* beyaz film */
    .prd-img::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,.35);
        opacity: 0;
        transition: opacity .25s ease;
        pointer-events: none;
        z-index: 3;
    }
    /* HEMEN İNCELE görseli */
    .prd-img::after {
        content: "";
        position: absolute;
        inset: 0;
        background: url('/assets/images/incele3.png') center/cover no-repeat;
        opacity: 0;
        transition: opacity .25s ease;
        pointer-events: none;
        z-index: 4;
    }

.prd-card:hover .prd-img::before,
.prd-card:hover .prd-img::after,
.prd-link:focus-visible .prd-img::before,
.prd-link:focus-visible .prd-img::after {
    opacity: 1;
}

.prd-card:hover .prd-img img {
    filter: brightness(.92);
}

@media (prefers-reduced-motion:reduce) {
    .prd-img::before, .prd-img::after {
        transition: none;
    }
}

/* ---------- Rozetler ---------- */
.badge-stack {
    position: absolute;
    z-index: 7;
    display: flex;
    gap: 6px;
    width: 100%;
    pointer-events: none; /* rozetler tıklamayı engellemesin; clickable yapacaksan kaldır */
}

    .badge-stack.top-right {
        top: 8px;
        right: 8px;
        flex-direction: column;
        align-items: flex-end;
    }

.badge-item {
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 9999px;
    background: #1e88e5;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    max-width: clamp(160px,80%,320px);
    text-align: center;
}

    .badge-item span {
        display: block;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.15;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-wrap: break-word;
    }

/* ---------- Başlık & fiyat ---------- */
.prd-title {
    margin-top: 10px;
    font-size: 14px;
    color: #2b2b2b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prd-price {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

    .prd-price .old {
        color: var(--ps-muted-2);
        text-decoration: line-through;
        font-weight: 400;
        font-size: 12px;
        float: left;
    }

    .prd-price .new {
        color: var(--ps-accent);
        font-weight: 800;
        font-size: 14px;
        float: right;
    }

/* ---------- Boş durum ---------- */
.ps-empty {
    padding: 32px;
    text-align: center;
    color: #777;
}

/* ---------- Yardımcılar ---------- */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.visually-hidden {
    position: absolute !important;
    clip: rect(1px,1px,1px,1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}
/* Eski kullanımlar için */
.ps-imgwrap {
    aspect-ratio: 1/1;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
}

    .ps-imgwrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }



    /* ---------- Aksesuar Css (isteğe bağlı) ---------- */

.option-group {
    margin: 18px 0
}

    .option-group .group-title {
        font-weight: 700;
        font-size: 18px;
        margin: 0 0 4px
    }

    .option-group .group-desc {
        color: #6b7280;
        font-size: 13px;
        margin: 0 0 12px
    }

.option-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}

@media (min-width:768px) {
    .option-grid {
        grid-template-columns: repeat(3,minmax(0,1fr))
    }
}

.option-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow .15s ease,border-color .15s ease,transform .15s ease;
    cursor: pointer;
    overflow: hidden;
}

    .option-card:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
        transform: translateY(-1px)
    }

    .option-card:has(input[type=radio]:checked) {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37,99,235,.25);
    }

    .option-card input[type=radio] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer
    }

/* Görsel */
.option-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: #f6f7f9;
}

/* Alt bilgi */
.option-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px
}

.option-dot {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    border: 2px solid #9ca3af;
    background: #fff;
    flex: 0 0 auto;
    display: inline-block;
    position: relative;
}

.option-card:has(input[type=radio]:checked) .option-dot {
    border-color: #2563eb;
}

    .option-card:has(input[type=radio]:checked) .option-dot::after {
        content: "";
        position: absolute;
        inset: 3px;
        border-radius: 9999px;
        background: #2563eb;
    }

.option-text {
    flex: 1 1 auto;
    display: flex;
    justify-content: space-between;
    gap: 10px
}

.option-name {
    font-size: 14px;
    color: #111;
    font-weight: 600;
    line-height: 1.2
}

.option-price {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap
}

/* Disabled */
.option-card.is-disabled {
    opacity: .55;
    pointer-events: none
}
