/* ============================================================
   QR Menu & Sales Panel - Gold & Black Theme
   ============================================================ */

:root {
    --bg-0: #050505;
    --bg-1: #0d0d0d;
    --bg-2: #161616;
    --bg-3: #1f1f1f;
    --gold: #d4af37;
    --gold-soft: #e8c96b;
    --gold-deep: #a8862a;
    --line: rgba(212, 175, 55, 0.25);
    --text: #f4e9c9;
    --muted: #a89a70;
    --danger: #e04a4a;
    --ok: #4ade80;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(212,175,55,0.09), transparent 60%),
        radial-gradient(900px 500px at -10% 90%, rgba(212,175,55,0.06), transparent 60%),
        var(--bg-0);
    background-attachment: fixed;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: "Cinzel", "Cormorant Garamond", Georgia, serif;
    letter-spacing: 0.06em;
    color: var(--gold);
    margin: 0 0 16px;
    font-weight: 500;
}
h1 { font-size: 2.4rem; text-transform: uppercase; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p  { line-height: 1.6; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: #fff; }

/* --- Top bar --- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(0,0,0,0.6), transparent);
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(10px);
}
.brand {
    display: flex; align-items: center; gap: 12px;
    font-family: "Cinzel", serif; color: var(--gold);
    font-size: 1.15rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.brand .dot { width: 10px; height: 10px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff8d6, var(--gold) 60%, var(--gold-deep));
    box-shadow: 0 0 12px rgba(212,175,55,0.6);
}

.lang-switch { display: flex; gap: 4px; flex-wrap: wrap; }
.lang-opt {
    padding: 5px 10px; border: 1px solid var(--line);
    border-radius: 999px; font-size: 12px; letter-spacing: 0.1em;
    color: var(--muted);
    font-family: system-ui, sans-serif;
}
.lang-opt.active, .lang-opt:hover { color: var(--gold); border-color: var(--gold); }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* --- Cards --- */
.card {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(212,175,55,0.08);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(212,175,55,0.08), transparent 40%);
}
.card > * { position: relative; }

/* --- Landing (hero) --- */
.hero {
    min-height: calc(100vh - 90px);
    display: grid; place-items: center;
    padding: 60px 20px;
}
.hero-inner { max-width: 1100px; width: 100%; }
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    background: linear-gradient(180deg, #fff9d9 0%, var(--gold) 60%, var(--gold-deep) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-align: center;
}
.hero .tagline {
    text-align: center; color: var(--muted); letter-spacing: 0.35em;
    text-transform: uppercase; font-size: 0.85rem; margin-bottom: 48px;
    font-family: system-ui, sans-serif;
}

/* --- Forms --- */
label { display: block; font-size: 0.85rem; color: var(--muted);
    letter-spacing: 0.1em; text-transform: uppercase; margin: 12px 0 6px;
    font-family: system-ui, sans-serif;
}
input[type=text], input[type=password], input[type=email],
input[type=number], input[type=url], input[type=tel],
select, textarea {
    width: 100%; padding: 14px 16px;
    background: rgba(0,0,0,0.55);
    border: 1px solid var(--line); color: var(--text);
    border-radius: 12px; font-size: 1rem;
    font-family: system-ui, sans-serif;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; border: 1px solid var(--gold);
    background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
    color: #1a1300; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; font-size: 0.85rem;
    font-family: system-ui, sans-serif; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s;
    box-shadow: 0 10px 24px -12px rgba(212,175,55,0.55);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(212,175,55,0.8); }
.btn.secondary {
    background: transparent; color: var(--gold);
}
.btn.secondary:hover { background: rgba(212,175,55,0.08); color: #fff; }
.btn.danger { background: linear-gradient(180deg, #ff6b6b, #b23030); border-color: #b23030; color: #fff; }
.btn.small { padding: 8px 14px; font-size: 0.72rem; }
.btn.block { width: 100%; }

/* --- Tables --- */
table.data { width: 100%; border-collapse: collapse; font-family: system-ui, sans-serif; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
table.data th { color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }
table.data tr:hover td { background: rgba(212,175,55,0.04); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem;
    letter-spacing: 0.1em; text-transform: uppercase; font-family: system-ui, sans-serif; }
.badge.on  { background: rgba(74,222,128,0.15); color: #6be89d; border: 1px solid rgba(74,222,128,0.3); }
.badge.off { background: rgba(224,74,74,0.15); color: #ff8080; border: 1px solid rgba(224,74,74,0.3); }

/* --- Alerts --- */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-family: system-ui, sans-serif; font-size: 0.9rem; }
.alert.err { background: rgba(224,74,74,0.12); border: 1px solid rgba(224,74,74,0.4); color: #ffb2b2; }
.alert.ok  { background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.4); color: #baf5cd; }

/* --- Sidebar layout (admin/dealer/business panels) --- */
.panel { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.panel .side {
    background: linear-gradient(180deg, #0a0a0a, #050505);
    border-right: 1px solid var(--line);
    padding: 30px 20px;
}
.panel .side h3 { color: var(--gold); letter-spacing: 0.2em; font-size: 0.9rem; }
.panel .side a {
    display: block; padding: 10px 14px; margin: 4px 0;
    color: var(--text); border-radius: 10px;
    font-family: system-ui, sans-serif; font-size: 0.92rem;
}
.panel .side a:hover, .panel .side a.active {
    background: rgba(212,175,55,0.1); color: var(--gold);
}
.panel .main { padding: 30px; }

@media (max-width: 820px) {
    .panel { grid-template-columns: 1fr; }
    .panel .side { border-right: none; border-bottom: 1px solid var(--line); }
}

/* --- Product grid (customer menu) --- */
.menu-grid { display: grid; gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.product-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 20px 16px; border-radius: 20px;
    background: linear-gradient(180deg, #141414, #0a0a0a);
    border: 1px solid var(--line);
    transition: transform .2s, border-color .2s;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.product-img {
    width: 160px; height: 160px; border-radius: 50%;
    background-size: cover; background-position: center;
    background-color: #222;
    border: 3px solid var(--gold);
    box-shadow: 0 12px 30px -10px rgba(212,175,55,0.5), inset 0 0 40px rgba(0,0,0,0.4);
    cursor: zoom-in;
    transition: transform .3s;
}
.product-card:hover .product-img { transform: scale(1.04); }

.product-name { margin: 14px 0 4px; color: var(--gold-soft); font-size: 1.05rem; }
.product-price { color: var(--text); font-family: "Cinzel", serif; letter-spacing: 0.1em; font-size: 1.1rem; }
.product-desc  { color: var(--muted); font-size: 0.85rem; font-family: system-ui, sans-serif; }

/* --- Image lightbox --- */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9);
    display: none; align-items: center; justify-content: center; z-index: 1000;
    backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 50%; border: 4px solid var(--gold);
    box-shadow: 0 0 80px rgba(212,175,55,0.4);
}
.lightbox .close { position: absolute; top: 20px; right: 24px; color: var(--gold); font-size: 32px; cursor: pointer; }

/* --- Cart --- */
.cart-item { display: grid; grid-template-columns: 60px 1fr auto auto; gap: 14px;
    align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line);
    font-family: system-ui, sans-serif;
}
.cart-item .thumb { width: 60px; height: 60px; border-radius: 50%; background-size: cover; background-position: center; border: 2px solid var(--gold); }

/* --- QR page --- */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px;
    background: #fff; border-radius: 16px; }
.qr-box img { max-width: 260px; }

/* --- Utility --- */
.flex { display: flex; }
.gap-10 { gap: 10px; } .gap-20 { gap: 20px; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.items-center { align-items: center; }
.mt-20 { margin-top: 20px; } .mt-40 { margin-top: 40px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.small { font-size: 0.8rem; color: var(--muted); }
.text-center { text-align: center; }
.hide { display: none; }
