/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ===== VARIABLES ===== */
:root {
    --orange: #E8580A;
    --orange-dark: #C44A08;
    --orange-light: #F47328;
    --gold: #F0A500;
    --gold-light: #F9C842;
    --cream: #FFF9F0;
    --dark: #1A1208;
    --text: #3D2B0E;
    --text-muted: #7A6040;
    --border: #E8D5B0;
    --white: #FFFFFF;
    --bg-light: #FEF6E8;
    --success: #2E7D32;
    --danger: #C62828;
    --warning: #F57F17;
    --info: #01579B;
    --shadow: 0 2px 12px rgba(232,88,10,0.10);
    --shadow-lg: 0 8px 32px rgba(232,88,10,0.15);
    --radius: 8px;
    --font-display: 'Playfair Display', serif;
    --font-body: 'Nunito', sans-serif;
    --header-h: 62px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    font-size: 14px;
    overflow-x: hidden;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
}
a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; height: auto; }
button, .btn { cursor: pointer; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--dark); line-height: 1.3; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--orange); }
.text-gold { color: var(--gold); }

/* ===== HEADER ===== */
.site-header {
    background: var(--dark);
    height: var(--header-h);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-text { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); line-height: 1.1; }
.logo-text span { display: block; font-size: 0.65rem; color: var(--orange-light); font-family: var(--font-body); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.logo-img { height: 38px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.logo-emoji-fallback { width: 38px; height: 38px; background: var(--orange); border-radius: 8px; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }

.header-search { flex: 1; max-width: 400px; position: relative; }
.header-search input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 7px 36px 7px 14px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: background 0.2s;
}
.header-search input::placeholder { color: rgba(255,255,255,0.5); }
.header-search input:focus { background: rgba(255,255,255,0.18); }
.header-search button {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--gold); font-size: 14px; padding: 0;
}

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-btn {
    display: flex; align-items: center; gap: 5px;
    background: none; border: none; color: rgba(255,255,255,0.85);
    font-family: var(--font-body); font-size: 13px; font-weight: 600;
    padding: 6px 10px; border-radius: var(--radius); transition: all 0.2s;
    text-decoration: none; white-space: nowrap;
}
.header-btn:hover { color: var(--gold); background: rgba(255,255,255,0.06); }
.header-btn i { font-size: 15px; }
.cart-btn { background: var(--orange); color: #fff; padding: 6px 12px; }
.cart-btn:hover { background: var(--orange-dark); color: #fff; }
.cart-count {
    background: var(--gold); color: var(--dark); font-size: 10px; font-weight: 700;
    border-radius: 50%; width: 18px; height: 18px; display: inline-flex;
    align-items: center; justify-content: center; margin-left: 2px;
}

/* ===== NAV BAR ===== */
.site-nav {
    background: var(--orange);
    border-bottom: 2px solid var(--orange-dark);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.site-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
}
.nav-link {
    display: inline-flex; align-items: center; gap: 5px;
    color: rgba(255,255,255,0.92); font-size: 13px; font-weight: 600;
    padding: 8px 12px; border-radius: 4px; transition: all 0.2s;
    text-decoration: none;
}
.nav-link:hover, .nav-link.active { background: rgba(0,0,0,0.15); color: #fff; }
.nav-link i { font-size: 13px; }

.hamburger {
    display: none; background: none; border: none;
    color: #fff; font-size: 22px; padding: 8px; cursor: pointer;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000; background: rgba(0,0,0,0.6);
}
.mobile-nav.open { display: block; }
.mobile-nav-inner {
    background: var(--dark); width: 280px; height: 100%;
    padding: 20px 16px; overflow-y: auto;
}
.mobile-nav-close {
    color: var(--gold); font-size: 22px; background: none; border: none;
    margin-bottom: 16px; cursor: pointer;
}
.mobile-nav-link {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.85); padding: 10px 8px;
    font-size: 14px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
}
.mobile-nav-link:hover { color: var(--gold); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: var(--bg-light); border-bottom: 1px solid var(--border);
    padding: 6px 0;
}
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.breadcrumb-list { display: flex; align-items: center; gap: 6px; list-style: none; flex-wrap: wrap; }
.breadcrumb-list li { font-size: 12px; color: var(--text-muted); }
.breadcrumb-list li a { color: var(--orange); font-weight: 600; }
.breadcrumb-list li + li::before { content: '›'; margin-right: 6px; }

/* ===== MAIN LAYOUT ===== */
.main-wrap { max-width: 1200px; margin: 0 auto; padding: 16px; overflow-x: hidden; }

/* ===== HERO BANNER ===== */
.hero {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 40px 40px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url('hero-pattern.svg') right center/cover repeat;
    opacity: 0.15;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 540px; }
.hero-title { font-family: var(--font-display); color: var(--gold); font-size: 2rem; margin-bottom: 8px; }
.hero-sub { color: rgba(255,255,255,0.75); font-size: 14px; margin-bottom: 16px; }

/* ===== CATEGORY PILLS ===== */
.category-section { margin-bottom: 20px; }
.section-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 12px; color: var(--dark); position: relative; padding-bottom: 8px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background: var(--orange); border-radius: 2px; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}
.category-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 8px; text-align: center;
    transition: all 0.2s; cursor: pointer; text-decoration: none; display: block;
}
.category-card:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-2px); }
.category-card .cat-icon { font-size: 22px; margin-bottom: 6px; display: block; }
.category-card .cat-name { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.2; }

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.product-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all 0.2s; display: flex; flex-direction: column;
    position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card .badge-out { position: absolute; top: 8px; left: 8px; }
.product-img-wrap {
    aspect-ratio: 1; overflow: hidden; background: var(--bg-light);
    display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-info { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.product-brand { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.product-name { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; line-height: 1.3; flex: 1; }
.product-size { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.product-price { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--orange); }
.btn-add-cart {
    background: var(--orange); color: #fff; border: none;
    border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 700;
    font-family: var(--font-body); transition: background 0.2s; white-space: nowrap;
}
.btn-add-cart:hover { background: var(--orange-dark); }
.btn-add-cart:disabled { background: #ccc; cursor: not-allowed; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: var(--radius); font-family: var(--font-body);
    font-size: 13px; font-weight: 700; border: none; transition: all 0.2s;
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-secondary { background: var(--gold); color: var(--dark); }
.btn-secondary:hover { background: #d48f00; color: var(--dark); }
.btn-outline { background: transparent; border: 2px solid var(--orange); color: var(--orange); }
.btn-outline:hover { background: var(--orange); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #2d1f0a; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b71c1c; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1b5e20; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn:disabled, .btn-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
}
.badge-warning { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.badge-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.badge-danger { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
.badge-info { background: #E3F2FD; color: #01579B; border: 1px solid #90CAF9; }
.badge-primary { background: #FFF3E0; color: var(--orange); border: 1px solid #FFCC80; }
.badge-secondary { background: #F5F5F5; color: #616161; border: 1px solid #E0E0E0; }
.badge-out { background: #212121; color: #fff; border: none; font-size: 9px; }

/* ===== CARDS ===== */
.card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.card-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-light);
}
.card-title { font-size: 14px; font-weight: 700; color: var(--dark); }
.card-body { padding: 16px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.form-control {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); font-family: var(--font-body); font-size: 13px;
    color: var(--text); background: var(--white); outline: none; transition: border 0.2s;
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,88,10,0.1); }
.form-control::placeholder { color: #bbb; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%237A6040' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-text { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 3px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    background: var(--dark); color: var(--gold);
    padding: 10px 12px; font-weight: 700; text-align: left;
    font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-light); }
tbody tr:nth-child(even) { background: rgba(255,249,240,0.5); }

/* ===== CART ===== */
.cart-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg-light); }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.cart-item-meta { font-size: 11px; color: var(--text-muted); }
.qty-control { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.qty-btn { background: var(--bg-light); border: none; width: 28px; height: 28px; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--text); transition: background 0.15s; }
.qty-btn:hover { background: var(--orange); color: #fff; }
.qty-val { padding: 0 10px; font-size: 13px; font-weight: 700; min-width: 32px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 28px; display: flex; align-items: center; justify-content: center; }

/* ===== ORDER SUMMARY ===== */
.order-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
.order-summary-row.total { border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 15px; color: var(--dark); }

/* ===== TOAST ===== */
#toast-container { position: fixed; top: 80px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--white); border-left: 4px solid var(--orange);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 10px 16px; font-size: 13px; min-width: 240px; max-width: 340px;
    display: flex; align-items: flex-start; gap: 10px; animation: slideIn 0.3s ease;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast-info i { color: var(--info); }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0; flex-shrink: 0; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark); color: rgba(255,255,255,0.75);
    padding: 32px 0 0;
    margin-top: 40px;
}
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 16px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-brand .logo-text { color: var(--gold); font-size: 1.2rem; margin-bottom: 8px; display: block; }
.footer-brand p { font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.55); margin-bottom: 12px; }
.footer-socials { display: flex; gap: 8px; }
.footer-social { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); transition: all 0.2s; font-size: 13px; }
.footer-social:hover { background: var(--orange); color: #fff; }
.footer-col h5 { color: var(--gold); font-family: var(--font-display); font-size: 13px; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 12px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-contact-item { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-size: 12px; color: rgba(255,255,255,0.6); }
.footer-contact-item i { color: var(--orange); margin-top: 2px; flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; text-align: center; font-size: 11px; color: rgba(255,255,255,0.35); max-width: 1200px; margin: 0 auto; }

/* ===== ADMIN LAYOUT ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: var(--dark); flex-shrink: 0;
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
    overflow-y: auto;
}
.admin-logo { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-logo .logo-text { font-size: 1.1rem; }
.admin-logo .logo-text span { font-size: 0.6rem; }
.admin-nav { padding: 12px 0; flex: 1; }
.admin-nav-group { padding: 0 12px; margin-bottom: 6px; }
.admin-nav-label { font-size: 9px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; margin: 10px 0 4px 8px; }
.admin-nav-link {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.65); padding: 8px 10px;
    border-radius: 6px; font-size: 13px; font-weight: 600;
    transition: all 0.2s; text-decoration: none;
}
.admin-nav-link:hover { color: #fff; background: rgba(255,255,255,0.07); }
.admin-nav-link.active { color: var(--gold); background: rgba(240,165,0,0.12); }
.admin-nav-link i { font-size: 15px; width: 18px; text-align: center; }
.admin-main { margin-left: 220px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar {
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0 20px; height: 52px; display: flex; align-items: center;
    justify-content: space-between; position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-topbar-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--dark); }
.admin-content { padding: 20px; flex: 1; }

/* ===== STAT CARDS ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    display: flex; align-items: center; gap: 14px;
}
.stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.stat-icon.orange { background: rgba(232,88,10,0.12); color: var(--orange); }
.stat-icon.gold { background: rgba(240,165,0,0.12); color: var(--gold); }
.stat-icon.green { background: rgba(46,125,50,0.12); color: var(--success); }
.stat-icon.blue { background: rgba(1,87,155,0.12); color: var(--info); }
.stat-val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--dark); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 3000; display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--white); border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
    animation: modalIn 0.25s ease;
}
.modal-header {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-light);
}
.modal-title { font-family: var(--font-display); font-size: 1rem; }
.modal-close { background: none; border: none; font-size: 18px; color: var(--text-muted); cursor: pointer; }
.modal-body { padding: 18px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
@keyframes modalIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== SEARCH RESULTS ===== */
.search-header { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }

/* ===== PRODUCT DETAIL ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product-detail-gallery { }
.product-main-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 8px; background: var(--bg-light); }
.product-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; transition: border-color 0.2s; }
.product-thumb.active, .product-thumb:hover { border-color: var(--orange); }

/* ===== ACCOUNT ===== */
.account-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.account-sidebar { }
.account-nav-link { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; margin-bottom: 4px; transition: all 0.2s; }
.account-nav-link:hover { background: var(--bg-light); color: var(--orange); }
.account-nav-link.active { background: rgba(232,88,10,0.1); color: var(--orange); }
.account-nav-link i { width: 16px; text-align: center; }

/* ===== ALERTS ===== */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 8px; }
.alert-success { background: #E8F5E9; border: 1px solid #A5D6A7; color: #1B5E20; }
.alert-danger { background: #FFEBEE; border: 1px solid #FFCDD2; color: #B71C1C; }
.alert-warning { background: #FFF8E1; border: 1px solid #FFE082; color: #E65100; }
.alert-info { background: #E3F2FD; border: 1px solid #90CAF9; color: #01579B; }

/* ===== PAGINATION ===== */
.pagination-nav { display: flex; justify-content: center; margin-top: 20px; }
.pagination { display: flex; gap: 4px; list-style: none; }
.page-item .page-link { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); background: var(--white); transition: all 0.2s; }
.page-item.active .page-link { background: var(--orange); color: #fff; border-color: var(--orange); }
.page-item .page-link:hover { border-color: var(--orange); color: var(--orange); }

/* ===== MISC ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.tag { display: inline-block; background: var(--bg-light); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; color: var(--border); margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; margin-bottom: 6px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-loading { position: fixed; inset: 0; background: rgba(255,255,255,0.75); z-index: 9999; display: flex; align-items: center; justify-content: center; }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 0; margin-bottom: 14px; }
.filter-bar .form-control { max-width: 180px; }

/* ===== STEPS ===== */
.checkout-steps { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.step { flex: 1; text-align: center; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 14px; left: 50%; right: 0; height: 2px; background: var(--border); z-index: 0; }
.step.done::after { background: var(--orange); }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--border); color: var(--text-muted); position: relative; z-index: 1; margin-bottom: 4px; }
.step.active .step-num { background: var(--orange); color: #fff; }
.step.done .step-num { background: var(--success); color: #fff; }
.step-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.step.active .step-label { color: var(--orange); }
.step.done .step-label { color: var(--success); }

/* ===== REPORT CHARTS ===== */
.chart-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.chart-title { font-family: var(--font-display); font-size: 0.95rem; color: var(--dark); margin-bottom: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .account-grid { grid-template-columns: 1fr; }
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .hamburger { display: block; }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; }
    .header-search { display: none; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .hero { padding: 24px 16px; }
    .hero-title { font-size: 1.3rem; }
    .hero-sub { font-size: 13px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    /* Hide logo subline on very small screens */
    .logo-text span { display: none; }
    .logo-text { font-size: 1.1rem; }
    /* Header actions: hide text labels, icons only */
    .d-none-sm { display: none !important; }
    /* Prevent wide grids overflowing */
    .main-wrap { padding: 12px; }
}
@media (max-width: 400px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .logo-text { display: none; }
}

/* ===== ACCOUNT LAYOUT ===== */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.account-nav { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: fit-content; }
.account-nav-user { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.account-nav-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.account-nav-name { font-weight: 700; font-size: .85rem; }
.account-nav-email { font-size: .75rem; color: var(--text-muted); }
.account-nav-links { display: flex; flex-direction: column; gap: 2px; }
.account-nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--dark); text-decoration: none; font-size: .875rem; transition: background 0.2s; }
.account-nav-link:hover, .account-nav-link.active { background: var(--bg-light); color: var(--orange); }
.account-nav-logout { color: var(--danger); margin-top: 8px; }
.account-nav-logout:hover { background: #fee2e2; }
.account-content { min-width: 0; }

/* ===== ADDRESS CARDS ===== */
.address-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.address-card-default { border-color: var(--orange); }
.address-card-name { font-weight: 700; font-size: .88rem; margin-bottom: 4px; }
.address-card-text { font-size: .8rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.address-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== STATIC PAGES ===== */
.page-hero { text-align: center; padding: 28px 20px; background: var(--bg-light); border-radius: var(--radius); margin-bottom: 28px; }
.page-hero h1 { font-family: var(--font-display); font-size: 1.6rem; color: var(--dark); margin-bottom: 6px; }
.page-hero p { color: var(--text-muted); font-size: .9rem; }
.static-page-content { max-width: 760px; margin: 0 auto; }
.static-page-content h3 { font-family: var(--font-display); font-size: 1rem; color: var(--orange); margin: 20px 0 8px; }
.static-page-content p { color: var(--text-dark); font-size: .9rem; line-height: 1.7; margin-bottom: 10px; }

/* ===== FAQ ===== */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-question { width: 100%; background: var(--white); border: none; padding: 14px 16px; text-align: left; font-size: .9rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--dark); }
.faq-question:hover { background: var(--bg-light); }
.faq-icon { color: var(--orange); }
.faq-answer { padding: 0 16px 14px; font-size: .875rem; color: var(--text-muted); line-height: 1.7; }

/* ===== CONTACT ===== */
.contact-info-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: .875rem; border-bottom: 1px solid var(--border); }
.contact-info-row:last-child { border: none; }
.contact-info-row i { color: var(--orange); width: 16px; margin-top: 2px; }
.social-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-light); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--dark); text-decoration: none; font-size: .85rem; transition: background 0.2s; }
.social-btn:hover { background: var(--orange); color: #fff; border-color: var(--orange); }

/* ===== ADMIN LAYOUT ===== */
.admin-body { background: #f1f5f9; font-family: var(--font-body); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--dark); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; z-index: 200; transition: transform 0.3s; overflow-y: auto; }
.admin-sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); color: #fff; font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.admin-nav { flex: 1; padding: 10px 0; }
.admin-nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: rgba(255,255,255,0.72); text-decoration: none; font-size: .875rem; transition: background 0.2s, color 0.2s; }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-nav-link.active { border-left: 3px solid var(--orange); }
.admin-nav-link i { width: 18px; text-align: center; }
.admin-sidebar-footer { padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.admin-main { margin-left: 220px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0 20px; height: 54px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 100; }
.admin-toggle-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--dark); display: none; }
.admin-topbar-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; flex: 1; }
.admin-topbar-user { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); }
.admin-content { padding: 20px; flex: 1; }
.admin-sidebar-open { transform: translateX(0) !important; }

/* ===== ADMIN STATS ===== */
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.stat-card.skeleton { height: 70px; animation: pulse 1.5s infinite; background: #e2e8f0; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.stat-val { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.stat-orange .stat-icon { background: rgba(232,88,10,0.12); color: var(--orange); }
.stat-green  .stat-icon { background: rgba(34,197,94,0.12); color: var(--success); }
.stat-blue   .stat-icon { background: rgba(59,130,246,0.12); color: #3b82f6; }
.stat-purple .stat-icon { background: rgba(139,92,246,0.12); color: #8b5cf6; }

/* ===== ADMIN TABLE ===== */
.admin-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.admin-table th { background: var(--bg-light); padding: 9px 10px; text-align: left; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(248,250,252,0.8); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--white); border-radius: var(--radius); width: 100%; padding: 20px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-family: var(--font-display); font-size: 1rem; margin: 0; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-muted); padding: 4px; }
.modal-close:hover { color: var(--danger); }

/* ===== EXTRA IMAGE WRAP ===== */
.extra-img-wrap { position: relative; display: inline-block; }
.btn-remove-extra { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }

/* ===== BADGES EXTRA ===== */
.badge-purple { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.badge-teal   { background: rgba(6,182,212,0.12); color: #0891b2; }
.badge-info   { background: rgba(59,130,246,0.12); color: #2563eb; }

/* ===== RESPONSIVE ADMIN ===== */
@media (max-width: 900px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .admin-toggle-btn { display: block; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .account-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* logo styles defined in header section above */

/* ===== ADMIN SIDEBAR TOGGLE FIX ===== */
/* JS uses .admin-sidebar-open but CSS had .open — align to admin-sidebar-open */
@media (max-width: 900px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.admin-sidebar-open { transform: translateX(0); }
}

/* ===== BREADCRUMB ===== */
.breadcrumb { background: var(--bg-light); border-bottom: 1px solid var(--border); }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; padding: 8px 16px; }
.breadcrumb-list { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--text-muted); flex-wrap: wrap; }
.breadcrumb-list li:not(:last-child)::after { content: '/'; margin-left: 6px; }
.breadcrumb-list a { color: var(--orange); text-decoration: none; }
.breadcrumb-list a:hover { text-decoration: underline; }

/* ===== TAG ===== */
.tag { display: inline-block; background: var(--bg-light); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; font-size: 11px; color: var(--text-muted); }

/* ===== ALERT ===== */
.alert { border-radius: var(--radius); padding: 10px 14px; font-size: .875rem; margin-bottom: 10px; }
.alert-warning { background: #fef9c3; border: 1px solid #fde047; color: #854d0e; }
.alert-danger  { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }

/* ============================================================
   AUTH PAGES  (standalone: login, register, forgot, admin login)
   ============================================================ */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF8F0 0%, #FDECD8 50%, #FFF3E0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--font-body);
}

.auth-wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}
.auth-logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
}
.auth-logo-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--dark);
    margin-top: 6px;
}
.auth-logo-sub {
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 2px;
}

.auth-card {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.10);
    border: 1px solid rgba(232,88,10,0.08);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 6px;
    text-align: center;
}
.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Full-width button */
.btn-block { width: 100%; justify-content: center; }

/* Password field with eye toggle */
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-right: 40px; }
.input-icon-wrap .input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}
.input-icon-wrap .input-icon:hover { color: var(--orange); }

/* Auth footer links */
.auth-footer-links {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer-links a { color: var(--orange); font-weight: 700; text-decoration: none; }
.auth-footer-links a:hover { text-decoration: underline; }

/* Admin auth variant */
.auth-admin-badge {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

/* hero overflow handled in hero section above */

/* ============================================================
   MOBILE HEADER  — tighter on small screens
   ============================================================ */
@media (max-width: 480px) {
    .logo-text { font-size: 1rem; }
    .logo-text span { display: none; }
    .header-inner { gap: 6px; padding: 0 8px; }
    .header-btn { padding: 6px 8px; font-size: 13px; }
}
@media (max-width: 360px) {
    .logo-text { display: none; }
}

/* ============================================================
   SECTION HEADER (title + view-all button) — mobile safe
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}
.section-header .section-title { margin-bottom: 0; min-width: 0; flex: 1; }
