/* ============================================
   PRODUCT PAGES STYLES
   SilTech Industries
   ============================================ */

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-section {
    margin-top: 0;
    padding: 2px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* Ensure breadcrumb clears the fixed header */
main > .breadcrumb-section:first-child {
    margin-top: 0;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--border-color);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumb li[aria-current="page"] {
    color: var(--text-primary);
}

/* ============================================
   PRODUCT HERO
   ============================================ */
.product-hero {
    padding-top: 2rem;
}

.product-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 768px) {
    .product-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Product Image */
.product-image-container {
    position: relative;
}

.product-image-main {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.product-image-main img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.stock-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stock-badge.out-of-stock {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-category-badge {
    display: inline-flex;
    background: var(--primary-muted);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.product-tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 0;
}

.product-info .product-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.product-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.product-trust span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   PRODUCT DETAILS TABS
   ============================================ */
.product-details {
    background: var(--bg-secondary);
}

.product-details .product-tabs {
    margin-bottom: 2rem;
}

.tab-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.feature-icon {
    color: var(--primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* Specs Table */
.specs-table-container {
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.specs-table th {
    width: 40%;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.specs-table td {
    font-weight: 500;
}

/* Applications Grid */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.application-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.application-icon {
    font-size: 1.25rem;
}

/* ============================================
   PRODUCT OVERVIEW
   ============================================ */
.overview-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.overview-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */
.related-products .products-grid {
    margin-bottom: 2rem;
}

.related-products .product-card {
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-products .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PRODUCTS INDEX PAGE
   ============================================ */
.products-hero {
    padding-bottom: 0;
}

.products-hero h1 {
    font-size: 3rem;
}

/* Featured Section */
.featured-section {
    padding: 4rem 0;
}

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

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

.featured-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.featured-image {
    position: relative;
    background: var(--bg-secondary);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.featured-image img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.featured-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-content h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
}

.featured-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* All Products Grid */
.all-products .products-grid {
    gap: 1.5rem;
}

.all-products .product-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.all-products .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.product-card-image {
    background: var(--bg-secondary);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
}

.product-card-image img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.card-tagline {
    font-size: 0.875rem;
    color: var(--primary);
    margin: -0.5rem 0 0.5rem 0;
}

.card-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table-container {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.comparison-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table thead th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table thead th:first-child {
    text-align: left;
}

.comparison-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
}

.comparison-table tbody tr:hover {
    background: var(--bg-secondary);
}

.comparison-table .comparison-cta td {
    padding: 1.5rem;
    border-bottom: none;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--primary-muted) 0%, var(--bg-secondary) 100%);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.bg-dark {
    background: var(--bg-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .product-title {
        font-size: 2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .product-trust {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .features-grid,
    .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-table th {
        width: 50%;
    }
    
    .products-hero h1 {
        font-size: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
}
