/* ============================================
   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(280px, 1fr));
    gap: 1.5rem;
    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: 200px;
    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;
}

.page-available-products .product-slider-btn,
.page-available-products #productsGrid > button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

.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: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

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

.spec-item {
    padding: 0.25rem 0.625rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    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.375rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    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;
    }
}

/* ============================================
   Blog Article Pages
   ============================================ */

.blog-article-section {
    padding: 4rem 0 5rem;
    background: var(--bg-light);
}

.blog-article {
    max-width: 860px;
    margin: 0 auto;
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.blog-article__hero {
    width: 100%;
    height: min(520px, 70vh);
    min-height: 420px;
    overflow: hidden;
    position: relative;
    background: #f3f5f8;
}

.blog-article__hero .blog-hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
    background: #f3f5f8;
}

.blog-article__hero .product-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 3.5rem;
    box-sizing: border-box;
    background: #f3f5f8;
}

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

.blog-article__hero img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.blog-article__hero .product-slider-btn {
    opacity: 1;
    z-index: 4;
}

.blog-article__hero .product-slider-indicators {
    opacity: 1;
    z-index: 4;
}

.blog-article__body {
    padding: 2.5rem 3rem;
}

.blog-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.blog-article__category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-article__date {
    color: var(--text-light);
    font-size: 0.95rem;
}

.blog-article__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* ---- Article Body Content ---- */

.blog-article__content {
    color: #334155;
    font-size: 1.0625rem;
    line-height: 1.85;
}

.blog-article__content p {
    margin-bottom: 1.4rem;
    color: #334155;
}

.blog-article__content h2 {
    color: var(--text-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.75rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary-color);
    letter-spacing: -0.01em;
}

.blog-article__content h3 {
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
}

.blog-article__content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem 0;
}

.blog-article__content ul li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.85rem;
    color: #334155;
    line-height: 1.75;
}

.blog-article__content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.blog-article__content ul li strong {
    color: var(--text-dark);
}

.blog-article__content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition-fast);
}

.blog-article__content a:hover {
    color: var(--primary-dark);
}

/* ---- Tables ---- */

.blog-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0 2rem;
    font-size: 0.95rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.blog-table thead tr {
    background: var(--primary-gradient);
    color: white;
}

.blog-table thead th {
    text-align: left;
    padding: 0.9rem 1.1rem;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.blog-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.blog-table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.blog-table tbody tr:hover {
    background: #eff6ff;
}

.blog-table tbody td {
    padding: 0.85rem 1.1rem;
    color: #334155;
    vertical-align: top;
    line-height: 1.6;
}

.blog-table tbody td strong {
    color: var(--text-dark);
}

/* ---- Back Link ---- */

.blog-article__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    padding: 0.65rem 1.25rem;
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.blog-article__back:hover {
    background: var(--primary-color);
    color: white;
    gap: 0.75rem;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .blog-article__body {
        padding: 1.5rem;
    }

    .blog-article__hero {
        height: min(380px, 55vh);
        min-height: 280px;
    }

    .blog-article__hero .product-slide {
        padding: 0.75rem 2.75rem;
    }

    .blog-article__title {
        font-size: 1.5rem;
    }

    .blog-article__content h2 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }

    .blog-article__content h3 {
        font-size: 1.05rem;
    }

    .blog-table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .blog-table thead th,
    .blog-table tbody td {
        padding: 0.65rem 0.75rem;
        min-width: 110px;
    }
}

@media (max-width: 480px) {
    .blog-article__body {
        padding: 1.25rem;
    }

    .blog-article__hero {
        height: 180px;
    }
}

/* ============================================
   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;
    }
}