/* ===== VARIABLES ===== */
:root {
    --navy: #0a1628;
    --navy-light: #132240;
    --gold: #c8922a;
    --gold-light: #d4a94a;
    --green: #6b8c42;
    --cream: #f5f0e8;
    --cream-dark: #e8e0d0;
    --white: #ffffff;
    --text-dark: #2d2d2d;
    --text-muted: #6c757d;
    --danger: #dc3545;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Raleway', sans-serif;
}

/* ===== BASE ===== */
* { box-sizing: border-box; }

html { font-size: 15px; scroll-behavior: smooth; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--white);
    margin: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--navy);
}

a { text-decoration: none; color: var(--gold); transition: all 0.3s; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; }

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--navy);
    color: var(--cream);
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 500;
}
.top-bar a { color: var(--cream); }
.top-bar a:hover { color: var(--gold); }
.top-bar i { margin-right: 4px; color: var(--gold); }

@media (max-width: 768px) {
    .top-bar .top-bar-right { display: none; }
    .top-bar { text-align: center; }
}

/* ===== HEADER ===== */
.site-header {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 2px solid var(--cream-dark);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo { display: flex; flex-direction: column; text-decoration: none; }
.logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}
.logo-accent { color: var(--gold); }
.logo-slogan {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-search { flex: 1; max-width: 450px; }
.header-search .form-control {
    border: 2px solid var(--cream-dark);
    border-right: none;
    border-radius: 25px 0 0 25px;
    padding: 10px 20px;
}
.header-search .form-control:focus {
    border-color: var(--gold);
    box-shadow: none;
}
.header-search .btn-gold {
    border-radius: 0 25px 25px 0;
    padding: 10px 20px;
}

.header-actions { display: flex; gap: 20px; align-items: center; }
.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--navy);
    font-size: 0.75rem;
    text-decoration: none;
    position: relative;
}
.header-action i { font-size: 1.3rem; margin-bottom: 2px; }
.header-action:hover { color: var(--gold); }

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .header-search { order: 3; max-width: 100%; flex-basis: 100%; margin-top: 10px; }
    .header-action span { display: none; }
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cream);
    padding: 12px 0;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}
.nav-menu li a {
    display: block;
    padding: 14px 18px;
    color: var(--cream);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--gold);
    color: var(--white);
}

@media (max-width: 991px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
    }
    .nav-menu.active { display: flex; }
    .nav-menu li a { padding: 12px 15px; border-top: 1px solid rgba(255,255,255,0.1); }
}

/* ===== BUTTONS ===== */
.btn-gold {
    background: var(--gold);
    color: var(--white);
    border: none;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 4px;
    transition: all 0.3s;
}
.btn-gold:hover { background: var(--gold-light); color: var(--white); }

.btn-navy {
    background: var(--navy);
    color: var(--white);
    border: none;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 4px;
}
.btn-navy:hover { background: var(--navy-light); color: var(--white); }

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    background: transparent;
    font-weight: 600;
    padding: 8px 23px;
    border-radius: 4px;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--white); }

/* ===== SLIDER / HERO ===== */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide {
    display: none;
    position: relative;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    background-color: var(--navy);
}
.hero-slide.active { display: block; }
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.4) 100%);
    display: flex;
    align-items: center;
}
.hero-content {
    color: var(--white);
    max-width: 550px;
    padding: 40px;
}
.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 5px;
}
.hero-content p {
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 25px;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active { background: var(--gold); transform: scale(1.2); }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10,22,40,0.6);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s;
}
.slider-arrow:hover { background: var(--gold); }
.slider-arrow.prev { left: 15px; }
.slider-arrow.next { right: 15px; }

@media (max-width: 768px) {
    .hero-slide { min-height: 300px; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .hero-content { padding: 25px; }
}

/* ===== FEATURES BAR ===== */
.features-bar {
    background: var(--cream);
    padding: 25px 0;
    border-bottom: 1px solid var(--cream-dark);
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.feature-item i {
    font-size: 1.8rem;
    color: var(--gold);
}
.feature-item h6 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
}
.feature-item small { color: var(--text-muted); font-size: 0.75rem; }

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
}
.section-title p { color: var(--text-muted); margin-top: 10px; }

.section-alt { background: var(--cream); }

/* ===== CATEGORY CARDS ===== */
.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
    transition: transform 0.3s;
}
.category-card:hover { transform: translateY(-5px); }
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-card .category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,22,40,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
.category-card h5 {
    color: var(--white);
    margin: 0;
    font-size: 1.1rem;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}
.product-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--cream);
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-img img { transform: scale(1.05); }

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}
.product-badge.new { background: var(--green); }
.product-badge.bestseller { background: var(--gold); }

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(10,22,40,0.9);
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    transition: bottom 0.3s;
}
.product-card:hover .product-actions { bottom: 0; }
.product-actions .btn {
    padding: 6px 15px;
    font-size: 0.8rem;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 5px;
}
.product-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--navy);
    line-height: 1.3;
}
.product-name a { color: var(--navy); }
.product-name a:hover { color: var(--gold); }
.product-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    flex: 1;
}
.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
}
.product-price .old-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
    margin-right: 8px;
}
.product-weight {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.product-card-footer {
    padding: 0 15px 15px;
}
.btn-add-cart {
    width: 100%;
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-add-cart:hover { background: var(--gold); }
.btn-add-cart i { margin-right: 5px; }

/* ===== PRODUCT LIST PAGE ===== */
.product-filters {
    background: var(--cream);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filter-sidebar h5 {
    font-size: 1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 15px;
}
.filter-sidebar .list-group-item {
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9rem;
}
.filter-sidebar .list-group-item:hover,
.filter-sidebar .list-group-item.active {
    background: var(--gold);
    color: white;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail { padding: 40px 0; }
.product-detail-img {
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream);
}
.product-detail-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.product-detail-info h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.product-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 20px;
}
.product-detail-price .old-price {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 10px;
}
.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}
.qty-selector button {
    width: 40px;
    height: 40px;
    border: 2px solid var(--cream-dark);
    background: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-selector input {
    width: 55px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--cream-dark);
    border-left: none;
    border-right: none;
    font-weight: 600;
}

/* ===== CART ===== */
.cart-table th {
    background: var(--navy);
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 12px 15px;
}
.cart-table td {
    vertical-align: middle;
    padding: 12px 15px;
}
.cart-table img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}
.cart-summary {
    background: var(--cream);
    padding: 25px;
    border-radius: 8px;
}
.cart-summary h4 { margin-bottom: 20px; }
.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--cream-dark);
}
.cart-summary .summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    border-bottom: none;
    padding-top: 12px;
}
.free-shipping-note {
    background: var(--green);
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-top: 15px;
}

/* ===== CHECKOUT ===== */
.checkout-form .form-label { font-weight: 600; font-size: 0.9rem; }
.checkout-form .form-control {
    border: 2px solid var(--cream-dark);
    padding: 10px 15px;
}
.checkout-form .form-control:focus { border-color: var(--gold); box-shadow: none; }

/* ===== ORDER SUCCESS ===== */
.order-success {
    text-align: center;
    padding: 80px 20px;
}
.order-success i { font-size: 4rem; color: var(--green); margin-bottom: 20px; }
.order-success h2 { color: var(--navy); }

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 40px 0;
}
.auth-card {
    max-width: 450px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--cream-dark);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
}
.auth-card .form-control {
    border: 2px solid var(--cream-dark);
    padding: 12px 15px;
}
.auth-card .form-control:focus { border-color: var(--gold); box-shadow: none; }
.auth-divider {
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 60px 0;
    text-align: center;
    color: var(--white);
}
.cta-section h2 { color: var(--gold); font-size: 2rem; }
.cta-section p { color: var(--cream); margin-bottom: 25px; font-size: 1.1rem; }

/* ===== FOOTER ===== */
.site-footer { background: var(--navy); color: var(--cream); }
.footer-top { padding: 50px 0 30px; }
.footer-brand p { color: rgba(245,240,232,0.7); font-size: 0.9rem; margin: 15px 0; }
.footer-brand .logo-text { font-size: 1.5rem; }

.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245,240,232,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 0.85rem;
    transition: all 0.3s;
}
.social-links a:hover { background: var(--gold); border-color: var(--gold); }

.site-footer h5 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: var(--font-body);
    font-weight: 600;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: rgba(245,240,232,0.7);
    font-size: 0.88rem;
}
.footer-links a:hover { color: var(--gold); }

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-contact li {
    margin-bottom: 10px;
    color: rgba(245,240,232,0.7);
    font-size: 0.88rem;
}
.footer-contact i { color: var(--gold); margin-right: 8px; width: 16px; }

.footer-bottom {
    border-top: 1px solid rgba(245,240,232,0.15);
    padding: 20px 0;
}
.footer-bottom p { margin: 0; font-size: 0.85rem; color: rgba(245,240,232,0.5); }
.payment-icons { display: flex; gap: 10px; }
.payment-icons i { font-size: 1.8rem; color: rgba(245,240,232,0.4); }

/* ===== TOAST NOTIFICATION ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast-msg {
    background: var(--navy);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.toast-msg.success { border-left: 4px solid var(--green); }
.toast-msg.error { border-left: 4px solid var(--danger); }

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

/* ===== ADMIN ===== */
.admin-sidebar {
    background: var(--navy);
    min-height: 100vh;
    padding: 20px 0;
    color: var(--cream);
}
.admin-sidebar h4 { padding: 0 20px; color: var(--gold); font-size: 1.1rem; margin-bottom: 25px; }
.admin-menu { list-style: none; padding: 0; margin: 0; }
.admin-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--cream);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.admin-menu a:hover,
.admin-menu a.active { background: var(--gold); color: white; }
.admin-menu i { width: 20px; margin-right: 8px; }

.admin-content { padding: 30px; }
.admin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 20px;
}
.stat-card {
    text-align: center;
    padding: 25px;
}
.stat-card i { font-size: 2.5rem; color: var(--gold); margin-bottom: 10px; }
.stat-card h3 { font-size: 2rem; margin-bottom: 5px; }
.stat-card p { color: var(--text-muted); margin: 0; }

/* ===== UTILITIES ===== */
.text-gold { color: var(--gold) !important; }
.bg-navy { background-color: var(--navy) !important; }
.bg-cream { background-color: var(--cream) !important; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state i { font-size: 3rem; color: var(--cream-dark); margin-bottom: 15px; }

/* ===== LOADING ===== */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}
.btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== PLACEHOLDER IMAGE ===== */
.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}
