/* Product Page Specific Styles - Mobile First */

/* Products Page Container */
.products-page-container {
    background: #FFFFFF;
    /* padding: 24px 0 60px; */
}

.products-page-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Mobile Header with Filter & Search */
.mobile-products-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.mobile-products-header h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 30px;
    color: #222222;
    margin: 0;
    padding: 16px 16px;
    background: #FFFFFF;
}

.mobile-search-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #C62828;
    padding: 12px 16px;
    margin: 0;
}

/* Mobile Categories Horizontal Scroll */
.mobile-categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 16px;
    background: #FFFFFF;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-categories-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FFFFFF;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
    flex-shrink: 0;
}

.mobile-category-item.active {
    background: #FFF5F5;
}

.mobile-category-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mobile-category-item span {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    color: #4D4D4D;
    text-align: center;
    white-space: nowrap;
}

.mobile-category-item.active span {
    color: #C62828;
    font-weight: 500;
}

.mobile-category-item.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 3px;
    background: #C62828;
}

.mobile-filter-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0,0,0,0);
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-filter-button img {
    width: 20px;
    height: 20px;
}

/* Search Input */
.products-search {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #FFFFFF;
    border-radius: 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #4D4D4D;
    background: #FFFFFF;
}

.search-input::placeholder {
    color: #B0B0B0;
}

.search-input:focus {
    outline: none;
    border-color: #C62828;
    background: #FFFFFF;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* Recommendations Section */
.recommendations-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.recommendations-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #4D4D4D;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    text-decoration: none;
}

.recommendation-item img {
    width: 20px;
    height: 20px;
}

.recommendation-item span {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
    color: #4D4D4D;
}

/* Product Populer Section */
.popular-products-section {
    margin-bottom: 24px;
}

.popular-products-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #4D4D4D;
    margin-bottom: 12px;
}

.popular-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.popular-product-item {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.popular-product-item .product-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    position: relative;
}

.popular-product-item .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Filter Modal */
.mobile-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.mobile-filter-modal.active {
    display: flex;
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #F0F1F2;
}

.mobile-filter-header h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #222222;
}

.mobile-filter-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-filter-close img {
    width: 24px;
    height: 24px;
}

.mobile-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.mobile-filter-footer {
    padding: 16px;
    border-top: 1px solid #F0F1F2;
    background: #FFFFFF;
}

.mobile-apply-filter {
    width: 100%;
    padding: 16px;
    background: #C62828;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

/* Sidebar Styles (Hidden on Mobile by Default) */
.products-sidebar {
    display: none;
}

/* Filter Section */
.filter-section {
    background: #FFFFFF;
    border: 1px solid #F0F1F2;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 28px;
    color: #4D4D4D;
    margin-bottom: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    gap: 12px;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.filter-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 28px;
    color: #4D4D4D;
}

.filter-toggle {
    width: 12px;
    height: auto;
    transition: transform 0.3s;
}

.filter-group.collapsed .filter-toggle {
    transform: rotate(180deg);
}

.filter-group.collapsed .filter-options {
    display: none;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #4D4D4D;
    user-select: none;
}

.filter-option:hover {
    color: #C62828;
}

.filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #CCCCCC;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background: #FFFFFF;
    transition: all 0.2s;
}

.filter-option input[type="checkbox"]:hover {
    border-color: #C62828;
}

.filter-option input[type="checkbox"]:checked {
    background: #C62828;
    border-color: #C62828;
}

.filter-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: bold;
}

.filter-divider {
    width: 100%;
    height: 1px;
    background: #F0F1F2;
    margin: 4px 0;
}

/* Products Content */
.products-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.products-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.products-header h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 28px;
    color: #222222;
    /* padding: 0 16px; */
}

.products-header .product-count {
    color: inherit;
    font-weight: inherit;
}

.products-header .products-search {
    display: none;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 16px;
    margin-top: 16px;
}

.product-item {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.product-item .product-image {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio (9/16 * 100) */
    position: relative;
    background: #000000;
    overflow: hidden;
}

.product-item .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding: 12px;
}

.product-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #222222;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-dimensions {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #808080;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

.no-products p {
    font-size: 16px;
    color: #666;
}

/* Pagination */
.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination-btn,
.pagination-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #F0F1F2;
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #4D4D4D;
}

.pagination-btn:hover:not(:disabled),
.pagination-number:hover {
    background: #F8F9FA;
    border-color: #C62828;
}

.pagination-number.active {
    background: #C62828;
    color: #FFFFFF;
    border-color: #C62828;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn img {
    width: 16px;
    height: 16px;
}

.pagination-dots {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #808080;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .products-page-container {
        /* padding: 32px 0 70px; */
    }

    .products-page-wrapper {
        padding: 0 24px;
        gap: 32px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 0;
    }

    .product-details {
        padding: 14px;
    }

    .product-name {
        font-size: 15px;
        line-height: 21px;
    }
}

/* Desktop Small (Sidebar appears) */
@media (min-width: 1024px) {
    .products-page-container {
        padding: 40px 0 80px;
    }

    .products-page-wrapper {
        padding: 0 40px;
        display: grid;
        grid-template-columns: 262px 1fr;
        gap: 40px;
    }

    .mobile-products-header {
        display: none;
    }

    .mobile-filter-button {
        display: none;
    }

    .products-sidebar {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .sidebar-section {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .sidebar-title {
        font-family: 'Poppins', sans-serif;
        font-weight: 600;
        font-size: 16px;
        line-height: 28px;
        color: #4D4D4D;
    }

    .category-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .category-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 8px 12px;
        background: none;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s;
        width: 100%;
        text-align: left;
    }

    .category-item.active {
        background: rgba(198, 40, 40, 0.05);
    }

    .category-icon {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .category-item span {
        font-family: 'Poppins', sans-serif;
        font-weight: 300;
        font-size: 16px;
        line-height: 28px;
        color: #4D4D4D;
        flex: 1;
    }

    .category-item.active span {
        color: #C62828;
        font-weight: 400;
    }

    .filter-section {
        max-height: 600px;
        overflow-y: auto;
    }

    .products-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .products-header h2 {
        font-size: 24px;
        line-height: 32px;
        white-space: nowrap;
    }

    .products-header .products-search {
        display: block;
        max-width: 600px;
        flex: 1;
    }

    .products-header .search-input {
        padding: 12px 16px 12px 48px;
        border: 1px solid #E0E0E0;
        background: #F8F9FA;
    }

    .products-header .search-input:focus {
        border-color: #C62828;
        background: #FFFFFF;
    }

    .products-header .search-icon {
        left: 16px;
        width: 20px;
        height: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-details {
        padding: 16px;
    }

    .product-name {
        font-size: 16px;
        line-height: 22px;
    }

    .product-dimensions {
        font-size: 14px;
        line-height: 20px;
    }

    .recommendations-section,
    .popular-products-section {
        display: none;
    }
}

/* Desktop Medium */
@media (min-width: 1200px) {
    .products-page-wrapper {
        padding: 0 60px;
        gap: 50px;
    }

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

    .product-name {
        font-size: 17px;
        line-height: 23px;
    }

    .pagination-btn,
    .pagination-number {
        width: 40px;
        height: 40px;
    }
}

/* Desktop Large */
@media (min-width: 1440px) {
    .products-page-wrapper {
        padding: 0 80px;
        gap: 60px;
    }

    .product-name {
        font-size: 18px;
        line-height: 24px;
    }
}

/* Desktop Extra Large */
@media (min-width: 1600px) {
    .products-page-wrapper {
        padding: 0 160px;
    }

    .product-item .product-image {
        height: auto;
    }
}   .products-page-wrapper {
        /* padding: 0 80px; */
        gap: 60px;
    }

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

    .product-item .product-image {
        height: auto;
    }

    .product-name {
        font-size: 18px;
        line-height: 24px;
    }

    .pagination-btn,
    .pagination-number {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 1440px) {
    .products-page-wrapper {
        padding: 0 160px;
    }

    .product-item .product-image {
        height: auto;
    }
}
