:root {
    --primary: #dd8b57;
    --primary-dark: #b86536;
    --primary-light: #f3a675;
    --accent: #1e293b;
    --bg-main: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 40px -10px rgba(221, 139, 87, 0.15), 0 10px 15px -5px rgba(221, 139, 87, 0.05);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --metallic-gradient: linear-gradient(135deg, #f3a675 0%, #dd8b57 50%, #b86536 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Background Accents */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(221, 139, 87, 0.1) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

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

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    background: var(--metallic-gradient);
    color: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(221, 139, 87, 0.3);
}

.logo h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo h1 span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 450px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(221, 139, 87, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Scale Selector */
.scale-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: 12px;
}

.toggle-group {
    display: flex;
    gap: 0.2rem;
}

.toggle-group label {
    padding: 0.5rem 1rem;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.toggle-group input:checked+label {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toggle-group input {
    display: none;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0 5rem;
}

/* Sidebar */
.sidebar-glass {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 6rem;
}

.sidebar h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.checkbox-container:hover {
    color: var(--primary-dark);
}

.checkbox-container input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.btn-modern {
    width: 100%;
    padding: 0.85rem;
    margin-top: 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.product-stats {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* Product Grid - Reverted to 3 Columns */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-glass {
        position: relative;
        top: 0;
    }
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1.5px solid #f1f5f9;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--metallic-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

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

.product-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff7ed;
    color: var(--primary-dark);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    width: fit-content;
    font-weight: 800;
}

.product-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.3;
    min-height: 2.6rem;
}

.product-image-container {
    width: 100%;
    height: 220px;
    background: #fbfcfd;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-image-container img {
    transform: scale(1.1);
}

.product-prices {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.price-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-dark);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 950px;
    width: 100%;
    padding: 3.5rem;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transform: scale(0.9) translateY(30px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f5f9;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.btn-outline {
    background: white;
    border: 1.5px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(221, 139, 87, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.comparison-table th {
    text-align: left;
    padding: 1rem;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.comparison-table th:first-child {
    border-radius: 12px 0 0 12px;
}

.comparison-table th:last-child {
    border-radius: 0 12px 12px 0;
}

.comparison-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1rem;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 1.25rem;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

/* Upload Section */
.upload-section {
    margin-top: 1.5rem;
    padding: 2rem;
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
    background: #fbfcfd;
    transition: var(--transition-smooth);
}

.upload-section:hover {
    border-color: var(--primary-light);
    background: #fffcf9;
}

.upload-label {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.btn-upload {
    width: 100%;
    background: var(--metallic-gradient);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(221, 139, 87, 0.2);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1500;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
}

.hidden {
    display: none !important;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
}

.no-results span {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
}

.no-results h2 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}