/* ============================================
   NITF - Nigeria International Trade Fair
   Global Stylesheet
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --nitf-green: #0d5a2c;
    --nitf-green-light: #1e7d42;
    --nitf-green-dark: #083d1d;
    --nitf-red: #e63946;
    --nitf-red-dark: #c1121f;
    --nitf-gold: #f4a300;
    --nitf-cream: #f8f9f4;
    --nitf-gray: #6c757d;
    --nitf-dark: #1a1a1a;
    --nitf-border: #e5e7eb;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.25s ease-in-out;
}

/* ---------- Reset & Base ---------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: var(--nitf-dark);
    background-color: #ffffff;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--nitf-green);
    transition: var(--transition);
}

a:hover {
    color: var(--nitf-green-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--nitf-dark);
}

/* ---------- Utility Colors ---------- */
.text-success { color: var(--nitf-green) !important; }
.text-danger  { color: var(--nitf-red) !important; }
.bg-success   { background-color: var(--nitf-green) !important; }
.bg-danger    { background-color: var(--nitf-red) !important; }

/* ---------- Navbar ---------- */
.navbar {
    background-color: #ffffff !important;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 3px solid var(--nitf-green);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0;
}

.navbar-brand img {
    height: 48px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-brand .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-family: 'Arial Black', 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.navbar-brand .logo-text .line-1 {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--nitf-green);
}

.navbar-brand .logo-text .line-2 {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--nitf-dark);
    letter-spacing: 1px;
}

.navbar-brand .logo-text .line-3 {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--nitf-red);
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: var(--nitf-dark) !important;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--nitf-green) !important;
    background-color: rgba(13, 90, 44, 0.06);
}

.navbar-nav .nav-link.btn-success {
    color: #fff !important;
}

.navbar-toggler {
    border: 2px solid var(--nitf-green);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(13, 90, 44, 0.2);
}

.cart-badge {
    display: inline-block;
    background: var(--nitf-red);
    color: #fff;
    border-radius: 20px;
    font-size: 0.7rem;
    padding: 1px 7px;
    margin-left: 4px;
    font-weight: 700;
    vertical-align: middle;
}

/* ---------- Hero Section ---------- */
.hero-section {
    background: linear-gradient(135deg, var(--nitf-cream) 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0 4rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13, 90, 44, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section h1 {
    position: relative;
    z-index: 1;
}

.hero-section p {
    position: relative;
    z-index: 1;
}

.hero-section .btn-danger {
    background: linear-gradient(135deg, var(--nitf-red) 0%, var(--nitf-red-dark) 100%);
    border: none;
    padding: 0.85rem 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.hero-section .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.4);
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--nitf-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
    background: #fff;
}

.card:hover {
    border-color: rgba(13, 90, 44, 0.3);
}

.card-img-top {
    transition: transform 0.4s ease;
}

.card:hover .card-img-top {
    transform: scale(1.03);
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ---------- Recommendation Widget ---------- */
.rec-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--nitf-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.rec-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
}

.rec-card .badge {
    font-weight: 600;
    padding: 0.35em 0.6em;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
    padding: 0.5rem 1.25rem;
}

.btn-success {
    background-color: var(--nitf-green);
    border-color: var(--nitf-green);
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--nitf-green-dark);
    border-color: var(--nitf-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(13, 90, 44, 0.25);
}

.btn-outline-success {
    color: var(--nitf-green);
    border-color: var(--nitf-green);
}

.btn-outline-success:hover {
    background-color: var(--nitf-green);
    border-color: var(--nitf-green);
    color: #fff;
}

.btn-danger {
    background-color: var(--nitf-red);
    border-color: var(--nitf-red);
}

.btn-danger:hover {
    background-color: var(--nitf-red-dark);
    border-color: var(--nitf-red-dark);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
}

/* ---------- Product Detail ---------- */
.product-image-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--nitf-cream);
}

.product-image-container img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--nitf-green);
    margin: 1rem 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    background: transparent;
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--nitf-green);
}

.breadcrumb-item.active {
    color: var(--nitf-gray);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--nitf-border);
    padding: 0.6rem 0.9rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--nitf-green);
    box-shadow: 0 0 0 3px rgba(13, 90, 44, 0.12);
}

.form-label {
    font-weight: 600;
    color: var(--nitf-dark);
    margin-bottom: 0.35rem;
}

/* ---------- Auth Pages (Login/Register) ---------- */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--nitf-cream) 0%, #ffffff 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--nitf-green);
}

.auth-card h2 {
    margin-bottom: 0.5rem;
    color: var(--nitf-green);
}

.auth-card .form-text {
    color: var(--nitf-gray);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* ---------- Cart ---------- */
.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--nitf-border);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-summary {
    background: var(--nitf-cream);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.cart-summary .total {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nitf-green);
}

/* ---------- Admin Dashboard ---------- */
.dashboard-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--nitf-green);
    margin-bottom: 1.5rem;
}

.dashboard-card h4,
.dashboard-card h5 {
    color: var(--nitf-green);
    margin-bottom: 1rem;
}

.stat-box {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--nitf-cream);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-box .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--nitf-green);
    line-height: 1;
}

.stat-box .stat-label {
    font-size: 0.875rem;
    color: var(--nitf-gray);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--nitf-dark);
    color: #cfcfcf;
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

.site-footer h5 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-footer a {
    color: #cfcfcf;
    display: block;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: var(--nitf-gold);
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #888;
}

.site-footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    margin-right: 0.5rem;
    transition: var(--transition);
    padding: 0;
}

.site-footer .social-icons a:hover {
    background: var(--nitf-green);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    padding: 0.9rem 1.2rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #0d5a2c;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
}

/* ---------- Badges ---------- */
.badge {
    font-weight: 600;
    padding: 0.35em 0.7em;
}

/* ---------- Tables (Admin) ---------- */
.table {
    vertical-align: middle;
}

.table thead th {
    background: var(--nitf-cream);
    color: var(--nitf-dark);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--nitf-green);
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Toast Notification ---------- */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-toast {
    background: var(--nitf-green);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    animation: slideIn 0.3s ease;
    min-width: 250px;
}

.custom-toast.error {
    background: var(--nitf-red);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ---------- Section Headers ---------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--nitf-border);
}

.section-header h3 {
    margin: 0;
    color: var(--nitf-dark);
}

.section-header h3 .accent {
    color: var(--nitf-green);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeInUp 0.5s ease-out;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--nitf-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--nitf-green-dark);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablets (≤ 992px) */
@media (max-width: 992px) {
    .hero-section {
        padding: 3.5rem 0 3rem;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .navbar-brand img {
        height: 42px;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-brand img {
        height: 38px;
    }

    .navbar-brand .logo-text .line-1 {
        font-size: 1rem;
    }

    .navbar-brand .logo-text .line-2,
    .navbar-brand .logo-text .line-3 {
        font-size: 0.62rem;
    }

    .navbar-collapse {
        background: #fff;
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 0.75rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav .nav-link {
        padding: 0.6rem 0.75rem !important;
        border-bottom: 1px solid var(--nitf-border);
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
        margin-top: 0.5rem;
        text-align: center;
    }

    .hero-section {
        padding: 2.5rem 0 2rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p.lead {
        font-size: 1rem;
    }

    .hero-section .btn-lg {
        padding: 0.65rem 1.75rem;
        font-size: 0.95rem;
    }

    .card-body {
        padding: 0.85rem;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .cart-item {
        flex-wrap: wrap;
    }

    .cart-item img {
        width: 65px;
        height: 65px;
    }

    .cart-summary {
        position: static;
        margin-top: 1.5rem;
    }

    .site-footer {
        padding: 2rem 0 1rem;
        margin-top: 3rem;
    }

    .site-footer h5 {
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .auth-card {
        padding: 1.75rem;
    }

    .stat-box {
        padding: 1rem;
    }

    .stat-box .stat-number {
        font-size: 1.5rem;
    }

    .dashboard-card {
        padding: 1.15rem;
    }

    .toast-container {
        right: 10px;
        left: 10px;
        top: 75px;
    }

    .custom-toast {
        min-width: auto;
        font-size: 0.9rem;
    }
}

/* Small Mobile (≤ 480px) */
@media (max-width: 480px) {
    .navbar-brand img {
        height: 34px;
    }

    .navbar-brand .logo-text .line-1 {
        font-size: 0.9rem;
    }

    .navbar-brand .logo-text .line-2,
    .navbar-brand .logo-text .line-3 {
        font-size: 0.55rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .product-image-container img {
        max-height: 320px;
    }

    h2, .h2 {
        font-size: 1.4rem;
    }

    h3, .h3 {
        font-size: 1.2rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .navbar, .site-footer, .btn, .toast-container {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* Header Advert Responsiveness */
/* Header Advert Responsiveness */
.header-advert-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 120px; /* Desktop limit */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .header-advert-wrapper img {
        max-height: 80px; /* Mobile limit */
        width: 100%;
    }
}