/* ===================================
   Products Page Styles
   =================================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--secondary-light) 100%);
    padding: 140px 0 80px;
    color: var(--white);
}

.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 16px;
    color: var(--gray-400);
}

.breadcrumb a {
    color: var(--gray-400);
}

.breadcrumb a:hover {
    color: var(--white);
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--gray-300);
    max-width: 600px;
}

/* Products Overview */
.products-overview {
    padding: 80px 0;
    background: var(--gray-50);
}

.category-cards-large {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category-large-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 300px 1fr;
    box-shadow: var(--shadow);
}

.category-large-card:nth-child(even) {
    grid-template-columns: 1fr 300px;
}

.category-large-card:nth-child(even) .category-large-icon {
    order: 2;
}

.category-large-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.category-large-icon i {
    font-size: 6rem;
    color: var(--white);
}

.audio-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.elevator-bg {
    background: linear-gradient(135deg, var(--elevator-color) 0%, #065f63 100%);
}

.industrial-bg {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-900) 100%);
}

.category-large-content {
    padding: 40px;
}

.category-large-content h2 {
    margin-bottom: 16px;
}

.category-large-content > p {
    color: var(--gray-600);
    margin-bottom: 24px;
}

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

.mini-product {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius);
}

.mini-product strong {
    display: block;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.mini-product span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Popular Products */
.popular-products {
    padding: 80px 0;
}

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

.popular-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.popular-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary-text);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.popular-badge.elevator-badge {
    background: var(--elevator-color);
}

.popular-badge.industrial-badge {
    background: var(--gray-700);
}

.popular-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.popular-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.popular-card h4 ,

.popular-card h3 {
    margin-bottom: 8px;
}

.popular-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.popular-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.popular-price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
}

/* Custom Cable CTA */
.custom-cta {
    background: var(--gray-900);
    padding: 80px 0;
}

.custom-cta-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.custom-cta-text h2 {
    color: var(--white);
    margin-bottom: 16px;
}

.custom-cta-text p {
    color: var(--gray-400);
    margin-bottom: 24px;
    font-size: 1.125rem;
}

.custom-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-300);
}

.custom-features i {
    color: var(--success);
}

.custom-cta-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.custom-cta-form h3 {
    margin-bottom: 24px;
}

.custom-cta-form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.custom-cta-form input,
.custom-cta-form textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: var(--transition);
}

.custom-cta-form input:focus,
.custom-cta-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

/* Downloads Section */
.downloads-section {
    padding: 80px 0;
    background: var(--gray-50);
}

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

.download-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.download-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.download-icon {
    width: 56px;
    height: 56px;
    background: rgba(227, 30, 36, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.download-info {
    flex: 1;
}

.download-info h4 ,

.download-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.download-info span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.download-card > i {
    color: var(--gray-400);
    transition: var(--transition);
}

.download-card:hover > i {
    color: var(--primary);
}

/* Product Detail Page Styles */
.product-detail-header {
    background: var(--gray-50);
    padding: 140px 0 60px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-gallery {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
}

.product-main-image {
    width: 100%;
    height: 300px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-main-image i {
    font-size: 6rem;
    color: var(--gray-400);
}

.product-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.product-thumbnails span {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-thumbnails span:hover,
.product-thumbnails span.active {
    border-color: var(--primary);
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.product-sku {
    color: var(--gray-500);
    margin-bottom: 16px;
}

.product-price-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
}

.product-price-large span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-500);
}

.product-description {
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.7;
}

.product-specs {
    background: var(--gray-50);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.product-specs h4 {
    margin-bottom: 12px;
}

.specs-list {
    display: grid;
    gap: 8px;
}

.specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9375rem;
}

.specs-list li:last-child {
    border-bottom: none;
}

.specs-list li span:first-child {
    color: var(--gray-500);
}

.specs-list li span:last-child {
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 16px;
}

/* Products List Page */
.products-list-section {
    padding: 60px 0;
}

.products-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 10px 20px;
    border: 1px solid var(--gray-300);
    border-radius: 50px;
    background: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.products-count {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

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

.product-list-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.product-list-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.product-list-image {
    height: 180px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-list-image i {
    font-size: 3rem;
    color: var(--gray-400);
}

.product-list-content {
    padding: 20px;
}

.product-list-content h4 {
    margin-bottom: 8px;
}

.product-list-content p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.product-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-list-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.product-list-price span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 1024px) {
    .category-large-card {
        grid-template-columns: 1fr;
    }

    .category-large-card:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .category-large-card:nth-child(even) .category-large-icon {
        order: 0;
    }

    .category-large-icon {
        padding: 40px;
    }

    .category-large-icon i {
        font-size: 4rem;
    }

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

    .custom-cta-content {
        grid-template-columns: 1fr;
    }

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

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

    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .popular-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-tabs {
        flex-wrap: wrap;
    }

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

    .product-actions {
        flex-direction: column;
    }
}

/* Wide spec tables scroll inside their box on phones instead of widening the page */
.product-specs-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Link to the selection guide under the product families */
.selection-guide-link {
    text-align: center;
    margin-top: 36px;
    color: var(--gray-600);
    font-size: 1rem;
}
.selection-guide-link a {
    color: var(--primary-text, #13795B);
    font-weight: 600;
    display: inline-block;
    padding: 8px 0;
}
.selection-guide-link a i { font-size: 0.8em; margin-left: 4px; }

/* ===================================
   Phones: product families as a swipeable carousel
   =================================== */
.carousel-dots { display: none; }

@media (max-width: 768px) {
    .category-cards-large[data-carousel] {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        grid-template-columns: none;
        max-width: none;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-inline: -20px;
        padding: 4px 20px 16px;
    }
    .category-cards-large[data-carousel]::-webkit-scrollbar { display: none; }
    .category-cards-large[data-carousel] > .category-large-card {
        flex: 0 0 84%;
        max-width: 340px;
        scroll-snap-align: start;
        height: auto;
    }
    .category-cards-large[data-carousel] > .category-large-card:hover { transform: none; }
    .carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
    .carousel-dots button {
        width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .carousel-dots button::before {
        content: ""; width: 8px; height: 8px; border-radius: 50%;
        background: var(--gray-300); transition: width .2s, background .2s;
    }
    .carousel-dots button.is-active::before { width: 22px; border-radius: 4px; background: var(--primary); }
}

/* Phones: carousel cards show image, title, short description and button only */
@media (max-width: 768px) {
    .category-cards-large[data-carousel] .category-products-grid { display: none; }
    .category-cards-large[data-carousel] .category-large-content { justify-content: space-between; }
    .category-cards-large[data-carousel] .category-large-content > p { margin-bottom: 18px; }
}
