/* ============ Tasarım değişkenleri ============ */
:root {
    --bg: #f5f6fa;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e7e9f0;
    --card: #ffffff;
    --brand: #6366f1;
    --brand-2: #8b5cf6;
    --accent: #f59e0b;
    --radius: 1rem;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, .10);
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--bs-body-font-family);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-2); }

/* ============ Genel bileşenler ============ */
.card {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--card);
}

.table > :not(caption) > * > * { padding: .85rem 1rem; }
.table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: var(--line);
}

.bg-white.border.rounded { border: 0 !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm); overflow: hidden; }

.form-control, .form-select {
    border-radius: .7rem;
    border-color: var(--line);
    padding: .6rem .85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15);
}

.btn { border-radius: .7rem; font-weight: 600; }

/* Ana buton: eski btn-warning sınıfları da aynı gradyanı kullanır */
.btn-brand,
.btn-warning {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 6px 18px rgba(99, 102, 241, .28);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-brand:hover,
.btn-warning:hover,
.btn-brand:focus,
.btn-warning:focus {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, .34);
}
.btn-warning:disabled, .btn-brand:disabled { opacity: .5; box-shadow: none; transform: none; }

.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-outline-dark { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline-dark:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge { font-weight: 600; border-radius: .5rem; padding: .4em .65em; }

.alert { border: 0; border-radius: .8rem; box-shadow: var(--shadow-sm); }

/* ============ Üst menü ============ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar .brand {
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: 1.25rem;
    color: var(--ink);
    text-decoration: none;
}
.topbar .brand .dot {
    display: inline-block;
    width: .6rem; height: .6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    margin-right: .45rem;
}
.topbar .nav-link { color: var(--ink); font-weight: 500; }
.topbar .nav-link:hover { color: var(--brand); }

.search-box { max-width: 420px; width: 100%; position: relative; }
.search-box input { padding-left: 2.4rem; background: #f1f3f9; border-color: transparent; }
.search-box i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.cart-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--ink); color: #fff !important;
    border-radius: 999px; padding: .45rem .9rem; font-weight: 600; text-decoration: none;
}
.cart-pill .count {
    background: var(--accent); color: #111; border-radius: 999px;
    min-width: 1.4rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; padding: 0 .35rem;
}

.fav-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    background: #fff; color: var(--ink) !important;
    border: 1px solid var(--line);
    border-radius: 999px; padding: .45rem .85rem; font-weight: 600; text-decoration: none;
    transition: all .15s ease;
}
.fav-pill:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.fav-pill .count {
    background: #fee2e2; color: #ef4444; border-radius: 999px;
    min-width: 1.35rem; height: 1.35rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; padding: 0 .35rem;
}

.fav-toggle-btn {
    position: absolute;
    top: .6rem;
    right: .6rem;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(4px);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color: #64748b;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.fav-toggle-btn:hover {
    transform: scale(1.1);
    background: #fff;
    color: #ef4444;
}
.fav-toggle-btn.is-fav {
    color: #ef4444;
    background: #fff;
}

/* ============ Platform ana sayfa ============ */
.hero-platform {
    border-radius: 1.5rem;
    padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem);
    color: #fff;
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(255, 255, 255, .22), transparent 60%),
        linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 120%);
    box-shadow: var(--shadow-md);
}
.hero-platform h1 { font-weight: 800; letter-spacing: -.03em; }
.hero-platform .btn-light { color: #4f46e5; }

.feature {
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.feature .ico {
    width: 2.75rem; height: 2.75rem; border-radius: .85rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(99, 102, 241, .12); color: var(--brand); font-size: 1.3rem; margin-bottom: .75rem;
}

.store-card {
    transition: transform .18s ease, box-shadow .18s ease;
}
.store-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.store-card .avatar {
    width: 3rem; height: 3rem; border-radius: .9rem; color: #fff; font-weight: 800; font-size: 1.2rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

/* ============ Vitrin: banner / hero ============ */
.shop-hero .carousel-item { height: clamp(200px, 36vw, 480px); background: #1e1b4b; }
.shop-hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.shop-hero .carousel-item::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, .62), rgba(15, 23, 42, .05) 65%);
}
.shop-hero .carousel-caption {
    z-index: 2; text-align: left; left: clamp(1rem, 6vw, 6rem); right: auto; bottom: 18%; max-width: 560px;
}
.shop-hero .carousel-caption h2 { font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.4rem, 4vw, 2.8rem); }
.shop-hero .carousel-caption p { font-size: clamp(.9rem, 1.6vw, 1.15rem); opacity: .95; }

.shop-hero-fallback {
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 5vw, 4rem);
    color: #fff;
    background:
        radial-gradient(900px 300px at 90% 0%, rgba(255, 255, 255, .2), transparent 60%),
        linear-gradient(120deg, #312e81, #6d28d9 60%, #be185d);
}
.shop-hero-fallback h1 { font-weight: 800; letter-spacing: -.03em; }

/* ============ Vitrin: kategori yan menü ============ */
.cat-side { position: sticky; top: 5rem; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a {
    display: block; padding: .5rem .8rem; border-radius: .6rem;
    color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.cat-list a:hover { background: #eef0fb; color: var(--brand); }
.cat-list a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.cat-list .sub a { font-weight: 400; color: var(--muted); font-size: .9rem; }
.cat-list .sub a.active { color: #fff; }

/* ============ Vitrin: ürün kartı ============ */
.product-card {
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card a { text-decoration: none; color: inherit; }
.product-card .thumb { position: relative; overflow: hidden; background: #eceef5; aspect-ratio: 1 / 1; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .price { font-weight: 800; letter-spacing: -.01em; }
.product-card .sold-out {
    position: absolute; top: .6rem; left: .6rem; background: rgba(15, 23, 42, .85); color: #fff;
    border-radius: .5rem; padding: .2rem .55rem; font-size: .75rem; font-weight: 600;
}

.product-img,
.product-img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #eceef5;
}
.product-img-placeholder {
    display: flex; align-items: center; justify-content: center;
    color: #9aa3b8; font-size: 1.6rem;
}

.cart-thumb {
    width: 64px; height: 64px; object-fit: cover; background: #eceef5; border-radius: .6rem;
}

/* ============ Ürün detay: galeri ============ */
.gallery-main {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius);
    background: #eceef5; box-shadow: var(--shadow-sm);
}
.gallery-thumbs { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .75rem; }
.gallery-thumbs button {
    padding: 0; border: 2px solid transparent; border-radius: .7rem; overflow: hidden;
    width: 72px; height: 72px; background: #eceef5; cursor: pointer; opacity: .75;
    transition: opacity .15s, border-color .15s;
}
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.active { border-color: var(--brand); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Quill çıktısı vitrinde gösterilirken */
.prod-desc.ql-editor { padding: 0; height: auto; overflow: visible; font-size: 1rem; line-height: 1.65; color: #1f2937; }
.prod-desc.ql-editor p, .prod-desc.ql-editor ul, .prod-desc.ql-editor ol { margin-bottom: .8rem; }

/* ============ Satıcı paneli ============ */
.panel-shell { display: flex; min-height: 100vh; }
.panel-side {
    width: 250px; flex: 0 0 250px; background: #0f172a; color: #cbd5e1;
    padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1rem;
    position: sticky; top: 0; height: 100vh;
}
.panel-side .side-brand { color: #fff; font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: -.02em; }
.panel-side .side-store {
    background: rgba(255, 255, 255, .06); border-radius: .8rem; padding: .7rem .85rem; font-size: .9rem;
}
.panel-side .side-store small { color: #94a3b8; display: block; }
.panel-side .nav-link {
    color: #cbd5e1; border-radius: .7rem; padding: .6rem .8rem; display: flex; align-items: center; gap: .7rem; font-weight: 500;
}
.panel-side .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.panel-side .nav-link.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.panel-main { flex: 1; min-width: 0; padding: clamp(1rem, 3vw, 2.25rem); }

@media (max-width: 991.98px) {
    .panel-shell { flex-direction: column; }
    .panel-side { width: 100%; flex-basis: auto; height: auto; position: static; padding: .75rem; }
    .panel-side .nav { flex-direction: row !important; overflow-x: auto; flex-wrap: nowrap; gap: .25rem; }
    .panel-side .nav-link { white-space: nowrap; }
    .panel-side .side-store { display: none; }
}

.stat-card .label { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }

.img-tile {
    position: relative; border-radius: .9rem; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}
.img-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.img-tile .tile-bar { padding: .5rem .65rem; font-size: .8rem; display: flex; flex-direction: column; gap: .25rem; }
.img-tile.is-main { border-color: var(--brand); }
.img-tile.marked-delete img { opacity: .3; filter: grayscale(1); }

.cat-tree-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.cat-tree-row:last-child { border-bottom: 0; }

.banner-thumb { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; border-radius: .8rem; background: #eceef5; }

/* Quill editör çerçevesi (panel) */
.editor-wrap .ql-toolbar { border-radius: .7rem .7rem 0 0; border-color: var(--line); background: #fafbff; }
.editor-wrap .ql-container { border-radius: 0 0 .7rem .7rem; border-color: var(--line); font-family: inherit; font-size: 1rem; }
.editor-wrap #editor { min-height: 260px; background: #fff; }

/* ============ Alt bilgi ============ */
.site-footer { background: #0f172a; color: #94a3b8; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer .title { color: #fff; font-weight: 700; }

.paytr-frame { width: 100%; border: 0; }
