
/* 1. The Rigid Box (Slightly larger to fit the chair) */
.ekea-logo-box {
    display: block;
    width: 180px;  
    height: 60px;  
    position: relative; 
    padding: 0 !important; 
}

/* 2. The Floating Image (THIS IS NEW!) */
.ekea-logo-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    /* This next line is the magic trick. It zooms the image in by 1.6x to hide the white padding! */
    transform: scale(1.6); 
    transform-origin: left center;
}

/* Move the main navigation links to the left on desktop */
@media (min-width: 992px) {
    #mainNav .navbar-nav.me-auto {
        margin-left: -30px; /* Adjust this number to move it exactly where you want! */
    }
}

/* ============================================================
   EKEA — Design System
   WCAG AA Compliant | Scandinavian-Inspired Premium Aesthetic
   ============================================================ */

/* ===== 1. FONT FACE — Visby CF (Self-Hosted) ===== */
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/VisbyLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/VisbyRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/VisbyMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/VisbySemibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/VisbyBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/VisbyExtrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: block;
}

/* ===== 2. DESIGN TOKENS (CSS Custom Properties) ===== */
:root {
    /* Primary Palette — All pass WCAG AA contrast on white/dark */
    --color-primary: #003366;
    --color-primary-light: #004d99;
    --color-primary-dark: #002244;
    --color-accent: #C4932B;
    --color-accent-hover: #A87B1F;
    --color-accent-light: #F5E6C8;

    /* Neutrals */
    --color-bg: #F5F5F0;
    --color-bg-alt: #EAEAE5;
    --color-surface: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-muted: #555555;
    --color-text-light: #F5F5F0;
    --color-border: #D1D1CC;

    /* Status Colors (WCAG safe on white) */
    --color-success: #2E7D32;
    --color-warning: #E65100;
    --color-danger: #C62828;
    --color-info: #01579B;

    /* Typography — Visby CF */
    --font-body: 'Visby CF', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Visby CF', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing & Sizing */
    --navbar-height: 72px;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --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 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* ----- Global Reset & Base ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
    overflow-y: scroll;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.75rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.375rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* Accessibility: Skip to Main Content Link */
.skip-link {
    position: absolute;
    top: -100px; /* Hides it completely off the top of the screen */
    left: 50%;
    transform: translateX(-50%); /* Centers it perfectly */
    background-color: #000; /* Change to your EKEA primary color if desired */
    color: #fff;
    padding: 12px 24px;
    z-index: 10000; /* This MUST be higher than Bootstrap's fixed navbar (1030) */
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: bold;
    transition: top 0.3s ease-in-out;
}

/* When a user presses the 'Tab' key, this gets triggered */
.skip-link:focus {
    top: 0; /* Drops down smoothly into view */
    color: #fff;
    outline: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ----- Focus Styles (Accessibility) ----- */
*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* ----- Navbar ----- */
.ekea-navbar {
    background: var(--color-primary-dark) !important;
    padding: 0.75rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.ekea-navbar.scrolled {
    padding: 0.75rem 0; /* Matches the original padding so it stops resizing */
    box-shadow: var(--shadow-lg); /* Keeps the darker shadow effect when scrolling */
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-accent) !important;
    letter-spacing: 3px;
}

.brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.ekea-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.94rem;
}

.ekea-navbar .nav-link:hover,
.ekea-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

.ekea-navbar .btn-accent {
    background: var(--color-accent) !important;
    color: var(--color-primary-dark) !important;
    font-weight: 600;
    border: none;
}

.ekea-navbar .btn-accent:hover {
    background: var(--color-accent-hover) !important;
}

.navbar-spacer {
    height: var(--navbar-height);
}

.badge.bg-accent {
    background-color: var(--color-accent) !important;
    color: var(--color-primary-dark);
    font-weight: 700;
}

/* ----- Hero Section ----- */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
    color: var(--color-text-light);
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--color-bg), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 540px;
    line-height: 1.7;
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.08;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ----- Buttons ----- */
.btn-primary-ekea {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary-ekea:hover {
    background-color: var(--color-accent-hover);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 147, 43, 0.3);
}

.btn-outline-ekea {
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: transparent;
}

.btn-outline-ekea:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-dark-ekea {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-dark-ekea:hover {
    background-color: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

/* ----- Section Styling ----- */
.section-padding {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 1rem auto 0;
    font-size: 1.1rem;
}

.bg-light-ekea {
    background-color: var(--color-bg-alt);
}

/* ----- Product Cards ----- */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.product-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-alt);
    aspect-ratio: 4/3;
}

.product-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .product-name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.product-card .product-category {
    font-size: 0.81rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.product-card .product-price {
    font-size: 1.38rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: auto;
}

.product-card .btn-add-cart {
    margin-top: 1rem;
}

/* ----- Category Badge ----- */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ----- Star Ratings ----- */
.star-rating {
    color: var(--color-accent);
    font-size: 1rem;
}

.star-rating .bi-star-fill {
    color: var(--color-accent);
}

.star-rating .bi-star {
    color: var(--color-border);
}

/* ----- Review Cards ----- */
.review-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}

.review-card:hover {
    box-shadow: var(--shadow-md);
}

.review-card .reviewer-name {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.review-card .review-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ----- Forms ----- */
.ekea-form .form-label {
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 0.94rem;
    margin-bottom: 0.38rem;
}

.ekea-form .form-control,
.ekea-form .form-select {
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.94rem;
    transition: var(--transition);
    background-color: var(--color-surface);
}

.ekea-form .form-control:focus,
.ekea-form .form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(196, 147, 43, 0.15);
}

.ekea-form .form-control.is-invalid {
    border-color: var(--color-danger);
}

.ekea-form .form-control.is-valid {
    border-color: var(--color-success);
}

.ekea-form .invalid-feedback {
    color: var(--color-danger);
    font-weight: 500;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* ----- Cart & Checkout Table ----- */
.cart-table th {
    background: var(--color-primary-dark);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.cart-table td {
    vertical-align: middle;
    padding: 1rem;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quantity-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-bg-alt);
    color: var(--color-text);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-control button:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}

.quantity-control input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.938rem;
}

/* ----- Order Summary ----- */
.summary-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
}

.summary-card .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-bg-alt);
}

.summary-card .summary-total {
    font-size: 1.38rem;
    font-weight: 700;
    color: var(--color-primary);
    border-top: 2px solid var(--color-primary);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* ----- Status Badges ----- */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.88rem;
    border-radius: 20px;
    font-size: 0.81rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.status-processing {
    background: #E3F2FD;
    color: #01579B;
}

.status-shipped {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-delivered {
    background: #E8F5E9;
    color: #1B5E20;
}

.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
}

/* ----- Admin Dashboard ----- */
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.stat-card .stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- Value Proposition Cards ----- */
.value-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.value-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.value-card .value-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: var(--color-accent-light);
    border-radius: 50%;
}

.value-card h5 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    margin-bottom: 0.75rem;
}

/* ----- Page Header ----- */
.page-header {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    padding: 3.5rem 0;
    text-align: center;
}

.page-header h1 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    justify-content: center;
    margin-bottom: 0;
}

.page-header .breadcrumb-item a {
    color: var(--color-accent);
}

.page-header .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ----- Footer ----- */
.ekea-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 10;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.94rem;
    line-height: 1.7;
    opacity: 0.8;
}

.footer-heading {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    color: #fff;
    font-size: 0.875rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.94rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: var(--transition);
    font-size: 1.125rem;
}

.social-link:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem 0;
    font-size: 0.875rem;
}

/* ----- Toast Notifications ----- */
.ekea-toast {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ----- Animations ----- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Product Detail Page ----- */
.product-detail-img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    aspect-ratio: 1/1;
    object-fit: cover;
    background: var(--color-bg-alt);
}

.product-detail-info h1 {
    font-size: 2.25rem;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.81rem;
    font-weight: 600;
}

.stock-in {
    background: #E8F5E9;
    color: #2E7D32;
}

.stock-low {
    background: #FFF3E0;
    color: #E65100;
}

.stock-out {
    background: #FFEBEE;
    color: #C62828;
}

/* ----- Empty State ----- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state .empty-icon {
    font-size: 4rem;
    color: var(--color-border);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* ----- Dropdown Customisation ----- */
.dropdown-menu-dark {
    background: var(--color-primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1.25rem;
}

.dropdown-menu-dark .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-accent);
}

/* ----- About Page ----- */
.team-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--color-accent);
}

/* ----- Pagination ----- */
.pagination .page-link {
    color: var(--color-primary);
    border-color: var(--color-border);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-primary-dark);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ----- Responsive ----- */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section-padding {
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.875rem;
    }

    .auth-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .cart-table {
        font-size: 0.875rem;
    }

    .cart-item-img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .page-header {
        padding: 2rem 0;
    }

    .product-card .card-body {
        padding: 1rem;
    }
}

/* ===== 17. UTILITY CLASSES ===== */
.text-accent {
    color: #7A5A10 !important; /* WCAG AA 6.3:1 on white */
}

.bg-accent {
    background-color: var(--color-accent) !important;
}

.text-muted-ekea {
    color: var(--color-text-muted);
}

.fw-semibold {
    font-weight: 600;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.border-accent {
    border-color: var(--color-accent) !important;
}

/* ----- Chatbot Widget ----- */
.chatbot-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 9998;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-toggle-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.08);
}

.chatbot-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--color-border);
}

.chatbot-header {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 0.875rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.chatbot-close-btn:hover {
    color: #fff;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 360px;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.chat-msg {
    padding: 0.63rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 90%;
    word-wrap: break-word;
}

.bot-msg {
    background: var(--color-bg-alt);
    color: var(--color-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-msg {
    background: var(--color-primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-result {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
}

.chatbot-result:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-primary-dark);
}

.chatbot-result i {
    font-size: 1.25rem;
    color: var(--color-accent);
}

.chatbot-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.chatbot-input-area .form-control {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

@media (max-width: 480px) {
    .chatbot-panel {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 16px;
    }
}

/* ----- Chart.js Containers ----- */
.chart-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.chart-section-title i {
    color: var(--color-accent);
    margin-right: 0.5rem;
}

.chart-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.chart-container:hover {
    box-shadow: var(--shadow-md);
}

.chart-container h5 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-container h5 i {
    color: var(--color-accent);
}

.chart-wrapper {
    position: relative;
    min-height: 280px;
    width: 100%;
}

.chart-wrapper canvas {
    max-width: 100%;
}

.chart-container-wide .chart-wrapper {
    min-height: 320px;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    color: var(--color-text-muted);
    font-size: 0.94rem;
}

.chart-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Rating distribution bar (product detail / news) */
.rating-chart-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.rating-chart-container .chart-wrapper {
    min-height: 180px;
}

/* Spending trend (history page) */
.spending-chart-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.spending-chart-container .chart-wrapper {
    min-height: 250px;
}

@media (max-width: 768px) {
    .chart-wrapper {
        min-height: 220px;
    }
    .chart-container-wide .chart-wrapper {
        min-height: 260px;
    }
}

/* ============================================================
   UI/UX ENHANCEMENTS — Touch Targets, Hover Effects, WCAG
   ============================================================ */

/* ----- Minimum Touch Targets (48×48dp Material Design / 44pt Apple HIG) ----- */
.btn {
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-sm {
    min-height: 40px;
    min-width: 40px;
    font-size: 0.85rem;
}

.btn-lg {
    min-height: 52px;
}

.page-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button {
    min-width: 44px;
    min-height: 44px;
}

/* ----- Focus-Visible for Keyboard Navigation (WCAG 2.4.7) ----- */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.page-link:focus-visible,
a:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(196, 147, 43, 0.25);
}

/* ----- Product Card Hover Overlay (View Details) ----- */
.product-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.product-card .card-img-wrapper::after {
    content: '\f52a  View Details';
    font-family: 'bootstrap-icons', var(--font-body);
    position: absolute;
    inset: 0;
    background: rgba(0, 34, 68, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .card-img-wrapper::after {
    opacity: 1;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

/* ----- Featured Product Cards (Von Restorff Effect) ----- */
.product-card-featured .card-img-wrapper {
    height: 320px;
    width: 100%;
}

.product-card-featured .card-img-wrapper img {
    height: 100%;
    object-fit: cover;
}

.product-card-featured .card-body {
    padding: 1.5rem;
}

.product-card-featured .product-name {
    font-size: 1.25rem;
}

.product-card-featured .product-price {
    font-size: 1.3rem;
}

/* ----- Status Badge for Session Online/Offline ----- */
.status-badge.status-cancelled {
    background-color: rgba(198, 40, 40, 0.1);
    color: var(--color-danger);
}

/* WCAG .text-accent override consolidated into Utility Classes section above */

/* ----- Sort dropdown themed ----- */
.form-select {
    border-color: var(--color-border);
    color: var(--color-text);
    font-family: var(--font-body);
}

.form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(196, 147, 43, 0.2);
}

/* ----- Search placeholder visibility ----- */
.form-control::placeholder {
    color: #777;
    opacity: 1;
}

/* ----- Cart Shake Animation ----- */
@keyframes cartShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-4px) rotate(-5deg); }
    30% { transform: translateX(4px) rotate(5deg); }
    45% { transform: translateX(-3px) rotate(-3deg); }
    60% { transform: translateX(3px) rotate(3deg); }
    75% { transform: translateX(-1px) rotate(-1deg); }
}

.cart-shake {
    animation: cartShake 0.6s ease-in-out;
}

/* ----- Hide default number input spinners ----- */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ----- Session Indicator Dots ----- */
.session-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.session-online {
    background-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
    animation: pulse-green 2s ease-in-out infinite;
}

.session-offline {
    background-color: var(--color-border);
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.1); }
}

/* ----- Product Card Image Fill Fix ----- */
.product-card > a {
    display: block;
    width: 100%;
}

.product-card .card-img-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 18. HERO SLIDESHOW (Adrian) ===== */
.content-layer {
    position: relative;
    z-index: 10;
    background-color: var(--color-bg);
    width: 100%;
    margin-top: 100vh;
    transform: translateY(-5px); 
    padding-top: 5px;
    box-shadow: 0px -10px 20px rgba(0,0,0,0.1);
    min-height: 100vh;
}

.hero-fixed {
    position: fixed; 
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    z-index: 0;
    overflow: hidden;
    background-color: #000;
    pointer-events: none;
}

.hero-fixed .hero-overlay,
.hero-fixed .hero-dots,
.hero-fixed .hero-content a {
    pointer-events: auto;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 101%; 
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center bottom; 
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2); 
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}
.hero-dot {
   width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.hero-dot.active {
    background: white;
    transform: scale(1.2);
}
.hero-dot:hover {
    background: rgba(255,255,255,0.8);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6); 
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; }
}

/* oAuth button*/
.auth-separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid #ccc;
    z-index: 1;
}

.auth-separator span {
    background-color: #fff;
    padding: 0 10px;
    color: #777;
    position: relative;
    z-index: 2;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #757575;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 16px;
    text-decoration: none;
    font-family: Roboto, sans-serif;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: background-color 0.2s, box-shadow 0.2s;
    width: 100%; /* Or set a fixed max-width */
}

.btn-google:hover {
    background-color: #f8f8f8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    color: #757575;
}

.google-logo {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}
