/**
 * Products Page - Clean Compact Design
 */

/* ===== Page Spacer for Fixed Header ===== */
.products-page-spacer {
    height: 70px;
}

@media (max-width: 991px) {
    .products-page-spacer {
        height: 65px;
    }
}

@media (max-width: 767px) {
    .products-page-spacer {
        height: 60px;
    }
}

/* ===== Hero / Page Title ===== */
.products-hero {
    padding: 70px 0 0;
    background: transparent;
    text-align: left;
}

.products-hero .container {
    max-width: 1600px;
    width: 95%;
}

.products-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.products-hero-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.products-hero-desc {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0;
    max-width: 500px;
}

.products-hero-right {
    text-align: right;
}

.products-hero-right .product-count {
    font-size: 13px;
    color: #888;
    background: #f5f5f5;
    padding: 5px 12px;
    border-radius: 20px;
}

.breadcrumb-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.breadcrumb-inline a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-inline a:hover {
    color: var(--color-primary);
}

.breadcrumb-inline i {
    font-size: 10px;
    opacity: 0.5;
}

.breadcrumb-inline span {
    color: #333;
}

/* Filter Bar - Compact */
.products-filter-bar {
    padding-bottom: 15px;
}

.filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: #eee;
    color: #333;
}

.filter-chip.active {
    background: #1a1a1a;
    color: #fff;
}

.filter-chip .filter-count {
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* Legacy breadcrumb support */
.breadcrumb-nav {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.breadcrumb-nav a {
    color: #888;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: #b8942f;
}

.breadcrumb-nav .separator {
    margin: 0 8px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px;
}

.product-count {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* ===== Category Section ===== */
.category-section {
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.category-section .container {
    max-width: 1600px;
    width: 95%;
}

.category-section:last-of-type {
    border-bottom: none;
}

.category-row {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

/* Render Image (Left Side) */
.category-render {
    flex: 0 0 525px;
    width: 525px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.render-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.render-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #aaa;
    text-align: center;
    padding: 20px;
}

.render-placeholder i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #ccc;
}

.render-placeholder span {
    font-size: 14px;
    font-weight: 600;
}

.render-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    color: #fff;
}

.render-overlay h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px;
}

.render-overlay p {
    font-size: 11px;
    margin: 0 0 10px;
    opacity: 0.9;
    line-height: 1.4;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #fff;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
}

.btn-view:hover {
    background: #b8942f;
    color: #fff;
}

/* Products Grid (Right Side) */
.category-products {
    flex: 1;
    min-width: 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.products-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.products-header a {
    font-size: 13px;
    font-weight: 600;
    color: #b8942f;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.products-header a:hover {
    color: #96791f;
}

/* Products Slider */
.products-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-slider {
    flex: 1;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
}

.products-slider::-webkit-scrollbar {
    display: none;
}

.products-slider .product-card {
    flex: 0 0 calc(25% - 12px);
    min-width: 140px;
}

/* Slider Arrows */
.slider-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #333;
}

.slider-arrow:hover {
    background: #b8942f;
    color: #fff;
}

.slider-arrow.slider-prev {
    order: -1;
}

.slider-arrow.slider-next {
    order: 1;
}

/* Product Card */
.product-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s;
}

.product-card:hover {
    border-color: #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.product-img {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -16px 0 0 -16px;
    width: 32px;
    height: 32px;
    border: 2.5px solid #eee;
    border-top-color: #b8942f;
    border-radius: 50%;
    animation: img-spin 0.7s linear infinite;
    z-index: 0;
    transition: opacity 0.3s;
}

.product-img.loaded::before {
    opacity: 0;
    pointer-events: none;
}

.product-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-img.loaded img {
    opacity: 1;
}

@keyframes img-spin {
    to { transform: rotate(360deg); }
}

.product-info {
    padding: 12px;
    text-align: center;
}

.product-info h4 {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.3;
}

.product-info .dims {
    font-size: 11px;
    color: #999;
}

/* Badges */
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 10px;
    color: #fff;
}

.badge.new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.badge.popular {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== Bottom Banner ===== */
.bottom-banner {
    padding: 30px 0 40px;
    background: #fff;
}

.bottom-banner .container {
    max-width: 1600px;
    width: 95%;
}

.banner-placeholder {
    position: relative;
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.banner-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    gap: 8px;
}

.banner-placeholder-text i {
    font-size: 48px;
    opacity: 0.5;
}

.banner-placeholder-text span {
    font-size: 16px;
    font-weight: 600;
}

.banner-placeholder-text small {
    font-size: 12px;
    opacity: 0.7;
}

.banner-placeholder img + .banner-placeholder-text {
    display: none;
}

.banner-placeholder.no-image .banner-placeholder-text {
    display: flex;
}

/* Legacy - keeping for reference */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px;
}

.section-header span {
    font-size: 14px;
    color: #999;
}

.all-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Item */
.product-item {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s;
}

.product-item:hover {
    border-color: #b8942f;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.item-img {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-img img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.item-info {
    padding: 15px;
    text-align: center;
}

.item-info .cat {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #b8942f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.item-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 5px;
    line-height: 1.3;
}

.item-info .dims {
    font-size: 12px;
    color: #999;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .products-slider .product-card {
        flex: 0 0 calc(33.333% - 10px);
    }

    .all-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .category-render {
        flex: 0 0 400px;
        width: 400px;
    }

    .products-slider .product-card {
        flex: 0 0 calc(33.333% - 10px);
        min-width: 130px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: 60px 0 0;
    }

    .products-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .products-hero-left h1 {
        font-size: 1.25rem;
    }

    .page-title {
        font-size: 22px;
    }

    .category-section {
        padding: 20px 0;
    }

    .category-row {
        flex-direction: column;
        gap: 20px;
    }

    .category-render {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .render-placeholder {
        height: 150px;
    }

    .products-slider .product-card {
        flex: 0 0 calc(50% - 8px);
        min-width: 120px;
    }

    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .all-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-info {
        padding: 10px;
    }

    .banner-placeholder {
        height: 200px;
    }

    .product-info h4 {
        font-size: 11px;
    }

    .item-info {
        padding: 12px;
    }

    .item-info h3 {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding: 55px 0 0;
    }

    .products-hero-left h1 {
        font-size: 1.125rem;
    }

    .breadcrumb-inline {
        font-size: 10px;
    }

    .filter-chip {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .page-title {
        font-size: 20px;
    }

    .category-render {
        max-width: 100%;
    }

    .all-products-grid {
        gap: 10px;
    }
}
