/* ============================================= */
/* ============ GLOBAL STYLES ================ */
/* ============================================= */

/**
 * CSS Variables for theming 
 * These variables control the color scheme and can be toggled between light/dark modes
 */
:root {
    /* Primary Colors */
    --primary: #ff4300;
    --primary-light: rgba(67, 97, 238, 0.2);
    --primary-dark: #3a56d4;
    
    /* Secondary Colors */
    --secondary: #3f37c9;
    --secondary-light: rgba(63, 55, 201, 0.2);
    
    /* Status Colors */
    --success: #4cc9f0;
    --success-dark: #3ab5d9;
    --danger: #f72585;
    --danger-dark: #e51c77;
    --warning: #f8961e;
    --warning-dark: #e68715;
    --info: #4895ef;
    --red: #e53e3e;
    --red-rgb: 229, 62, 62;
    --orange: #ed8936;
    --orange-rgb: 237, 137, 54;
    --yellow: #ecc94b;
    --yellow-rgb: 236, 201, 75;
    --green: #48bb78;
    --green-rgb: 72, 187, 120;
    --blue: #4299e1;
    --blue-rgb: 66, 153, 225;
    
    /* Background Colors */
    --body-bg: #14141f;
    --sidebar: #1e1e2d;
    --sidebar-hover: #2d2d44;
    --header: #252536;
    --card: #2d2d44;
    --card-bg: #ffffff;
    --background: #f7fafc;
    
    /* Text Colors */
    --text: #e9ecef;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);
    --card-border: #3a3a4a;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --product-card-shadow: 0 2px 6px rgba(0,0,0,0.1);
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 999px;
    --border-radius: 12px;
    
    /* Base font size */
    font-size: 16px;
}

/* Light Theme Overrides */
[data-theme="light"] {
    --body-bg: #f5f7fb;
    --sidebar: #f8f9fa;
    --sidebar-hover: #e9ecef;
    --header: #ffffff;
    --card: #ffffff;
    --text: #495057;
    --text-secondary: #6c757d;
    --text-muted: #a0aec0;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-border: #eee;
    --background: #f7fafc;
    --card-bg: #ffffff;
    --red: #e53e3e;
    --red-rgb: 229, 62, 62;
    --orange: #ed8936;
    --orange-rgb: 237, 137, 54;
    --yellow: #ecc94b;
    --yellow-rgb: 236, 201, 75;
    --green: #48bb78;
    --green-rgb: 72, 187, 120;
    --blue: #4299e1;
    --blue-rgb: 66, 153, 225;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --text: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --background: #1a202c;
    --card-bg: #2d3748;
    --border-color: #4a5568;
    --red: #f56565;
    --red-rgb: 245, 101, 101;
    --orange: #f6ad55;
    --orange-rgb: 246, 173, 85;
    --yellow: #f6e05e;
    --yellow-rgb: 246, 224, 94;
    --green: #68d391;
    --green-rgb: 104, 211, 145;
    --blue: #63b3ed;
    --blue-rgb: 99, 179, 237;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Poppins', 'Helvetica Neue', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}


html {
    scroll-behavior: smooth;
}

body {
    background: var(--body-bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition-normal);
    line-height: 1.6;
}
/* ========================================================== */
/* FORCED OVERRIDE FOR REPORT ISSUE BADGE                    */
/* ========================================================== */

#auto-login-wrapper .report-issue-badge,
#extension-notification .report-issue-badge,
button.report-issue-badge {
    /* store brand colour (layout's --accent), not a hardcoded red/gold */
    background-color: rgba(var(--accent-rgb, 138, 21, 34), 0.08) !important;
    color: var(--link-color, var(--accent, #8A1522)) !important;
    border: 1px solid rgba(var(--accent-rgb, 138, 21, 34), 0.35) !important;
    border-radius: 50px !important; /* Fully round */
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    box-shadow: none !important; /* Remove any default shadows */
    text-transform: none !important; /* Prevent theme from making it UPPERCASE */
}

#auto-login-wrapper .report-issue-badge:hover,
#extension-notification .report-issue-badge:hover,
button.report-issue-badge:hover {
    background-color: var(--accent, #8A1522) !important;
    color: #fff !important;
}

/* ========================================================== */
/* FORCED OVERRIDE FOR SEND FEEDBACK BUTTON                  */
/* ========================================================== */

#auto-login-wrapper .btn-feedback,
#extension-notification .btn-feedback,
button.btn-feedback {
    background-color: var(--accent, #8A1522) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important; /* Fully round to match Report Issue */
    padding: 14px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    margin-top: 30px !important; /* Top space from options */
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(var(--accent-rgb, 138, 21, 34), 0.2) !important;
    transition: all 0.3s ease !important;
    text-transform: none !important; /* Prevent UPPERCASE */
    width: 100% !important;
}

#auto-login-wrapper .btn-feedback:hover,
#extension-notification .btn-feedback:hover,
button.btn-feedback:hover {
    background-color: var(--accent-dark, #6F1019) !important;
    color: #ffffff !important; 
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(var(--accent-rgb, 138, 21, 34), 0.3) !important;
}

/* Ensure the spinner icon inside the button is white/cream when loading */
#auto-login-wrapper .btn-feedback i,
button.btn-feedback i {
    color: #fff !important;
}
/* ============================================= */
/* ============ PRELOADER ===================== */
/* ============================================= */

/**
 * Preloader styles that show while page is loading
 * Matches the current theme (light/dark)
 */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--body-bg) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: var(--transition-normal);
}

.lds-ripple {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-ripple div {
    position: absolute;
    border: 4px solid var(--primary);
    opacity: 1;
    border-radius: 50%;
    animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    transition: var(--transition-normal);
}

.lds-ripple div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes lds-ripple {
    0% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 0;
    }
    4.9% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 0;
    }
    5% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        top: 0px;
        left: 0px;
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}

/* ============================================= */
/* ============ SIDEBAR FIXES ================= */
/* ============================================= */

.sidebar {
    width: 260px;
    background: var(--sidebar);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    flex-shrink: 0;
    background: #ffffff;
}

.sidebar-brand img {
    height: 40px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-menu {
    padding: 12px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for sidebar */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.sidebar-item {
    margin: 2px 12px;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    position: relative;
}

.sidebar-link i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: #f0f2f5;
    color: var(--text);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #ff4300, #ff5722);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 67, 0, 0.3);
}

.sidebar-link.active i {
    color: #ffffff;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 20px;
    flex-shrink: 0;
}

.sidebar-title {
    padding: 8px 24px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================= */
/* ============ HEADER FIXES ================== */
/* ============================================= */

.header {
    background: #ffffff;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-right: 16px;
}

.toggle-sidebar:hover {
    background: #f0f2f5;
    color: #ff4300;
}

/* Hide the empty marquee */
.marquee {
    display: none;
}

/* ============================================= */
/* ============ USER MENU FIXES =============== */
/* ============================================= */

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 10px;
}

.user-btn:hover {
    background: #f0f2f5;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4300, #ff5722);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(255, 67, 0, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    overflow: hidden;
    display: none;
    z-index: 100;
    transform-origin: top right;
    animation: dropdownFade 0.2s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
    font-size: 14px;
}

.dropdown-item i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--text);
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 4px 0;
}

/* ============================================= */
/* ============ FOOTER FIXES ================== */
/* ============================================= */

.footer {
    background: #ffffff;
    padding: 16px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer a {
    color: #ff4300;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.footer a:hover {
    color: #e53e00;
    text-decoration: underline;
}

/* ============================================= */
/* ============ MAIN CONTENT FIXES ============ */
/* ============================================= */

.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f7fb;
}

.page-content {
    padding: 24px;
    flex: 1;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================= */
/* ============ RESPONSIVE ==================== */
/* ============================================= */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toggle-sidebar {
        display: flex;
    }
    
    .page-content {
        padding: 16px;
    }
    
    .header {
        padding: 0 16px;
    }
}

@media (max-width: 576px) {
    .user-name {
        display: none;
    }
    
    .user-avatar {
        margin-right: 0;
    }
    
    .page-content {
        padding: 12px;
    }
    
    .header {
        padding: 0 12px;
    }
}
/* ============================================= */
/* ============ MAIN CONTENT ================= */
/* ============================================= */

.main-content {
    flex: 1;
    margin-left: 260px;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: var(--header);
    padding: 0 var(--space-xl);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    font-size: 20px;
    color: var(--text);
    margin-right: var(--space-lg);
    cursor: pointer;
    display: none;
    transition: var(--transition-normal);
}

.toggle-sidebar:hover {
    color: var(--primary);
}

.page-title {
    font-size: 22px;
    font-weight: 600;
}

/* Theme Toggle Styles */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-right: var(--space-lg);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.theme-toggle:hover {
    background: var(--sidebar-hover);
}

.theme-toggle i {
    font-size: 20px;
    margin-right: var(--space-sm);
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.user-btn:hover {
    background: var(--sidebar-hover);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: var(--space-sm);
    overflow: hidden;
    transition: var(--transition-normal);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + var(--space-sm));
    right: 0;
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    overflow: hidden;
    display: none;
    z-index: 100;
    transform-origin: top right;
    animation: fadeIn 0.2s ease-out;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition-normal);
}

.dropdown-item i {
    margin-right: var(--space-sm);
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: var(--sidebar-hover);
    color: var(--text);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

/* Page Content Styles */
.page-content {
    padding: var(--space-md);
    flex: 1;
    animation: fadeIn 0.5s ease-out;
}

.breadcrumb {
    display: flex;
    align-items: center;
    /* margin-bottom: var(--space-xl); */
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb i {
    margin: 0 var(--space-sm);
    font-size: 12px;
}

/* Footer Styles */
.footer {
    background: var(--header);
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.footer a:hover {
    text-decoration: underline;
}

/* ============================================= */
/* ============ CARDS & GRIDS ================ */
/* ============================================= */

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--card-border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.card-body {
    padding: var(--space-lg);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.stat-trend {
    margin-left: var(--space-sm);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
}

.trend-up {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

.trend-down {
    background: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--space-md);
}

/* Product Grid */
.product-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
}

.product-card {
    background: var(--card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background-color: var(--danger);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.product-image-link {
    display: block;
    position: relative;
    padding-top: 52.5%;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-normal);
    background: var(--card);
}

.product-image-link:hover .product-image {
    transform: scale(1.05);
}

.product-content {
    padding: var(--space-lg);
}

.product-title {
    font-size: 16px;
    margin: 0 0 var(--space-sm) 0;
    color: var(--text);
    line-height: 1.3;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-normal);
}

.product-title a:hover {
    color: var(--primary);
}

.product-status {
    margin-bottom: var(--space-sm);
}

.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
}

.badge.accessible {
    background-color: var(--success);
    color: white;
}

.badge.locked {
    background-color: var(--secondary);
    color: white;
}

.product-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.product-actions {
    margin-top: auto;
}

/* Button Styles */
/* Updated Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    gap: var(--space-sm);
    height: 40px; /* Set fixed height to match */
    font-size: 14px; /* Consistent font size */
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary); /* Add border like secondary */
    opacity: 0.9; /* Match transparency */
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    opacity: 1; /* Full opacity on hover */
    transform: translateY(-1px); /* Consistent hover effect */
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    opacity: 0.9; /* Match transparency */
}

.btn-secondary:hover {
    background: var(--primary-light);
    opacity: 1; /* Full opacity on hover */
    transform: translateY(-1px); /* Consistent hover effect */
}

/* Ensure both buttons have same padding and dimensions */
.btn-primary, .btn-secondary {
    min-width: 120px;
    padding: 8px 16px;
    line-height: 1.5;
}

.checkout-btn,
.buy-now-btn {
    display: block;
    width: 100%;
    padding: var(--space-sm);
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.buy-now-btn:hover {
    background-color: var(--danger-dark);
    transform: translateY(-2px);
}

.add-basket-btn,
.add-to-cart-btn {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.add-to-cart-btn:hover {
    background-color: #166534;
    transform: translateY(-1px);
}

.buy-now-btn,
.btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1;
    vertical-align: middle;
}

.buy-now-btn .icon {
    width: 20px;
    height: 20px;
    stroke: white;
    vertical-align: middle;
    display: inline-block;
}

.add-to-cart-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.add-to-cart-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* Floating Cart Button */
.floating-cart-button {
    position: fixed;
    bottom: 100px;
    right: 15px;
    z-index: 999;
    background: var(--primary);
    color: white;
    padding: 12px 15px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    transition: var(--transition-normal);
}

.floating-cart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.floating-cart-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.floating-cart-button .label {
    font-size: 0.8rem;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
}

.am-cart-search-wrapper {
    text-align: center;
    margin: 20px 0;
}

.am-cart-search-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.am-cart-search-input {
    width: 300px;
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.am-cart-search-btn,
.am-cart-search-clear {
    width: 100px;
    height: 38px;
    padding: 8px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    line-height: 22px;
}

.am-cart-search-clear {
    color: red;
    background: #fff;
    text-decoration: none;
    visibility: hidden;
}

.am-cart-search-clear.visible {
    visibility: visible;
}

/* ============================================= */
/* ============ SUBSCRIPTION CARDS ========== */
/* ============================================= */

.subscriptions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.subscription-search-box {
    margin-bottom: 2.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.subscription-filter {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.subscription-filter:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(var(--blue-rgb), 0.15);
    outline: none;
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subscription-filter:not(:placeholder-shown) + .clear-search {
    opacity: 1;
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.subscription-card {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.subscription-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 100%;
    transition: all 0.3s ease;
}

.subscription-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.subscription-card.color-red {
    background: linear-gradient(180deg, rgba(var(--red-rgb), 0.05), rgba(var(--red-rgb), 0.02));
}
.subscription-card.color-red::before {
    background: var(--red);
}

.subscription-card.color-orange {
    background: linear-gradient(180deg, rgba(var(--orange-rgb), 0.05), rgba(var(--orange-rgb), 0.02));
}
.subscription-card.color-orange::before {
    background: var(--orange);
}

.subscription-card.color-yellow {
    background: linear-gradient(180deg, rgba(var(--yellow-rgb), 0.05), rgba(var(--yellow-rgb), 0.02));
}
.subscription-card.color-yellow::before {
    background: var(--yellow);
}

.subscription-card.color-green {
    background: linear-gradient(180deg, rgba(var(--green-rgb), 0.05), rgba(var(--green-rgb), 0.02));
}
.subscription-card.color-green::before {
    background: var(--green);
}

.subscription-card.color-blue {
    background: linear-gradient(180deg, rgba(var(--blue-rgb), 0.05), rgba(var(--blue-rgb), 0.02));
}
.subscription-card.color-blue::before {
    background: var(--blue);
}

[data-theme="dark"] .subscription-card.color-red {
    background: linear-gradient(180deg, rgba(var(--red-rgb), 0.08), rgba(var(--red-rgb), 0.04));
}

[data-theme="dark"] .subscription-card.color-orange {
    background: linear-gradient(180deg, rgba(var(--orange-rgb), 0.08), rgba(var(--orange-rgb), 0.04));
}

[data-theme="dark"] .subscription-card.color-yellow {
    background: linear-gradient(180deg, rgba(var(--yellow-rgb), 0.08), rgba(var(--yellow-rgb), 0.04));
}

[data-theme="dark"] .subscription-card.color-green {
    background: linear-gradient(180deg, rgba(var(--green-rgb), 0.08), rgba(var(--green-rgb), 0.04));
}

[data-theme="dark"] .subscription-card.color-blue {
    background: linear-gradient(180deg, rgba(var(--blue-rgb), 0.08), rgba(var(--blue-rgb), 0.04));
}

.subscription-card.future {
    opacity: 0.85;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.subscription-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.subscription-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.subscription-title a:hover {
    color: var(--blue);
}

.subscription-status {
    display: flex;
    gap: 0.75rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-badge i {
    font-size: 0.7rem;
}

.status-badge.rebill {
    background: rgba(var(--green-rgb), 0.15);
    color: var(--green);
}

.status-badge.lifetime {
    background: rgba(var(--blue-rgb), 0.15);
    color: var(--blue);
}

.status-badge.expires {
    background: linear-gradient(135deg, rgba(var(--yellow-rgb), 0.2), rgba(var(--orange-rgb), 0.1));
    color: var(--blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.future {
    background: rgba(var(--blue-rgb), 0.15);
    color: var(--blue);
}

.subscription-description {
    color: var(--text-secondary);
    font-size: 1rem;
    flex-grow: 1;
}

.subscription-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.action-button {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--box-shadow);
}

.action-button.cancel {
    background: rgba(var(--red-rgb), 0.15);
    color: var(--red);
}

.action-button.cancel:hover {
    background: rgba(var(--red-rgb), 0.25);
    transform: translateY(-2px);
}

.action-button.upgrade {
    background: rgba(var(--blue-rgb), 0.15);
    color: var(--blue);
}

.action-button.upgrade:hover {
    background: rgba(var(--blue-rgb), 0.25);
    transform: translateY(-2px);
}

.coming-soon-badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--blue);
    background: rgba(var(--blue-rgb), 0.15);
    border-radius: var(--border-radius);
    font-weight: 500;
}

.no-subscriptions {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh; /* reduced height to bring in tighter spacing 
    background: #f7f9fc; */
    padding: 0; /* remove top/bottom padding */
}

.empty-state {
    text-align: center;
    width: 90%;
    font-size: 1.5rem;
    padding: 2rem 2rem 3.5rem; /* reduced padding */
    background: var(--card-bg, #fff);
    border-radius: var(--border-radius, 16px);
    box-shadow: var(--box-shadow, 0 4px 10px rgba(0, 0, 0, 0.05));
    position: relative;
    margin: 0; /* ensure no extra space added */
}


/* Optional icon above title */
.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    margin-bottom: 0.75rem;
    color: var(--text, #333);
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-secondary, #666);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.primary-button {
    display: inline-flex;
    flex-direction: column; /* stack icon above text */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--green, #28a745);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: var(--box-shadow, 0 4px 10px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    margin-top: -1.5rem;
    position: absolute;
    /*bottom: -30px;*/
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.primary-button i {
    font-size: 2rem; /* large icon */
    line-height: 1;
}

.primary-button:hover {
    opacity: 0.9;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: var(--box-shadow-hover, 0 6px 14px rgba(0, 0, 0, 0.15));
}

.icon-text-stack {
    /*display: flex; */
    flex-direction: left;
    align-items: center;
}


/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal[open] {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--box-shadow);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal[open] .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--blue);
}

.modal h3 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.25rem;
}

/* Typography */
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6, .subscription-title { font-size: 1.125rem; }

.subscription-description {
    font-size: 0.875rem;
}

.status-badge, .action-button {
    font-size: 0.8125rem;
}

/* ============================================= */
/* ============ ANIMATIONS =================== */
/* ============================================= */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================= */
/* ============ RESPONSIVE =================== */
/* ============================================= */

@media (max-width: 1200px) {
    .product-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    /* Mobile Sidebar */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toggle-sidebar {
        display: block;
    }
    
    .product-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .header {
        padding: 0 var(--space-lg);
    }
    
    .page-content {
        padding: var(--space-lg);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .product-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .subscriptions-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle span {
        display: none;
    }
    
    .modal-content {
        width: 95%;
        padding: 2rem;
    }
    
    .subscriptions-container {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .product-grid-container {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }
    
    .header {
        padding: 0 var(--space-md);
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-avatar {
        margin-right: 0;
    }
    
    .page-content {
        padding: var(--space-md);
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    
    .breadcrumb i {
        display: none;
    }
}

/* ============================================= */
/* ============ UTILITY CLASSES ============== */
/* ============================================= */

/* Status Badges */
.status-badge {
    font-size: 1rem !important;
    padding: 0.5rem !important;
    border-radius: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    font-weight: 500 !important;
}

/* Search Wrapper */
.search-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-lg);
    position: relative;
    width: 100%;
    margin-top: 2rem !important;
}

.search-container {
    width: 100%;
    max-width: 500px;
    position: relative;
}

#searchInput {
    width: 100%;
    padding: var(--space-sm) 40px var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 16px;
    box-sizing: border-box;
    background-color: var(--card);
    color: var(--text);
    transition: var(--transition-normal);
}

#searchInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

#clearSearch {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 28px;
    color: var(--danger);
    cursor: pointer;
    user-select: none;
    display: none;
    line-height: 1;
    transition: var(--transition-normal);
}

#clearSearch:hover {
    color: var(--danger-dark);
}

.filter-buttons {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.filter-btn {
    background: var(--secondary-light);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    margin: 0 var(--space-xs) var(--space-xs) 0;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-normal);
    color: var(--text);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

#noResultsMessage {
    display: none;
    text-align: center;
    color: var(--danger);
    font-weight: bold;
    font-size: 18px;
    margin-top: var(--space-lg);
    padding-bottom: 20px;
}

.am-block {
    padding: 0 !important;
}

.am-form form {
    background: transparent !important;
}


/* ============================================= */
/* ============ AUTH PAGES =================== */
/* ============================================= */

.auth-container {
    padding: var(--space-xl);
    max-width: 1200px;
    margin: 0rem auto;
    background: var(--card-bg);
    box-shadow: var(--box-shadow);
    color: var(--text);
    font-family: inherit;
    transition: var(--transition-normal);
    display: flex;
    justify-content: center;
}

.auth-card {
    background: var(--card-bg);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 600px;
    font-family: inherit;
    color: var(--text);
}

.auth-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
}

.auth-form-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md) var(--space-sm) 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--text);
    font-size: 16px;
    transition: var(--transition-normal);
}

.auth-form-input-icon {
    position: absolute;
    left: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.auth-form-button {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 16px;
}

.auth-form-button:hover {
    background: var(--primary-dark);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-normal);
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-container {
        padding: var(--space-md);
        margin: 1rem auto;
    }
    
    .auth-card {
        padding: var(--space-lg);
    }
}
/* ============================================= */
/* ============ AUTH FORM COMPONENTS ========= */
/* ============================================= */

.input-wrapper {
    position: relative;
    margin-bottom: var(--space-md);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-size: 14px;
}

.forgot-password {
    text-align: right;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-md);
    font-size: 14px;
}

/* Form specific adjustments */
.auth-form-input {
    padding-left: 40px !important;
}

.auth-form-input-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .form-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .forgot-password {
        text-align: center;
        width: 100%;
    }
}




/* ============================================= */
/* ============ LAYOUT STRUCTURE ============= */
/* ============================================= */

.page-container {
    min-height: 400px;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--box-shadow);
    color: var(--text);
    transition: var(--transition-normal);
}

.page-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.content-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

/* ============================================= */
/* ============ TABLES & DATA ================ */
/* ============================================= */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
}

.data-table th {
    background: var(--primary);
    color: white;
    padding: var(--space-sm);
    text-align: left;
}

.data-table td {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover td {
    background: var(--primary-light);
}

.payment-history-table {
    width: 100%;
}

.payment-history-row-payment {
    background: var(--card);
}

.payment-history-row-refund {
    background: var(--primary-light);
}

/* ============================================= */
/* ============ CHECKOUT COMPONENTS ========== */
/* ============================================= */

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.payment-options {
    display: grid;
    gap: var(--space-sm);
}

.payment-option {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: var(--transition-normal);
    cursor: pointer;
}

.payment-option:hover {
    border-color: var(--primary);
    box-shadow: var(--box-shadow);
}

.payment-option.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-option-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.payment-icon {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    flex-shrink: 0;
}

.payment-icon i {
    font-size: 1.75rem;
}

.payment-icon img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.payment-details {
    flex: 1;
    min-width: 0;
}

.payment-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.payment-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.payment-selector {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-option.active .payment-selector {
    border-color: var(--primary);
}

.payment-option.active .payment-selector .radio-indicator {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

/* ============================================= */
/* ============ FORM COMPONENTS ============== */
/* ============================================= */

.form-row {
    margin-bottom: var(--space-md);
}

.input-wrapper {
    position: relative;
}

.coupon-section {
    margin-top: var(--space-lg);
}

.coupon-preview {
    display: flex;
    align-items: center;
    background: var(--success);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.coupon-input-group {
    display: flex;
    gap: var(--space-sm);
}

.coupon-input {
    flex: 1;
    padding: var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    color: var(--text);
}

/* ============================================= */
/* ============ BUTTONS & ACTIONS ============ */
/* ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    gap: var(--space-sm);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

/* ============================================= */
/* ============ UTILITY CLASSES ============== */
/* ============================================= */

.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.error-message {
    padding: var(--space-sm);
    background: var(--danger);
    color: white;
    border-radius: var(--radius-sm);
    margin-top: var(--space-sm);
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* ============================================= */
/* ============ RESPONSIVE ADJUSTMENTS ======= */
/* ============================================= */

@media (max-width: 992px) {
    .page-container {
        padding: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: var(--space-md);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .coupon-input-group {
        flex-direction: column;
    }
    
    .payment-option-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .payment-icon {
        margin-bottom: var(--space-sm);
    }
}


.subscription-search-box {
    display: none !important;
}

/* ============ CART PRODUCT GRID (/cart) ============
   cart.css lays the list out as repeat(N, 1fr); a 1fr track never shrinks below its
   widest content, so a 400px product image or a long "500 BDT for 30 days" select
   made some columns wider than others and pushed the last card off-screen.
   min-width:0 lets every column share the width equally; the image box is a fixed
   square so every card lines up. */
.am-cart ul.am-cart-layout-product-list > li.am-cart-layout-product-list_item { min-width: 0; }
.am-cart .product-card { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.am-cart .product-card .product-image-link {
    position: relative; display: block; width: 100%; padding-top: 0; aspect-ratio: 1 / 1; overflow: hidden;
}
.am-cart .product-card img.product-image {
    position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; object-fit: cover;
}
.am-cart .product-card div.product-image { position: absolute; inset: 0; min-height: 0 !important; }
.am-cart .product-card .product-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.am-cart .product-card .product-title { overflow-wrap: anywhere; }
.am-cart .product-card select,
.am-cart .product-card .plan-select { width: 100%; max-width: 100%; min-width: 0; }
.am-cart .product-card button,
.am-cart .product-card input[type="submit"] { max-width: 100%; white-space: normal; }
/* cart.css gives the no-sidebar product area width:99% + padding-right:1em, which left a
   wider gap on the right than the left - let the grid run to the content edge. */
.am-cart.am-cart-nosidebar .am-cart-main { float: none; width: 100%; padding-right: 0; }
