:root {
    --bg: #0a0a0f;
    --surface: #13131a;
    --surface2: #1c1c28;
    --gold: #c9a84c;
    --gold2: #e8c96a;
    --white: #f5f0e8;
    --gray: #8a8599;
    --border: rgba(201, 168, 76, 0.18);
    --radius: 14px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── AUTH ── */
#auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 20%, #1a1530 0%, #0a0a0f 60%);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
    animation: fadeUp .5s ease;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
}

.auth-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--gold2);
}

.auth-logo p {
    color: var(--gray);
    font-size: 14px;
    margin-top: 4px;
}

.tab-btns {
    display: flex;
    background: var(--surface2);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all .25s;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #0a0a0f;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 7px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
}

.form-group textarea {
    resize: vertical;
    min-height: 68px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #4a4560;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    border: none;
    border-radius: 10px;
    color: #0a0a0f;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}

.btn-primary:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.alert {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.alert.error {
    background: rgba(224, 92, 92, .12);
    border: 1px solid rgba(224, 92, 92, .3);
    color: #e08080;
    display: block;
}

.alert.success {
    background: rgba(92, 184, 138, .12);
    border: 1px solid rgba(92, 184, 138, .3);
    color: #80c8a0;
    display: block;
}

/* ── NAV ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, .93);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--gold2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 6px 14px 6px 8px;
    font-size: 13px;
    color: var(--gray);
}

.avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #0a0a0f;
    font-weight: 700;
}

.btn-nav {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all .2s;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray);
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    border: none;
    color: #0a0a0f;
    font-weight: 600;
}

.btn-gold:hover {
    opacity: .85;
}

/* ── HERO ── */
.hero {
    padding: 80px 32px 60px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, .07) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201, 168, 76, .1);
    border: 1px solid rgba(201, 168, 76, .25);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.15;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--white), var(--gold2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--gray);
    font-size: 17px;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-stats {
    display: inline-flex;
    gap: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 32px;
}

.stat .num {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--gold2);
}

.stat .lbl {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

/* ── PRODUCTS ── */
.section {
    padding: 60px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 32px;
}

.section-title span {
    color: var(--gold2);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    animation: fadeUp .4s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
    border-color: rgba(201, 168, 76, .35);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--surface2), #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}

.product-body {
    padding: 18px;
}

.product-category {
    font-size: 11px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin-bottom: 6px;
}

.product-desc {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 14px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--gold2);
}

.btn-cart {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    border: none;
    border-radius: 8px;
    color: #0a0a0f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    grid-column: 1/-1;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ── FOOTER ── */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 48px 32px 28px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--gold2);
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--white);
    font-size: 14px;
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: var(--gray);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color .2s;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    color: var(--gray);
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── ADMIN MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn .2s ease;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 32px;
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: fadeUp .3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--gold2);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--gray);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--white);
}

.admin-tabs {
    display: flex;
    background: var(--surface2);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}

.admin-tab {
    flex: 1;
    padding: 9px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all .22s;
}

.admin-tab.active {
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #0a0a0f;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.edit-banner {
    background: rgba(201, 168, 76, .08);
    border: 1px solid rgba(201, 168, 76, .2);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-cancel-edit {
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.btn-cancel-edit:hover {
    color: var(--white);
}

.search-box {
    position: relative;
    margin-bottom: 14px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}

.search-box input:focus {
    border-color: var(--gold);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
}

.admin-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color .2s;
}

.admin-item:hover {
    border-color: rgba(201, 168, 76, .28);
}

.a-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
    flex-shrink: 0;
}

.a-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.a-info .aname {
    font-size: 14px;
    color: var(--white);
    font-weight: 500;
}

.a-info .aprice {
    font-size: 12px;
    color: var(--gold);
    margin-top: 2px;
}

.a-info .acat {
    font-size: 11px;
    color: var(--gray);
}

.a-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-edit {
    padding: 5px 11px;
    background: rgba(201, 168, 76, .1);
    border: 1px solid rgba(201, 168, 76, .25);
    border-radius: 6px;
    color: var(--gold);
    font-size: 12px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background .2s;
}

.btn-edit:hover {
    background: rgba(201, 168, 76, .2);
}

.btn-del {
    padding: 5px 11px;
    background: rgba(224, 92, 92, .1);
    border: 1px solid rgba(224, 92, 92, .25);
    border-radius: 6px;
    color: #e08080;
    font-size: 12px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background .2s;
}

.btn-del:hover {
    background: rgba(224, 92, 92, .2);
}

/* ── TOAST ── */
#toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 14px;
    color: var(--white);
    box-shadow: var(--shadow);
    z-index: 999;
    transform: translateY(100px);
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

#toast.success {
    border-color: rgba(92, 184, 138, .4);
    color: #80c8a0;
}

#toast.error {
    border-color: rgba(224, 92, 92, .4);
    color: #e08080;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.hidden {
    display: none !important;
}

@media(max-width:768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr
    }

    nav {
        padding: 0 14px
    }

    .section {
        padding: 40px 14px
    }

    .hero {
        padding: 50px 16px 40px
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px
    }

    .auth-card {
        padding: 32px 20px
    }

    .form-row {
        grid-template-columns: 1fr
    }

    .modal {
        padding: 20px 16px
    }

    .user-pill span {
        display: none
    }
}


/* 🔥 POPUP STYLE */
.popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideIn 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
}

/* 🔥 ANIMATION */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 🔥 EDIT BUTTON */
button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #2196f3;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #1976d2;
}

#admin-modal {
    transition: 0.3s;
}

.hidden {
    display: none;
}



.product-img-placeholder img,
.a-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}




