/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
}

.container {
    max-width: 98vw;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Top Contact Bar */
.top-contact-bar {
    background-color: #f1f3f5; /* Light grey background from screenshot */
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.top-bar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    width: 100%;
}

.top-bar-left {
    text-align: left;
}

.top-bar-center {
    text-align: center;
}

.top-bar-right {
    text-align: right;
    font-weight: 600;
}

/* Contact icons use the green theme color */
.top-contact-bar .contact-icon {
    color: #007ab8; /* theme green */
    margin-right: 8px;
    font-size: 15px;
}

/* Main Header */
.main-header {
    background-color: #007ab8; /* Dark green from image */
    padding: 0;
    color: white;
}

.main-header a {
    color: white;
    text-decoration: none;
    font-size: 14px; /* default for back-btn / home-btn */
}

.header-left-group {
    display: flex;
    gap: clamp(8px, 1.5vw, 20px);
    font-weight: 600;
    align-items: stretch; /* Stretch children to take full header height */
    flex-shrink: 0; /* Don't let left buttons compress into nav space */
    white-space: nowrap;
}

.home-btn, .back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Stretch vertically to match the header ribbon */
    min-width: 44px;
    padding: 0 12px;
    border-radius: 0; /* Sharp corners */
    transition: background-color 0.2s;
}

/* Hide back button on desktop by default */
.back-btn {
    display: none;
}

/* Show back button only on mobile/tablet devices */
@media (max-width: 992px) {
    .back-btn {
        display: inline-flex;
    }
    .home-btn i {
        display: inline-block;
        margin-right: 6px;
    }
}

.home-btn:hover, .back-btn:hover {
    background-color: #005d8c; /* Solid dark green hover */
}

.main-header-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    gap: clamp(6px, 1vw, 15px);
    height: 50px; /* Vertically matching the size of the header ribbon */
}

.home-btn i {
    display: none;
}

.header-nav {
    display: flex;
    gap: clamp(4px, 0.6vw, 10px);
    flex: 1 1 auto;
    justify-content: space-evenly;
    align-items: stretch;
    margin: 0 clamp(4px, 1vw, 10px);
    white-space: nowrap;
}

.header-nav a {
    white-space: nowrap; /* Prevent link text from wrapping */
    font-size: clamp(12px, 0.9vw, 15px);
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 44px;
    padding: 0 clamp(8px, 0.8vw, 14px);
    flex: 1 1 auto;
    max-width: 200px;
    text-align: center;
    border-radius: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-nav a:not(.nav-login-btn) {
    color: #ffffff; /* Make text pure white for visibility */
    transition: color 0.3s ease, background-color 0.2s ease;
}

.header-nav a:not(.nav-login-btn):hover {
    color: #ffffff;
    background-color: #005d8c;
    text-decoration: none;
}

.nav-login-btn {
    align-self: center;
    height: 36px !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    padding: 0 18px !important;
    border-radius: 6px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 6px !important;
    color: #ffffff !important;
    flex: 0 0 auto !important; /* Login button shouldn't stretch as much */
    max-width: 140px !important;
}
.nav-login-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    text-decoration: none !important;
}

/* Main Content */
main {
    padding: 15px 0 10px 0;
}

.page-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
}

/* Popular This Week Section Boxed Container */
.popular-section-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    background-color: #ffffff;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.popular-section-box .section-title {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Category Card */
.category-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #007ab8;
    transform: translateY(-2px);
}

.card-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Icon Styling */
.card-icon {
    width: 44px;
    height: 44px;
    border: 2px solid #007ab8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #007ab8;
    background: #fff;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
}

.card-title {
    font-size: 15px;
    font-weight: 500;
    color: #212529;
}

.card-arrow {
    color: #adb5bd;
    font-size: 18px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .category-grid { grid-template-columns: 1fr; }
    .top-bar-grid {
        grid-template-columns: 1fr 1fr;
    }
    .top-bar-center {
        display: none !important;
    }
    .top-bar-left {
        text-align: left !important;
    }
    .top-bar-right {
        text-align: right !important;
    }
}
/* --- Product Grid & Card Styles --- */

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

/* 3-column grid for products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(335px, 1fr));
    gap: 20px;
}

/* Product Card Container */
.product-card {
    background: #ffffff; /* White background matching screenshot */
    border: 1px solid #e2e8f0;
    border-top: 3px solid #007ab8; /* Green top border matching screenshot */
    border-radius: 0;
    padding: 16px 16px 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    gap: 0;
}

.product-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border-color: #007ab8;
    transform: translateY(-2px);
}

/* Product Header */
.product-header {
    margin-bottom: 8px;
}

.product-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a; /* Navy Blue - matching screenshot */
    margin: 0 0 10px 0;
    line-height: 1.45;
    text-transform: uppercase;
    min-height: 36px;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    text-decoration: underline;
}

/* Product Category & Price Row */
.product-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.product-category {
    font-size: 12px;
    color: #007ab8; /* Theme Green */
    font-weight: 600;
    text-decoration: none;
}

.product-category:hover {
    text-decoration: underline;
}

.product-price {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb; /* Blue - matching screenshot */
}

/* Product Metadata Row (Subject & Grade) */
.product-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #475569; /* Slate 600 */
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icons in meta row are green, matching screenshot */
.product-meta-item i,
.product-meta-item svg.meta-icon {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #007ab8; /* Theme green icons */
    stroke: #007ab8;
    vertical-align: middle;
    flex-shrink: 0;
}

.product-meta-item span a {
    color: inherit;
    text-decoration: none;
}

.product-meta-item span a:hover {
    text-decoration: underline;
}

/* Product Footer (Buttons) */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.btn-buy-now {
    flex: 0 0 auto;
    text-align: center;
    padding: 7px 20px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px; /* Rounded corners matching screenshot */
    border: 1.5px solid #2563eb; /* Royal blue border matching screenshot */
    color: #2563eb; /* Royal blue text matching screenshot */
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-buy-now:hover {
    background: rgba(37, 99, 235, 0.04);
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.add-to-cart-form {
    flex: 0 0 auto;
    display: flex;
    margin-left: auto; /* Push to right */
}

.btn-add-cart {
    width: auto;
    text-align: center;
    padding: 7px 20px; /* Match Buy Now padding */
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px; /* Rounded corners matching screenshot */
    border: 1.5px solid #007ab8;
    color: #ffffff;
    background: #007ab8; /* Dark green - matching screenshot */
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add-cart:hover {
    background: #0b543a;
    border-color: #0b543a;
}

/* Added to Cart Button State */
.btn-added-cart {
    width: auto;
    margin-left: auto; /* Push to right */
    text-align: center;
    padding: 7px 20px; /* Match Buy Now padding */
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px; /* Rounded corners matching screenshot */
    border: 1.5px solid #007ab8; /* Green border matching screenshot */
    color: #007ab8; /* Green text matching screenshot */
    background: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-added-cart:hover {
    background: rgba(0, 122, 184, 0.04);
}

/* Responsive for Product Grid */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* --- BREADCRUMB BAR --- */
.breadcrumb-bar {
    background-color: transparent;
    padding: 0;
    border-bottom: none;
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-item a {
    text-decoration: none;
    color: #007ab8;
    font-weight: 500;
}

.breadcrumb-item a i {
    margin-right: 4px;
    color: #007ab8;
}

.breadcrumb-item.current {
    color: #64748b;
    font-weight: 500;
}

.breadcrumb-sep {
    color: #94a3b8;
    margin: 0 4px;
    font-weight: bold;
}

/* --- CATEGORY HEADER CONTAINER --- */
.category-header-container {
    padding: 24px 20px 16px 20px;
    max-width: 98vw;
    margin: 0 auto;
}

.category-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a; /* Slate 900 */
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

/* --- CATEGORY LAYOUT (Sidebar + Main) --- */
.category-layout {
    display: flex;
    gap: 25px;
    padding-bottom: 50px;
    margin-top: 5px;
    align-items: flex-start;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    position: sticky;
    top: 20px; /* Sticky sidebar */
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Gap between cards */
}

.sidebar-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    overflow: hidden;
}

.sidebar-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transform: translateY(-1px);
}

.sidebar-item.active {
    border-color: #007ab8;
    background-color: #f0f9ff; /* very light green active state */
    box-shadow: 0 4px 12px rgba(0, 122, 184, 0.05);
}

.sidebar-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-icon-circle {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background-color: #ffffff;
    transition: all 0.2s;
}

.sidebar-icon-circle.grade-icon {
    border: 2px solid #0f172a;
}

.sidebar-icon-circle svg {
    width: 18px;
    height: 18px;
    color: #007ab8;
    fill: none;
}

.sidebar-icon-circle.grade-icon svg {
    color: #0f172a;
    fill: none;
}

.sidebar-toggle:hover .sidebar-icon-circle {
    border-color: #007ab8;
    background-color: #e8f4f0;
}

.sidebar-toggle:hover .sidebar-icon-circle.grade-icon {
    border-color: #0f172a;
    background-color: #f1f5f9;
}

.sidebar-item.active .sidebar-icon-circle {
    border-color: #007ab8;
    background-color: #e8f4f0;
}

.sidebar-item.active .sidebar-icon-circle.grade-icon {
    border-color: #0f172a;
    background-color: #e2e8f0;
}

.sidebar-icon-circle.subject-icon {
    border: 2px solid #007ab8;
}

.grade-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.grade-label {
    font-size: 14px;
    font-weight: 700;
    color: #007ab8;
    line-height: 1.2;
}

.subject-btn .grade-label {
    color: #0f172a;
    transition: color 0.2s;
}

.subject-btn:hover .grade-label,
.sidebar-item.active .subject-btn .grade-label {
    color: #007ab8;
}

.category-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 400;
    margin-top: 2px;
}

.sidebar-toggle .arrow {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar-toggle:hover .arrow {
    color: #007ab8;
}

.sidebar-item.active .sidebar-toggle .arrow {
    color: #007ab8;
    transform: translateX(2px);
}

/* --- MAIN CONTENT --- */
.main-content {
    flex-grow: 1;
    min-width: 0; /* Prevents grid overflow */
}

/* Responsive Design */
@media (max-width: 992px) {
    .category-layout {
        flex-direction: column;
        gap: 15px;
    }
    .sidebar {
        width: 100%;
        position: static;
    }
    .sidebar-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .sidebar-list {
        grid-template-columns: 1fr;
    }
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-bottom: 20px;
}

.page-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: #f1f1f1;
    border-color: #bbb;
}

.page-btn.active {
    background: #007ab8;
    border-color: #007ab8;
    color: #fff;
    cursor: default;
}
/* --- CART ICON (compact: icon + count only) --- */
.cart-wrapper {
    flex-shrink: 0; /* Never compress into nav link space */
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto; /* No longer needs a fixed reservation — icon+number is small */
}
.cart-btn {
    background-color: transparent;
    color: white;
    text-decoration: none;
    font-size: 15px; /* slightly larger icon target */
    width: auto;
    min-width: 36px;
    height: 36px;
    border-radius: 30px; /* Capsule shape */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 12px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    font-weight: 700;
    position: relative;
}
.cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}
/* Header cart count value — absolute positioned red overlapping badge */
#header-cart-count-value {
    background-color: #ef4444; /* Vibrant red */
    color: white;
    font-weight: 700;
    font-size: 9px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1px;
    right: 2px;
    border: 2px solid #007ab8; /* Matches dark green header background */
    line-height: 1;
    z-index: 2;
}
#header-cart-count-value[data-count="0"] {
    display: none !important;
}

/* Hamburger Button (mobile) */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    padding: 0;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Header Right Group */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Off-canvas overlay — must sit above the sticky header (z-index 1000) */
.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease;
    z-index: 1900; /* above .main-header (1000) */
}
.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Off-canvas Navigation Drawer — highest stack, above overlay */
.mobile-offcanvas-nav {
    position: fixed;
    top: 0;
    right: -320px; /* Hidden offscreen right by default */
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #005d8c; /* Deep forest green for contrast and premium feel */
    box-shadow: -4px 0 25px rgba(0,0,0,0.3);
    z-index: 2000; /* above overlay (1900) and header (1000) */
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    color: white;
}

.mobile-offcanvas-nav.active {
    right: 0;
}

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.offcanvas-title {
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.offcanvas-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0 5px;
}

.offcanvas-close-btn:hover {
    opacity: 0.7;
}

.offcanvas-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex: 1;
}

.offcanvas-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.offcanvas-link i {
    width: 20px;
    text-align: center;
    color: rgba(255,255,255,0.65);
}

.offcanvas-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

/* Offcanvas Login/Logout Button */
.mobile-offcanvas-nav .nav-login-btn {
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.3) !important;
    background-color: rgba(255,255,255,0.08) !important;
    justify-content: center !important;
    color: white !important;
    padding: 10px !important;
    font-weight: 600 !important;
}

/* Offcanvas Cart Section */
.offcanvas-cart-wrapper {
    margin-top: auto; /* Push to the bottom */
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.offcanvas-cart-btn {
    background-color: #0f172a; /* Slate 900 */
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.offcanvas-cart-btn:hover {
    background-color: #1e293b;
    color: white;
    text-decoration: none;
}

/* Gold badge for offcanvas cart count */
#offcanvas-cart-count-value {
    color: #ffcc00;
    font-weight: 700;
    font-size: 14px;
    min-width: 14px;
    text-align: center;
    line-height: 1;
}

/* Collapsed layout triggers */
.main-header-container.nav-collapsed .header-nav {
    display: none !important;
}
.main-header-container.nav-collapsed .hamburger-btn {
    display: inline-flex !important;
}

/* Ensure mobile fallback */
@media (max-width: 992px) {
    .hamburger-btn {
        display: inline-flex !important;
    }
    .header-nav {
        display: none !important;
    }
}

/* --- CART PAGE (Checkout) Layout --- */
.cart-page-container {
    display: flex;
    gap: 40px;
    padding: 40px 20px 60px 20px;
    max-width: 98vw;
    margin: 0 auto;
    align-items: flex-start;
}

/* Left Column: Payment Form */
.cart-left {
    flex: 1.3;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.01);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-left h2 {
    font-size: 15px;
    font-weight: 800;
    color: #007ab8; /* Theme green from screenshot */
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.cart-left p {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* Right Column: Cart Items */
.cart-right {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.cart-right h3 {
    font-size: 14px;
    font-weight: 750;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Individual Cart Item List */
.cart-item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px; /* Spacing between X and text */
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.cart-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a; /* Navy Blue */
    line-height: 1.4;
}

.cart-item-meta {
    font-size: 11px;
    color: #007ab8; /* Theme green to match product meta styling */
    font-weight: 600;
}

.cart-item-price {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

/* Remove Item 'X' Button */
.remove-item-btn {
    background: none;
    border: none;
    color: #dc3545; /* Red color */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn:hover {
    transform: scale(1.15);
}

.btn-proceed {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    align-self: flex-start;
}

.btn-proceed:hover {
    background-color: #1e293b;
}

/* Input with icon inside */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-wrapper .form-control {
    padding-right: 40px; /* Space for icon */
}

.input-icon-right {
    position: absolute;
    right: 15px;
    color: #007ab8; /* theme green */
    font-size: 16px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive for Cart Page */
@media (max-width: 992px) {
    .cart-page-container {
        flex-direction: column;
        gap: 30px;
        padding-top: 20px;
    }
    .cart-left, .cart-right {
        width: 100%;
    }
}

/* --- PRODUCT PAGE (Checkout) Layout --- */
.product-page-container {
    display: flex;
    gap: 40px;
    padding: 40px 0 60px 0;
}

/* Left Column: Payment Form */
.product-left {
    flex: 1.2;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.product-left h2 {
    font-size: 16px;
    font-weight: 700;
    color: #007ab8;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.product-left p {
    color: #555;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box; /* Ensure padding doesn't break width */
}

.btn-pay-now {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-pay-now:hover { background: #333; }

.btn-add-cart-wide {
    width: 100%;
    background: #007ab8;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-add-cart-wide:hover { background: #0b543a; }

.btn-added-cart-wide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    font-size: 15px;
    font-weight: 750;
    border-radius: 6px;
    border: 2px solid #007ab8;
    color: #007ab8;
    background: #ffffff;
    text-decoration: none;
    text-align: center;
    margin-top: 20px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.btn-added-cart-wide:hover {
    background: rgba(0, 122, 184, 0.04);
}

/* Right Column: Product Details */
.product-right {
    flex: 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.product-right h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.detail-list li::before {
    content: "●";
    color: #007ab8;
    position: absolute;
    left: 0;
    top: 0;
}

.detail-list strong {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 2px;
}

/* Mobile Responsive for Product Page */
@media (max-width: 768px) {
    .product-page-container { flex-direction: column; }
}
/* ============================================================
   FOOTER — Dark Professional Theme
   ============================================================ */
.site-footer {
    background-color: #0d1117; /* Near-black */
    color: #c9d1d9;
    padding: 60px 0 0 0;
    margin-top: 20px;
    border-top: 3px solid #007ab8;
}

/* 4-Column Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.6fr;
    gap: 40px;
    padding-bottom: 50px;
}

/* Brand Column */
.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-brand .footer-logo i {
    font-size: 26px;
    color: #007ab8;
}

.footer-brand .footer-logo img {
    height: 28px;
    width: auto;
}

.footer-brand .footer-logo span {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
}

.footer-tagline {
    font-size: 13.5px;
    color: #8b949e;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 300px;
}

/* Social Icons */
.footer-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #8b949e;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-socials a:hover {
    background-color: #007ab8;
    color: #ffffff;
    border-color: #007ab8;
    transform: translateY(-3px);
}

/* Column Title */
.footer-col-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #21262d;
}

/* Link Lists */
.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link-list li a {
    color: #8b949e;
    text-decoration: none;
    font-size: 13.5px;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: flex;
    align-items: center;
    gap: 7px;
}

.footer-link-list li a i {
    font-size: 9px;
    color: #007ab8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.footer-link-list li a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-link-list li a:hover i {
    transform: translateX(2px);
}

/* Contact List */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #8b949e;
    line-height: 1.5;
}

.footer-contact-list li i {
    font-size: 13px;
    color: #007ab8;
    margin-top: 2px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.footer-contact-list li a {
    color: #8b949e;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-list li a:hover {
    color: #ffffff;
}

.footer-contact-list strong {
    color: #ffffff;
}

/* Newsletter Form */
.footer-newsletter-form {
    position: relative;
    display: block;
    width: 100%;
}

.footer-newsletter-form input {
    width: 100%;
    padding: 12px 52px 12px 20px;
    border-radius: 50px;
    border: 1px solid #30363d;
    background-color: #161b22;
    color: #c9d1d9;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.footer-newsletter-form input::placeholder {
    color: #484f58;
}

.footer-newsletter-form input:focus {
    border-color: #007ab8;
    box-shadow: 0 0 0 2px rgba(0, 122, 184, 0.15);
}

.footer-newsletter-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background-color: #007ab8;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.footer-newsletter-form button:hover {
    background-color: #0a4a33;
    transform: translateY(-50%) scale(1.05);
}

/* Divider */
.footer-divider {
    height: 1px;
    background-color: #21262d;
    width: 100%;
}

/* Copyright Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 13px;
    color: #484f58;
}

.footer-copyright strong {
    color: #8b949e;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.footer-bottom-links a {
    color: #484f58;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #ffffff;
}

.footer-bottom-links span {
    color: #30363d;
}

/* ── Responsive Footer ── */
@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* --- SECTION TITLE (All uppercase with accent) --- */
.section-title {
    margin-top: 20px;
    margin-bottom: 22px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0f172a;
    text-transform: uppercase;
    padding-left: 14px;
    border-left: 4px solid #007ab8;
    line-height: 1.2;
    position: relative;
}

/* Reduce empty space for the first section title on the page */
main > .container > .section-title:first-of-type,
.container > .section-title:first-of-type {
    margin-top: 10px;
}

.section-divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 25px 0;
}

/* 3-column grid for products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(335px, 1fr));
    gap: 25px;
    margin-bottom: 30px; /* Spacing between different sections */
}

/* Responsive for Product Grid */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: 1fr; }
}
/* Duplicate product card override section removed to keep styling uniform across the codebase */

/* --- POLICY PAGES STYLING --- */
.policy-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.policy-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.policy-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.policy-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #4a5568;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.policy-sidebar-link:hover {
    background: #f7fafc;
    color: #007ab8;
    border-left-color: #cbd5e0;
}

.policy-sidebar-link.active {
    background: #e6f4ea;
    color: #007ab8;
    font-weight: 600;
    border-left-color: #007ab8;
}

.sidebar-link-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    opacity: 0.85;
}

.policy-sidebar-link.active .sidebar-link-icon {
    color: #007ab8;
    opacity: 1;
}

.policy-content-main {
    flex-grow: 1;
    min-width: 0;
}

.policy-content-main.full-width {
    width: 100%;
}

.policy-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.policy-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 24px;
    margin-bottom: 28px;
}

.header-icon-circle {
    width: 48px;
    height: 48px;
    background: #e6f4ea;
    color: #007ab8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.policy-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

/* Typography Inside Policy Pages */
.policy-card-body {
    color: #4a5568;
    line-height: 1.7;
    font-size: 16px;
}

.policy-card-body h2 {
    font-size: 20px;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
}

.policy-card-body h3 {
    font-size: 18px;
    color: #2d3748;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.policy-card-body h4 {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 600;
}

.policy-card-body p {
    margin-bottom: 20px;
}

.policy-card-body ul, .policy-card-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.policy-card-body li {
    margin-bottom: 8px;
}

.policy-card-body a {
    color: #007ab8;
    text-decoration: none;
    font-weight: 500;
}

.policy-card-body a:hover {
    text-decoration: underline;
}

/* Page Header Dropdown Menu Layout */
.policy-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 24px;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.policy-header-row .policy-card-header {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    flex-grow: 1;
}

.policy-dropdown-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.policy-dropdown-label {
    font-size: 13px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    white-space: nowrap;
}

.policy-dropdown-select {
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-width: 220px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.policy-dropdown-select:focus {
    border-color: #007ab8;
    box-shadow: 0 0 0 3px rgba(0, 122, 184, 0.15);
}

@media (max-width: 768px) {
    .policy-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .policy-dropdown-container {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .policy-dropdown-select {
        width: 100%;
    }
}

/* About Page Specific Styles */
.info-section {
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.info-card i {
    font-size: 28px;
    color: #007ab8;
    margin-bottom: 16px;
}

.info-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #2d3748;
}

.info-card p {
    font-size: 14px;
    margin: 0;
    color: #718096;
    line-height: 1.5;
}

/* Contact Page Specific Styles */
.contact-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-method {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.contact-method i {
    font-size: 24px;
    color: #007ab8;
    margin-bottom: 12px;
}

.contact-method h4 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 15px;
    color: #2d3748;
}

.contact-method p {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-method small {
    color: #a0aec0;
}

.contact-form-container {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.contact-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #2d3748;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.contact-form .form-group {
    margin-bottom: 16px;
}

.contact-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

.contact-form .form-control {
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 15px;
    color: #2d3748;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.contact-form .form-control:focus {
    border-color: #007ab8;
    box-shadow: 0 0 0 3px rgba(0, 122, 184, 0.15);
}

.btn-submit-contact {
    background: #007ab8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-contact:hover {
    background: #0b543a;
}

/* FAQ Accordion Styles */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.faq-item {
    border: 1px solid #edf2f7;
    border-radius: 8px;
    overflow: hidden;
    background: #f7fafc;
    transition: all 0.2s;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    outline: none;
}

.faq-question:hover {
    color: #007ab8;
}

.faq-icon {
    font-size: 18px;
    color: #718096;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out, padding 0.2s ease-out;
}

.faq-item.open {
    background: #ffffff;
    border-color: #cbd5e0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.faq-item.open .faq-question {
    color: #007ab8;
}

.faq-item.open .faq-answer {
    padding: 0 20px 20px 20px;
    max-height: 500px;
    border-top: 1px solid #edf2f7;
}

/* Delivery / Shipping Specific Styles */
.delivery-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.d-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 20px;
}

.step-num {
    width: 32px;
    height: 32px;
    background: #e6f4ea;
    color: #007ab8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.d-step h4 {
    margin-top: 4px;
    margin-bottom: 6px;
}

.d-step p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

/* Responsive Policy Page Adjustments */
@media (max-width: 992px) {
    .policy-layout {
        flex-direction: column;
    }
    .policy-sidebar {
        width: 100%;
    }
    .policy-sidebar-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .policy-sidebar-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    .policy-content-card {
        padding: 30px 20px;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .top-bar-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 6px;
    }
    .top-bar-center {
        display: none;
    }
    .top-bar-left {
        text-align: left;
    }
    .top-bar-right {
        text-align: right;
    }
}

/* --- DYNAMIC TERM FILTER TABS --- */
.term-tabs-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.term-tabs-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.term-tab {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #475569; /* Slate 600 */
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px; /* Capsule shape */
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.term-tab:hover {
    color: #007ab8;
    border-color: #007ab8;
    background-color: #f0f9ff;
}

.term-tab.active {
    color: #ffffff;
    background-color: #007ab8;
    border-color: #007ab8;
    box-shadow: 0 2px 6px rgba(0, 122, 184, 0.15);
}

/* --- PRODUCT DETAILS / CHECKOUT PAGE --- */
.product-page-container {
    display: flex;
    gap: 40px;
    padding: 40px 20px 60px 20px;
    max-width: 98vw;
    margin: 0 auto;
    align-items: flex-start;
}

.product-left {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-right {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.product-left h2 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.product-left p {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.product-left form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.product-left .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.product-left .form-group label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.product-left .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #ffffff;
}

.product-left .form-control:focus {
    border-color: #007ab8;
}

.product-left .btn-pay-now {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
    align-self: flex-start;
}

.product-left .btn-pay-now:hover {
    background-color: #1e293b;
}

.product-left .btn-add-cart-wide {
    width: 100%;
    background-color: #007ab8;
    color: #ffffff;
    border: 1px solid #007ab8;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    text-align: center;
}

.product-left .btn-add-cart-wide:hover {
    background-color: #0b543a;
    border-color: #0b543a;
}

.product-right h3 {
    font-size: 14px;
    font-weight: 750;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Detail list with custom blue dots */
.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-list li {
    position: relative;
    padding-left: 20px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.detail-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #2563eb; /* Blue bullet */
}

.detail-list li strong {
    display: block;
    color: #0f172a;
    font-weight: 750;
    font-size: 13px;
    margin-bottom: 4px;
}

/* Mobile responsive for product page */
@media (max-width: 992px) {
    .product-page-container {
        flex-direction: column;
        gap: 30px;
        padding-top: 20px;
    }
    .product-left, .product-right {
        width: 100%;
    }
}

/* --- SMART PAGINATION --- */
.smart-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
}

.smart-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.smart-pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.88);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    text-decoration: none;
}

.smart-pagination-item:hover:not(.disabled):not(.active) {
    background-color: rgba(0, 0, 0, 0.06);
}

.smart-pagination-item.active {
    color: #1677ff;
    background-color: #ffffff;
    border-color: #1677ff;
    cursor: default;
}

.smart-pagination-item.disabled {
    color: rgba(0, 0, 0, 0.25);
    cursor: not-allowed;
}

.smart-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    color: rgba(0, 0, 0, 0.25);
    font-size: 14px;
    user-select: none;
}

.smart-page-size-selector {
    display: inline-flex;
    align-items: center;
}

.smart-page-size-select {
    height: 32px;
    padding: 0 30px 0 12px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.88);
    background-color: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath fill='none' stroke='rgba(0,0,0,0.45)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m12 6-4 4-4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

.smart-page-size-select:hover {
    border-color: #4096ff;
}

.smart-page-size-select:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: calc(100vw - 40px);
}

.toast {
    background: #ffffff;
    color: #1e293b;
    border-left: 4px solid #007ab8; /* Success green accent */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    color: #007ab8;
    font-size: 16px;
    flex-shrink: 0;
}

.toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #475569;
}

/* Header Wrapper and Sticky Styles */
.main-header-wrapper {
    position: relative;
    width: 100%;
}
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.2s ease;
}
.main-header.unstuck {
    position: absolute;
    left: 0;
}

/* WhatsApp Floating Widget */
.wa-widget {
    --wa-green: #25D366;
    --wa-green-dark: #075E54; /* True WhatsApp classic dark teal */
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating launcher button */
.wa-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--wa-green);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
    position: relative;
    padding: 0;
}

.wa-launcher:hover {
    transform: scale(1.08) rotate(5deg);
    background-color: #20ba5a;
}

.wa-launcher svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* Pulse animation for premium launcher look */
.wa-launcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--wa-green);
    opacity: 0.5;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Modal panel */
.wa-modal {
    position: absolute;
    bottom: 76px;
    left: 0;
    width: 320px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.wa-modal.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.wa-header {
    background: var(--wa-green-dark);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.wa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wa-avatar svg {
    width: 26px;
    height: 26px;
    fill: var(--wa-green-dark);
}

.wa-info {
    flex: 1;
    min-width: 0;
}

.wa-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.wa-status {
    font-size: 12px;
    opacity: 0.95;
    line-height: 1.3;
    margin-top: 2.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wa-status-dot {
    width: 6px;
    height: 6px;
    background-color: #00e676; /* WhatsApp neon green online dot */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #00e676;
    position: relative;
    animation: wa-online-pulse 2s infinite ease-in-out;
}

@keyframes wa-online-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(0, 230, 118, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
    }
}

.wa-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.wa-close:hover {
    opacity: 1;
}

.wa-body {
    background: #efeae2; /* True WhatsApp chat wallpaper color */
    padding: 20px 16px;
    min-height: 120px;
    position: relative;
}

.wa-bubble {
    background: #fff;
    border-radius: 0 8px 8px 8px;
    padding: 10px 12px;
    max-width: 88%;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13); /* True WhatsApp bubble shadow */
    position: relative;
    margin-left: 8px;
}

/* Little bubble tail */
.wa-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #fff transparent transparent;
}

.wa-sender {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--wa-green-dark);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wa-bubble p {
    font-size: 14px;
    color: #111111; /* True WhatsApp message text color */
    line-height: 1.4;
    margin: 0 0 6px;
}

.wa-bubble p:last-of-type {
    margin-bottom: 2px;
}

.wa-time {
    display: block;
    text-align: right;
    font-size: 10.5px;
    color: rgba(0, 0, 0, 0.45); /* True WhatsApp timestamp color */
    margin-top: 4px;
}

.wa-footer {
    padding: 12px;
    background-color: #ffffff;
}

.wa-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--wa-green);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px;
    border-radius: 999px;
    transition: background-color 0.15s ease;
    box-shadow: 0 2px 5px rgba(37, 211, 102, 0.2);
}

.wa-start:hover {
    background: var(--wa-green-dark);
}

.wa-start svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* WhatsApp Option Buttons */
.wa-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.wa-option-btn {
    display: flex;
    align-items: center;
    background: #ffffff;
    color: #333333 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.wa-option-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    color: #075e54 !important; /* WhatsApp signature color on hover */
}

.wa-option-btn:hover .wa-option-icon {
    color: #075e54 !important;
}

.wa-option-btn:active {
    transform: translateY(0);
}

@media (max-width: 767.98px) {
    .wa-widget {
        left: 16px;
        right: auto;
        bottom: 75px; /* Raised to clear the 54px mobile footer ribbon with extra spacing */
    }
    .wa-modal {
        left: 0;
        right: auto;
        bottom: 140px; /* Raised correspondingly to stay above the launcher */
        width: calc(100vw - 32px);
    }
}

/* ============================================================
   GLOBAL BUTTON SPINNER
   A pure-CSS inline spinner that renders inside any button.
   Injected by btnSpinner.start() in script.js.
   ============================================================ */

/* The spinning ring */
.btn-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.65s linear infinite;
    margin-right: 6px;
    vertical-align: -0.15em;
    flex-shrink: 0;
    opacity: 0.85;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Slight opacity on the button itself while spinning to signal disabled state */
button[data-spinning="1"],
input[type="submit"][data-spinning="1"] {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   USER PROFILE HEADER DROPDOWN
   ============================================================ */
.profile-dropdown-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 15px;
    align-self: center;
}

.profile-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.profile-avatar-btn:hover {
    border-color: #ffffff;
    transform: scale(1.05);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-initials {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 12px 16px;
}

.profile-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.profile-dropdown-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.profile-dropdown-divider {
    height: 1px;
    background-color: #f1f5f9;
    margin: 6px 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    color: #334155;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.profile-dropdown-item i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    transition: color 0.15s ease;
}

.profile-dropdown-item:hover {
    background-color: #f8fafc;
    color: #007ab8;
}

.profile-dropdown-item:hover i {
    color: #007ab8;
}

.profile-dropdown-logout {
    color: #ef4444;
}

.profile-dropdown-logout:hover {
    background-color: #fef2f2;
    color: #ef4444;
}

.profile-dropdown-logout:hover i {
    color: #ef4444;
}

/* Offcanvas Profile Section (Mobile) */
.offcanvas-profile-section {
    padding: 15px 20px;
    background-color: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.offcanvas-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.offcanvas-profile-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007ab8;
}

.offcanvas-profile-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #007ab8;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.offcanvas-profile-info {
    overflow: hidden;
}

.offcanvas-profile-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.offcanvas-profile-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   USER PROFILE DASHBOARD
   ============================================================ */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: #f8fafc;
    position: relative;
    width: 100%;
}

/* Sidebar Styling */
.dashboard-sidebar {
    width: 280px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}

.sidebar-profile {
    padding: 30px 24px 20px 24px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px auto;
    border: 3px solid #007ab8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007ab8;
    box-shadow: 0 4px 12px rgba(0, 122, 184, 0.15);
}

.sidebar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.sidebar-user-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.sidebar-user-email {
    font-size: 13px;
    color: #64748b;
    word-break: break-all;
}

.sidebar-nav {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #64748b;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
    background-color: #f1f5f9;
    color: #007ab8;
}

.sidebar-nav-item:hover i {
    color: #007ab8;
}

.sidebar-nav-item.active {
    background-color: #eaf5f0;
    color: #007ab8;
    font-weight: 600;
}

.sidebar-nav-item.active i {
    color: #007ab8;
}

.sidebar-nav-divider {
    height: 1px;
    background-color: #f1f5f9;
    margin: 12px 0;
}

.sidebar-nav-logout {
    color: #ef4444;
}

.sidebar-nav-logout i {
    color: #ef4444;
}

.sidebar-nav-logout:hover {
    background-color: #fef2f2;
    color: #ef4444;
}

/* Dashboard Content Area */
.dashboard-main {
    flex-grow: 1;
    padding: 35px 40px;
    overflow-y: auto;
    width: 100%;
}

.dashboard-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #007ab8;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.2s ease;
}

.dashboard-sidebar-toggle:hover {
    background-color: #0c573c;
}

/* Welcome Header */
.dashboard-welcome {
    margin-bottom: 30px;
}

.dashboard-welcome h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.dashboard-welcome p {
    color: #64748b;
    font-size: 15px;
}

/* Alerts */
.dashboard-alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-alert-success {
    background-color: #eaf5f0;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.dashboard-alert-success i {
    color: #007ab8;
    font-size: 16px;
}

.dashboard-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.dashboard-alert-error i {
    color: #ef4444;
    font-size: 16px;
}

/* Stats Cards Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card-downloads .stat-card-icon {
    background-color: #eff6ff;
    color: #3b82f6;
}

.stat-card-orders .stat-card-icon {
    background-color: #fdf2f8;
    color: #ec4899;
}

.stat-card-spent .stat-card-icon {
    background-color: #ecfdf5;
    color: #10b981;
}

.stat-card-age .stat-card-icon {
    background-color: #fff7ed;
    color: #f97316;
}

.stat-card-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

/* Dashboard Section Cards */
.dashboard-section-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 28px;
    margin-bottom: 25px;
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.section-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card-header h2 i {
    color: #007ab8;
}

.section-card-badge {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
}

.section-card-link {
    font-size: 14px;
    color: #007ab8;
    text-decoration: none;
    font-weight: 600;
}

.section-card-link:hover {
    text-decoration: underline;
}

/* Responsive Table */
.dashboard-table-responsive {
    overflow-x: auto;
    width: 100%;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.dashboard-table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-table td {
    padding: 16px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

.dashboard-table td.td-title {
    font-weight: 600;
    color: #0f172a;
    min-width: 200px;
}

/* Buttons in Dashboard */
.btn-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-dashboard-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-dashboard-primary {
    background-color: #007ab8;
    color: #ffffff !important;
}

.btn-dashboard-primary:hover {
    background-color: #0c573c;
}

.btn-dashboard-outline {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569 !important;
}

.btn-dashboard-outline:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a !important;
}

/* Empty States */
.dashboard-empty-state {
    text-align: center;
    padding: 50px 20px;
}

.dashboard-empty-state i {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 15px;
    display: block;
}

.dashboard-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.dashboard-empty-state p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 50px;
    text-transform: uppercase;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Referral Section */
.referral-code-section {
    max-width: 600px;
}

.referral-intro {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.referral-code-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: fit-content;
}

.referral-code-value {
    font-family: monospace;
    font-size: 20px;
    font-weight: 700;
    color: #007ab8;
    letter-spacing: 1px;
}

.referral-coming-soon {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Avatar Upload styling */
.avatar-upload-area {
    display: flex;
    align-items: center;
    gap: 25px;
}

.avatar-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #007ab8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-initials {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.avatar-preview:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-info p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #334155;
}

.avatar-upload-info p.text-muted-sm {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 12px;
}

/* Form Styling inside Settings */
.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group-dashboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-full {
    grid-column: span 2;
}

.form-group-dashboard label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.form-group-dashboard input {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    transition: all 0.2s ease;
}

.form-group-dashboard input:focus {
    outline: none;
    border-color: #007ab8;
    box-shadow: 0 0 0 3px rgba(0, 122, 184, 0.15);
}

.form-group-dashboard input:disabled {
    background-color: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.form-help-text {
    font-size: 12px;
    color: #64748b;
}

/* ============================================================
   RESPONSIVE DASHBOARD LAYOUT
   ============================================================ */
@media (max-width: 991px) {
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .dashboard-sidebar.sidebar-open {
        left: 0;
    }
    
    .dashboard-sidebar-toggle {
        display: flex;
    }
    
    .dashboard-main {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .settings-form-grid {
        grid-template-columns: 1fr;
    }
    .form-group-full {
        grid-column: span 1;
    }
    .avatar-upload-area {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Sticky Cart Ribbon (only on mobile) */
.sticky-cart-ribbon {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 54px;
    background-color: #005d8c;
    color: #ffffff;
    z-index: 999;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sticky-cart-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
}

.sticky-cart-checkout {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s ease;
}

.sticky-cart-checkout:hover {
    opacity: 0.9;
    color: #ffffff !important;
    text-decoration: none;
}

/* Desktop and large screens hide sticky cart ribbon */
@media (min-width: 768px) {
    .sticky-cart-ribbon {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 54px;
    }
}

/* Mobile Brand Title Styles (replaces hamburger) */
.mobile-brand-title {
    display: none;
    color: #ffffff;
    font-weight: 700;
    font-size: clamp(14px, 4vw, 17px);
    letter-spacing: 0.5px;
    white-space: nowrap;
    align-self: center;
    margin-left: 5px;
    text-decoration: none;
}
.mobile-brand-title:hover {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
}

@media (max-width: 992px) {
    .hamburger-btn {
        display: none !important;
    }
    .mobile-brand-title {
        display: inline-block !important;
    }
}

/* --- FLASH MESSAGES STYLES --- */
.flash-messages {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 450px;
    pointer-events: none;
}

.flash-message {
    pointer-events: auto;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: flashSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    border-left: 4px solid transparent;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Success style (green) */
.flash-message.flash-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
    border-left: 4px solid #10b981;
}
.flash-message.flash-success::before {
    content: "\f058"; /* FontAwesome check-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #10b981;
    font-size: 18px;
}

/* Error style (red) */
.flash-message.flash-error,
.flash-message.flash-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
    border-left: 4px solid #ef4444;
}
.flash-message.flash-error::before,
.flash-message.flash-danger::before {
    content: "\f06a"; /* FontAwesome exclamation-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ef4444;
    font-size: 18px;
}

/* Info style (blue) */
.flash-message.flash-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
    border-left: 4px solid #3b82f6;
}
.flash-message.flash-info::before {
    content: "\f05a"; /* FontAwesome info-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #3b82f6;
    font-size: 18px;
}

@keyframes flashSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.flash-message.fade-out {
    opacity: 0;
    transform: scale(0.95);
}
