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

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ====== HEADER STYLES ====== */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    color: #e0e0e0;
}

/* ====== CONTROLS & FILTERS ====== */
.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-box {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 500px;
}

.search-box input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 100%;
    font-size: 16px;
}

.search-box button {
    padding: 12px 20px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* ====== TABLE STYLES ====== */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th,
td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: #f9fafb;
}

tr:hover {
    background-color: #f1f5f9;
}

/* ====== PRODUCT ITEMS ====== */
.product-item {
    border: 1px solid #e5e5e5;
    padding: 15px;
    margin-bottom: 30px;
    background: #fff;
    transition: all 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    margin-bottom: 15px;
    text-align: center;
}

.product-image img {
    max-height: 200px;
    width: auto;
}

.product-info h3 {
    margin-top: 0;
    font-size: 18px;
    min-height: 45px;
}

.product-info p {
    color: #666;
    min-height: 60px;
}

/* ====== COMPACT SPEC CARDS ====== */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.compact .spec-card-header {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact .spec-thumbnail {
    width: 60px;
    height: 45px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 2px;
}

.compact h3 {
    font-size: 16px;
    margin: 0;
}

.compact .spec-card-body {
    padding: 10px 15px;
}

.compact .spec-highlights li {
    padding: 5px 0;
    font-size: 14px;
}

/* ====== BUTTON STYLES ====== */
.btn-primary {
    background-color: #0088cc;
    border-color: #0088cc;
    padding: 5px 12px;
    font-size: 13px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #006699;
    border-color: #006699;
}

.btn-specs {
    padding: 5px 12px;
    font-size: 13px;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

/* ====== LINK STYLES ====== */
.model-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ====== CATEGORY BADGES ====== */
.category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.shelves {
    background-color: #e3f2fd;
    color: #1565c0;
}

.power {
    background-color: #fff8e1;
    color: #f57c00;
}

.cable {
    background-color: #e8f5e9;
    color: #388e3c;
}

.rack {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.mounting {
    background-color: #ffebee;
    color: #d32f2f;
}

.mobility {
    background-color: #e0f7fa;
    color: #0097a7;
}

.security {
    background-color: #fff3e0;
    color: #ef6c00;
}

.cooling {
    background-color: #e8eaf6;
    color: #303f9f;
}

/* ====== UTILITY CLASSES ====== */
.highlight {
    background-color: #fff8e1;
}

.no-match {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-style: italic;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* ====== THUMBNAIL STYLES ====== */
.thumbnail-cell {
    text-align: center;
    width: 100px;
}

.thumbnail-img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 4px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-image {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccc;
    border-radius: 4px;
    color: #999;
    font-size: 12px;
    text-align: center;
}

/* ====== RESPONSIVE STYLES ====== */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    th,
    td {
        padding: 12px 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .specs-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .compact .spec-card-header {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .compact .spec-thumbnail {
        width: 50px;
        height: 40px;
    }

    .thumbnail-cell {
        width: 70px;
    }

    .thumbnail-img,
    .no-image {
        width: 60px;
        height: 45px;
    }
}