/* ==========================================================================
   VİTRİN MODÜLLERİ — mini sepet çekmecesi, hızlı bakış paneli, stok çubuğu

   ON SEKİZ TEMANIN HEPSİNDE ÇALIŞIR ÇÜNKÜ RENK YAZMAZ.
   Her tema `:root` üzerinde aynı on iki simgeyi tanımlıyor (--primary,
   --accent, --card-bg, --border, --title, --text, --btn-radius,
   --card-radius…). Bu dosya YALNIZ o simgeleri kullanır; tema değişince
   modül de o temanın diline döner. Yedek değerler (var(--x, #…)) yalnız
   simgeyi tanımlamayan bir düzen için vardır.

   NEDEN AYRI DOSYA: tema kendi `layouts/app.blade.php` dosyasını getirdiğinde
   `css/shop.css` YÜKLENMEZ. Modül stilini oraya yazmak on sekiz temanın on
   ikisinde modülü stilsiz bırakırdı; bu dosya `@stack('head')` üzerinden her
   düzende ayrıca yüklenir.
   ========================================================================== */

/* ---------------- Ortak: örtü ---------------- */

.mdl-ortu {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 22, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 900;
}

.mdl-ortu[data-acik] {
    opacity: 1;
    visibility: visible;
}

/* ---------------- Mini sepet çekmecesi ---------------- */

.msep {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 950;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    height: 100%;
    background: var(--card-bg, #fff);
    border-left: 1px solid var(--border, #e5e7eb);
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.26s ease, visibility 0.26s ease;
}

.msep[data-acik] {
    transform: none;
    visibility: visible;
}

/* Hareketi azaltan ziyaretçide kayma yok, doğrudan görünür/gizli. */
@media (prefers-reduced-motion: reduce) {
    .msep,
    .mdl-ortu,
    .hbak {
        transition: none;
    }
}

.msep__baslik {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.msep__baslik h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--title, #111827);
}

.msep__kapat {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--btn-radius, 8px);
    background: transparent;
    color: var(--text, #374151);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.msep__kapat:hover {
    border-color: var(--primary, #111827);
    color: var(--primary, #111827);
}

.msep__govde {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 20px;
}

.msep__bos {
    padding: 48px 0;
    text-align: center;
    color: var(--text, #374151);
}

.msep__liste {
    margin: 0;
    padding: 0;
    list-style: none;
}

.msep__satir {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.msep__gorsel img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius, 8px);
    background: var(--page-bg, #f6f7f9);
}

.msep__ad {
    display: block;
    color: var(--title, #111827);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.msep__ad:hover {
    text-decoration: underline;
}

.msep__meta {
    margin: 4px 0 0;
    color: var(--text, #4b5563);
    font-size: 0.86rem;
}

.msep__uyari {
    margin: 4px 0 0;
    color: #b42318;
    font-size: 0.82rem;
}

.msep__sag {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.msep__tutar {
    color: var(--title, #111827);
    white-space: nowrap;
}

.msep__sil-form {
    margin: 0;
}

.msep__sil {
    border: 0;
    background: transparent;
    color: var(--text, #6b7280);
    font-size: 1.15rem;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
}

.msep__sil:hover {
    color: #b42318;
}

.msep__ozet {
    padding-top: 16px;
}

.msep__ozet-satir {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    color: var(--title, #111827);
}

.msep__ozet-satir--indirim strong {
    color: #067647;
}

.msep__not {
    margin: 8px 0 16px;
    color: var(--text, #6b7280);
    font-size: 0.82rem;
}

.msep__eylemler {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.msep__dugme,
.hbak__dugme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--primary, #111827);
    border-radius: var(--btn-radius, 8px);
    background: transparent;
    color: var(--primary, #111827);
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.msep__dugme--ana,
.hbak__dugme--ana {
    background: var(--primary, #111827);
    border-color: var(--primary, #111827);
    color: #fff;
}

.msep__dugme:hover,
.hbak__dugme:hover {
    filter: brightness(1.08);
}

.hbak__dugme[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------------- Üst çubuk sepet rozeti ---------------- */

/*
 * Rozet, temanın kendi sepet bağlantısının içine JavaScript ile eklenir;
 * bağlantı `position: relative` değilse köşeye değil metnin yanına oturur —
 * bu yüzden konumlama akışa saygılı (inline) tutuldu.
 */
.msep-rozet {
    display: inline-block;
    min-width: 20px;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent, #b45309);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
}

/* ---------------- Hızlı bakış ---------------- */

.hbak-ac {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--btn-radius, 8px);
    background: var(--card-bg, #fff);
    color: var(--text, #374151);
    font-size: 0.82rem;
    text-decoration: none;
}

.hbak-ac:hover {
    border-color: var(--primary, #111827);
    color: var(--primary, #111827);
}

.hbak {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 950;
    width: min(880px, calc(100vw - 32px));
    max-height: min(90vh, 720px);
    overflow-y: auto;
    padding: 0;
    border: 0;
    border-radius: var(--card-radius, 14px);
    background: var(--card-bg, #fff);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -48%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.hbak[data-acik] {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.hbak__kapat {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    background: var(--card-bg, #fff);
    color: var(--text, #374151);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.hbak__ic {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 28px;
    padding: 28px;
}

@media (max-width: 720px) {
    .hbak__ic {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

.hbak__gorsel {
    position: relative;
}

.hbak__gorsel img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius, 10px);
    background: var(--page-bg, #f6f7f9);
}

.hbak__rozet {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent, #b45309);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
}

.hbak__ustluk {
    margin: 0 0 6px;
    color: var(--text, #6b7280);
    font-size: 0.82rem;
    text-transform: none;
}

.hbak__ad {
    margin: 0 0 10px;
    color: var(--title, #111827);
    font-size: 1.4rem;
    line-height: 1.25;
}

.hbak__fiyat {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 12px;
}

.hbak__fiyat strong {
    color: var(--title, #111827);
    font-size: 1.35rem;
}

.hbak__fiyat s {
    color: var(--text, #9ca3af);
}

.hbak__ozet {
    margin: 0 0 14px;
    color: var(--text, #4b5563);
    line-height: 1.6;
}

.hbak__stok {
    margin: 0 0 16px;
    font-size: 0.88rem;
}

.hbak__stok--var { color: #067647; }
.hbak__stok--az { color: #b54708; }
.hbak__stok--yok { color: var(--text, #6b7280); }

.hbak__etiket {
    display: block;
    margin-bottom: 6px;
    color: var(--title, #111827);
    font-size: 0.86rem;
    font-weight: 600;
}

.hbak__secim,
.hbak__adet {
    width: 100%;
    min-height: 44px;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid var(--border, #d1d5db);
    border-radius: var(--btn-radius, 8px);
    background: var(--card-bg, #fff);
    color: var(--title, #111827);
    font: inherit;
}

.hbak__adet {
    max-width: 120px;
}

.hbak__eylemler {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 420px) {
    .hbak__eylemler,
    .msep__eylemler {
        grid-template-columns: 1fr;
    }
}

.hbak__bag {
    color: var(--accent, #b45309);
    font-size: 0.88rem;
}

/* ---------------- Stok çubuğu + canlı izleyici ---------------- */

.acil {
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 10px);
    background: var(--page-bg, #f9fafb);
}

.acil__metin {
    margin: 0 0 8px;
    color: var(--title, #111827);
    font-size: 0.9rem;
}

.acil__cubuk {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--border, #e5e7eb);
}

.acil__dolgu {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--accent, #b45309);
}

.acil__izleyici {
    margin: 10px 0 0;
    color: var(--text, #4b5563);
    font-size: 0.86rem;
}

/* Ekran okuyucuya görünür, gözle görünmez yardımcı. */
.mdl-gizli {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
