/* ==========================================================================
   Pangereh — Base stylesheet (variables, reset, header, footer)
   Written from scratch. Uses Vazirmatn (Google Fonts) — no local font file
   dependency, so it can never 404 due to a missing asset on the server.
   ========================================================================== */

:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #eef1f6;
    --text: #1c2430;
    --muted: #6b7280;
    --line: #e5e9f0;
    --navy: #1f3864;
    --navy-2: #16294d;
    --gold: #f59e0b;
    --gold-deep: #c9820a;
    --danger: #dc2626;
    --success: #16a34a;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
    --radius: 16px;
}

html.dark {
    --bg: #0e131d;
    --surface: #141b28;
    --surface-2: #1a2433;
    --text: #f2f5f9;
    --muted: #a6afbd;
    --line: #283346;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.85;
    transition: background 0.2s ease, color 0.2s ease;
}

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

:root {
    --content-max-width: 1440px;
    --content-gutter: 5%;
}

.container {
    width: min(var(--content-max-width), calc(100% - (var(--content-gutter) * 2)));
    margin-inline: auto;
}
.container-fluid { width: min(1520px, 92%); margin-inline: auto; }

/* -------------------- Alerts -------------------- */
.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 14px;
}
.alert.success { background: rgba(22, 163, 74, 0.1); color: var(--success); border: 1px solid rgba(22, 163, 74, 0.25); }
.alert.danger { background: rgba(220, 38, 38, 0.1); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.25); }

/* -------------------- Generic buttons -------------------- */
.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); border-color: rgba(220, 38, 38, 0.35); }
.btn-danger:hover { background: rgba(220, 38, 38, 0.08); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-shell {
    width: min(1440px, 90%);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

.brand-mark { display: flex; align-items: center; gap: 10px; }

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.brand-icon span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}
.brand-icon span:nth-child(1) { top: 7px; left: 7px; }
.brand-icon span:nth-child(2) { top: 14px; left: 14px; }
.brand-icon span:nth-child(3) { bottom: 7px; right: 7px; background: #fff; opacity: .6; }

.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 17px; font-weight: 800; color: var(--text); }
.brand-text small { font-size: 11px; color: var(--muted); }

.desktop-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s ease;
}
.nav-link:hover { background: var(--surface-2); }

.nav-dropdown-menu a:hover { background: var(--surface-2); border-radius: 6px; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }

.cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    background: var(--surface-2);
    font-size: 14px;
    font-weight: 600;
}

.account-btn {
    padding: 9px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.account-btn:hover { opacity: 0.92; }

.mobile-menu-btn { display: none; }
.burger, .burger::before, .burger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: transform 0.2s ease;
}
.burger::before, .burger::after { content: ''; position: absolute; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 10px 20px 16px;
    border-top: 1px solid var(--line);
}
.mobile-nav a { padding: 10px 0; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-nav.open { display: flex; }

@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: inline-flex; }
    .cart-btn span { display: none; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.85);
    margin-top: 60px;
    padding-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    min-width: 0;
}

.footer-brand { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.site-footer p { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, 0.65); }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.16); }

.footer-grid > div > strong {
    display: block;
    font-size: 14px;
    color: #fff;
    margin-bottom: 14px;
}
.footer-grid > div a,
.footer-grid > div span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 10px;
}
.footer-grid > div a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}
