/* ===============================
   PROFESSIONAL CATEGORY PAGE V2
   With Sidebar Filters + Quick View
   =============================== */

:root {
    --new-black: #000000;
    --new-gray: #86868b;
    --new-light: #f5f5f7;
    --new-white: #ffffff;
    --new-accent: #0071e3;
    --border-light: #d2d2d7;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    background: #fff;
    overflow-x: hidden;
}

/* Top Navigation Bar */
.top-nav {
    background: #f5f5f7;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
}

.top-nav .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    font-size: 20px;
    font-weight: 600;
    color: var(--new-black);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--new-black);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.7;
}

.cart-link {
    position: relative;
    color: var(--new-black);
    font-size: 20px;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Hero Section */
.category-hero-new {
    background: var(--new-black);
    padding: 60px 0 40px 0;
    text-align: center;
}

.category-hero-new h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--new-white);
    margin: 0 0 12px 0;
    letter-spacing: -1px;
}

.category-hero-new p {
    font-size: 19px;
    color: var(--new-gray);
    margin: 0;
}

/* Main Layout with Sidebar */
.category-layout {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar Filters */
.sidebar-filters {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.filter-section {
    background: var(--new-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--new-black);
    margin-bottom: 16px;
}

.filter-group {
    margin-bottom: 12px;
}

.filter-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #1d1d1f;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}

.filter-group label:hover {
    color: var(--new-accent);
}

.filter-group input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.price-range {
    display: flex;
    gap: 12px;
    align-items: center;
}

.price-range input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
}

.btn-reset-filters {
    width: 100%;
    padding: 12px;
    background: var(--new-white);
    border: 1px solid var(--new-black);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--new-black);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset-filters:hover {
    background: var(--new-black);
    color: var(--new-white);
}

/* Products Grid - Smaller Cards */
.products-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Smaller Product Card */
.product-card-new {
    background: var(--new-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Product Image - Smaller */
.product-image-new {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--new-light);
    position: relative;
    overflow: hidden;
}

.product-image-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card-new:hover .product-image-new img {
    transform: scale(1.05);
}

/* Quick View Button - Appears on Hover */
.btn-quick-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 12px 24px;
    background: var(--new-white);
    color: var(--new-black);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-card-new:hover .btn-quick-view {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.btn-quick-view:hover {
    background: var(--new-black);
    color: var(--new-white);
}

/* NEW Badge */
.product-badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: var(--new-black);
    color: var(--new-white);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    z-index: 2;
}

.product-badge-new.sale {
    background: #ff3b30;
}

/* Product Info - Compact */
.product-info-new {
    padding: 16px;
    text-align: center;
}

.product-brand-new {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--new-gray);
    margin-bottom: 6px;
}

.product-title-new {
    font-size: 15px;
    font-weight: 600;
    color: var(--new-black);
    margin: 0 0 8px 0;
    line-height: 1.3;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-new {
    font-size: 16px;
    color: var(--new-black);
    margin-bottom: 12px;
    font-weight: 600;
}

.price-old-new {
    text-decoration: line-through;
    color: var(--new-gray);
    margin-right: 6px;
    font-size: 13px;
}

/* Add to Basket Button - Compact */
.btn-buy-new {
    width: 100%;
    padding: 10px;
    background: var(--new-accent);
    color: var(--new-white);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy-new:hover {
    background: #0077ed;
    transform: translateY(-2px);
}

/* Quick View Modal */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.quick-view-modal.active {
    display: flex;
}

.modal-content {
    background: var(--new-white);
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: var(--new-light);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--new-black);
    color: var(--new-white);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--new-light);
    border-radius: 12px;
    overflow: hidden;
}

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

.modal-details h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--new-black);
    margin-bottom: 8px;
}

.modal-brand {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--new-gray);
    margin-bottom: 16px;
}

.modal-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--new-black);
    margin-bottom: 24px;
}

.modal-description {
    font-size: 15px;
    color: #1d1d1f;
    line-height: 1.6;
    margin-bottom: 24px;
}

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

.btn-modal-add {
    flex: 1;
    padding: 16px;
    background: var(--new-accent);
    color: var(--new-white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-add:hover {
    background: #0077ed;
    transform: translateY(-2px);
}

/* Loading State */
.loading-new {
    text-align: center;
    padding: 80px 20px;
}

.spinner-new {
    width: 40px;
    height: 40px;
    border: 3px solid var(--new-light);
    border-top-color: var(--new-black);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

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

/* Empty State */
.empty-state-new {
    max-width: 600px;
    margin: 80px auto;
    text-align: center;
    padding: 0 40px;
}

.empty-state-new h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--new-black);
    margin: 0 0 12px 0;
}

.empty-state-new p {
    font-size: 17px;
    color: var(--new-gray);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.btn-back-new {
    padding: 14px 28px;
    background: var(--new-black);
    color: var(--new-white);
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-back-new:hover {
    background: #1d1d1f;
    transform: translateY(-2px);
}

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

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

    .products-grid-new {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .products-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .category-hero-new h1 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .products-grid-new {
        grid-template-columns: 1fr;
    }
}
