﻿/* Üretildi: docs/araclar/md_css_uret.js — kaynak: tasarım klasörü urunler.css (elle düzenlemeyin; eklemeler md-ek.css'e) */
/* Mordens Tekstil - Ürün Listesi Sayfası */

.md .plp {
    padding-bottom: clamp(48px, 7vw, 96px);
}

/* ========== SAYFA YOLU ========== */
.md .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    padding-block: 20px 24px;
    font-size: 13px;
    color: #8a8290;
}

.md .breadcrumb a {
    transition: color .2s;
}

.md .breadcrumb a:hover {
    color: var(--renk-metin);
}

.md .breadcrumb a::after {
    content: "/";
    margin: 0 10px;
    color: #cfc8d2;
}

.md .breadcrumb [aria-current] {
    color: var(--renk-metin);
}

/* ========== BAŞLIK ========== */
.md .plp-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px 64px;
    padding-bottom: 28px;
}

.md .plp-head__title {
    font-family: var(--font-baslik);
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.md .plp-head__lead {
    max-width: 420px;
    font-size: 15px;
    color: #6b6370;
    padding-bottom: 6px;
}

/* ========== KATEGORİ KISAYOLLARI ========== */
.md .plp-cats {
    display: flex;
    gap: 8px;
    padding-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.md .plp-cats::-webkit-scrollbar {
    display: none;
}

.md .plp-cat {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid #e3ddd5;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--renk-metin);
    transition: border-color .2s, background .2s, color .2s;
}

.md .plp-cat span {
    font-size: 12px;
    color: #9a929f;
    font-variant-numeric: tabular-nums;
}

.md .plp-cat:hover {
    border-color: #9a929f;
}

.md .plp-cat.is-active {
    border-color: var(--renk-metin);
    background: var(--renk-metin);
    color: #fff;
}

.md .plp-cat.is-active span {
    color: rgba(255, 255, 255, .6);
}

.md .plp-cat.is-empty {
    display: none;
}

/* ========== ARAÇ ÇUBUĞU ========== */
.md .plp-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-block: 14px;
    border-top: 1px solid #ebe5dd;
    border-bottom: 1px solid #ebe5dd;
}

.md .plp-bar__filter {
    display: none;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #e3ddd5;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
}

.md .plp-bar__filter svg {
    width: 18px;
    height: 18px;
}

.md .plp-bar__filter b {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--renk-metin);
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.md .plp-bar__count {
    font-size: 14px;
    color: #6b6370;
}

.md .plp-bar__count b {
    font-weight: 600;
    color: var(--renk-metin);
}

.md .plp-bar__right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.md .plp-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b6370;
}

.md .plp-sort select {
    height: 40px;
    padding: 0 34px 0 14px;
    border: 1px solid #e3ddd5;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b2230' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
    font: inherit;
    font-weight: 500;
    color: var(--renk-metin);
    appearance: none;
    cursor: pointer;
}

.md .plp-sort select:focus {
    outline: none;
    border-color: var(--renk-metin);
}

/* ========== SEÇİLİ FİLTRELER ========== */
.md .plp-active {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 16px;
}

.md .plp-active[hidden] {
    display: none;
}

.md .plp-active__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.md .plp-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 12px;
    border-radius: 4px;
    background: #f4f1ec;
    font-size: 13px;
    transition: background .2s;
}

.md .plp-chip svg {
    width: 14px;
    height: 14px;
    color: #6b6370;
}

.md .plp-chip:hover {
    background: #ebe5dd;
}

.md .plp-active__clear {
    font-size: 13px;
    font-weight: 500;
    color: #6b6370;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.md .plp-active__clear:hover {
    color: var(--renk-metin);
}

/* ========== GÖVDE: FİLTRE + ÜRÜNLER ========== */
.md .plp-body {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: clamp(28px, 3vw, 48px);
    align-items: start;
    padding-top: 28px;
}

/* Filtreler (masaüstü: yan sütun) */
.md .filters__panel {
    position: sticky;
    top: 104px;
}

.md .filters__overlay, .md .filters__head, .md .filters__foot {
    display: none;
}

.md .f-group {
    border-bottom: 1px solid #ebe5dd;
}

.md .f-group:first-child summary {
    padding-top: 0;
}

.md .f-group summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 16px;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.md .f-group summary::-webkit-details-marker {
    display: none;
}

.md .f-group summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 3px;
    border-right: 1.5px solid #9a929f;
    border-bottom: 1.5px solid #9a929f;
    transform: translateY(-3px) rotate(45deg);
    transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}

.md .f-group[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.md .f-group__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 18px;
}

.md .f-group__body--pills {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.md .f-group__body--colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
}

/* Onay kutusu satırı */
.md .f-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block: 6px;
    font-size: 14px;
    color: #4a4250;
    cursor: pointer;
}

.md .f-check input, .md .f-pill input, .md .f-color input, .md .f-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.md .f-check span::before {
    content: "";
    display: inline-block;
    vertical-align: -3px;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 1px solid #cfc8d2;
    border-radius: 3px;
    background: #fff center / 12px no-repeat;
    transition: background-color .2s, border-color .2s;
}

.md .f-check:hover span::before {
    border-color: var(--renk-metin);
}

.md .f-check input:checked + span {
    color: var(--renk-metin);
    font-weight: 500;
}

.md .f-check input:checked + span::before {
    border-color: var(--renk-metin);
    background-color: var(--renk-metin);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.md .f-check input:focus-visible + span::before, .md .f-pill input:focus-visible + span, .md .f-color input:focus-visible + i, .md .f-switch input:focus-visible + .f-switch__ui {
    outline: 2px solid var(--renk-metin);
    outline-offset: 2px;
}

.md .f-check small {
    margin-left: auto;
    font-size: 12px;
    color: #9a929f;
    font-variant-numeric: tabular-nums;
}

.md .f-check.is-zero {
    opacity: .4;
}

/* Hap düğmeler (ölçü, hızlı fiyat) */
.md .f-pill span, .md .f-pill-btn {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #e3ddd5;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #4a4250;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
}

.md .f-pill span:hover, .md .f-pill-btn:hover {
    border-color: #9a929f;
    color: var(--renk-metin);
}

.md .f-pill input:checked + span, .md .f-pill-btn.is-active {
    border-color: var(--renk-metin);
    background: var(--renk-metin);
    color: #fff;
}

/* Renk */
.md .f-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b6370;
    cursor: pointer;
}

.md .f-color i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 0 0 0 #fff, 0 0 0 0 transparent;
    transition: box-shadow .2s;
}

.md .f-color:hover i {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 0 0 2px #fff, 0 0 0 3px #cfc8d2;
}

.md .f-color input:checked + i {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 0 0 2px #fff, 0 0 0 3px var(--renk-metin);
}

.md .f-color input:checked ~ span {
    color: var(--renk-metin);
    font-weight: 500;
}

/* Fiyat */
.md .f-price {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.md .f-price label {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #8a8290;
}

.md .f-price input {
    width: 100%;
    height: 40px;
    padding: 0 32px 0 10px;
    border: 1px solid #e3ddd5;
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    color: var(--renk-metin);
    -moz-appearance: textfield;
}

.md .f-price input::-webkit-outer-spin-button, .md .f-price input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.md .f-price input:focus {
    outline: none;
    border-color: var(--renk-metin);
}

.md .f-price em {
    position: absolute;
    right: 10px;
    bottom: 11px;
    font-style: normal;
    font-size: 12px;
    color: #9a929f;
}

.md .f-price__quick {
    display: flex;
}

/* Anahtar (TRYP) */
.md .f-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 18px;
    font-size: 14px;
    color: #4a4250;
    cursor: pointer;
}

.md .f-switch__ui {
    position: relative;
    flex: 0 0 auto;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #d9d2c8;
    transition: background .25s;
}

.md .f-switch__ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}

.md .f-switch input:checked + .f-switch__ui {
    background: var(--renk-metin);
}

.md .f-switch input:checked + .f-switch__ui::after {
    transform: translateX(16px);
}

/* ========== ÜRÜN IZGARASI ========== */
.md .plp-grid {
    --sutun: 3;
    display: grid;
    grid-template-columns: repeat(var(--sutun), minmax(0, 1fr));
    gap: 40px 24px;
}

.md .plp-grid > * {
    animation: plp-in .5s cubic-bezier(.2, .7, .2, 1) both;
}

.md .plp-grid > [hidden] {
    display: none;
}

@keyframes plp-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.md .plp-grid .p-card__media > a {
    display: block;
}

.md .plp-grid .p-card__tags {
    right: 56px;
}

.md .plp-promo .promo-card__text {
    padding: 28px 24px 20px;
}

.md .plp-promo img {
    aspect-ratio: 4 / 5;
    flex: 1;
    min-height: 0;
}

/* Sonuç yok */
.md .plp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 72px 24px;
    border-radius: 10px;
    background: #faf8f5;
    text-align: center;
}

.md .plp-empty[hidden] {
    display: none;
}

.md .plp-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
    color: #9a929f;
}

.md .plp-empty h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.015em;
}

.md .plp-empty p {
    max-width: 360px;
    font-size: 14px;
    color: #6b6370;
    margin-bottom: 10px;
}

/* Daha fazla göster */
.md .plp-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 56px;
}

.md .plp-more[hidden] {
    display: none;
}

.md .plp-more p {
    font-size: 13px;
    color: #6b6370;
}

.md .plp-more__bar {
    width: 200px;
    height: 2px;
    background: #e6e0d8;
    border-radius: 2px;
    overflow: hidden;
}

.md .plp-more__bar span {
    display: block;
    height: 100%;
    background: var(--renk-metin);
    transition: width .4s cubic-bezier(.2, .7, .2, 1);
}

.md .plp-more .btn-outline {
    margin-top: 6px;
}

.md .plp-more.is-done .btn-outline {
    display: none;
}

/* Ortak koyu buton (filtre paneli) */
.md .btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border-radius: 6px;
    background: var(--renk-metin);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: background .25s;
}

.md .btn-dark:hover {
    background: #41364a;
}

/* Otel şeridi */
.md .plp-strip {
    margin-top: clamp(56px, 7vw, 96px);
}

/* ========== DUYARLI ========== */
/* Tablet ve mobil: filtreler soldan açılan panel */
@media (max-width: 1024px) {
    .md .plp-body {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 24px;
    }

    .md .plp-bar__filter {
        display: inline-flex;
    }

    .md .filters {
        position: fixed;
        inset: 0;
        z-index: 200;
        visibility: hidden;
        transition: visibility 0s .4s;
    }

    .md .filters.is-open {
        visibility: visible;
        transition: none;
    }

    .md .filters__overlay {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(43, 34, 48, .28);
        backdrop-filter: blur(2px);
        opacity: 0;
        transition: opacity .4s;
    }

    .md .filters.is-open .filters__overlay {
        opacity: 1;
    }

    .md .filters__panel {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: min(380px, 88vw);
        background: #fff;
        transform: translateX(-100%);
        transition: transform .4s cubic-bezier(.2, .7, .2, 1);
    }

    .md .filters.is-open .filters__panel {
        transform: none;
        transition-duration: .55s;
    }

    .md .filters__head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #ebe5dd;
    }

    .md .filters__head h2 {
        font-size: 18px;
        font-weight: 600;
    }

    .md .filters__close {
        display: flex;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
    }

    .md .filters__close svg {
        width: 22px;
        height: 22px;
    }

    .md .filters__scroll {
        flex: 1;
        overflow-y: auto;
        padding: 16px 20px 0;
    }

    .md .filters__foot {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 10px;
        padding: 14px 20px;
        border-top: 1px solid #ebe5dd;
    }

    .md .filters__foot .btn-outline {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .md .plp-head {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 20px;
    }

    .md .plp-cats {
        margin-inline: calc(var(--sayfa-bosluk) * -1);
        padding-inline: var(--sayfa-bosluk);
        padding-bottom: 18px;
    }

    .md .plp-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .md .plp-bar__count {
        order: 3;
        flex: 0 0 100%;
        font-size: 13px;
    }

    .md .plp-bar__right {
        flex: 1 1 0;
        min-width: 0;
    }

    .md .plp-sort {
        flex: 1;
    }

    .md .plp-sort select {
        width: 100%;
    }

    .md .plp-sort span {
        display: none;
    }

    .md .plp-grid, .md .plp-grid[data-sutun="3"] {
        --sutun: 2;
        gap: 28px 12px;
    }

    .md .plp-promo {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .md .plp-promo .promo-card__text {
        padding: 20px 18px;
    }

    .md .plp-promo .promo-card__title {
        font-size: 20px;
    }

    .md .plp-promo img {
        width: 42%;
        aspect-ratio: auto;
        flex: 0 0 42%;
    }

    .md .plp-grid .p-card__body {
        padding-top: 12px;
    }

    .md .plp-grid .p-card__title {
        font-size: 14px;
    }

    .md .plp-grid .p-card__tags .tag:nth-child(n+2) {
        display: none;
    }

    .md .plp-grid .swatches {
        gap: 6px;
    }

    .md .plp-grid .swatch {
        width: 34px;
        height: 34px;
    }

    .md .plp-grid .price__value {
        font-size: 15px;
    }

    .md .plp-grid .size {
        padding: 4px 8px;
        font-size: 11px;
    }

    .md .plp-strip {
        grid-template-columns: 1fr;
    }

    .md .plp-strip img {
        height: 200px;
        order: -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .md .plp-grid > *, .md .filters__panel, .md .filters__overlay {
        animation: none;
        transition: none;
    }
}
