/* Products Level 3 - Professional Product Detail Page
   Ultra-clean, modern design matching localhost:3000
   Font: Open Sans (matching live site)
   ================================================== */

/* Reset & Variables */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-600: #1776C8;
    --primary-700: #125A9C;
    --primary-50: rgba(23, 118, 200, 0.05);
    --primary-100: rgba(23, 118, 200, 0.1);
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Site Header (placeholder) */
.site-header {
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600);
    text-decoration: none;
}

/* Breadcrumb */
.breadcrumb {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition);
}

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

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

.breadcrumb .current {
    color: var(--gray-900);
    font-weight: 500;
}

/* Product Section */
.product-section {
    padding: 40px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
        align-items: start;
    }
}

/* Product Gallery */
.product-gallery {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.main-image {
    background: var(--white);
    border-radius: var(--radius-lg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
}

.main-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.thumbnail-strip {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.thumb {
    width: 72px;
    height: 72px;
    padding: 8px;
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.thumb:hover {
    border-color: var(--gray-300);
}

.thumb.active {
    border-color: var(--primary-600);
    background: var(--white);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

/* Brand & SKU */
.product-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sku {
    font-size: 13px;
    color: var(--gray-500);
    padding-left: 16px;
    border-left: 1px solid var(--gray-300);
}

/* Product Title */
.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin: 0;
}

@media (min-width: 640px) {
    .product-title {
        font-size: 2rem;
    }
}

/* Product Trust Section (Elephant Style - Full Width) */
.product-trust-section-full {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 40px 0;
}

.trust-grid-inline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .trust-grid-inline {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.trust-inline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.trust-icon-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.3);
}

.trust-inline-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trust-inline-text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
}

.trust-inline-text span {
    font-size: 11px;
    color: var(--gray-500);
}

/* Color Selection */
.color-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.color-label span:first-child {
    color: var(--gray-600);
}

.color-name {
    font-weight: 600;
    color: var(--gray-900);
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.swatch {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.swatch:hover {
    transform: scale(1.1);
    z-index: 1;
}

.swatch.active {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--primary-600);
}

/* White swatch needs visible border */
.swatch[style*="FFFFFF"] {
    border-color: var(--gray-300);
}

.color-count {
    font-size: 13px;
    color: var(--gray-500);
}

/* Start Designing Button */
.btn-design {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(23, 118, 200, 0.4);
}

.btn-design:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 118, 200, 0.5);
}

.btn-design svg {
    flex-shrink: 0;
}

/* Sizes Section */
.sizes-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sizes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sizes-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.size-chart-link {
    font-size: 13px;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
}

.size-chart-link:hover {
    text-decoration: underline;
}

.sizes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-tag {
    padding: 6px 14px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
}

/* Shipping Note */
.shipping-note {
    font-size: 14px;
    color: var(--gray-500);
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
}

/* ==================== */
/* Details Section Tabs */
/* ==================== */
.details-section {
    padding: 48px 0;
    background: var(--white);
}

.tabs-container {
    background: var(--white);
}

.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--gray-500);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.tab-panel p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--gray-50);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.info-card strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.info-card span {
    font-size: 15px;
    color: var(--gray-900);
    font-weight: 500;
}

/* Specs Table */
.specs-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: var(--gray-600);
}

.spec-value {
    color: var(--gray-900);
    font-weight: 500;
    text-align: right;
}

/* Features List */
.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--gray-700);
    padding-left: 24px;
    position: relative;
}

.features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary-600);
    border-radius: 50%;
}

/* Methods Grid */
.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    font-weight: 500;
}

.method-card svg {
    color: #10B981;
    flex-shrink: 0;
}

/* Uses Grid */
.uses-intro {
    color: var(--gray-600);
    margin-bottom: 20px;
}

.uses-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.use-tag {
    padding: 10px 18px;
    background: var(--primary-50);
    color: var(--primary-600);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

/* ================ */
/* FAQ Section      */
/* ================ */
.faq-section {
    padding: 64px 0;
    background: var(--gray-50);
}

.faq-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all var(--transition);
}

.faq-item:hover {
    border-color: var(--gray-300);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.faq-question span {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.faq-question svg {
    flex-shrink: 0;
    color: var(--gray-400);
    transition: transform var(--transition);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

.faq-cta {
    text-align: center;
    margin-top: 32px;
    font-size: 15px;
    color: var(--gray-600);
}

.faq-cta a {
    color: var(--primary-600);
    font-weight: 600;
    text-decoration: none;
}

.faq-cta a:hover {
    text-decoration: underline;
}

/* =================== */
/* Related Products    */
/* =================== */
.related-section {
    padding: 64px 0;
    background: var(--white);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-600);
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    text-decoration: none;
    transition: all var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.card-image {
    background: var(--gray-50);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.card-info {
    padding: 16px;
}

.card-brand {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 4px 0 8px;
    line-height: 1.4;
}

.card-colors {
    font-size: 12px;
    color: var(--gray-500);
}

/* ================ */
/* Trust Footer     */
/* ================ */
.trust-footer {
    padding: 48px 0;
    background: var(--gray-900);
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (min-width: 768px) {
    .trust-items {
        grid-template-columns: repeat(4, 1fr);
    }
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: var(--white);
}

.trust-item svg {
    flex-shrink: 0;
    color: var(--primary-600);
}

.trust-item strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.trust-item span {
    font-size: 13px;
    color: var(--gray-400);
}

/* =================== */
/* Responsive          */
/* =================== */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }

    .product-section {
        padding: 16px 0;
    }

    .product-grid {
        gap: 16px;
    }

    .product-gallery {
        padding: 12px;
    }

    /* Smaller image on mobile to fit button above fold */
    .main-image {
        aspect-ratio: unset !important;
        height: 300px;
        max-height: 300px;
        min-height: 300px;
        overflow: visible;
    }

    /* Ensure image scales down to fit container */
    .main-image img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .thumbnail-strip {
        display: none;
    }

    .product-info {
        gap: 14px;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .color-swatches {
        gap: 6px;
    }

    .swatch {
        width: 30px;
        height: 30px;
    }

    .product-trust-section-full {
        padding: 24px 0;
    }

    .trust-grid-inline {
        gap: 16px;
    }

    .trust-icon-img {
        width: 48px;
        height: 48px;
    }

    .trust-inline-text strong {
        font-size: 12px;
    }

    .trust-inline-text span {
        font-size: 10px;
    }

    .btn-design {
        width: 100%;
        padding: 14px 24px;
    }

    .tabs-nav {
        gap: 0;
        padding: 0 16px;
        margin: 0 -16px 24px;
    }

    .tab-btn {
        padding: 14px 16px;
        font-size: 14px;
    }

    .faq-section h2 {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

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

    .card-info {
        padding: 12px;
    }

    .card-info h3 {
        font-size: 13px;
    }

    .trust-items {
        gap: 24px;
    }

    .trust-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Focus States for Accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .breadcrumb,
    .order-mode-toggle,
    .btn-design,
    .tabs-nav,
    .faq-section,
    .related-section,
    .trust-footer {
        display: none !important;
    }

    .product-grid {
        display: block;
    }

    .product-gallery,
    .product-info {
        page-break-inside: avoid;
    }
}
