﻿/* ========================================
   PRODUCTS PAGE - COMPLETE STYLING
   All products page specific styles
======================================== */

/* ========================================
   PRODUCTS PAGE HERO
   Styling is handled by the shared .page-hero /
   .products-hero rules in style.css.
   Only products-specific inner elements are here.
======================================== */

/* Make navbar spacer seamless with hero background */
body:has(.products-hero) .navbar-spacer {
    background: #0f0c29;
}

.products-hero-inner {
    max-width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.products-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.products-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.products-breadcrumb a:hover { color: #ffd700; }
.products-breadcrumb a i     { font-size: 0.8125rem; }

.products-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 300;
}

.products-breadcrumb .current {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.products-header-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.products-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.03em;
    text-align: center;
}

.products-item-count {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    background: rgba(102, 126, 234, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.35);
    backdrop-filter: blur(8px);
}

/* ========================================
   RECOMMENDATION SECTION - Amazon-style slider
======================================== */

/* Section wrapper */
.rec-section {
    background: #fff;
    padding: 20px 0 24px;
    border-bottom: 1px solid #e7e7e7;
}

/* Header */
.rec-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.rec-header-icon { font-size: 1.125rem; color: #5b6af0; }
.rec-header-title { font-size: 1.375rem; font-weight: 700; color: #0f1111; margin: 0; }

/* Outer: positions the arrows */
.rec-outer {
    position: relative;
    padding: 0 20px;
    margin: 0 -20px;
}

/* Side arrows */
.rec-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0f1111;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rec-arrow:hover { background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.rec-arrow:disabled { opacity: 0; pointer-events: none; }
.rec-arrow--left  { left: -18px; }
.rec-arrow--right { right: -18px; }

/* Viewport clips the track */
.rec-viewport { overflow: hidden; width: 100%; }

/* Track */
.rec-track {
    display: flex;
    gap: 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Card - no border, just right separator */
.rec-card {
    flex: 0 0 calc(100% / 6);
    min-width: 0;
    background: #fff;
    border-right: 1px solid #e7e7e7;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 14px 12px 16px;
    transition: background 0.15s ease;
    box-sizing: border-box;
}
.rec-card:last-child { border-right: none; }
.rec-card:hover { background: #f7f8ff; }

/* Image */
.rec-card-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}
.rec-card-img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.2s ease; }
.rec-card:hover .rec-card-img { transform: scale(1.05); }
.rec-card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 2.5rem; background: #f8f9fa; }

/* Body */
.rec-card-body { display: flex; flex-direction: column; flex: 1; }
.rec-card-name {
    font-size: 13px;
    font-weight: 400;
    color: #0f1111;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 54px;
}
.rec-card:hover .rec-card-name { color: #5b6af0; }
.rec-card-rating { display: flex; align-items: center; gap: 2px; margin-bottom: 5px; flex-wrap: wrap; }
.rec-card-rating i { font-size: 11px; color: #f59e0b; }
.rec-card-rating-count { font-size: 11px; color: #5b6af0; margin-left: 3px; }
.rec-card-discount-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.rec-card-disc-pct { font-size: 12px; font-weight: 700; color: #cc0c39; }
.rec-card-price { font-size: 16px; font-weight: 700; color: #0f1111; line-height: 1.2; margin-bottom: 2px; }
.rec-card-price sup { font-size: 11px; font-weight: 400; vertical-align: super; line-height: 1; }
.rec-card-old-price { font-size: 11px; color: #565959; margin-bottom: 3px; }

/* Responsive */
@media (max-width: 991.98px) { .rec-card { flex: 0 0 calc(100% / 3); } }
@media (max-width: 575.98px) {
    .rec-card { flex: 0 0 calc(100% / 2); }
    .rec-card-name { min-height: auto; -webkit-line-clamp: 2; }
    .rec-arrow--left  { left: -12px; }
    .rec-arrow--right { right: -12px; }
}
/* ========================================
   PRODUCTS SECTION - FILTERS & GRID
======================================== */

/* products-section padding is defined in style.css */

/* Filters Bar */
.filters-bar {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.125rem 1.25rem;
    margin-bottom: 1.125rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.filter-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label i {
    font-size: 0.75rem;
    color: #667eea;
}

.filter-input,
.filter-select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    background: #ffffff;
    height: 38px;
    color: #1f2937;
}

.filter-select-with-icons {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-left: 0.75rem;
}

.filter-select-with-icons option {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.filter-input:hover,
.filter-select:hover {
    border-color: #9ca3af;
}

.filter-input:focus,
.filter-select:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.filter-input::placeholder {
    color: #9ca3af;
    font-size: 0.8125rem;
}

.btn-filter {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 1.125rem;
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.btn-filter:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.btn-filter:active {
    transform: translateY(0);
    opacity: 1;
}

.btn-filter i {
    font-size: 1rem;
}

/* Remove the noisy pulse-filter animation entirely */
.btn-filter.filters-pending {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

.btn-clear-filters {
    background: transparent;
    color: #6c757d;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    padding: 0.4375rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-clear-filters:hover {
    background: #fff5f5;
    color: #dc3545;
    border-color: #dc3545;
    border-style: solid;
    text-decoration: none;
}

.btn-clear-filters i {
    font-size: 0.9375rem;
}

/* Results Info */
.results-info {
    margin-bottom: 1.125rem;
}

.results-text {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: 0;
}

/* ========================================
   PRODUCT CARD ENTRANCE ANIMATION
======================================== */

@keyframes card-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered entrance for each card */
.product-card-pro {
    animation: card-fade-up 0.4s ease both;
}

.product-card-pro:nth-child(1)  { animation-delay: 0.04s; }
.product-card-pro:nth-child(2)  { animation-delay: 0.08s; }
.product-card-pro:nth-child(3)  { animation-delay: 0.12s; }
.product-card-pro:nth-child(4)  { animation-delay: 0.16s; }
.product-card-pro:nth-child(5)  { animation-delay: 0.20s; }
.product-card-pro:nth-child(6)  { animation-delay: 0.24s; }
.product-card-pro:nth-child(7)  { animation-delay: 0.28s; }
.product-card-pro:nth-child(8)  { animation-delay: 0.32s; }
.product-card-pro:nth-child(9)  { animation-delay: 0.36s; }
.product-card-pro:nth-child(10) { animation-delay: 0.40s; }
.product-card-pro:nth-child(11) { animation-delay: 0.44s; }
.product-card-pro:nth-child(12) { animation-delay: 0.48s; }

/* ========================================
   PRODUCTS GRID & CARDS
======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Product Card */
.product-card-pro {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8eaed;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card-pro:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border-color: #c5cae9;
}

/* Product Image */
.product-image-pro {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f7f8fa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-img.img-grayscale {
    filter: grayscale(60%);
}

.product-card-pro:hover .product-img {
    transform: scale(1.06);
}

.product-placeholder-pro {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
}

.product-placeholder-pro i {
    font-size: 3rem;
    color: #c8cdd5;
}

.product-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(91, 106, 240, 0.9);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

/* Product Content */
.product-content-pro {
    padding: 0.875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title-pro {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1d23;
    margin: 0 0 0.35rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description-pro {
    font-size: 0.775rem;
    color: #7a8394;
    margin: 0 0 0.5rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating-pro {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 0.5rem;
}

.product-rating-pro i {
    font-size: 0.75rem;
    color: #f5a623;
}

.rating-text {
    font-size: 0.72rem;
    color: #9aa0ac;
    margin-left: 4px;
}

.product-price-pro {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-current-pro {
    font-size: 1.1rem;
    font-weight: 700;
    color: #5b6af0;
}

.price-old-pro {
    font-size: 0.78rem;
    color: #b0b7c3;
    text-decoration: line-through;
}

.product-stock-pro {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #22c55e;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

.product-stock-pro i {
    font-size: 0.72rem;
}

/* Product Actions */
.product-actions-pro {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-add-to-cart-pro {
    flex: 1;
    background: #5b6af0;
    color: #fff;
    border: none;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: background 0.18s ease, transform 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-add-to-cart-pro:hover {
    background: #4a58e0;
    color: #fff;
    transform: translateY(-1px);
}

.btn-add-to-cart-pro:active {
    transform: translateY(0);
}

.btn-view-details-pro {
    background: #fff;
    color: #5b6af0;
    border: 1.5px solid #5b6af0;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    font-size: 0.8rem;
    transition: background 0.18s ease, color 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view-details-pro:hover {
    background: #5b6af0;
    color: #fff;
}

/* No Products Found */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-products-found i {
    font-size: 3.5rem;
    color: #5b6af0;
    margin-bottom: 1rem;
}

.no-products-found h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1d23;
    margin-bottom: 0.5rem;
}

.no-products-found p {
    font-size: 0.9rem;
    color: #7a8394;
    margin-bottom: 1.25rem;
}

/* ========================================
   PAGINATION
======================================== */

.products-pagination {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.products-pagination .pagination {
    gap: 0.375rem;
}

.products-pagination .page-link {
    border: 1px solid #e0e3e8;
    border-radius: 7px;
    color: #5b6af0;
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.products-pagination .page-link:hover {
    background: #5b6af0;
    color: #fff;
    border-color: #5b6af0;
}

.products-pagination .page-item.active .page-link {
    background: #5b6af0;
    border-color: #5b6af0;
    color: #fff;
}

.products-pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #b0b7c3;
    border-color: #e0e3e8;
}

/* ========================================
   REDUCED MOTION â€” respect user preference
======================================== */

@media (prefers-reduced-motion: reduce) {
    .product-card-pro,
    .rec-product-card,
    .strip-ai-icon {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 991.98px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .product-image-pro {
        height: 160px;
    }

    .product-content-pro {
        padding: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .product-actions-pro {
        flex-direction: column;
    }
}


