/* ============================================
   Products Pages Styles
   ============================================ */

/* Page Header Section */
.page-header-section {
    padding: 6rem 0 4rem;
    background: var(--primary-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
    z-index: 0;
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-header-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.page-header-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.95;
    line-height: 1.6;
}

/* Products Filters */
.products-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Products Grid */
.products-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-light);
}

.product-card__image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.product-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.product-slide.active {
    opacity: 1;
    z-index: 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-card:hover .product-slider-btn {
    opacity: 1;
}

.product-slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.product-slider-prev {
    left: 1rem;
}

.product-slider-next {
    right: 1rem;
}

.product-slider-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-slider-indicators {
    opacity: 1;
}

.product-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.product-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.product-indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

.sold-badge {
    background: var(--text-light);
}

.product-card__content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.spec-item {
    padding: 0.375rem 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.product-card__description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.product-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Space Grotesk', sans-serif;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Sold Products Specific */
.sold-stats-section {
    padding: 4rem 0;
    background: white;
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-overview-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-light);
    border-radius: 1.5rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.stat-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stat-overview-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-overview-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sold-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.75rem;
}

.sold-to {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.sold-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-card.sold {
    opacity: 0.95;
}

.product-card.sold:hover {
    opacity: 1;
}

/* Pagination */
.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.875rem 2rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.pagination-info {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

/* Contact CTA Section */
.contact-cta-section {
    padding: 5rem 0;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-text {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Available Sale & Sold Records Sections (for index.html) */
.available-sale-section,
.sold-records-section {
    padding: 5rem 0;
    background: white;
}

.cta-box {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

.cta-box__text {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-section {
        padding: 4rem 0 3rem;
    }

    .products-filters {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-small {
        width: 100%;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .stat-overview-number {
        font-size: 2.5rem;
    }
}

/* ============================================
   Image Lightbox Modal
   ============================================ */

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-wrapper {
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10002;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10002;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-indicators {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lightbox-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.lightbox-indicator.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

.lightbox-counter {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0.5rem;
}

.product-image {
    cursor: pointer;
    transition: var(--transition);
    touch-action: pan-y pinch-zoom;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.product-image:hover {
    opacity: 0.9;
}

.product-image-slider {
    touch-action: pan-y pinch-zoom;
}

.product-slide {
    touch-action: pan-y pinch-zoom;
}

@media (max-width: 768px) {
    .product-image {
        cursor: default;
    }
    
    .product-image-slider {
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 968px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-image-wrapper {
        height: 70vh;
    }
}

@media (max-width: 768px) {
    .lightbox-container {
        width: 95%;
    }
    
    .lightbox-image-wrapper {
        height: 60vh;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

