/* bayisite — modern & temiz tasarım */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --accent-dark: #db2777;
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus { outline: none; }

html, body { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav a {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.15s;
}

.nav a:hover, .nav a.active { color: var(--text); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.15s;
}

.cart-link:hover { border-color: var(--primary); color: var(--primary); }

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.menu-toggle { display: none; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.18s;
    border: 1px solid transparent;
    background: var(--surface);
    color: var(--text);
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}

.btn-ghost:hover { background: var(--surface); border-color: var(--border); }

.btn-outline {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* ---- Hero ---- */
.hero {
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 60%);
    pointer-events: none;
}

.hero .inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
}

.hero-text h1 {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-text h1 .grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text p {
    font-size: 18px;
    color: var(--muted);
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-image {
    position: relative;
    min-height: 420px;
}

.hero-card {
    position: absolute;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 5 / 9;
}

.hero-card.c1 { top: 0; right: 70px; width: 215px; transform: rotate(-6deg); }
.hero-card.c2 { top: 44px; right: 0; width: 200px; transform: rotate(8deg); z-index: 2; }
.hero-card.c3 { top: 118px; right: 152px; width: 185px; transform: rotate(-3deg); z-index: 1; }

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---- Sections ---- */
.section { padding: 60px 0; }

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.section-head p { color: var(--muted); margin-top: 6px; }

/* ---- Brands grid ---- */
.brands {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.brand-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px 14px;
    text-align: center;
    transition: all 0.18s;
    cursor: pointer;
}

.brand-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.brand-card img {
    width: 64px; height: 64px;
    object-fit: contain;
    margin: 0 auto 10px;
}

.brand-card b { font-size: 14px; font-weight: 600; }

/* ---- Models grid ---- */
.models {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.model-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 18px 16px;
    text-align: center;
    transition: all 0.18s;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.model-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.model-card .img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.model-card .img img { max-height: 100%; max-width: 100%; }
.model-card b { font-size: 14px; font-weight: 600; }
.model-card .price { color: var(--primary); font-size: 13px; margin-top: 4px; font-weight: 600; }

/* ---- Template gallery ---- */
.templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.template-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.template-card .thumb {
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #f3f4f6, #fafafa);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.template-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.template-card .body { padding: 16px 18px 18px; }
.template-card .body h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.template-card .body span { font-size: 13px; color: var(--muted); }

.cat-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cat-pill {
    padding: 8px 16px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.cat-pill.active, .cat-pill:hover {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

/* ---- Features ---- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.feature {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 24px;
    border: 1px solid var(--border);
    transition: transform 0.15s;
}

.feature:hover { transform: translateY(-3px); }

.feature .icon {
    width: 48px; height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
    font-size: 22px;
}

.feature h3 { font-size: 17px; margin-bottom: 6px; font-weight: 600; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---- Forms ---- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.field input, .field select, .field textarea {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.field textarea { min-height: 90px; resize: vertical; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Cart ---- */
.cart-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }

.cart-items { display: flex; flex-direction: column; gap: 14px; }

.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    gap: 18px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.cart-item img { width: 90px; height: 110px; object-fit: cover; border-radius: 10px; background: #f3f4f6; }
.cart-item .info b { display: block; font-weight: 600; margin-bottom: 3px; }
.cart-item .info span { color: var(--muted); font-size: 13px; }

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.qty button { width: 34px; height: 34px; background: var(--surface); font-size: 16px; }
.qty button:hover { background: #f3f4f6; }
.qty span { min-width: 36px; text-align: center; font-weight: 600; }

.icon-btn {
    background: transparent;
    width: 36px; height: 36px;
    border-radius: 8px;
    color: var(--muted);
}
.icon-btn:hover { background: #fef2f2; color: var(--danger); }

.cart-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 96px;
}

.cart-summary h3 { font-size: 18px; margin-bottom: 18px; font-weight: 700; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 15px; color: var(--muted); }
.cart-summary .row.total { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 16px; font-size: 17px; color: var(--text); font-weight: 700; }
.cart-summary .row b { color: var(--text); font-weight: 600; }

.empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    color: var(--muted);
}

.empty .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty h3 { color: var(--text); margin-bottom: 8px; }

/* ---- Footer ---- */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 56px 0 28px;
    margin-top: 80px;
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}

.site-footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #94a3b8; font-size: 14px; transition: color 0.15s; }
.site-footer a:hover { color: #fff; }
.site-footer .desc { color: #94a3b8; font-size: 14px; margin-top: 10px; max-width: 280px; }

.foot-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 22px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* ---- Banner / alerts ---- */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
}
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-info { background: #eff6ff; color: #1e40af; }

/* ---- Tracking page ---- */
.tracking {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.timeline { display: flex; justify-content: space-between; margin: 28px 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 18px; left: 8%; right: 8%; height: 2px; background: var(--border); z-index: 0; }
.timeline .step { position: relative; z-index: 1; text-align: center; flex: 1; }
.timeline .step .dot {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border);
    margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-weight: 700;
}
.timeline .step.done .dot { background: var(--gradient); color: #fff; border-color: transparent; }
.timeline .step.active .dot { background: #fff; border-color: var(--primary); color: var(--primary); }
.timeline .step span { font-size: 12px; color: var(--muted); }
.timeline .step.done span, .timeline .step.active span { color: var(--text); font-weight: 600; }

/* ---- Designer container ---- */
.designer-wrap {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 22px;
    text-align: center;
}

#clothing-designer {
    margin: 0 auto !important;
    max-width: 820px;
    width: 100%;
    display: inline-block;
    text-align: left;
}

/* FPD container ortalama */
.fpd-container {
    margin: 0 auto !important;
    max-width: 820px !important;
}

.fpd-container .fpd-content-wrap,
.fpd-container .fpd-product-stage {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Mobile: FPD küçültme */
@media (max-width: 900px) {
    .designer-wrap { padding: 10px; min-height: auto; }
}
@media (max-width: 760px) {
    .designer-wrap { padding: 6px; }
    .fpd-container .fpd-product-stage {
        max-width: 100%;
        overflow: auto;
    }
}

@media (max-width: 480px) {
    .designer-wrap { padding: 4px; }
    .designer-actions { flex-direction: column; }
    .designer-actions .btn { width: 100%; }
}

.designer-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 22px 0;
    flex-wrap: wrap;
}

/* ---- Template editor fields (customer side) ---- */
.tpl-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.tpl-field {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.tpl-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tpl-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
}

/* ---- Spinner ---- */
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 14px;
}
.loading-overlay.show { display: flex; }

/* ---- Auth pages ---- */
.auth-wrap {
    max-width: 440px;
    margin: 60px auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.auth-wrap h1 { font-size: 26px; margin-bottom: 6px; font-weight: 800; letter-spacing: -0.02em; }
.auth-wrap .sub { color: var(--muted); margin-bottom: 26px; }
.auth-wrap .btn { width: 100%; }
.auth-wrap .alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-wrap .alt a { color: var(--primary); font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
    .hero { padding: 50px 0 30px; }
    .hero .inner { grid-template-columns: 1fr; gap: 30px; }
    .hero-image { min-height: 300px; }
    .hero-card.c1 { width: 160px; }
    .hero-card.c2 { width: 145px; }
    .hero-card.c3 { width: 135px; }
    .cart-wrap { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .row-2 { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .cart-item { grid-template-columns: 70px 1fr; grid-template-rows: auto auto; gap: 12px; }
    .cart-item img { width: 70px; height: 90px; }
    .cart-item .qty, .cart-item .icon-btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 620px) {
    .site-header .inner {
        height: auto;
        min-height: 72px;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .nav {
        order: 3;
        width: 100%;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .nav::-webkit-scrollbar { display: none; }
    .nav a {
        flex: 0 0 auto;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 999px;
        padding: 8px 12px;
        font-size: 13px;
    }
    .nav a.active {
        background: var(--text);
        border-color: var(--text);
        color: #fff;
    }
    .menu-toggle { display: none; }
    .container { padding: 0 18px; }
    .foot-grid { grid-template-columns: 1fr; }
}

.menu-toggle {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    align-items: center; justify-content: center;
}
