/* ==========================================================================
   Peças TI - Premium Glassmorphic Dark Theme Styling
   ========================================================================== */

/* Design System / Variables */
:root {
    --bg-main: #0a0e1a;
    --bg-surface: rgba(17, 24, 43, 0.65);
    --bg-surface-hover: rgba(28, 38, 68, 0.85);
    --bg-input: rgba(15, 22, 42, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(16, 185, 129, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --accent-color: #10b981;
    --accent-cyan: #06b6d4;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 8px;
    
    /* Theme Specific Variables */
    --bg-modal: rgba(13, 19, 36, 0.95);
    --bg-header: rgba(10, 14, 26, 0.8);
    --bg-footer: #05070d;
    --theme-btn-bg: rgba(255, 255, 255, 0.05);
    --theme-btn-color: #f8fafc;
}

/* Light Theme Variables */
body.light-theme {
    --bg-main: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-surface-hover: rgba(255, 255, 255, 1);
    --bg-input: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-hover: rgba(16, 185, 129, 0.6);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.08);
    
    --bg-modal: rgba(255, 255, 255, 0.98);
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-footer: #e2e8f0;
    --theme-btn-bg: rgba(15, 23, 42, 0.05);
    --theme-btn-color: #0f172a;
}
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Base Styles & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Accent Typography */
.accent-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* General Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #042f2e;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    padding: 10px 16px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Header / Navigation */
.main-header {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    font-size: 28px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.logo-text h1, .logo-text h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: var(--text-primary);
}

.logo-text .accent-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 2px;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.hero-content h2 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

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

/* Circuits Display Graphic (Hero right) */
.hero-image-container {
    position: relative;
}

.circuit-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0) 70%);
    filter: blur(30px);
    z-index: -1;
    pointer-events: none;
}

.circuit-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.circuit-header {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.circuit-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.circuit-header .dot.red { background-color: #ef4444; }
.circuit-header .dot.yellow { background-color: #eab308; }
.circuit-header .dot.green { background-color: #22c55e; }

.code-line {
    margin-bottom: 6px;
    white-space: nowrap;
}
.code-line-indent {
    margin-left: 20px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.c-purple { color: #c084fc; }
.c-blue { color: #60a5fa; }
.c-green { color: #34d399; }
.c-gray { color: #64748b; }

/* Filter & Search Bar Card */
.search-filter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
    position: relative;
    z-index: 105; /* Establish stacking context above nav-menu-bar (z-index 100) */
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 1010; /* Establish z-index stack on search box to clear navigation header siblings */
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-muted);
    font-size: 18px;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 54px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.clear-btn {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: none;
}
.clear-btn:hover {
    color: var(--text-primary);
}

.filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.filters-row.single-filter {
    grid-template-columns: 1fr;
    max-width: 300px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group select {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Category Tabs (Horizontally Scrollable) */
.category-tabs-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px;
    width: 100%;
    scrollbar-width: none; /* Firefox */
}

.category-tabs::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: #042f2e;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nav-scroll-btn {
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}
.nav-scroll-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.nav-scroll-btn.left { left: -18px; }
.nav-scroll-btn.right { right: -18px; }

/* Grid Header & Badges */
.products-grid-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

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

.active-filters-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 30px;
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 500;
}

.badge .remove-badge {
    cursor: pointer;
    font-size: 10px;
}
.badge .remove-badge:hover {
    color: var(--text-primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
    min-height: 400px;
}

/* Glassmorphic Product Card */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-6px);
    background: var(--bg-surface-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.product-card:hover::before {
    opacity: 1;
}

/* Supplier Badges */
.card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    z-index: 2;
}

.supplier-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.supplier-badge.ciapc {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.supplier-badge.neide {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.category-tag {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Product Image Area */
.product-image-wrapper {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.product-card:hover .product-image-wrapper {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.product-image-wrapper img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: var(--transition-normal);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}

.light-theme .product-image-wrapper img {
    mix-blend-mode: multiply;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.06);
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.18)) contrast(1.02) brightness(1.01);
}

/* Branded image watermark tag */
.image-brand-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.75;
    transition: var(--transition-fast);
}

.product-card:hover .image-brand-badge {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Subtle inner border glow effect instead of watermarks */
.product-image-wrapper {
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02);
}
.product-card:hover .product-image-wrapper {
    box-shadow: inset 0 0 14px rgba(16, 185, 129, 0.12);
}



/* Product Details */
.product-info-block {
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px; /* Ensure alignment */
}

/* Pricing Layout */
.price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selling-price {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.original-price-label {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 4px;
}
.original-price-label span {
    text-decoration: line-through;
}

/* WhatsApp action button */
.whatsapp-btn {
    background: #25d366;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
    border: none;
    text-decoration: none;
}

.whatsapp-btn:hover {
    background: #20ba56;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

/* Admin Sidebar Drawer Panel */
.admin-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100%;
    background: var(--bg-modal);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-normal);
}

.admin-drawer.open {
    right: 0;
}

.drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px 32px 48px 32px; /* Bottom padding increased to 48px to keep buttons safe from taskbar/browser chrome overlap */
    box-sizing: border-box;
}

.drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 4px;
}

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

.drawer-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 0.5;
}
.close-btn:hover {
    color: var(--text-primary);
}

.drawer-intro {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Styled HTML5 Range Input */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #1e293b;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transition: var(--transition-fast);
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.number-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.number-input-group input[type="number"],
.form-group input[type="text"] {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
}

.number-input-group input[type="number"] {
    width: 60px;
    text-align: center;
}

.form-group input[type="text"] {
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.help-text {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

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

.drawer-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Drawer overlay backdrop */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(16, 185, 129, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination Section */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* Footer Section */
.main-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-area {
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

.footer-contact p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-whatsapp {
    color: #25d366;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    .hero-content h2 {
        font-size: 32px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .filters-row {
        grid-template-columns: 1fr;
    }
    .admin-drawer {
        width: 100%;
        right: -100%;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==========================================================================
   Shopping Cart (Carrinho) Elements
   ========================================================================== */

/* Floating Cart Trigger Button */
.cart-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: #042f2e;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    z-index: 998;
    transition: var(--transition-normal);
    animation: cart-bounce 3s ease-in-out infinite;
}

.cart-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
    filter: brightness(1.1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
    box-shadow: var(--shadow-sm);
}

@keyframes cart-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Cart Drawer (Shares layout with Admin Drawer) */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100dvh; /* Dynamic viewport height to account for taskbars and browser UI */
    background: var(--bg-modal);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-normal);
}

.cart-drawer.open {
    right: 0;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cart Items cards */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition-fast);
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Quantity controls in cart */
.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.qty-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.qty-num {
    width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-fast);
    padding: 4px;
}
.cart-item-remove:hover {
    color: #ef4444;
}

/* Cart Summary & Footer */
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cart-summary-row.total-row {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
    margin-bottom: 20px;
}

.cart-summary-row.total-row span:last-child {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Empty Cart State inside Drawer */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.cart-empty-state i {
    font-size: 40px;
    margin-bottom: 16px;
}

.cart-empty-state p {
    font-size: 14px;
}


/* ==========================================================================
   Product Detail Modal Elements
   ========================================================================== */

.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1010;
    display: none;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
    overflow-y: auto;
    padding: 60px 0 120px 0; /* Bottom padding increased to 120px to allow scrolling buttons above taskbars */
}

/* Premium scrollbar for the modal overlay */
.detail-modal::-webkit-scrollbar {
    width: 8px;
}
.detail-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.detail-modal::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
}
.detail-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

.detail-modal.open {
    display: flex;
    opacity: 1;
}

.modal-card {
    position: relative;
    width: 90%;
    max-width: 860px;
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 80px; /* Safe margin bottom to prevent overlap with Windows taskbar or browser UI */
    box-shadow: var(--shadow-lg);
    transform: translateY(30px);
    transition: transform var(--transition-normal);
}

.detail-modal.open .modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 36px;
    line-height: 0.5;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}
.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
}

.modal-image-area {
    width: 100%;
    height: 320px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.modal-info-area {
    display: flex;
    flex-direction: column;
}

.modal-info-area .category-tag {
    align-self: flex-start;
    margin-bottom: 12px;
}

.modal-info-area h3 {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal-price-box {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.price-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.modal-info-area .selling-price {
    font-size: 28px;
    color: var(--text-primary);
}

.modal-features {
    margin-bottom: 28px;
}

.modal-features h4 {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.modal-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-features li {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 16px;
}

.modal-actions .btn {
    flex: 1;
}

/* Adjust card action elements styling */
.product-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.product-card-actions .btn {
    flex: 1;
}

.btn-detail {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 12px;
    width: 44px;
    flex-shrink: 0 !important;
    flex: none !important;
}
.btn-detail:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .modal-image-area {
        height: 200px;
    }
    .modal-card {
        padding: 30px 20px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* CEP Calculator inside Cart Drawer */
.cart-cep-container {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.cart-cep-container label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cep-field-group {
    display: flex;
    gap: 8px;
}

.cep-field-group input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-fast);
}

.cep-field-group input:focus {
    border-color: var(--accent-cyan);
    outline: none;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.2);
}

.cep-field-group button {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cep-result-msg {
    font-size: 12px;
    margin-top: 4px;
    border-radius: 4px;
    padding: 6px 10px;
    line-height: 1.4;
}

.cep-result-msg.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.cep-result-msg.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ==========================================================================
   Navigation Dropdown Menu Bar Elements
   ========================================================================== */

.nav-menu-bar {
    width: 100%;
    background: linear-gradient(to right, #2c6e26 0%, #151817 20%, #0d0f0e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    padding: 0 16px;
    z-index: 100;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.nav-menu-list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    min-height: 52px;
}

.nav-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px 0;
}

.nav-menu-link {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-menu-link i {
    font-size: 14px;
}

.nav-menu-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-menu-link.active {
    color: #ffffff;
    background: rgba(44, 110, 38, 0.25);
    border: 1px solid rgba(44, 110, 38, 0.4);
}

/* Arrow icon in dropdown items */
.nav-menu-link .arrow-icon {
    font-size: 10px;
    margin-left: 2px;
    transition: transform var(--transition-fast);
}

.nav-menu-item.dropdown:hover .arrow-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu Card */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 220px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-menu-item.dropdown:hover .dropdown-menu {
    display: block;
    animation: dropdown-fade-in 0.2s ease forwards;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-fast);
    text-align: left;
}

.dropdown-item:hover {
    color: #ffffff;
    background: rgba(44, 110, 38, 0.2);
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustment for top menu bar */
@media (max-width: 992px) {
    .nav-menu-list {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 6px 0;
    }
    
    .nav-menu-list::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-menu-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 60px; /* Prevent going out of screen boundaries on mobile */
        left: 5%;
        width: 90%;
    }
}

/* Theme Toggle & Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    background: var(--theme-btn-bg);
    border: 1px solid var(--border-color);
    color: var(--theme-btn-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: scale(1.05);
}

.whatsapp-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    height: 40px;
    padding: 0 16px;
}

/* ==========================================================================
   Hero Banner Carousel Elements
   ========================================================================== */

.hero-carousel-section {
    padding: 24px 0;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    width: calc(100% / 3);
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Slide Content */
.slide-content {
    max-width: 40%;
    z-index: 2;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
}

.slide-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 6px;
}

.slide-content h2 {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.slide-content h2 .accent-highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    line-height: 1.45;
}

.brand-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.brand-tags span {
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

.slide-btn {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    background: var(--accent-gradient);
    transition: var(--transition-fast);
}

.slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.slide-graphics {
    position: relative;
    width: 58%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.slide-graphics .giant-icon {
    font-size: 140px;
    color: rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
    animation: float-slow 4s ease-in-out infinite;
}

.slide-graphics .giant-icon.energy {
    color: rgba(245, 158, 11, 0.08);
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.fallback-graphic {
    max-width: 100%;
    max-height: 110%;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.5));
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: float-slow 5s ease-in-out infinite;
}

/* Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
    backdrop-filter: blur(5px);
}

.carousel-control:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.carousel-control.prev { left: 16px; }
.carousel-control.next { right: 16px; }

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: var(--transition-fast);
}

.carousel-indicators .indicator.active {
    width: 22px;
    border-radius: 4px;
    background: var(--accent-color);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-container {
        height: 380px;
    }
    
    .carousel-slide {
        flex-direction: column;
        justify-content: center;
        padding: 24px;
    }
    
    .slide-content {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }
    
    .brand-tags {
        justify-content: center;
    }
    
    .slide-graphics {
        display: none;
    }
}

/* ==========================================================================
   Advanced Interactivity Additions
   ========================================================================== */

/* Double filter row split */
.double-filter {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

@media (max-width: 576px) {
    .double-filter {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Clear Cart Button */
.clear-cart-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    margin-left: auto;
    margin-right: 12px;
    border: 1px solid transparent;
}

.clear-cart-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
}

/* Search suggestions container */
.search-box {
    position: relative;
}

.search-suggestions-box {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-modal) !important; /* Fully opaque theme-sensitive backdrop color */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999 !important; /* Forces suggest box over navigation elements */
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    backdrop-filter: blur(10px);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

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

.suggestion-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

.suggestion-item-img {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
    flex-shrink: 0;
}

.suggestion-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.suggestion-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item-price {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: 2px;
}

/* Cart Pop / Bounce Animation */
@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3) rotate(-8deg); }
    50% { transform: scale(0.9) rotate(5deg); }
    70% { transform: scale(1.15) rotate(-3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.cart-pop-active {
    animation: cartBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    color: var(--accent-color) !important;
}

/* Description modal styles */
.modal-description-content h3 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.modal-description-content ul {
    margin: 0 0 12px 0;
    padding-left: 16px;
    list-style-type: disc;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.modal-description-content li {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.modal-description-content p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 10px 0;
}

/* Floating WhatsApp Button */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    z-index: 998;
    transition: var(--transition-normal);
    text-decoration: none;
    animation: wa-pulse 2s infinite;
}

.whatsapp-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
    background: #059669;
    color: #ffffff;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Responsive Viewport Height Safety Adjustments (Prevents taskbar/browser chrome overlap) */
@media (max-height: 768px) {
    .detail-modal {
        padding: 20px 0 100px 0; /* Keeps 100px of bottom safety margin on smaller viewports */
    }
    .modal-card {
        padding: 20px 24px;
    }
    .modal-grid {
        gap: 20px;
    }
    .modal-image-area {
        height: 200px; /* Scale down product image to make details fit without clipping */
    }
    .modal-info-area h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .modal-price-box {
        margin-bottom: 8px;
        padding: 8px 12px;
    }
    .modal-info-area .selling-price {
        font-size: 22px;
    }
    .modal-features {
        margin-bottom: 12px;
    }
    .modal-features h4 {
        margin-bottom: 6px;
    }
    .modal-features li {
        font-size: 12px;
    }
    .modal-actions {
        gap: 10px;
    }
}

@media (max-height: 720px) {
    .drawer-content {
        padding: 20px 20px 40px 20px; /* Safe padding for short vertical screens */
    }
    .drawer-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    .drawer-body {
        margin-bottom: 10px;
    }
    .drawer-footer {
        padding-top: 12px;
    }
    .cart-cep-container {
        margin-bottom: 8px;
    }
}


