/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Lato:wght@700;900&display=swap');

:root {
    --primary-color: #005A9C;
    --primary-dark: #004b82; /* Darker shade for better hover */
    --secondary-color: #f8f9fa;
    --header-bg: #2c3e50;
    --card-bg: #ffffff;
    --text-color: #212529; /* Slightly darker text for better contrast */
    --text-light: #6c757d;
    --border-color: #e9ecef; /* Lighter border */
    --focus-ring: rgba(0, 90, 156, 0.4); /* Custom focus ring color */
    --success-color: #198754;
    --error-color: #dc3545;
    --button-danger-bg: #c82333;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.08); /* Improved subtle shadow */
    --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

/* --- Global & Body --- */
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.65; /* Increased line height for readability */
    -webkit-font-smoothing: antialiased; /* Better font rendering */
    -moz-osx-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: 'Lato', sans-serif;
    line-height: 1.2;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ADMIN PAGE PADDING OVERRIDE (Maximizing width) */
.admin-page .container {
    max-width: 95vw; /* Use 95% of viewport width */
    padding: 0 10px; /* Reduced side padding */
    margin: 20px auto;
}
/* Ensure the inner header/nav doesn't lose content */
.admin-page .site-header .header-top {
    padding: 10px 20px; 
}


.loading-text {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: var(--text-light);
}

/* --- Header & Universal Navigation --- */
.site-header {
    background: var(--header-bg);
    color: white;
    padding-bottom: 20px;
    box-shadow: var(--shadow-md);
    position: sticky; /* Sticky header for better UX */
    top: 0;
    z-index: 500;
}
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}
.logo {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    font-size: 1.8em;
    color: white;
    text-decoration: none;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.main-nav a {
    text-decoration: none;
    color: white;
    padding: 10px 18px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-weight: 500; /* Slightly lighter weight for clean look */
    font-size: 1em;
    border: 2px solid transparent;
    background-color: transparent;
}
.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly stronger hover */
}
.main-nav a.active {
    background-color: var(--primary-color);
    border-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.nav-loading-placeholder a {
    background-color: rgba(255, 255, 255, 0.05);
    color: transparent;
    pointer-events: none;
    width: 80px;
    display: inline-block;
}
.header-main { text-align: center; padding: 20px; }
.header-main h1 { margin: 0; font-family: 'Lato', sans-serif; font-size: 2.8em; font-weight: 900; }
.header-main p { font-size: 1.2em; opacity: 0.9; margin-top: 5px; }

header h1 {
    text-align: center;
}

/* --- Buttons --- */
.button-primary, .button-danger, .button-outline {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    text-decoration: none; /* Ensure anchor buttons look consistent */
    display: inline-block; /* Ensure padding works correctly */
}
/* Standard focus state for accessibility */
.button-primary:focus, .button-danger:focus, .button-outline:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.button-primary { 
    background-color: var(--primary-color); 
    color: white; 
    border-color: var(--primary-color);
}
.button-primary:hover:not(:disabled) { 
    background-color: var(--primary-dark); 
    border-color: var(--primary-dark); 
    transform: translateY(-1px); 
    box-shadow: var(--shadow-md); 
}
.button-primary:disabled { 
    background-color: #adb5bd; /* Lighter disabled state */
    border-color: #adb5bd; 
    cursor: not-allowed; 
}

.button-outline { 
    background-color: transparent; 
    color: var(--primary-color); 
    border-color: var(--primary-color); 
    /* NEW: Better appearance for these buttons in Admin section */
    padding: 8px 15px;
    font-size: 0.9em;
    margin-right: 10px;
    margin-bottom: 10px;
}
.button-outline:hover:not(:disabled) { 
    background-color: var(--primary-color); 
    color: white; 
    box-shadow: var(--shadow-sm);
}

.button-danger { 
    background-color: var(--error-color); 
    color: white; 
    border-color: var(--error-color); 
}
.button-danger:hover:not(:disabled) { 
    background-color: var(--button-danger-bg); 
    border-color: var(--button-danger-bg); 
    transform: translateY(-1px);
}

/* --- Main Shopping Layout --- */
.main-layout-container { display: flex; gap: 30px; align-items: flex-start; }
main#main-content { flex: 3; }

/* Incomplete Profile Banner */
#profileIncompleteBanner {
    padding: 15px 20px;
    background-color: #fff3cd; /* Yellow warning color */
    border: 1px solid #ffeeba;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.info-banner { 
    background-color: #e3f2fd; 
    padding: 20px; 
    border-radius: var(--border-radius); 
    margin-bottom: 30px; 
    border-left: 5px solid var(--primary-color); 
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap; 
    gap: 20px; 
    font-weight: 500; 
    box-shadow: var(--shadow-sm); 
}
.product-grid-container { display: flex; flex-direction: column; gap: 50px; }
.product-category-section .section-title { 
    margin-bottom: 25px; 
    border-bottom: 3px solid var(--primary-color); 
    padding-bottom: 10px; 
    font-size: 2.2em; 
    font-family: 'Lato', sans-serif; 
    font-weight: 700;
}
.product-grid-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }

/* --- Product Card --- */
.product-card {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--border-radius); padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border 0.2s; 
    min-height: 250px; 
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card h3 { margin-top: 0; color: var(--primary-color); font-family: 'Lato', sans-serif; font-size: 1.4em;}
.product-card .product-description { flex-grow: 1; color: var(--text-light); font-size: 0.9em; margin: 10px 0; }
.product-card .quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}
.product-card .quantity-controls select {
    flex-grow: 1;
}
.product-card .quick-add-btn {
    width: 40px;
    padding: 5px 0;
    font-size: 1.2em;
}


.product-card select { 
    width: 100%; 
    padding: 10px; 
    border-radius: var(--border-radius); 
    border: 1px solid var(--border-color); 
    background-color: #fdfdfd; 
    cursor: pointer; 
    font-size: 1em; 
}
.product-card select:focus {
    outline: 2px solid var(--focus-ring);
    border-color: var(--primary-color);
    box-shadow: none;
}

/* --- Cart Sidebar (Desktop Only) --- */
#cart-sidebar { 
    flex: 1; min-width: 300px; 
    background: var(--card-bg); 
    border-radius: var(--border-radius); 
    padding: 25px; 
    position: sticky; 
    top: 90px; 
    box-shadow: var(--shadow-md); 
}
#cart-sidebar h2 { margin-top: 0; text-align: center; color: var(--primary-color); font-family: 'Lato', sans-serif; }
.cart-items-list { min-height: 100px; max-height: 350px; overflow-y: auto; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 15px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f1f1; }
.cart-item:last-child { border-bottom: none; }
.cart-item .item-name { flex-grow: 1; color: var(--text-color); font-weight: 500;}
.cart-item .item-total { font-weight: 700; }
.cart-empty-message { text-align: center; color: #777; padding: 30px 0; font-style: italic; }
.cart-summary .summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 1.1em; }
.cart-summary .summary-row.total { font-weight: 700; font-size: 1.4em; border-top: 2px solid var(--text-color); padding-top: 15px; margin-top: 10px; }
#saveOrderBtn { width: 100%; margin-top: 15px; }

/* --- NEW: Mobile Cart Footer (Fixed Position) --- */
.mobile-cart-footer-hidden {
    display: none !important;
}

.mobile-cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 15px 20px;
    box-shadow: var(--shadow-lg); 
    border-top: 3px solid var(--primary-color);
    z-index: 900; 
    display: flex;
    align-items: center;
    gap: 15px;
    box-sizing: border-box; 
}
.mobile-cart-footer-visible {
    display: flex !important;
}
.mobile-cart-summary {
    flex-grow: 1;
    font-size: 1.3em;
    font-weight: 700;
}
.mobile-cart-footer #mobile-saveOrderBtn {
    flex-shrink: 0;
    padding: 10px 15px;
}
.mobile-cart-footer .form-message {
    position: absolute;
    bottom: 60px; 
    left: 50%;
    transform: translateX(-50%);
    min-width: 80%;
    text-align: center;
    z-index: 901;
}


/* --- General Form & Admin Page Styles --- */
.form-section { 
    margin-bottom: 40px; 
    padding: 25px; 
    background: white; 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow-sm); 
}
.form-section h2 { 
    margin-top: 0; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 10px; 
    margin-bottom: 20px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
label { margin-bottom: 8px; font-weight: 700; font-size: 0.95em; color: var(--text-color); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    font-size: 1em; 
    box-sizing: border-box; 
    font-family: 'Roboto', sans-serif; 
    transition: border-color 0.2s, box-shadow 0.2s; 
}
input:focus:not([type="checkbox"]):not([type="radio"]), select:focus, textarea:focus { 
    outline: 2px solid var(--focus-ring); 
    outline-offset: 1px;
    border-color: var(--primary-color); 
    box-shadow: none; 
}

/* Fix Checkbox/Radio Styling */
.radio-group, .checkbox-group { 
    display: flex; 
    gap: 25px; 
    align-items: center; 
}
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    padding: 0;
}
.form-group label {
    display: flex;
    align-items: center;
    font-weight: 400; /* Reset font weight for checkbox labels */
    cursor: pointer;
}

.form-message { margin-top: 15px; padding: 10px; border-radius: var(--border-radius); font-weight: 500; text-align: center; min-height: 24px; display: none; }
.form-message.visible { display: block; }
.form-message.success { color: var(--success-color); background-color: #d1e7dd; border: 1px solid #c3e6cb; }
.form-message.error { color: var(--error-color); background-color: #f8d7da; border: 1px solid #f5c6cb; }
.form-message.saving { color: var(--primary-color); background-color: #e9f5ff; border: 1px solid #b3d4ff; }


/* --- Auth & Standalone Pages --- */
.auth-page .container, .volunteer-page .container, .profile-page .container, .static-page .container { max-width: 900px; }
.auth-form-container { 
    max-width: 450px; 
    margin: 40px auto; 
    padding: 40px; 
    border-radius: var(--border-radius); 
    background-color: white; 
    box-shadow: var(--shadow-lg); 
}
.auth-form-container h2 { text-align: center; }
.auth-form-container p { text-align: center; color: var(--text-light); }
.auth-form-container form .form-group { margin-bottom: 20px; }
.auth-form-container button { width: 100%; }
.auth-switch-link { text-align: center; margin-top: 25px; font-size: 0.9em; }
.auth-switch-link a { color: var(--primary-color); text-decoration: none; font-weight: 700; }
.auth-switch-link a:hover { text-decoration: underline; }

.content-container { padding: 25px; background: white; border-radius: var(--border-radius); box-shadow: var(--shadow-sm); }

/* --- Modal --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.7); animation: fadeIn 0.3s; justify-content: center; align-items: center; }
/* Smaller Modal Content for quick details */
#volunteerDetailModal .modal-content, #orderDetailModal .modal-content {
    max-width: 500px;
}
.modal-content { background-color: #fefefe; padding: 30px; border: 1px solid #888; width: 90%; max-width: 800px; border-radius: var(--border-radius); position: relative; animation: slideIn 0.3s; box-shadow: var(--shadow-lg); }
.close-button { color: #aaa; position: absolute; top: 15px; right: 25px; font-size: 32px; font-weight: bold; cursor: pointer; transition: color 0.2s; }
.close-button:hover { color: #333; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-50px); } to { transform: translateY(0); } }

/* --- Admin Table --- */
.admin-table-container { overflow-x: auto; }
.admin-table { 
    width: 100%; 
    min-width: 90vw; /* Enforce 90% viewport width minimum */
    border-collapse: collapse; 
    margin-top: 20px; 
    background: white; 
}
.admin-table th, .admin-table td { 
    border: 1px solid var(--border-color); 
    padding: 12px 10px; 
    text-align: left; 
    vertical-align: top; 
    word-wrap: break-word; 
    white-space: normal; 
}
.admin-table th { background-color: var(--secondary-color); font-weight: 700; }
.admin-table tr:nth-child(even) { background-color: #fcfcfc; }
.admin-table .actions { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.admin-table .unread-row { background-color: #fffde7; font-weight: 600; }

/* Specific styles for Volunteer table readability */
.admin-table .volunteer-cell-small {
    width: 80px;
    white-space: nowrap;
}
.admin-table .volunteer-cell-medium {
    width: 120px;
}
.admin-table .volunteer-notes {
    max-width: 150px;
    font-size: 0.85em;
    cursor: help; 
    white-space: normal; 
}
/* Ensure Name/Email column uses minimal height */
.admin-table td:first-child {
    min-width: 160px;
}
/* Ensure Avail/Roles columns are visually dense but clear */
.admin-table .volunteer-cell-compact {
    font-size: 0.9em;
    max-width: 100px;
}

/* Static Content Preview area styling */
#staticContentPreview {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
}


/* --- Messaging System --- */
.unread-indicator { display: inline-block; width: 10px; height: 10px; background-color: var(--error-color); border-radius: 50%; margin-left: 6px; box-shadow: 0 0 5px var(--error-color); }
.nav-link-messages { position: relative; display: inline-flex; align-items: center; }
.messages-layout { display: flex; border: 1px solid var(--border-color); border-radius: var(--border-radius); overflow: hidden; height: 75vh; background-color: #fff; margin-top: 20px; }
#conversationsListPanel { flex: 0 0 350px; border-right: 1px solid var(--border-color); overflow-y: auto; background-color: var(--secondary-color); }
#messageChatPanel { flex: 1; display: flex; flex-direction: column; }
#messagesContainer, #messageModalBody { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
}
.conversation-item { padding: 15px; cursor: pointer; border-bottom: 1px solid #e9ecef; transition: background-color 0.2s ease; }
.conversation-item:hover { background-color: #f1f3f5; }
.conversation-item.active { background-color: #e9f5ff; border-right: 3px solid var(--primary-color); }
/* Style for unread conversations */
.conversation-item.unread strong { color: var(--primary-color); position: relative; padding-left: 12px; font-weight: 700 !important;}
.conversation-item.unread strong::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 8px; 
    height: 8px; 
    background-color: var(--primary-color); 
    border-radius: 50%; 
}
#sendMessageForm, #adminReplyForm { padding: 15px; border-top: 1px solid var(--border-color); background-color: var(--secondary-color); }
.message-wrapper { margin-bottom: 15px; display: flex; flex-direction: column; }
.message-wrapper.sent { align-items: flex-end; }
.message-wrapper.received { align-items: flex-start; }

/* ENHANCED BUBBLE STYLES */
.message-bubble { 
    max-width: 75%; 
    padding: 12px 18px; 
    border-radius: 20px; 
    line-height: 1.4; 
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
    transition: all 0.2s; 
}
.message-bubble.sent { 
    background-color: var(--primary-color); 
    color: white; 
    border-top-right-radius: 4px; 
}
.message-bubble.received { 
    background-color: #e9ecef; 
    color: var(--text-color); 
    border: 1px solid #dee2e6; 
    border-top-left-radius: 4px; 
}

/* REPLY SNIPPET STYLES */
.reply-snippet-bubble {
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.85em;
    line-height: 1.3;
}
.message-bubble.sent .reply-snippet-bubble {
    background-color: rgba(255, 255, 255, 0.15); 
    border-left: 3px solid rgba(255, 255, 255, 0.5); 
    opacity: 0.9;
}
.message-bubble.received .reply-snippet-bubble {
    background-color: #dce0e3; 
    border-left: 3px solid var(--primary-color);
}


/* REPLY ICON STYLES */
.reply-icon { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background-color: #fff; 
    border: 1px solid var(--border-color); 
    border-radius: 50%; 
    width: 28px; 
    height: 28px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    opacity: 0; 
    transition: opacity 0.2s ease, transform 0.2s; 
    font-size: 1.2em;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}
.message-wrapper.sent .reply-icon { 
    left: -35px; 
    color: var(--text-color);
}
.message-wrapper.received .reply-icon { 
    right: -35px; 
    color: var(--primary-color);
}
.message-wrapper:hover .reply-icon { opacity: 1; }
.reply-icon:hover { transform: translateY(-50%) scale(1.1); background-color: #f0f0f0; }

.admin-convo-info-panel { 
    padding: 15px; 
    background-color: #fef8e2; 
    border: 1px solid #fce8a7;
    border-bottom: 1px solid var(--border-color); 
    margin-bottom: 10px;
}
.admin-convo-info-panel h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
}
.admin-convo-info-panel p { 
    margin: 0 0 5px 0; 
    font-size: 0.9em; 
}
#profileCompletionPrompt { padding: 20px; background-color: #fff3cd; border: 1px solid #ffeeba; border-radius: var(--border-radius); text-align: center; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .main-layout-container { 
        flex-direction: column; 
        /* IMPORTANT: Padding to ensure content doesn't hide under the new fixed mobile footer */
        padding-bottom: 120px; 
    }
    #cart-sidebar { 
        display: none; 
    }
}
@media (max-width: 768px) {
    .header-top { flex-direction: column; gap: 15px; }
    .form-grid { grid-template-columns: 1fr; }
    .main-nav { flex-wrap: wrap; justify-content: center; }
    .header-main h1 { font-size: 2.2em; }
    
    /* Ensure reply buttons don't clip on small screens */
    .message-bubble { max-width: 85%; }
    .message-wrapper.sent .reply-icon { left: -5px; opacity: 1; }
    .message-wrapper.received .reply-icon { right: -5px; opacity: 1; }

    .admin-table { 
        min-width: 700px; /* Ensure tables are still wide enough */
    }
}

/* === START: NEW STYLES FOR INDEX PAGE UX ENHANCEMENTS === */

/* --- Controls (Search & Filter Button) --- */
.controls-container {
    display: flex;
    gap: 1rem;
    padding: 1rem 0; 
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    margin-bottom: 20px;
}

#openFilterBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}
#openFilterBtn:hover {
    background-color: var(--secondary-color);
}

.search-container {
    flex-grow: 1;
}
#searchBar {
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    font-size: 1em; 
    box-sizing: border-box; 
    font-family: 'Roboto', sans-serif; 
    transition: border-color 0.2s, box-shadow 0.2s; 
}


/* --- FILTER SIDEBAR STYLES --- */
#filterSidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px; 
    background-color: var(--card-bg);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg); 
}

body.sidebar-open #filterSidebar {
    transform: translateX(0);
}

#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

body.sidebar-open #sidebarOverlay {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
}

#closeFilterBtn {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-light);
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input[type="number"] {
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    font-size: 1em; 
    box-sizing: border-box; 
    font-family: 'Roboto', sans-serif; 
    transition: border-color 0.2s, box-shadow 0.2s; 
}


.price-range-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.price-range-btn {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.price-range-btn:hover {
    background-color: #e0e0e0;
}

.price-range-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.custom-price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

#clearFiltersBtn {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--text-color);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}
#clearFiltersBtn:hover {
    background-color: var(--secondary-color);
}

/* === END: NEW STYLES FOR INDEX PAGE UX ENHANCEMENTS === */

/* === START: NEW STYLES FOR CART.HTML === */

#cartReviewSection {
    max-width: 900px;
    margin: 0 auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item .item-name {
    flex-grow: 1;
    font-size: 1.1em;
    font-weight: 500;
}

.cart-item .cart-quantity-selector {
    width: 80px; 
    margin-right: 10px;
}

.cart-item .item-total {
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

/* Summary Area */
.cart-summary {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fdfdfd;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.cart-summary .summary-row.total {
    font-weight: 700;
    font-size: 1.4em;
    border-top: 2px solid var(--text-color);
    padding-top: 15px;
    margin-top: 10px;
}

/* Action Buttons Styling */
#checkoutBtn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#updateCartBtn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

@media (max-width: 768px) {
    #updateCartBtn, #checkoutBtn {
        width: 50% !important;
        float: none !important;
        border-radius: var(--border-radius) !important; 
    }
    #updateCartBtn {
        margin-bottom: 10px;
    }
}

/* === END: NEW STYLES FOR CART.HTML === */