/* ============================================
   Products Page Styles
   ============================================ */

/* Products Hero */
.products-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
    text-align: center;
}

.products-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

.products-hero p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Category Filter */
.category-filter {
    padding: 24px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 72px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

/* Products Grid */
.products-section {
    padding: 40px 0 80px;
    background: var(--bg-alt);
    min-height: 400px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Product Card */
.product-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-light);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .no-image {
    font-size: 60px;
    color: var(--border);
}

.product-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.product-info {
    padding: 20px;
}

.product-item-no {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-material {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.size-tag {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-alt);
    border-radius: 4px;
    color: var(--text-light);
}

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

/* Loading & Empty */
.loading-state,
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal[hidden] {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.modal-content {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
    background: none;
    border: none;
    z-index: 3;
}

.modal-close:hover { color: var(--danger); }

.product-detail {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}
    display: none !important;
}

.product-detail {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.product-detail-body {
    padding: 32px;
}

.product-detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.product-detail-image {
    width: 200px;
    height: 200px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.product-detail-image .no-image {
    font-size: 80px;
    color: var(--border);
}

.product-detail-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.product-detail-info .item-no {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-detail-info .material {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 16px;
}

/* Sizes Table */
.sizes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.sizes-table th,
.sizes-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.sizes-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
}

.sizes-table td {
    color: var(--text-light);
}

.inquire-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.inquire-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .products-hero {
        padding: 100px 0 40px;
    }
    .products-hero h1 {
        font-size: 28px;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .category-filter {
        top: 0;
    }
    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .product-detail-header {
        flex-direction: column;
        align-items: center;
    }
    .product-detail-image {
        width: 100%;
        max-width: 280px;
    }
}
