/* Screen-reader only — visible to search engines, hidden visually */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes pulse-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse-animation 0.5s ease-in-out;
}

.kcode-valid {
    color: var(--success-color) !important;
    transform: scale(1.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color, #f8f9fa);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --success-color: #28a745;
    --admin-color: #dc3545;
    --whatsapp-color: #25D366;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --header-bg: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --header-bg-rgb: 30,60,114;
    --card-bg: #fff;
    --border-color: #e1e5eb;
    --dark-text: #f0f0f0;
    --placeholder-bg: url('../img/system/placeholder.png');
}

/* White Theme */
.theme-white {
    --primary-color: #DC2626;
    --secondary-color: #EF4444;
    --success-color: #16a34a;
    --admin-color: #991b1b;
    --whatsapp-color: #25D366;
    --bg-color: #FFFFFF;
    --text-color: #121212;
    --dark-text: #121212;
    --header-bg: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    --header-bg-rgb: 245,247,250;
    --header-text: #DC2626;
    --card-bg: #FFFFFF;
    --border-color: #F5F7FA;
    --placeholder-bg: url('../img/system/placeholder.png');
}

.theme-white header,
.theme-white header .logo-text,
.theme-white header .btn-member,
.theme-white header .lang-btn {
    color: #DC2626 !important;
}

.theme-white .btn-member {
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
    background: rgba(255,255,255,0.8) !important;
}

.theme-white .btn-member i {
    color: var(--primary-color) !important;
}

.theme-white .main-footer {
    color: #000000 !important;
}

.theme-white .main-footer h4 {
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}

.theme-white .footer-links a,
.theme-white .footer-bottom,
.theme-white .footer-bottom p {
    color: #333333 !important;
}

.theme-white .theme-toggle-btn {
    color: var(--primary-color) !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
}

/* AI Assistant White Theme Overrides */
.theme-white #faq-modal .modal-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%) !important;
    color: #DC2626 !important;
}

.theme-white #faq-modal .modal-close {
    color: #DC2626 !important;
    background: rgba(220, 38, 38, 0.1);
}

.theme-white .chat-message.bot .chat-bubble {
    background-color: #e9ecef !important; /* Gray (Req 5) */
    color: #000000 !important;
}

.theme-white .ai-response {
    background: #e9ecef !important; /* Gray (Req 5) */
    color: #000000 !important;
    border: 1px solid #e1e5eb;
}

/* Product Variant Pills */
.product-variants-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.variant-pill {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
}

.variant-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.variant-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.variant-pill.set-pill {
    background: #FFF5F5 !important;
    color: #E53E3E !important;
    border-color: #FEB2B2 !important;
    font-weight: bold;
}

.variant-pill.set-pill:hover {
    background: #FED7D7 !important;
    border-color: #F56565 !important;
}

.product-card .price-row {
    margin-top: auto;
}

.product-card .discount-badge-small {
    background: #e74c3c;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 5px;
    font-weight: bold;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure consistent card height and content alignment */
.product-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2em; /* Approximately 2 lines */
    margin-bottom: 8px;
}

.product-name {
    height: 1.4em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 2px; /* Reduced from 4px (Task 5) */
}

.gift-tag-small {
    font-size: 0.75rem;
    color: #e67e22;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 1.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Black Theme */
.theme-black {
    --primary-color: #EF4444;
    --secondary-color: #DC2626;
    --success-color: #22c55e;
    --admin-color: #b91c1c;
    --whatsapp-color: #25D366;
    --bg-color: #0F0F0F;
    --text-color: #F5F5F5;
    --text-color-rgb: 245, 245, 245;
    --dark-text: #F5F5F5;
    --header-bg: #2d2d2d;
    --header-bg-rgb: 45,45,45;
    --header-text: #F5F5F5;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --placeholder-bg: url('../img/system/placeholder.png');
    --placeholder-text: rgba(255,255,255,0.08);
    color-scheme: dark;
}

.theme-black .breadcrumb-list li,
.theme-black .breadcrumb-list li a,
.theme-black .product-modal-description,
.theme-black .product-category-tag,
.theme-black .trust-bar,
.theme-black .filter-group h4,
.theme-black .filter-checkbox-label,
.theme-black .modal-header h2 {
    color: var(--text-color) !important;
}

.theme-black .view-btn {
    color: var(--text-color) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

.theme-black .btn-tool-icon {
    background: #333;
    color: #eee;
    border-color: #555;
}

.theme-black #sort-inventory-container {
    background-color: #333333 !important; /* Lighter black (Req 1) */
    color: #fff !important;
}

.theme-black .inventory-item {
    background-color: #333 !important;
    border-bottom: 1px solid #444;
}

.theme-black .inventory-item .inventory-name,
.theme-black .inventory-item .inventory-price,
.theme-black .inventory-item .inventory-index,
.theme-black .inventory-item .inventory-kcode {
    color: #fff !important;
}

/* Gradient Black Headers (Req 1) */
.theme-black #product-modal .modal-header,
.theme-black .cart-header,
.theme-black #faq-modal .modal-header,
.theme-black #contact-modal .modal-header,
.theme-black #add-banner-modal .modal-header,
.theme-black #edit-banner-modal .modal-header {
    background: linear-gradient(135deg, #333 0%, #000 100%) !important;
    color: #fff !important;
}

.theme-black #faq-modal .modal-content,
.theme-black .chat-container {
    background-color: #2d2d2d !important;
    color: #fff !important;
}

/* Gradient Black AI Bubble (Req 1) */
.theme-black .chat-message.bot .chat-bubble {
    background: linear-gradient(135deg, #333 0%, #000 100%) !important;
    color: #fff !important;
    border: 1px solid #404040;
}

.theme-black .ai-response {
    background: linear-gradient(135deg, #333 0%, #000 100%) !important;
    color: #fff !important;
    border: 1px solid #404040;
}

.theme-black .sort-inventory-container .fas,
.theme-black .banner-move-btn i,
.theme-black .banner-edit-btn i,
.theme-black .banner-delete-btn i {
    color: white !important;
}

.theme-black .ai-response .quick-option-btn,
.theme-black .ai-response .ai-category-card,
.theme-black .ai-response .whatsapp-link {
    background: #222 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
}

/* Gradient Headers for White Theme (Req 4) */
.theme-white #product-modal .modal-header,
.theme-white .cart-header,
.theme-white #faq-modal .modal-header,
.theme-white #contact-modal .modal-header,
.theme-white #add-banner-modal .modal-header,
.theme-white #edit-banner-modal .modal-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%) !important;
    color: #DC2626 !important; /* Red Text as per previous req */
}

.theme-black .banner-move-btn,
.theme-black .banner-edit-btn,
.theme-black .banner-delete-btn {
    background-color: rgba(255,255,255,0.1) !important;
}

/* AI Assistant Black Theme Overrides */
.theme-black #faq-modal .modal-header {
    background: linear-gradient(135deg, #333 0%, #000 100%) !important;
}

/* Scrollbar Black Theme */
.theme-black ::-webkit-scrollbar-track,
.theme-black .chat-container::-webkit-scrollbar-track,
.theme-black .category-management-list::-webkit-scrollbar-track {
    background: #000000 !important;
}

.theme-black ::-webkit-scrollbar-thumb {
    background: #404040 !important;
}

/* Red Theme (Bean Paste for AI Bubble - Req 6) */
.theme-red {
    --primary-color: #C67C85;
    --secondary-color: #E29CA5;
    --success-color: #15803d;
    --admin-color: #7f1d1d;
    --whatsapp-color: #25D366;
    --bg-color: #FFFFFF;
    --text-color: #121212;
    --dark-text: #121212;
    --header-bg: linear-gradient(135deg, #C67C85 0%, #E29CA5 100%);
    --header-bg-rgb: 198,124,133;
    --header-text: #FFFFFF;
    --card-bg: #FFFFFF;
    --border-color: #F8E8EA;
    --placeholder-bg: url('../img/system/placeholder.png');
}

.theme-red .chat-message.bot .chat-bubble {
    background-color: #C67C85 !important; /* Bean Paste (Req 6) */
    color: #FFFFFF !important;
}

.theme-red .ai-response {
    background-color: #C67C85 !important; /* Bean Paste (Req 6) */
    color: #FFFFFF !important;
    border: 1px solid #E29CA5;
}

.theme-red .ai-response .quick-option-btn,
.theme-red .ai-response .ai-category-card,
.theme-red .ai-response .whatsapp-link {
    background: #fff !important;
    color: #C67C85 !important;
    border: 1px solid #F8E8EA !important;
}

/* Ensure all headers have gradient + background */
.theme-red #product-modal .modal-header,
.theme-red .cart-header,
.theme-red #faq-modal .modal-header,
.theme-red #contact-modal .modal-header,
.theme-red #add-banner-modal .modal-header,
.theme-red #edit-banner-modal .modal-header {
    background: linear-gradient(135deg, #C67C85 0%, #E29CA5 100%) !important;
    color: #FFFFFF !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

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

header .container {
    padding-top: 0;
    padding-bottom: 0;
}

header {
    background: rgba(var(--header-bg-rgb, 198,124,133), 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    padding: 2px 0;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled {
    background: rgba(var(--header-bg-rgb, 198,124,133), 0.95);
    padding: 0;
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
}

/* UI Improvements: Modern Card Styling (Task 7) */
.product-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* Tooltip System (Task 3) */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000000;
    pointer-events: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.15);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
    [data-tooltip]::after {
        display: none !important;
    }
}

.trust-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 1.5px 12px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.56rem;
    color: var(--text-color);
    letter-spacing: 0.03em;
    opacity: 0.8;
}

.trust-separator {
    opacity: 0.4;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 70px;
    width: auto;
    max-width: 200px;
    border-radius: 8px;
    object-fit: contain;
}

.nav-btn {
    padding: 5px 11px;
    font-size: 0.7rem;
}

.lang-btn {
    padding: 3px 8px;
    font-size: 0.65rem;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.language-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 4px;
    order: 1;
}

.lang-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 500;
    transition: all .3s;
    font-size: .85rem;
}

.lang-btn.active {
    background: #fff;
    color: var(--primary-color);
}

.user-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    order: 2;
}

.btn {
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .68rem;
}

.btn-cart {
    background-color: var(--success-color);
    color: #fff;
    position: relative;
}

.btn-whatsapp {
    background-color: var(--whatsapp-color);
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4757;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.member-dropdown {
    position: relative;
    display: inline-block;
}

.btn-member {
    background-color: rgba(255, 255, 255, .2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 18px;
    cursor: pointer;
    transition: all .3s;
    font-weight: 500;
    font-size: .85rem;
}

.btn-member:hover {
    background-color: rgba(255, 255, 255, .3);
}

.member-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .15);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn .2s ease-out;
}

.member-dropdown.active .member-dropdown-content {
    display: block;
}

.member-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: .9rem;
    color: var(--text-color);
    transition: background-color .2s;
}

.member-dropdown-item:hover {
    background-color: rgba(0, 0, 0, .05);
}

.member-dropdown-item i {
    color: var(--primary-color);
    width: 20px;
}

.theme-selector-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--header-bg);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    transition: all .3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

.theme-selector-panel {
    position: absolute;
    bottom: 60px;
    right: 0; /* Center align with toggle button */
    left: 0;
    margin: 0 auto;
    width: 100%;
    background-color: transparent;
    padding: 0;
    min-width: 0;
    display: none;
    flex-direction: column;
    align-items: center; /* Center icons */
    gap: 15px;
    box-shadow: none;
    pointer-events: none; /* Allow clicks to pass through transparent areas */
}

.theme-selector-panel > * {
    pointer-events: auto; /* Enable clicks on icons */
}

.theme-selector-panel.active {
    display: flex;
}

/* Staggered animation for theme icons */
.theme-selector-panel.active .theme-option {
    animation: popOut 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

.theme-selector-panel.active .theme-option:nth-child(1) { animation-delay: 0.1s; }
.theme-selector-panel.active .theme-option:nth-child(2) { animation-delay: 0.2s; }
.theme-selector-panel.active .theme-option:nth-child(3) { animation-delay: 0.3s; }

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

.theme-option {
    cursor: pointer;
    transition: transform .2s;
    background: transparent;
    padding: 0;
    display: flex;
    justify-content: center;
}

.theme-option:hover {
    transform: scale(1.1);
    background: transparent;
}

.theme-option.active .theme-icon {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary-color);
}

.theme-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.admin-panel {
    display: none;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
    margin-bottom: 15px;
}

.admin-panel.active {
    display: block;
}

.admin-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2rem;
}

/* 横幅轮播样式 */
.banner-container {
    max-width: 80%;
    margin: 10px auto 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 80vh;
}

.slider-banner {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.slide-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background-color: #000;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    text-align: center;
    pointer-events: none;
}

.slide-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.slide-description {
    font-size: 1rem;
    opacity: 0.9;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-btn {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s;
    z-index: 15;
}

.slider-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 15;
}

.slider-dot.active {
    background-color: white;
}

/* 水印样式 */
.image-watermark, .video-watermark, .fullscreen-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* 颜色图片水印 */
.color-image-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* 横幅管理样式 */
.banner-management-form {
    background-color: rgba(0, 0, 0, .05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.banner-management-form h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.banner-management-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.banner-management-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.banner-management-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: background-color .2s;
}

.banner-management-item:hover {
    background-color: rgba(0, 0, 0, .05);
}

.banner-management-item:last-child {
    border-bottom: none;
}

.banner-management-preview {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    background-color: rgba(0, 0, 0, .05);
    flex-shrink: 0;
}

.banner-management-details {
    flex: 1;
    margin-left: 15px;
}

.banner-management-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.banner-management-url {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 5px;
    word-break: break-all;
}

.banner-management-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(0, 0, 0, .1);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: .75rem;
    margin-right: 10px;
}

.banner-management-actions {
    display: flex;
    gap: 5px;
}

.banner-move-btn {
    background-color: rgba(0, 0, 0, .1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}

.banner-move-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.banner-move-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.banner-move-btn:disabled:hover {
    background-color: rgba(0, 0, 0, .1);
    color: inherit;
}

.search-container {
    padding: 8px 0;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    box-shadow: none;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 900px;
    margin-bottom: 10px;
}

.search-input {
    flex-grow: 1;
    padding: 20px 25px;
    border: 2px solid var(--border-color);
    border-radius: 12px 0 0 12px;
    font-size: 18px;
    transition: border-color .3s, box-shadow .3s;
    background-color: var(--card-bg);
    color: var(--text-color);
    height: 60px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, .2);
}

.search-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 40px;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: background-color .3s;
    height: 60px;
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

.categories {
    margin-bottom: 6px;
    position: relative;
}
.categories::before,
.categories::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s;
}
.categories::before {
    left: 0;
    background: linear-gradient(to left, transparent, var(--bg-color));
    opacity: var(--show-left, 0);
}
.categories::after {
    right: 0;
    background: linear-gradient(to right, transparent, var(--bg-color));
    opacity: var(--show-right, 1);
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    padding-bottom: 5px;
    border-bottom: 2px solid var(--border-color);
}

.category-list {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-card {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.4s ease;
}

.category-card:hover {
    background: #fff;
    border-color: var(--primary-color);
}

.category-card:hover .category-name,
.category-card:hover .category-count {
    color: var(--primary-color);
}

/* Red theme: hover text = dusty rose */
body.theme-red .category-card:hover {
    background: #fff !important;
    border-color: #C67C85 !important;
}
body.theme-red .category-card:hover .category-name,
body.theme-red .category-card:hover .category-count {
    color: #C67C85 !important;
}

/* White theme: hover text = red */
body.theme-white .category-card:hover {
    background: #fff !important;
    border-color: #ff0000 !important;
}
body.theme-white .category-card:hover .category-name,
body.theme-white .category-card:hover .category-count {
    color: #ff0000 !important;
}

/* Black theme: hover text = white on dark bg */
body.theme-black .category-card:hover {
    background: #333 !important;
    border-color: var(--primary-color) !important;
}
body.theme-black .category-card:hover .category-name,
body.theme-black .category-card:hover .category-count {
    color: #fff !important;
}

.category-card.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.category-card.active .category-name,
.category-card.active .category-count {
    color: #fff;
}

.category-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
}

.category-count {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.6;
}

.category-card .category-icon {
    width: 1.2rem;
    height: 1.2rem;
    object-fit: contain;
    font-size: 1rem;
    flex-shrink: 0;
}

.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 20px;
    margin-bottom: 35px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Softer shadow */
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);

    /* Animation Initial State */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

.product-card.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    color: #666;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    color: #EF4444;
}

.wishlist-btn.active {
    color: #EF4444;
}

/* Modal wishlist button — mirrors .wishlist-btn */
.wishlist-btn-modal {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.wishlist-btn-modal:hover {
    transform: scale(1.1);
    color: #EF4444;
}

.wishlist-btn-modal.active {
    color: #EF4444;
}

/* Trust Bar Styling */
.trust-bar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.trust-separator {
    color: var(--primary-color);
    font-weight: bold;
}

/* Reviews Section */
.reviews-section {
    padding: 15px 0;
    background-color: var(--bg-color);
}

/* Product Badge: Set (Task 1) */
.set-badge {
    background: linear-gradient(135deg, #FFB74D 0%, #F57C00 100%);
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 3px;
}


.product-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: var(--placeholder-bg, linear-gradient(135deg, #f5f0eb 0%, #e8e0d8 100%));
    background-size: cover;
    background-position: center;
}

.product-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    z-index: 2;
    pointer-events: none;
}

.product-card:hover .product-image-container::after {
    background: rgba(0,0,0,0.06);
}

.product-image-container::before {
    content: 'KK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--placeholder-text, rgba(198,124,133,0.15));
    z-index: 0;
    letter-spacing: 0.2em;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    cursor: pointer;
    z-index: 1;
}

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

.product-details {
    padding: 12px 15px; /* Reduced padding (Task 1) */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 2px;
    color: var(--primary-color);
    line-height: 1.3;
}

.product-qrcode-trigger img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
}

.product-description {
    color: var(--text-color);
    opacity: .8;
    margin-bottom: 4px;
    flex-grow: 1;
    font-size: .85rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* K-code和多颜色显示样式 */
.product-kcode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #999;
    margin-bottom: 4px;
    padding: 2px 0;
}

.product-kcode {
    display: flex;
    align-items: center;
    gap: 5px;
}

.multi-color-badge {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-price-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Reduced margin */
    gap: 8px;
    flex-wrap: wrap;
}

.price-with-discount {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-color);
    opacity: .6;
    font-size: .85rem; /* Reduced size */
}

.current-price {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.discount-badge-price {
    background-color: var(--admin-color);
    color: #fff;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: .75rem;
    display: inline-block;
    font-weight: 600;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    padding: 8px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(0.65rem, 2vw, 0.8rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.btn-view-details {
    background-color: rgba(0, 0, 0, .05);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 8px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(0.65rem, 2vw, 0.8rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-view-details:hover {
    background-color: rgba(0, 0, 0, .1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100vh;
    background-color: var(--card-bg);
    box-shadow: -8px 0 30px rgba(0, 0, 0, .15);
    z-index: 1050;
    transition: right .4s cubic-bezier(.25, .46, .45, .94);
    display: flex;
    flex-direction: column;
    padding: 0;
    overscroll-behavior: contain;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

.cart-overlay.active {
    display: block;
    animation: fadeIn .3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--header-bg);
    color: #fff;
}

.cart-title {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-title i {
    color: #ffd700;
}

.cart-count-header {
    background-color: #ffd700;
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: .8rem;
    font-weight: bold;
}

.close-cart {
    background: rgba(255, 255, 255, .2);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .3s;
}

.close-cart:hover {
    background: rgba(255, 255, 255, .3);
}

.close-cart:hover span {
    display: inline-block;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.cart-body {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cart-items {
    flex-grow: 1;
    min-height: 200px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    animation: slideInCart .3s ease-out;
}

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

.cart-item-image {
    width: 100px;
    height: 75px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 15px;
    background-color: rgba(0, 0, 0, .05);
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; 
    -webkit-box-orient: vertical;
}

.cart-item-price {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.cart-item-quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, .05);
    flex-shrink: 0;
    min-width: 112px;
}

.qty-btn {
    background-color: var(--card-bg);
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-color);
    transition: all .2s;
}

.qty-btn:hover {
    background-color: rgba(0, 0, 0, .1);
}

.qty-btn.decrease {
    border-right: 1px solid var(--border-color);
}

.qty-btn.increase {
    border-left: 1px solid var(--border-color);
}

.quantity-display {
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    font-size: 1rem;
}

.cart-item-total {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-left: auto;
    white-space: nowrap;
    padding-left: 10px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--admin-color);
    cursor: pointer;
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color .2s;
    margin-left: 10px;
}

.cart-item-remove:hover {
    background-color: rgba(220, 53, 69, .1);
}

.cart-footer {
    background-color: rgba(0, 0, 0, .05);
    padding: 25px;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
}

.cart-summary {
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: .95rem;
}

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

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-checkout {
    background: linear-gradient(135deg, var(--whatsapp-color) 0%, #1da851 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    transition: all .3s;
}

.cart-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, .3);
}

.cart-checkout:active {
    transform: translateY(-1px);
}

.cart-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-color);
    opacity: .7;
}

.cart-empty-icon {
    font-size: 4rem;
    color: var(--text-color);
    margin-bottom: 20px;
    opacity: .3;
}

.cart-empty-text {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.cart-empty-subtext {
    font-size: .9rem;
    opacity: .7;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .7);
    z-index: 1100;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
    overscroll-behavior: contain;
}

.modal.active {
    display: flex;
    animation: modalFadeIn .3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.modal-content {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn .4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    background: var(--header-bg);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: rgba(255, 255, 255, .2);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .3);
}

.modal-close:hover span {
    display: inline-block;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-modal-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.product-modal-image-wrapper {
    position: relative;
    overflow: visible;
    border-radius: 8px;
    margin-bottom: 20px;
    aspect-ratio: 16 / 9;
    background: var(--bg-color);
}

.zoom-container {
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

.zoom-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    display: block;
    border-radius: 8px;
    cursor: zoom-in;
    z-index: 1;
    background: var(--bg-color);
}

.zoom-toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zoom-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
}

.zoom-toggle-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Clickable Interactivity & Hover Effects (Task 5) */
.product-card, .btn-add-cart, .btn-details, .btn-modal-add-to-cart, .wishlist-btn, .wishlist-btn-modal, .qty-btn, .remove-btn, .cart-item-remove, .logo-img, .category-card, .slide, .zoom-toggle-btn {
    cursor: pointer !important;
}

.btn-hover-effect:hover, .btn-modal-add-to-cart:hover, .btn-add-cart:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15) !important;
}

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

.cart-item-image:hover, .bundle-items-preview img:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.category-card:hover {
    transform: translateY(-3px);
}

/* Animations */
@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.wishlist-btn.active i, .wishlist-btn-modal.active i {
    animation: pulse-red 0.5s ease-in-out;
}

.magnifier-lens {
    position: absolute;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: none;
    width: 150px;
    height: 150px;
    pointer-events: none;
    display: none;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.product-modal-image {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.product-modal-details {
    flex: 1;
    min-width: 300px;
    font-size: .9rem;
}

.product-modal-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 700;
}

.product-modal-description {
    font-size: .95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: .9;
}

/* 产品详情中的K-code和多颜色行 */
.product-modal-kcode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 20px;
    padding: 10px 0;
    border-top: 1px dashed rgba(0, 0, 0, 0.2);
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
}

.product-modal-kcode {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-modal-multi-color-badge {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-modal-price-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.product-modal-discount-badge {
    background-color: var(--admin-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: .85rem;
    display: inline-block;
    font-weight: 600;
}

.product-modal-current-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-modal-price-comparison {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.product-modal-old-price {
    text-decoration: line-through;
    color: var(--text-color);
    opacity: .6;
    font-size: 1rem;
}

.product-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.product-modal-disclaimer {
    font-size: 0.75rem;
    color: var(--text-color);
    margin-top: 24px;
    padding: 12px 16px;
    background: rgba(var(--primary-color-rgb, 198,124,133), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.product-modal-disclaimer:hover {
    background: rgba(var(--primary-color-rgb, 198,124,133), 0.08);
}

.product-modal-disclaimer i {
    font-size: 1rem;
    color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.btn-modal-add-to-cart {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .3s;
}

.btn-modal-add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .2);
}

.success-message {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--success-color);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1200;
    animation: slideInLeft .3s ease-out;
    max-width: 350px;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.success-message.fade-out {
    animation: fadeOutLeft .5s ease-out forwards;
}

.close-panel-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: background-color 0.3s;
    z-index: 10;
}

.close-panel-btn:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.theme-black .close-panel-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

@keyframes fadeOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.admin-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
    transition: all .3s;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.edit-form {
    background-color: rgba(0, 0, 0, .05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.edit-form h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: .9rem;
    transition: border-color .3s;
    background-color: var(--card-bg);
    color: var(--text-color);
    height: 36px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .1);
}

.admin-edit-buttons {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    gap: 8px;
    z-index: 10;
}

.product-card:hover .admin-edit-buttons {
    display: flex;
}

.edit-product-btn,
.delete-product-btn {
    background-color: rgba(0, 0, 0, .7);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all .3s;
}

.edit-product-btn:hover {
    background-color: #007bff;
    transform: scale(1.1);
}

.delete-product-btn:hover {
    background-color: var(--admin-color);
    transform: scale(1.1);
}

.product-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(0, 0, 0, .1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: .85rem;
    color: var(--text-color);
    margin-bottom: 12px;
}

.recommended-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ffc107 0%, #ffab00 100%);
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: .8rem;
    z-index: 5;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
}

.edit-modal-content {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.edit-modal-header {
    padding: 20px 25px;
    background: var(--header-bg);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-modal-body {
    padding: 25px;
    overflow-y: auto;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: flex-end;
}

.btn-save {
    background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all .3s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, .2);
}

.btn-cancel {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all .3s;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

.excel-import-export {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.excel-import-export h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.excel-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-excel-export,
.btn-excel-import {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    transition: all .3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-excel-import {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.btn-excel-export:hover,
.btn-excel-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.simple-share-modal {
    max-width: 500px;
}

.file-share-container {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, .05);
    border-radius: 8px;
    margin: 20px 0;
}

.file-share-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.file-share-instructions {
    background: rgba(0, 0, 0, .05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: .9rem;
    color: var(--text-color);
}

.excel-category-hint {
    background-color: rgba(0, 0, 0, .05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: .9rem;
    color: var(--text-color);
}

.excel-category-hint ul {
    margin: 10px 0 0 20px;
}

.excel-category-hint li {
    margin-bottom: 5px;
}

.sort-mode-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ffab00 100%);
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    transition: all .3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, .2);
}

.sort-mode-btn.active {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
}

.sort-save-buttons {
    display: none;
    gap: 10px;
    margin-top: 15px;
}

.sort-save-buttons.active {
    display: flex;
}

.version-info-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.version-info-form h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.version-log {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, .05);
    border-radius: 4px;
}

.version-log-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    font-size: .85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-log-item:last-child {
    border-bottom: none;
}

.version-log-content {
    flex: 1;
}

.version-log-actions {
    display: flex;
    gap: 5px;
}

.version-log-edit-btn,
.version-log-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .8rem;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all .2s;
}

.version-log-edit-btn {
    color: var(--primary-color);
}

.version-log-edit-btn:hover {
    background-color: rgba(0, 0, 0, .05);
}

.version-log-delete-btn {
    color: var(--admin-color);
}

.version-log-delete-btn:hover {
    background-color: rgba(220, 53, 69, .1);
}

.version-edit-section {
    margin-bottom: 15px;
}

.version-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.version-footer {
    text-align: center;
    padding: 15px;
    font-size: .85rem;
    color: var(--text-color);
    opacity: .7;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    background-color: rgba(0, 0, 0, .05);
}

.image-fullscreen-modal {
    background-color: rgba(0, 0, 0, .9);
    z-index: 2000;
}

.image-fullscreen-modal .modal-content {
    max-width: 95%;
    max-height: 95%;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

.image-fullscreen-modal .modal-header {
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.image-fullscreen-modal .modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-fullscreen-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* SEO: admin elements hidden by default. Only shown when:
   1. Netlify Identity confirms admin role → JS adds body.admin-mode
   2. User navigates to ?admin URL → JS adds body.admin-mode (login entry)
   This prevents Googlebot / DeepSeek / other JS-less crawlers from
   indexing admin UI text and labelling the site as a "test build". */
.admin-only,
.theme-selector-container {
    display: none !important;
}

body.admin-mode .admin-only,
body.admin-mode .theme-selector-container {
    display: block !important;
}

/* Some admin-only elements need different display values; restore them */
body.admin-mode button.admin-only,
body.admin-mode .member-dropdown-item.admin-only {
    display: flex !important;
}

body.admin-mode .modal.admin-only {
    display: none !important; /* modals stay hidden until openX() adds .active */
}

body.admin-mode .modal.admin-only.active {
    display: flex !important;
}

.admin-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-controls-column {
    flex: 1;
    min-width: 300px;
}

.admin-controls-column .admin-actions {
    margin-top: 0;
}

.sort-inventory-container {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.sort-inventory-container.active {
    display: block;
}

.inventory-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 15px;
}

.inventory-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: background-color .2s;
}

.inventory-item:hover {
    background-color: rgba(0, 0, 0, .05);
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-item.dragging {
    opacity: .5;
    background-color: rgba(0, 0, 0, .1);
}

.inventory-index {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 30px;
    text-align: center;
}

.inventory-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    margin: 0 10px;
    background-color: rgba(0, 0, 0, .05);
}

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

.inventory-kcode {
    font-weight: 600;
    color: var(--primary-color);
    font-size: .9rem;
    margin-bottom: 3px;
}

.inventory-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-category {
    font-size: .8rem;
    color: var(--text-color);
    opacity: .8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.inventory-price {
    font-weight: 700;
    color: var(--success-color);
    margin-left: 15px;
    min-width: 100px;
    text-align: right;
}

.inventory-actions {
    display: flex;
    gap: 5px;
    margin-left: 15px;
}

.inventory-move-btn {
    background-color: #444 !important; /* Light Black (Req 4) */
    color: #fff !important;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}

.inventory-move-btn:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.inventory-move-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.inventory-move-btn:disabled:hover {
    background-color: rgba(0, 0, 0, .1);
    color: inherit;
}

.categories-management-form {
    background-color: rgba(0, 0, 0, .05);
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.categories-management-form h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.category-management-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.category-management-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: background-color .2s;
}

.category-management-item:hover {
    background-color: rgba(0, 0, 0, .05);
}

.category-management-item:last-child {
    border-bottom: none;
}

.category-management-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.category-management-details {
    flex: 1;
    margin-left: 15px;
}

.category-management-id {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.category-management-name {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-management-name-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.category-management-name-item label {
    font-size: .8rem;
    opacity: .7;
    margin-bottom: 3px;
}

.category-management-name-item input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: .9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.category-management-icon-select {
    margin-left: 15px;
    min-width: 220px;
}

.category-management-icon-select label {
    display: block;
    font-size: .8rem;
    opacity: .7;
    margin-bottom: 3px;
}

.category-management-icon-select select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: .9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.category-management-image-input {
    margin-left: 15px;
    min-width: 250px;
}

.category-management-image-input label {
    display: block;
    font-size: .8rem;
    opacity: .7;
    margin-bottom: 3px;
}

.category-management-image-input input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: .9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.category-management-image-input small {
    display: block;
    margin-top: 5px;
    font-size: .75rem;
    color: var(--text-color);
    opacity: .7;
}

/* 颜色图片容器样式 */
.color-images-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.color-images-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.color-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.color-image-item {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    background-color: rgba(0, 0, 0, .05);
}

.color-image-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.color-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    position: relative;
}

@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 6px;
    }
    .logo-img {
        height: 70px;
    }
    .banner-container {
        height: auto;
    }
    .products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    .cart-sidebar {
        width: 380px;
    }
    .product-modal-content {
        flex-direction: column;
    }
    .product-modal-image {
        max-width: 100%;
    }
    .admin-controls-row {
        flex-direction: column;
    }
    .inventory-item {
        flex-wrap: wrap;
        padding: 15px;
    }
    .inventory-price {
        margin-left: 0;
        margin-top: 10px;
        text-align: left;
        min-width: auto;
        width: 100%;
    }
    .inventory-actions {
        margin-left: auto;
        margin-top: 10px;
    }
    .category-management-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .category-management-details {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    .category-management-name {
        flex-direction: column;
        gap: 10px;
    }
    .category-management-icon-select,
    .category-management-image-input {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    .banner-management-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .banner-management-preview {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
        height: 150px;
    }
    .banner-management-details {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    .banner-management-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    .content-wrapper {
        grid-template-columns: 220px 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .banner-container {
        height: auto;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    .category-list {
        padding: 6px 12px;
    }
    .category-card {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    .theme-selector-container {
        bottom: 10px;
        right: 10px;
    }
    .theme-selector-panel {
        right: 0;
        bottom: 60px;
    }
    .search-box {
        max-width: 100%;
    }
    .search-input {
        padding: 15px 20px;
        height: 55px;
        font-size: 16px;
    }
    .search-btn {
        padding: 0 30px;
        height: 55px;
        font-size: 16px;
    }
    .product-modal-details {
        font-size: .85rem;
    }
    .product-modal-name {
        font-size: 1.3rem;
    }
    .inventory-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .inventory-thumbnail {
        margin: 0 0 10px 0;
        width: 100px;
        height: 75px;
    }
    .inventory-details {
        width: 100%;
    }
    .inventory-price {
        margin-top: 10px;
        width: 100%;
        text-align: left;
    }
    .inventory-actions {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    .content-wrapper {
        display: block;
    }

    .products-area {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .banner-container {
        height: auto;
    }
    .cart-sidebar {
        padding: 0;
    }
    .cart-header {
        padding: 15px 20px;
    }
    .cart-body {
        padding: 20px;
    }
    .cart-footer {
        padding: 20px;
    }
    .cart-item {
        flex-wrap: wrap;
    }
    .cart-item-image {
        width: 80px;
        height: 60px;
    }
    .cart-item-details {
        width: calc(100% - 100px);
    }
    .cart-item-quantity-controls {
        justify-content: space-between;
        width: 100%;
        margin-top: 10px;
    }
    .cart-item-remove {
        position: absolute;
        top: 15px;
        right: 0;
    }
    .success-message {
        max-width: 90%;
        left: 5%;
        right: 5%;
        text-align: center;
    }
    .logo-img {
        height: 55px;
    }
    .member-dropdown-content {
        min-width: 140px;
        right: -10px;
    }
    .controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    .language-switcher {
        order: 0;
        margin-bottom: 5px;
    }
    .user-actions {
        order: 1;
    }
    .theme-selector-panel {
        min-width: 130px;
        padding: 10px;
    }
    .theme-option {
        font-size: .8rem;
        padding: 6px 8px;
    }
    .search-input {
        padding: 12px 15px;
        height: 50px;
        font-size: 14px;
    }
    .search-btn {
        padding: 0 20px;
        height: 50px;
        font-size: 14px;
    }
    .product-modal-details {
        font-size: .8rem;
    }
    .product-modal-name {
        font-size: 1.2rem;
    }
    .inventory-thumbnail {
        width: 80px;
        height: 60px;
    }
    .pagination-container {
        gap: 5px;
    }
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .page-input {
        width: 50px;
        height: 32px;
    }
    .page-go-btn {
        height: 32px;
        padding: 0 8px;
        font-size: 0.9rem;
    }
}

.no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color);
    font-size: 1.1rem;
    opacity: .7;
}



.online-mode {
    background-color: #f5f7fa !important;
}

.online-mode.theme-black {
    background-color: #1a1a1a !important;
}

/* Footer Styles */
.main-footer {
    background: var(--header-bg); /* Use header gradient for consistency */
    color: #fff;
    padding: 5px 0 2px; /* Reduced padding (Task 2) */
    margin-top: 10px; /* Reduced margin (Task 2) */
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 5px; /* Reduced gap (Task 2) */
}

.footer-column {
    min-width: 150px;
}

.footer-column h4 {
    margin-bottom: 5px; /* Reduced margin (Task 2) */
    font-size: 0.9rem; /* Slightly smaller font */
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 2px; /* Reduced padding */
    display: inline-block;
}

.footer-links {
    list-style: none;
    line-height: 1.8; /* Increased line height (Task 1) */
}

.footer-links li {
    margin-bottom: 5px; /* Increased margin (Task 1) */
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

/* Chat UI */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    margin-bottom: 10px;
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
}

.chat-message.bot .chat-bubble {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 5px;
}

.chat-message.user .chat-bubble {
    background-color: var(--primary-color);
    color: #fff;
    border-bottom-right-radius: 5px;
}
/* Ensure product modal is above AI chat modal */
#product-modal {
    z-index: 1200;
}

/* Cart Item Price Styles */
.cart-item-price-container {
    margin-bottom: 4px;
}

.cart-item-discount-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}

.cart-item-old-price {
    font-size: 0.7rem;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

/* Sort Inventory Button Styles */
.sort-inventory-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    color: #333;
}

.theme-black .sort-inventory-btn {
    background: #444 !important; /* Light Black */
    color: #fff !important;
    border-color: #555 !important;
}

#banner-section {
    padding-top: 5px;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(0, 0, 0, 0.05);
}

.page-search-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    white-space: nowrap;
}

.page-input {
    width: 60px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    font-size: 0.9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.page-go-btn {
    height: 36px;
    padding: 0 12px;
    border: none;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.page-go-btn:hover {
    opacity: 0.9;
}

/* Responsive Pagination */
@media (max-width: 480px) {
    .pagination-container {
        gap: 5px;
    }
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .page-input {
        width: 50px;
        height: 32px;
    }
    .page-go-btn {
        height: 32px;
        padding: 0 8px;
        font-size: 0.9rem;
    }
}

/* Sidebar Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr; /* Reduced sidebar width */
    gap: 20px; /* Reduced gap */
    align-items: start;
}

.filter-sidebar {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px; /* Reduced padding */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px; /* Adjust based on header height */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

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

.sidebar-header h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.mobile-filter-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-filter-btn {
    display: none;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 8px;
}

.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

.filter-overlay.show {
    display: block;
}

.filter-group {
    margin-bottom: 15px; /* Reduced margin */
}

.filter-group h4 {
    font-size: 0.95rem;
    margin-bottom: 10px; /* Reduced margin */
    color: var(--text-color);
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: color 0.2s;
}

.filter-checkbox-label:hover {
    color: var(--primary-color);
}

.filter-checkbox-label input[type="radio"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* Sidebar Category Dropdown */
.sidebar-category-dropdown {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.dropdown-header {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-list {
    display: none; /* Toggled via JS */
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.sidebar-category-item {
    padding: 8px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-category-item:last-child {
    border-bottom: none;
}

.sidebar-category-item:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.sidebar-category-item.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Dual Slider Styles */
.dual-range-wrapper input[type=range] {
    -webkit-appearance: none;
    pointer-events: none;
    background: transparent;
    outline: none; /* Remove outline */
    height: 30px; /* Increase hit area of the track container */
}

/* Ensure thumb catches events */
.dual-range-wrapper input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto; /* Vital for click-through */
    width: 22px; /* Reverted to smaller size (User Req) */
    height: 22px; /* Reverted to smaller size (User Req) */
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* Stronger shadow */
    margin-top: -9px; /* Adjusted center alignment */
    position: relative;
    z-index: 100; /* Ensure high z-index to be clickable */
}

.dual-range-wrapper input[type=range]::-moz-range-thumb {
    pointer-events: auto;
    width: 22px; /* Reverted to smaller size (User Req) */
    height: 22px; /* Reverted to smaller size (User Req) */
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    position: relative;
    z-index: 100; /* Ensure high z-index to be clickable */
}

.range-slider-wrapper input[type="range"] {
    accent-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(3, 1fr); /* Keep 3 if possible */
    }
}

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 200px 1fr;
        gap: 15px;
    }
    .products {
        grid-template-columns: repeat(2, 1fr); /* Drop to 2 on tablets */
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        display: block;
    }

    .filter-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-height: 75vh;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
        overflow-y: auto;
        background: var(--card-bg);
        padding: 20px;
        margin-bottom: 0;
    }

    /* Drag Handle for Bottom Sheet */
    .filter-sidebar::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(var(--text-color-rgb, 0,0,0), 0.1);
        border-radius: 2px;
    }

    .filter-sidebar.show {
        transform: translateY(0);
    }

    .filter-overlay {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .filter-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-filter-close {
        display: block;
    }

    .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .products-area {
        width: 100%;
    }
    .products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
/* Description Line Styling */
.desc-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.desc-line i {
    color: var(--primary-color);
    margin-top: 3px; /* Align with first line of text */
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* 3D Design Styles */
.btn-tool-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #555;
}

.btn-tool-icon:hover {
    background: #f0f0f0;
    border-color: #ccc;
    color: var(--primary-color);
}

.btn-tool-icon.active {
    background: #e0e0e0;
    border-color: #bbb;
    color: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Updated View Buttons for Transparency (Task 3) */
.view-btn {
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    background: transparent; /* Transparent background */
    color: #333;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(0,0,0,0.05);
}

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

.modal-fullscreen-btn {
    background: transparent; /* Transparent background */
    border: none;
    color: #333;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.modal-fullscreen-btn:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.room-preset-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.room-preset-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 3D Design Texture Styles */
.texture-item {
    width: 40px;
    height: 40px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.2s;
    background-color: #eee;
    flex-shrink: 0;
}

.texture-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    z-index: 10;
}

/* 3D Design Modal Layout */
.design-modal-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-height: 0;
    position: relative; /* Ensure positioning context */
}

.design-sidebar {
    width: 300px;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: margin-left 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
    overflow-y: auto !important;
}

.design-sidebar-toggle-btn {
    display: block !important;
    position: absolute;
    left: 300px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: white;
    border: 1px solid #ddd;
    padding: 20px 5px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.design-canvas-container {
    flex: 1;
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
    height: 100%;
    min-width: 0; /* Important for flex container scaling */
}

/* 3D Info Overlay */
#3d-info-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    user-select: none;
    z-index: 5;
}

/* Texture Items */
.texture-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Furniture List Items (Specific styling for 2D thumbnails) */
.model-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
    margin-bottom: 5px;
}

.model-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.model-icon {
    width: 60px; /* Slightly larger for 2D line art */
    height: 60px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

.model-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%); /* Make it look like line art if it's colored */
}

.model-info {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.model-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-code {
    font-size: 0.75rem;
    color: #888;
}

.model-dims {
    font-size: 0.7rem;
    color: #666;
    margin-top: 2px;
}

/* Rulers */
#ruler-x, #ruler-y {
    background: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    display: none; /* Hidden by default, toggled by JS */
}

/* Tool Visibility */
.tool-hidden {
    display: none !important;
}

/* Review Modal Styles */
.star-rating {
    display: flex;
    gap: 5px;
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
}

.star-rating .star.active {
    color: #ffd700;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.review-tag {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--card-bg);
    transition: all 0.2s;
    user-select: none;
}

.review-tag:hover {
    border-color: var(--primary-color);
}

.review-tag.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.platform-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.platform-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.platform-btn:hover {
    transform: translateY(-2px);
}

.platform-btn.google {
    background: #4285F4;
}

.platform-btn.facebook {
    background: #1877F2;
}

.theme-white .review-tag {
    color: #333;
}

.theme-black .review-tag {
    color: #fff;
    border-color: #444;
}

.theme-black .star-rating .star {
    color: #444;
}

.theme-black .star-rating .star.active {
    color: #ffd700;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    padding: 8px 15px;
    margin-bottom: 10px;
}
.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}
.breadcrumb-list li::after {
    content: '>';
    margin-left: 6px;
    opacity: 0.5;
}
.breadcrumb-list li:last-child::after {
    content: '';
}
.breadcrumb-list li a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumb-list li a:hover {
    text-decoration: underline;
}

/* Dream Space Mobile Responsive */
@media (max-width: 768px) {
    #design-3d-modal > .modal-content {
        max-width: 100vw !important;
        width: 100vw;
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0;
        margin: 0;
    }
    #design-3d-modal .modal-header {
        padding: 8px 12px;
        gap: 6px;
        flex-wrap: wrap;
    }
    #design-3d-modal .modal-header h3 {
        font-size: 0.9rem;
    }
    #design-3d-modal .view-controls {
        margin-left: 0 !important;
        gap: 4px !important;
    }
    #design-3d-modal .view-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    .design-modal-body {
        flex-direction: column;
        position: relative;
    }
    .design-sidebar {
        position: absolute;
        left: 0; top: 0; bottom: 0;
        z-index: 100;
        width: 260px;
        margin-left: -260px !important;
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
        background: #f9f9f9;
    }
    .design-sidebar-toggle-btn {
        left: 0 !important;
        padding: 14px 6px;
    }
    .design-sidebar[style*="margin-left: 0"] ~ .design-sidebar-toggle-btn,
    .design-sidebar[style*="margin-left:0"] ~ .design-sidebar-toggle-btn {
        left: 260px !important;
    }
    .btn-tool-icon {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    #room-settings-panel input,
    #room-settings-panel select,
    #quick-define-container input {
        font-size: 0.8rem;
        padding: 4px 6px;
    }
    .model-item {
        padding: 8px;
        gap: 8px;
    }
    .model-icon {
        width: 48px;
        height: 48px;
    }
    .model-name {
        font-size: 0.8rem;
    }
    #3d-info-overlay {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    #object-controls {
        bottom: 8px;
        right: 8px;
        font-size: 0.75rem;
    }
    #object-controls button {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}
@media (max-width: 480px) {
    #design-3d-modal .view-controls {
        width: 100%;
        justify-content: center;
    }
    .design-sidebar {
        width: 220px;
        margin-left: -220px !important;
    }
}

/* 放大镜按钮 (Task 5) */
.magnifier-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.2rem;
}

.magnifier-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px var(--primary-color);
    transform: scale(1.1);
}

.magnifier-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.15);
}

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

/* Modal zoom active state */
.zoom-container.magnifier-active .zoom-image {
    cursor: zoom-in !important;
}

.product-modal-image-wrapper {
    position: relative;
    overflow: visible;
    border-radius: 12px;
    background: #f5f5f5;
}
