/**
 * Product Catalogue and Product Detail Page Styling
 * Optimized for maximum cross-browser compatibility (Chrome, Safari, Firefox)
 * Full responsiveness up to 4K resolutions and down to mobile screens (iOS/macOS friendly)
 */

/* ==========================================================================
   LAYOUT CONTAINERS & GRID DEFINITIONS
   ========================================================================== */
#products-catalog-page,
#product-detail-page {
    background-color: var(--color-slate-50);
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--color-slate-800);
}

/* 4K Resizing & Scaling Setup */
@media (min-width: 2000px) {
    #products-catalog-page .header-container,
    #product-detail-page .header-container {
        max-width: 140rem; /* Wide containers for 4K */
    }
    #products-catalog-page,
    #product-detail-page {
        font-size: 1.125rem; /* Larger base font for ultra-high-definition */
    }
}

/* Breadcrumbs Custom styling */
.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-slate-400);
    margin-bottom: 0;
}

@media (min-width: 640px) {
    .breadcrumb-nav {
        font-size: 0.8125rem;
    }
}

.breadcrumb-nav a {
    color: var(--color-slate-500);
    transition: var(--transition-fast);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-nav a:hover,
.breadcrumb-nav a.hover-white:hover {
    color: var(--color-brand-cyan);
}

.breadcrumb-nav .separator {
    color: var(--color-slate-300);
    font-weight: 400;
}

.breadcrumb-nav .current {
    color: var(--color-slate-900);
    font-weight: 600;
}

/* Product Detail Cards Layout */
.product-detail-layout-card {
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-slate-100);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .product-detail-layout-card {
        padding: 2.5rem;
    }
}

/* Product split grid: 2 columns */
.product-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .product-split-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 4rem;
    }
    .product-gallery-col {
        grid-column: span 5 / span 5;
    }
    .product-info-col {
        grid-column: span 7 / span 7;
    }
}

@media (min-width: 2000px) {
    .product-split-grid {
        gap: 6rem;
    }
}

/* ==========================================================================
   GALLERY DISPLAY
   ========================================================================== */
.product-main-image-wrap {
    aspect-ratio: 1 / 1;
    background-color: var(--color-slate-950);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-slate-800);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-main-image-wrap:hover img {
    transform: scale(1.03);
}

.product-gallery-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    background-color: rgba(15, 23, 42, 0.95);
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 2rem 1.5rem 1rem;
    color: var(--color-slate-200);
    font-size: 0.75rem;
    line-height: 1.4;
    z-index: 10;
    font-weight: 500;
}

.product-thumbnail-strip {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.product-thumb-btn {
    width: 5rem;
    height: 5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--color-slate-200);
    cursor: pointer;
    background: none;
    padding: 0;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.product-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb-btn:hover {
    border-color: var(--color-slate-400);
}

.product-thumb-btn.active {
    border-color: var(--color-brand-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* ==========================================================================
   PRODUCT INFORMATION & SPECS SHEET
   ========================================================================== */
.product-info-col h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--color-brand-dark);
    line-height: 1.2;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .product-info-col h1 {
        font-size: 2.5rem;
    }
}

.product-meta-summary-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    background-color: var(--color-slate-50);
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-slate-100);
    font-size: 0.8125rem;
    margin: 1.5rem 0;
}

.product-meta-item span {
    font-size: 10px;
    color: var(--color-slate-400);
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    letter-spacing: 0.05em;
}

.product-meta-item p {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-slate-800);
    margin-top: 4px;
}

.product-meta-item .status-active {
    color: var(--color-emerald-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-meta-item .status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--color-emerald-500);
    display: inline-block;
    position: relative;
}

.product-meta-item .status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-emerald-500);
    animation: ping 1.5s infinite;
}

/* ==========================================================================
   SPECIFICATIONS TABLE
   ========================================================================== */
.specs-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-xl);
    background-color: var(--color-white);
    margin-top: 1.5rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8125rem;
}

@media (min-width: 640px) {
    .specs-table {
        font-size: 0.875rem;
    }
}

.specs-table th {
    background-color: var(--color-slate-50);
    border-bottom: 1px solid var(--color-slate-100);
    font-weight: 700;
    color: var(--color-slate-600);
    padding: 1rem;
}

.specs-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-slate-100);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table tr:hover {
    background-color: var(--color-slate-50/50);
}

.specs-table td.spec-diameter {
    font-weight: 700;
    color: var(--color-slate-900);
}

.specs-table td.spec-length {
    font-family: var(--font-mono);
    color: var(--color-slate-600);
}

.specs-table td.spec-surface {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--color-brand-dark);
}

/* ==========================================================================
   UTILITY & GENERAL COMPONENT REPLACEMENTS
   ========================================================================== */
.btn-about-cta,
.btn-consult-now-about {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--color-brand-dark);
    color: var(--color-white);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition-all-300);
    border: none;
    cursor: pointer;
}

.btn-about-cta:hover,
.btn-consult-now-about:hover {
    background-color: var(--color-brand-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
}

/* Mobile responsive resets */
@media (max-width: 768px) {
    .product-meta-summary-box {
        grid-template-columns: 1fr;
    }
    .specs-table th,
    .specs-table td {
        padding: 0.75rem;
    }
}

/* Safari / iOS specific optimizations */
@supports (-webkit-overflow-scrolling: touch) {
    .product-thumbnail-strip {
        -webkit-overflow-scrolling: touch;
    }
}
