/*
 * Sepet / Giriş / Favoriler sayfalarının ve bunlara bağlı global bileşenlerin
 * (toast, rozet, favori kalbi) stilleri.
 *
 * NOT: Bu projede Tailwind build adımı yok — build/assets/app.css statik olarak
 * derlenmiş halde geliyor ve yalnızca mevcut view'larda geçen sınıfları içeriyor.
 * Bu yüzden yeni sayfalar Tailwind yardımcı sınıfı eklemek yerine buradaki
 * semantik sınıfları kullanır. app.css'ten SONRA yüklenir.
 */

:root {
    --gold: #C5A880;
    --gold-dark: #a07855;
    --surface: #F5F5F5;
    --line: rgba(0, 0, 0, .1);
    --line-soft: rgba(0, 0, 0, .06);
    --muted: rgba(0, 0, 0, .5);
}

/* ---------------------------------------------------------------- yardımcılar */

/* display:grid/flex taşıyan bölümler JS ile hidden'lanıyor — öznitelik kazansın. */
[hidden] { display: none !important; }

.s-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .s-wrap { padding: 0 48px; } }

.s-narrow { max-width: 560px; margin: 0 auto; }

/* Sayfa başlığı: ince breadcrumb + iri, sıkı tipografi. */
.s-head { padding: 48px 0 32px; }
.s-head__crumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 10px; font-weight: 800; letter-spacing: .15em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.s-head__crumb a { transition: color .2s; }
.s-head__crumb a:hover { color: #000; }
.s-head__crumb span { color: rgba(0, 0, 0, .2); }
.s-head__title {
    font-size: 34px; font-weight: 900; line-height: 1;
    letter-spacing: -.02em; text-transform: uppercase;
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
@media (min-width: 768px) { .s-head__title { font-size: 46px; } }
.s-head__count {
    font-size: 11px; font-weight: 900; letter-spacing: .18em;
    color: var(--gold); text-transform: uppercase;
}
.s-head__sub { margin-top: 10px; font-size: 13px; color: var(--muted); font-weight: 300; }

/* ------------------------------------------------------------------- butonlar */

.s-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase;
    padding: 16px 32px; border: 1px solid transparent; cursor: pointer;
    transition: background-color .22s, color .22s, border-color .22s, transform .12s;
    text-align: center; line-height: 1;
}
.s-btn:active { transform: translateY(1px); }
.s-btn--primary { background: #000; color: #fff; }
.s-btn--primary:hover { background: var(--gold); }
.s-btn--gold { background: var(--gold); color: #fff; }
.s-btn--gold:hover { background: #000; }
.s-btn--ghost { border-color: rgba(0, 0, 0, .15); color: #000; background: transparent; }
.s-btn--ghost:hover { border-color: #000; background: #000; color: #fff; }
/* Ürün detayındaki favori butonu (kart üstündeki .fav-btn'in metinli karşılığı) */
.s-btn--ghost[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-dark); }
.s-btn--ghost[aria-pressed="true"] svg { fill: currentColor; }
.s-btn--block { width: 100%; }
.s-btn[disabled] { opacity: .35; cursor: not-allowed; }
.s-btn[disabled]:hover { background: #000; color: #fff; }

.s-link {
    font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 0, 0, .2); padding-bottom: 2px; transition: color .2s, border-color .2s;
}
.s-link:hover { color: var(--gold); border-color: var(--gold); }

/* --------------------------------------------------------------- boş durumlar */

.s-empty { text-align: center; padding: 96px 24px 112px; }
.s-empty__icon {
    width: 112px; height: 112px; margin: 0 auto 40px;
    background: #F7F7F7; display: flex; align-items: center; justify-content: center;
    color: rgba(0, 0, 0, .22);
}
.s-empty__title {
    font-size: 24px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .1em; margin-bottom: 18px;
}
.s-empty__text {
    font-size: 13px; color: rgba(0, 0, 0, .42); font-weight: 500;
    text-transform: uppercase; letter-spacing: .06em;
    max-width: 420px; margin: 0 auto 40px; line-height: 1.9;
}
.s-empty .s-btn { min-width: 280px; padding: 20px 32px; }

/* =========================================================== SEPET ============ */

.cart-grid { display: grid; gap: 40px; align-items: start; padding-bottom: 96px; }
@media (min-width: 1024px) { .cart-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; } }

/* Ücretsiz kargo eşiğine kalan tutarı gösteren ilerleme çubuğu. */
.ship {
    border: 1px solid var(--line-soft); background: var(--surface);
    padding: 18px 20px; margin-bottom: 28px;
}
.ship__text { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.ship__text b { color: var(--gold-dark); }
.ship__track { height: 4px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.ship__fill {
    height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.ship--done { border-color: rgba(197, 168, 128, .45); background: rgba(197, 168, 128, .08); }

/* Satır: görsel + bilgi + adet + tutar */
.cart-line {
    display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 18px;
    padding: 22px 0; border-bottom: 1px solid var(--line-soft);
    animation: s-fade-in .3s ease both;
}
@media (min-width: 640px) { .cart-line { grid-template-columns: 110px minmax(0, 1fr) auto; gap: 24px; align-items: center; } }
.cart-line--leaving { opacity: 0; transform: translateX(-12px); transition: opacity .25s, transform .25s; }

.cart-line__img { aspect-ratio: 3 / 4; background: var(--surface); overflow: hidden; }
.cart-line__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cart-line__name {
    font-size: 13px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .04em; line-height: 1.35; display: block;
}
.cart-line__name:hover { color: var(--gold-dark); }
.cart-line__meta { font-size: 11px; color: var(--muted); margin-top: 5px; letter-spacing: .06em; text-transform: uppercase; }
.cart-line__unit { font-size: 13px; margin-top: 8px; color: rgba(0, 0, 0, .7); }

.cart-line__actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
@media (min-width: 640px) { .cart-line__actions { margin-top: 0; } }

.cart-line__total { font-size: 15px; font-weight: 900; white-space: nowrap; text-align: right; min-width: 96px; }

.cart-line__remove {
    font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(0, 0, 0, .35); transition: color .2s; background: none; border: 0; cursor: pointer; padding: 0;
}
.cart-line__remove:hover { color: #b91c1c; }

/* Adet seçici */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); height: 38px; }
.qty__btn {
    width: 34px; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1; background: none; border: 0; cursor: pointer;
    color: rgba(0, 0, 0, .55); transition: background-color .18s, color .18s;
}
.qty__btn:hover { background: #000; color: #fff; }
.qty__btn[disabled] { opacity: .25; cursor: not-allowed; }
.qty__btn[disabled]:hover { background: none; color: rgba(0, 0, 0, .55); }
.qty__val {
    width: 40px; text-align: center; font-size: 13px; font-weight: 800;
    border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    height: 100%; outline: none; -moz-appearance: textfield; background: transparent;
}
.qty__val::-webkit-outer-spin-button, .qty__val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Sipariş özeti — masaüstünde yapışkan */
.summary { border: 1px solid var(--line-soft); padding: 28px 26px; background: #fff; }
@media (min-width: 1024px) { .summary { position: sticky; top: 96px; } }
.summary__title {
    font-size: 12px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase;
    padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px;
}
.summary__row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 7px 0; color: rgba(0, 0, 0, .65); }
.summary__row b { color: #000; font-weight: 700; }
.summary__row--free b { color: var(--gold-dark); }
.summary__total {
    display: flex; justify-content: space-between; align-items: baseline;
    border-top: 1px solid var(--line-soft); margin-top: 16px; padding-top: 18px;
}
.summary__total span { font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.summary__total b { font-size: 24px; font-weight: 900; }
.summary__note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.6; }

/* Kupon alanı */
.coupon { display: flex; gap: 0; margin: 18px 0 4px; }
.coupon input {
    flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-right: 0;
    padding: 0 14px; height: 46px; font-size: 11px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; outline: none; background: transparent;
}
.coupon input:focus { border-color: #000; }
.coupon button {
    border: 1px solid #000; background: #000; color: #fff; padding: 0 18px; height: 46px;
    font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
    transition: background-color .2s;
}
.coupon button:hover { background: var(--gold); border-color: var(--gold); }

/* Güven rozetleri */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); margin-top: 24px; }
.trust__item { background: #fff; padding: 16px 8px; text-align: center; }
.trust__item svg { margin: 0 auto 8px; color: var(--gold); display: block; }
.trust__item span { font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: rgba(0, 0, 0, .6); line-height: 1.4; display: block; }

/* =========================================================== FAVORİLER ======== */

.fav-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-bottom: 96px; }
@media (min-width: 768px) { .fav-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.fav-cell { animation: s-fade-in .3s ease both; }
.fav-cell--leaving { opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }

.fav-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
    padding: 14px 0; margin-bottom: 32px;
}
.fav-bar__hint { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.fav-bar__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fav-bar .s-btn { padding: 12px 22px; }

/* ============================================================ GİRİŞ ========== */

.auth { display: grid; min-height: 78vh; }
@media (min-width: 1024px) { .auth { grid-template-columns: 1.05fr 1fr; } }

/* Sol: editoryal marka paneli (mobilde gizli) */
.auth__aside {
    display: none; position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 60%, #000 100%);
    padding: 64px 56px; flex-direction: column; justify-content: space-between;
}
@media (min-width: 1024px) { .auth__aside { display: flex; } }
.auth__aside::after {
    content: ''; position: absolute; inset: auto -20% -30% -20%; height: 60%;
    background: radial-gradient(ellipse at center, rgba(197, 168, 128, .22), transparent 70%);
    pointer-events: none;
}
.auth__brand { font-size: 12px; font-weight: 900; letter-spacing: .35em; text-transform: uppercase; }
.auth__slogan { position: relative; z-index: 1; }
.auth__slogan h2 {
    font-size: 44px; font-weight: 900; line-height: 1.05; text-transform: uppercase;
    letter-spacing: -.02em; margin-bottom: 18px;
}
.auth__slogan h2 em { font-style: italic; color: var(--gold); }
.auth__slogan p { font-size: 14px; font-weight: 300; color: rgba(255, 255, 255, .6); line-height: 1.7; max-width: 380px; }
.auth__perks { position: relative; z-index: 1; display: grid; gap: 14px; }
.auth__perk { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.auth__perk svg { color: var(--gold); flex: 0 0 auto; }

/* Sağ: form paneli */
.auth__main { display: flex; align-items: center; justify-content: center; padding: 48px 24px 80px; }
@media (min-width: 768px) { .auth__main { padding: 64px 48px 96px; } }
.auth__panel { width: 100%; max-width: 420px; }

/* Giriş / Kayıt sekmeleri */
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); margin-bottom: 32px; }
.tabs__btn {
    padding: 15px 8px; font-size: 11px; font-weight: 900; letter-spacing: .16em;
    text-transform: uppercase; background: transparent; border: 0; cursor: pointer;
    color: var(--muted); transition: background-color .22s, color .22s;
}
.tabs__btn[aria-selected="true"] { background: #000; color: #fff; }
.tabs__btn:not([aria-selected="true"]):hover { color: #000; }

.auth__title { font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 8px; }
.auth__lead { font-size: 13px; color: var(--muted); font-weight: 300; margin-bottom: 28px; line-height: 1.6; }

/* Yüzen etiketli alan */
.field { position: relative; margin-bottom: 18px; }
.field input {
    width: 100%; height: 58px; padding: 22px 16px 8px; border: 1px solid var(--line);
    font-size: 14px; outline: none; background: transparent; transition: border-color .2s;
}
.field input:focus { border-color: #000; }
.field label {
    position: absolute; left: 16px; top: 19px; font-size: 13px; color: rgba(0, 0, 0, .4);
    pointer-events: none; transition: transform .18s ease, font-size .18s ease, color .18s ease;
    transform-origin: left top;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    transform: translateY(-11px) scale(.78); color: var(--gold-dark); font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase;
}
.field--pw input { padding-right: 52px; }
.field__eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    background: none; border: 0; cursor: pointer; color: rgba(0, 0, 0, .35); transition: color .2s;
}
.field__eye:hover { color: #000; }

/* Parola gücü göstergesi (kayıt sekmesi) */
.pwmeter { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; }
.pwmeter__track { flex: 1 1 auto; height: 3px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.pwmeter__fill { height: 100%; width: 0; background: #b91c1c; transition: width .3s, background-color .3s; }
.pwmeter__label { font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-width: 46px; text-align: right; }

.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 9px; font-size: 12px; color: rgba(0, 0, 0, .6); cursor: pointer; line-height: 1.5; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); flex: 0 0 auto; cursor: pointer; }
.check a { text-decoration: underline; text-underline-offset: 2px; }
.check a:hover { color: var(--gold-dark); }

.auth__sep { display: flex; align-items: center; gap: 14px; margin: 28px 0; color: rgba(0, 0, 0, .3); }
.auth__sep::before, .auth__sep::after { content: ''; height: 1px; background: var(--line-soft); flex: 1 1 auto; }
.auth__sep span { font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }

.social { display: grid; gap: 10px; }
.social__btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; border: 1px solid var(--line); background: #fff; cursor: pointer;
    font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
    transition: border-color .2s, background-color .2s;
}
.social__btn:hover { border-color: #000; background: var(--surface); }

.auth__foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 26px; line-height: 1.7; }
.auth__foot button {
    background: none; border: 0; padding: 0; cursor: pointer; font-weight: 900;
    font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
    border-bottom: 1px solid rgba(0, 0, 0, .25);
}
.auth__foot button:hover { color: var(--gold-dark); border-color: var(--gold-dark); }

/* ================================================== GLOBAL BİLEŞENLER ======== */

/* Başlıktaki sepet/favori sayaç rozeti */
.badge-count {
    position: absolute; top: -7px; right: -9px; min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 9999px; background: var(--gold); color: #fff;
    font-size: 9px; font-weight: 900; line-height: 16px; text-align: center;
    animation: s-pop .28s cubic-bezier(.34, 1.56, .64, 1);
}
.badge-count[hidden] { display: none; }

/* Ürün kartı üzerindeki favori kalbi */
.fav-btn {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 34px; height: 34px; border-radius: 9999px; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .92); color: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s, color .2s, background-color .2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}
.product-tile:hover .fav-btn, .fav-btn[aria-pressed="true"] { opacity: 1; transform: scale(1); }
.fav-btn:hover { background: #fff; color: var(--gold-dark); }
.fav-btn[aria-pressed="true"] { color: var(--gold-dark); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.fav-btn--beat { animation: s-beat .4s ease; }
@media (hover: none) { .fav-btn { opacity: 1; transform: scale(1); } }

/* Kart üzerinde hover ile beliren hızlı sepete ekle */
.quick-add {
    position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2;
    height: 42px; border: 0; cursor: pointer; background: rgba(0, 0, 0, .88); color: #fff;
    font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
    opacity: 0; transform: translateY(8px); transition: opacity .24s, transform .24s, background-color .2s;
}
.product-tile:hover .quick-add { opacity: 1; transform: translateY(0); }
.quick-add:hover { background: var(--gold); }
@media (hover: none) { .quick-add { opacity: 1; transform: none; } }

/* Kalp ve hızlı-ekle butonlarının konumlandığı kap: görsel alanı. */
.product-tile__media { position: relative; }

/* Toast bildirimleri */
.toast-wrap {
    position: fixed; z-index: 60; right: 16px; bottom: 88px;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
@media (min-width: 768px) { .toast-wrap { right: 24px; bottom: 24px; } }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 12px;
    background: #000; color: #fff; padding: 14px 18px; min-width: 250px; max-width: 340px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
    animation: s-toast-in .3s cubic-bezier(.34, 1.2, .64, 1) both;
}
.toast--out { animation: s-toast-out .25s ease forwards; }
.toast__icon { color: var(--gold); flex: 0 0 auto; }
.toast__text { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; flex: 1 1 auto; }
.toast__action {
    background: none; border: 0; cursor: pointer; color: var(--gold); flex: 0 0 auto;
    font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
    border-bottom: 1px solid currentColor; padding: 0 0 1px;
}
.toast__action:hover { color: #fff; }

/* ------------------------------------------------------------------ animasyon */

@keyframes s-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes s-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes s-beat { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.28); } 65% { transform: scale(.94); } }
@keyframes s-toast-in { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes s-toast-out { to { opacity: 0; transform: translateX(24px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
    .cart-line, .fav-cell, .badge-count, .toast, .fav-btn--beat { animation: none !important; }
    .ship__fill, .fav-btn, .quick-add, .field label { transition-duration: .01ms !important; }
}
