@media (min-width: 576px) {
    .navbar-expand-sm .navbar-collapse {
        display: flex !important;
    }
}

/* Merged and refactored from custom.css and header_styles.css */
:root {
    /* 🎨 Modern & Clean E-commerce Palette */
    --primary-color: #ef9ae4;
    --primary-hover: #d15e90;
    --secondary-color: #a9d2d9;
    --secondary-hover: #a3b7e0;

    /* 🔘 Button States */
    --btn-primary-active-header: #c45484;
    --btn-primary-active: #ef9ae4;
    --btn-primary-active-border: #ef9ae4;
    --btn-primary-inactive: #ebd9e1;
    --btn-primary-inactive-border: #d1c4c8;

    /* ✒️ Typography & Text Colors */
    --text-color: #792c85; /* Dark, soft purple for high contrast */
    --text-secondary: #6b8a91; /* Muted, complementary blue-gray */
    --text-on-primary: #ffffff; /* White text on primary backgrounds */
    --text-on-secondary: #ffffff; /* White text on secondary backgrounds */

    --background-color: #F7FAFC;
    --card-background-color: #FFFFFF;
    --border-color: #d579df;
    
    --white: #fff;
    --transparent: transparent;

    /* 🎨 Derived Transparent & Shadow Colors */
    --card-background-light-transparent: rgba(255, 255, 255, 0.8);
    --card-background-mid-transparent: rgba(255, 255, 255, 0.50);
    --card-background-dark-transparent: rgba(255, 255, 255, 0.95);
    --primary-color-light-transparent: rgba(237, 172, 228, 0.3);
    --primary-color-dark-transparent: rgba(237, 172, 228, 0.6);
    --primary-shadow-color: rgba(237, 172, 228, 0.4);
    --primary-shadow-medium: rgba(237, 172, 228, 0.25);
    --black-shadow-light: rgba(0, 0, 0, 0.05);
    --toast-shadow: rgba(0, 0, 0, 0.15);

    /* Status colors */
    --status-success: #48BB78;
    --status-warning: #F6E05E;
    --status-danger: #F56565;
    --status-info: #4299E1;
    --status-shipped: #00bcd4;
    --status-cancelled: #e57373;
    --status-refunded: #9e9e9e;
    --status-processing: #ffca28;
    --disable-color: var(--status-refunded);

    /* Other variables */
    --thead-background-color: #F7FAFC;
    --card-image-background: #F7FAFC;
    
    /* Pulse animation */
    --pulse-start: rgba(237, 172, 228, 0.7);
    --pulse-end: rgba(237, 172, 228, 0);
    
    --background-color-rgba: linear-gradient(
        90deg,
        rgba(245, 240, 250, 0.95) 0%,
        rgba(235, 220, 245, 0.9) 50%,
        rgba(228, 237, 255, 0.95) 100%
    );

    --primary-accent-gradient-start: rgba(237, 172, 228, 0.9);
    --primary-accent-gradient-end: rgba(169, 210, 217, 0.85);
}

/* Logo width for navbar-brand */
.navbar-brand img {
    width: 250px;
    transition: width 0.4s ease-in-out;
}

/* Navbar scrolled state */
.navbar.scrolled {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled .navbar-brand img {
    width: 60px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}


/* --- Ensure Bootstrap hamburger icon is visible and themed --- */
.navbar-toggler-icon {
    background-image: none !important;
    width: 1.8em;
    height: 1.8em;
    display: inline-block;
    position: relative;
}
.navbar-toggler-icon::before, .navbar-toggler-icon::after, .navbar-toggler-icon span {
    content: '';
    display: block;
    position: absolute;
    left: 0.3em;
    right: 0.3em;
    height: 0.22em;
    background: var(--text-on-primary)!important;
    border-radius: 2px;
    transition: all 0.2s;
}
.navbar-toggler-icon::before {
    top: 0.35em;
}
.navbar-toggler-icon::after {
    bottom: 0.35em;
}
.navbar-toggler-icon span {
    top: 0.79em;
}

/* For compatibility, add a span inside .navbar-toggler-icon if not present */
/* Sidebar submenu hide/show logic */
.sidebar-group-links {
    display: none;
}
.sidebar-group.open .sidebar-group-links {
    display: flex;
    animation: fadeIn 0.2s;
}
/* Referral Analytics Dashboard Styles */
.text-purple {
    color: #6f42c1 !important;
}

.text-primary-custom {
    color: var(--text-color) !important;
}   
.bg-light {
    background-color: #f8f9fa !important;
}

.card-header h6 {
    font-weight: 600;
    color: var(--text-color);
}

/* Analytics metrics cards */
.analytics-metric-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.analytics-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Chart containers */
.chart-container canvas {
    max-height: 250px !important;
}

/* Monthly performance table */
#monthly-performance-table th {
    border-top: none;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
}

/* Top earning days list styling */
#top-earning-days .list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

#top-earning-days .list-group-item:last-child {
    border-bottom: none;
}


/* ✒️ Base Typography */
body {
    background: var(--background-color-rgba);
    color: var(--text-color);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-attachment: fixed;
}

/* Custom nav-tab style for campaign analytics */
.nav-tab-custom {
    background: var(--btn-primary-inactive);
    color: var(--primary-color);
    border: 1px solid var(--btn-primary-inactive-border);
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-right: 2px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.nav-tab-custom.active,
.nav-tab-custom:focus,
.nav-tab-custom:hover {
    background: var(--btn-primary-active);
    color: #fff;
    border-color: var(--btn-primary-active-border) var(--btn-primary-active-border) var(--card-background-color);
    z-index: 2;
}

.custom-bg-primary {
    background: var(--primary-color) !important;
    color: #fff !important;
}
.custom-bg-secondary {
    background: var(--secondary-color) !important;
    color: #fff !important;
}
.text-primary {
    color: var(--primary-color) !important
}
.text-green {
    color: #48BB78 !important;
}   
h1, .h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px var(--black-shadow-light);
}

h2, .h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

h3, .h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

h4, .h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

h5, .h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.bg-rgba {
    background: var(--background-color-rgba);
}


span {
    color: var(--text-secondary);
}

.text-white {
    color: var(--white) !important;
}
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.page-header {
    margin-bottom: 20px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary-color) !important;
}
.list-group-item {
    background-color: var(--transparent);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease-in-out;
}
.list-group-item:hover {
    background-color: var(--primary-color-light-transparent);
}


.modal-title {
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

/* ===== Button Styles - Using Theme Variables ===== */
/* Primary Button (Active State) */
.btn-primary,
.btn-primary.active,
.btn-outline-primary.active,
.btn-group .btn.active {
    background: linear-gradient(135deg, var(--btn-primary-active) 0%, var(--btn-primary-active) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover:not(.active),
.btn-outline-primary:not(.active):hover {
    background: linear-gradient(135deg, var(--btn-primary-active-border) 0%, var(--btn-primary-active-border) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transform: scale(1.05);
}

/* Active buttons stay the same on hover */
.btn-primary.active:hover,
.btn-outline-primary.active:hover,
.btn-group .btn.active:hover {
    background: linear-gradient(135deg, var(--btn-primary-active) 0%, var(--btn-primary-active) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transform: none;
    cursor: default;
}

/* Secondary Button (Active State) */
.btn-secondary,
.btn-secondary.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-secondary:hover:not(.active) {
    background: linear-gradient(135deg, var(--btn-primary-active) 0%, var(--btn-primary-active) 100%);
    border-color: var(--btn-primary-active);
    color: #fff;
    transform: scale(1.05);
}

.btn-secondary.active:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transform: none;
    cursor: default;
}

/* Outline Button (Inactive State) */
.btn-outline-primary:not(.active),
.btn-outline-secondary:not(.active) {
    background-color: transparent;
    border-color: var(--btn-primary-inactive-border);
    color: var(--text-primary);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-outline-secondary:not(.active):hover {
    background-color: var(--btn-primary-inactive);
    border-color: var(--btn-primary-inactive-border);
    color: var(--text-primary);
    transform: scale(1.02);
}

.btn-outline-secondary.active {
    background: linear-gradient(135deg, var(--btn-primary-active) 0%, var(--btn-primary-active) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-outline-secondary.active:hover {
    background: linear-gradient(135deg, var(--btn-primary-active) 0%, var(--btn-primary-active) 100%);
    border-color: var(--btn-primary-active-border);
    color: #fff;
    transform: none;
    cursor: default;
}

/* Bootstrap Button Group Overrides */
.btn-group .btn:not(.active) {
    background-color: #fff;
    border-color: var(--btn-primary-inactive-border);
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.btn-group .btn:not(.active):hover {
    background-color: var(--btn-primary-inactive);
    border-color: var(--btn-primary-inactive-border);
    color: var(--text-primary);
}

/* ===== End Button Styles ===== */

/* 🖼 Thumbnails */
.thumbnail-image {
    cursor: pointer;
    width: 55px;
    height: 55px;
    margin-right: 8px;
    object-fit: cover;
    border: 2px solid var(--transparent);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}
.thumbnail-image.active,
.thumbnail-image:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 6px var(--primary-shadow-color);
}

/* 🖼 Main product image */
#main-product-image {
    max-height: 70vh;
    object-fit: contain;
    width: 100%;
}


.table-responsive {
    color: var(--primary-color)
}

/* 📱 Responsive tweaks */
@media (max-width: 576px) {
    .table-responsive {
        border: none;
    }
    .img-thumbnail {
        width: 50px;
        height: 50px;
    }
    .update-quantity {
        width: 60px !important;
    }
    body, .responsive-text {
        font-size: 11px;
    }
}


.tag-list h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}
.tag-label {
    display: block;
    margin-bottom: 10px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--card-background-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--text-color);
}
.tag-label:hover {
    background-color: var(--primary-color-light-transparent);
}
.tag-label.selected {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 📦 Main content */
.main-content {
    padding: 20px;
}

/* 💎 Card Theme */

.card {
    background: var(--card-background-color);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.card:hover {
    /* Removed translateY - card no longer rises */
    box-shadow: 0 10px 25px var(--primary-shadow-medium);
}
.card.accent {
    background: linear-gradient(135deg, var(--primary-accent-gradient-start), var(--primary-accent-gradient-end));
    color: var(--white);
    border: none;
}

/* Card image */
.card-img-top-container {
    aspect-ratio: 3 / 2;
    background-color: var(--card-image-background);
    overflow: hidden;
}
.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}
.card:hover .card-img-top {
    transform: scale(1.05);
}

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    background-color: var(--primary-color);
    
}
.card-header {
    padding: .75rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--secondary-color);
    background-color: var(--background-color);
    color: var(--primary-color) !important;
}
/* Card text */
.card-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-color);
    
}
.card-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Buttons - Legacy Styles (Removing to avoid conflicts) */
/* These are now handled by the unified button styles above */

/* Price highlight */
.product-price {
    font-weight: 700;
    font-size: 2rem;
    color: var(--primary-color);
}
.card-footer-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 📘 Product Modal */
#product-info-tabs .nav-link {
    color: var(--text-color);
}
#product-info-tabs .nav-link.active {
    font-weight: bold;
    color: var(--btn-primary-active);
    border-bottom: 2px solid var(--btn-primary-active);
}

/* 🔔 Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}
.toast {
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 8px;
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.5s;
    box-shadow: 0 4px 12px var(--toast-shadow);
}
.toast.show {
    opacity: 1;
}

/* 🛒 Cart Modal */
#cartModal .modal-content,
#product-modal .modal-content {
    background-color: var(--card-background-color);
    color: var(--text-color);
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--primary-shadow-medium);
}

#cartModal .modal-header,
#product-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
}
#cartModal .modal-footer,
#product-modal .modal-footer {
    border-top: 1px solid var(--border-color);
}
#cartModal .list-group-item {
    background-color: var(--transparent);
    border-color: var(--border-color);
}
#cartModal .list-group-item:last-child {
    border-bottom: none;
}
.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 🧾 Table */
.table thead {
    background-color: var(--thead-background-color);
    color: var(--text-color);
}

/* 🕒 Timeline */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 var(--pulse-start); }
    70% { box-shadow: 0 0 0 10px var(--pulse-end); }
    100% { box-shadow: 0 0 0 0 var(--pulse-end); }
}

.timeline-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
    margin: 3rem 0;
    padding: 0 0 25px 0;
    list-style: none;
    overflow-x: auto;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    transform: translateY(-50%);
    z-index: 0;
}

.timeline-progress {
    position: absolute;
    top: 15px;
    left: 0;
    height: 2px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
    z-index: 1;
    width: 0;
    transition: width 0.8s ease-in-out;
}

.timeline-item {
    position: relative;
    flex: 1;
    text-align: center;
    min-width: 100px;
    z-index: 2;
    margin-bottom: 0;
}

.timeline-icon {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--disable-color);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 4px solid var(--card-background-color);
    box-shadow: 0 0 15px var(--toast-shadow);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-content {
    margin-top: 15px;
}

.timeline-status {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.timeline-item.completed .timeline-icon {
    background-color: var(--status-success);
}

.timeline-item.current .timeline-icon {
    background-color: var(--primary-color);
    transform: scale(1.1);
    animation: pulse 2s infinite;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.15);
}

/* 📱 Responsive: Vertical layout on small screens */
@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .timeline-container::before {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 100%;
    }

    .timeline-progress {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 0;
    }

    .timeline-item {
        flex: none;
        text-align: center;
        margin-bottom: 2rem;
        min-width: unset;
        position: relative;
    }

    .timeline-icon {
        margin: 0 auto;
    }

    .timeline-content {
        margin-top: 10px;
        text-align: center;
    }
}

/* ===== HEADER STYLES (from header_styles.css) ===== */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.navbar-toggler {
    color: var(--btn-primary-active-header) !important;
}
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--background-color) !important;
    letter-spacing: 0.5px;
    transition: color 0.2s ease-in-out;
}

.navbar-brand:hover {
    color: var(--secondary-color) !important; /* Subtle hover effect */
}


/* --- Menu text color: white for contrast on colored header --- */
.navbar, .navbar .navbar-nav .nav-link {
    color: #fff !important;
}
.nav-link {
    color: #fff !important;
    transition: color 0.2s, background 0.2s;
    font-weight: 500;
    position: relative;
    background: transparent;
}
.nav-link:hover,
.nav-link:focus {
    color: var(--btn-primary-active-header) !important;
    
    background: rgba(255,255,255,0.08);
    text-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.nav-link.active {
    color: var(--btn-primary-active-header) !important;
    font-weight: 800;
    background: rgba(255,255,255,0.18);
    text-shadow: 0 2px 8px rgba(0,0,0,0.13);
    font-size: 1.15em;
    letter-spacing: 0.5px;
    border-radius: 0.35em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    transition: color 0.2s, background 0.2s, font-size 0.2s;
}

/* Underline effect for hover and active states */
.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--btn-primary-active-header);
    transition: width 0.3s ease-in-out;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}


/* Search Bar */
.search-form .form-control {
    width: 300px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--card-background-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.search-form .form-control::placeholder {
    color: var(--secondary-color);
}

.search-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    outline: none;
}

/* User name */
.user-name {
    display: none;
    color: var(--text-color);
}

@media (min-width: 992px) {
    .user-name {
        display: inline-block;
        margin-left: 5px;
    }
}

/* Optional - subtle hover animation for navbar items */
.navbar-brand {
    position: relative;
}

.navbar-brand::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}

.navbar-brand:hover::after {
    width: 100%;
}


/* Logo shrink effect handled by #navbar-logo and .site-header.scrolled #navbar-logo in header.html */

/* Dashboard Enhancements */
.dashboard-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}


.chart-container-wrapper {
    background-color: var(--card-background-color);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.stat-card-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.stat-card-info h5 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-card-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Unified Sidebar Styles */
.sidebar {
    height: 100vh;
    width: 80px;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    background-color: var(--card-background-color);
    overflow-x: hidden;
    transition: width 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-weight: bold;
    display: flex;
    flex-direction: column;
}
.sidebar.open {
    width: 240px;
}
.sidebar-link,
.sidebar-group-title,
.sidebar-group-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.sidebar-link .link-text,
.sidebar-group-title .link-text,
.sidebar-group-links .link-text {
    display: none;
    transition: opacity 0.2s;
}
.sidebar.open .link-text {
    display: inline;
    opacity: 1;
}
.sidebar-link:hover,
.sidebar-group-title:hover,
.sidebar-group-links a:hover {
    background: #f3f4f6;
}
.sidebar-link.active {
    background: #e6f0ff;
    color: #1d4ed8;
    border-left: 3px solid #2563eb;
}
.sidebar i {
    min-width: 22px;
    text-align: center;
}
.sidebar-group-links {
    display: none;
    flex-direction: column;
    padding-left: 18px;
    background: none;
}
.sidebar-group.open .sidebar-group-links {
    display: flex;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
.sidebar-chevron {
    margin-left: auto;
    transition: transform 0.25s ease;
}
.sidebar-group.open .sidebar-chevron {
    transform: rotate(90deg);
}
.sidebar .closebtn {
    display: none;
}
@media (max-width: 991px) {
    .sidebar {
        width: 0;
        max-width: 320px;
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    }
    .sidebar.open {
        width: 80vw;
        max-width: 320px;
        transform: translateX(0);
    }
    #main {
        padding-left: 0 !important;
    }
    .sidebar-backdrop {
        display: block;
    }
    .sidebar .closebtn {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-secondary);
        z-index: 1100;
    }
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1000;
}
.sidebar.open ~ .sidebar-backdrop {
    display: block;
}

/* ===== CHECKOUT PAGE STYLES ===== */


@media (max-width: 991.98px) {
    .order-summary-mobile {
        order: 2;
    }
    .customer-info-mobile {
        order: 1;
    }
}

/* Shipping Card Styles */
.shipping-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    background: linear-gradient(to right, var(--card-background-color), var(--background-color));
    transition: border-color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.shipping-card:hover {
    border-color: var(--btn-primary-inactive-border);
    background: var(--btn-primary-inactive);
}

.shipping-card.selected {
    border-color: var(--btn-primary-active-border);
    background: linear-gradient(to right, var(--primary-color-light-transparent), var(--primary-color-dark-transparent));
}

.shipping-card input[type="radio"] {
    display: none;
}

.shipping-card label {
    display: block;
    width: 100%;
}

.shipping-card .top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.shipping-card .service-estimate {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shipping-card .price {
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-color);
    margin-left: 16px;
    white-space: nowrap;
}

.shipping-card .tracking-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Order Summary Styles */
.order-summary-compact .card-title {
    font-size: 1rem;
    margin-bottom: .2rem;
}

.order-summary-compact .list-group-item {
    padding: .15rem 0.45rem;
}

.coupon-toggle {
    cursor: pointer;
}

/* Delivery Method Selector Styles */
.delivery-method-selector {
    background: var(--background-color);
    padding: 5px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.delivery-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    border: 2px solid var(--border-colorr);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: left;
    min-height: auto;
    background: var(--background-color) !important;
    cursor: pointer;
}

.delivery-option:hover:not(.active) {
    border-color: var(--btn-primary-active) !important;
    background: var(--btn-primary-inactive) !important;
    /* Removed hover raise effect */
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 12px var(--primary-shadow-medium);
}

.delivery-option.active {
    border-color: var(--btn-primary-active-border);
    background: var(--btn-primary-active) !important;
    box-shadow: 0 4px 12px var(--primary-shadow-color);
    font-weight: 600;
}

.delivery-option.active:hover {
    border-color: var(--btn-primary-active-border);
    background: var(--btn-primary-active) !important;
    box-shadow: 0 4px 12px var(--primary-shadow-color);
    transform: none;
    cursor: default;
}

.delivery-option .delivery-icon {
    font-size: 1.75rem;
    margin-right: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: inherit;
}

.delivery-option:hover:not(.active) .delivery-icon {
    transform: scale(1.1);
    color: var(--text-primary);
}

.delivery-option.active .delivery-icon {
    color: #fff;
}

.delivery-option .delivery-text {
    flex-grow: 1;
}

.delivery-option .delivery-text strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 2px;
    color: var(--text-color);
}

.delivery-option .delivery-text small {
    color: var(--text-secondary);
    font-size: 0.6rem;
}

.delivery-option.active .delivery-text strong {
    color: var(--primary-hover);
}

.delivery-option input[type="radio"] {
    display: none;
}

@media (max-width: 575px) {
    .delivery-option {
        padding: 10px 12px;
    }
    
    .delivery-option .delivery-icon {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .delivery-option .delivery-text strong {
        font-size: 0.65rem;
    }
    
    .delivery-option .delivery-text small {
        font-size: 0.55rem;
    }
}
