:root {
    --brand-navy: #2b2d8f;
    --brand-navy-dark: #1e2066;
    --brand-red: #e8332a;
    --brand-blue-light: #2fa8dc;
    --brand-bg: #f7f8fc;
}

* { box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    color: #2c2c2c;
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; }

a { text-decoration: none; }

.top-bar {
    background: var(--brand-navy-dark);
    color: #fff;
}

.navbar .nav-link {
    font-weight: 600;
    color: #2c2c2c !important;
    padding: 0.5rem 0.9rem !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--brand-navy) !important;
}

.btn-primary,
.btn-brand {
    background-color: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
    font-weight: 600;
}

.btn-primary:hover,
.btn-brand:hover {
    background-color: var(--brand-navy-dark);
    border-color: var(--brand-navy-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--brand-navy);
    border-color: var(--brand-navy);
}

.btn-outline-primary:hover {
    background-color: var(--brand-navy);
    border-color: var(--brand-navy);
}

.btn-accent {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
    font-weight: 600;
}

.btn-accent:hover {
    background-color: #c8221a;
    border-color: #c8221a;
    color: #fff;
}

.text-brand { color: var(--brand-navy); }
.bg-brand { background-color: var(--brand-navy); }
.bg-brand-light { background-color: var(--brand-bg); }

/* Hero */
.hero-section {
    background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-navy-dark) 60%, #14153f 100%);
    color: #fff;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}
.hero-section h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.hero-section .btn-accent { padding: 0.75rem 2rem; }

/* Category cards */
.category-card {
    border-radius: 14px;
    overflow: hidden;
    background: var(--brand-bg);
    text-align: center;
    padding: 1.5rem 1rem;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
    border: 1px solid #eef0fa;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(43,45,143,0.12);
}
.category-card .icon-wrap {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
}

/* Product card */
.product-card {
    border: 1px solid #eef0fa;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: box-shadow .2s ease, transform .2s ease;
    background: #fff;
    position: relative;
}
.product-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.09);
    transform: translateY(-3px);
}
.product-card .product-img-wrap {
    height: 190px;
    display: flex; align-items: center; justify-content: center;
    background: #f4f5fa;
    overflow: hidden;
}
.product-card .product-img-wrap img {
    max-height: 100%; max-width: 100%; object-fit: contain;
}
.product-card .badge-featured {
    position: absolute; top: 10px; left: 10px; z-index: 2;
}
.product-card .price {
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 1.1rem;
}
.product-card .compare-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85rem;
}

/* Product detail */
.product-gallery-thumb {
    width: 70px; height: 70px; object-fit: contain;
    border: 1px solid #eee; border-radius: 8px; padding: 4px; cursor: pointer;
    background: #fff;
}
.product-gallery-thumb.active { border-color: var(--brand-navy); }
.product-gallery-main {
    height: 380px; display:flex; align-items:center; justify-content:center;
    background: #f4f5fa; border-radius: 12px; overflow: hidden;
}
.product-gallery-main img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* Cart */
.cart-item-img {
    width: 80px; height: 80px; object-fit: contain; background: #f4f5fa; border-radius: 8px;
}

/* Footer */
.site-footer {
    background: var(--brand-navy-dark);
}
.footer-link {
    color: #d9dcf5;
}
.footer-link:hover { color: #fff; }

/* Stats / trust badges */
.trust-badge {
    text-align: center;
    padding: 1.5rem 0.5rem;
}
.trust-badge i { font-size: 2.2rem; color: var(--brand-navy); }

/* Mobile responsiveness helpers */
@media (max-width: 767.98px) {
    .hero-section { padding: 40px 0; text-align: center; }
    .product-card .product-img-wrap { height: 150px; }
    .product-gallery-main { height: 260px; }
    .top-bar { display: none !important; }
}

@media (max-width: 991.98px) {
    .navbar-collapse { max-height: 80vh; overflow-y: auto; }
}

/* Admin sidebar */
.admin-sidebar {
    background: var(--brand-navy-dark);
    min-height: 100vh;
    color: #fff;
}
.admin-sidebar a {
    color: #d9dcf5;
    display: block;
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #eee;
}
.stat-card {
    border-radius: 14px;
    padding: 1.3rem;
    color: #fff;
}
.stat-card.navy { background: var(--brand-navy); }
.stat-card.red { background: var(--brand-red); }
.stat-card.blue { background: var(--brand-blue-light); }
.stat-card.dark { background: #2c2c2c; }

.table-responsive-card thead { display: none; }
@media (max-width: 767.98px) {
    .table-responsive-card, .table-responsive-card tbody, .table-responsive-card tr, .table-responsive-card td {
        display: block; width: 100%;
    }
    .table-responsive-card tr { margin-bottom: 1rem; border: 1px solid #eee; border-radius: 8px; padding: 0.5rem; }
    .table-responsive-card td { text-align: right; padding-left: 45%; position: relative; border: none; }
    .table-responsive-card td::before {
        content: attr(data-label);
        position: absolute; left: 10px; width: 40%; text-align: left; font-weight: 600; color: #666;
    }
}
