:root {
    --bg-body: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-soft: 0 4px 15px -1px rgba(0, 0, 0, 0.04);
    --shadow-float: 0 15px 35px -5px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Navigation */
.main-header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #000;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nav-item:hover,
.nav-item.active {
    color: var(--accent);
    background: var(--bg-alt);
}

.nav-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    border-radius: var(--radius-md);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    padding: 0.5rem;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-content a:hover {
    background: var(--bg-alt);
    color: var(--accent);
    padding-left: 1.25rem;
}

/* Ultra-Dense Grid (8 products per row) */
.product-grid.ultra-dense {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1.25rem;
    padding-bottom: 5rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
    border-color: var(--accent);
}

.product-image-container {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f5f9;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--transition);
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-info-compact {
    padding: 1rem;
}

.product-info-compact .tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    /* Professional Gray */
    margin-bottom: 0.25rem;
}

.product-info-compact .name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Detailed Modal Styles - Elite Premium Refinement */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    display: none;
    z-index: 2000;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    max-width: 1400px;
    width: 98%;
    display: grid;
    grid-template-columns: 550px 1fr;
    gap: 0;
    border-radius: 40px;
    box-shadow: 0 40px 100px -20px rgba(15, 23, 42, 0.2);
    position: relative;
    height: 94vh;
    max-height: 950px;
    overflow: hidden;
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-left-col {
    padding: 2.5rem;
    background: #fdfdfd;
    border-right: 1px solid #f1f5f9;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: #000 #f1f5f9;
    gap: 2rem;
}

.modal-left-col::-webkit-scrollbar {
    width: 6px;
}

.modal-left-col::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-left-col::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 10px;
}

.modal-right-col {
    padding: 3rem 4rem;
    background: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: #000 #f1f5f9;
}

.modal-right-col::-webkit-scrollbar {
    width: 6px;
}

.modal-right-col::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-right-col::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 10px;
}

.main-modal-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1.1;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: opacity 0.3s;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: 0.2s;
    opacity: 0;
}

.main-modal-img-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.slider-btn.prev {
    left: 15px;
}

.slider-btn.next {
    right: 15px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #000;
    width: 24px;
    border-radius: 4px;
}

.thumb-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0.5rem 0.2rem 1rem 0.2rem;
}

.thumb-scroll img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: 0.2s;
    flex-shrink: 0;
}

.thumb-scroll img.active {
    border-color: #2563eb;
    box-shadow: 0 8px 15px -5px rgba(37, 99, 235, 0.2);
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 2100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.1);
    background: #fee2e2;
    color: #ef4444;
}

.modal-desc-box {
    padding-top: 1rem;
}

.modal-desc-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #475569;
}

/* Data Listing System */
.specs-list {
    display: flex;
    flex-direction: column;
}

.spec-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    gap: 2rem;
    align-items: baseline;
}

.spec-item b {
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.spec-item span {
    color: #1e293b;
    font-weight: 500;
    line-height: 1.5;
}

.section-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 850;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    padding: 6px 14px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}

.badge.variant-badge:hover {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.badge.variant-badge.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-price {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    color: #dc2626;
    letter-spacing: -0.06em;
    display: inline-block;
}

.modal-title-box {
    margin-bottom: 0.5rem;
}

.category-tag {
    font-size: 0.7rem;
    font-weight: 800;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-product-name {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0.5rem 0;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #0f172a;
}

/* Scrollbar Refinement */
.modal-left-col::-webkit-scrollbar,
.modal-right-col::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.thumb-scroll::-webkit-scrollbar {
    height: 4px;
}

.thumb-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}