/* ==========================================
   Product Detail Page
   ========================================== */

/* Section wrapper */
.detail-section {
    padding-block: 8rem 5rem;
    min-height: 100vh;
    background: var(--primary-bg);
}

/* Two-column layout */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

@media (min-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Gallery */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-image-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5rem;
    padding: 3rem;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    position: relative;
    overflow: hidden;
}

.main-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.thumbs-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.thumb-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 0.5rem;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-item:hover {
    border-color: rgba(61, 194, 105, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.thumb-item.active {
    border-color: var(--accent-color);
    background: rgba(61, 194, 105, 0.05);
}

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

/* Info column */
.product-category-badge {
    background: rgba(0, 209, 255, 0.1);
    color: #00d1ff;
    border: 1px solid rgba(0, 209, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.product-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Feature cards */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(61, 194, 105, 0.08);
    border: 1px solid rgba(61, 194, 105, 0.15);
    color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-box .material-symbols-rounded {
    font-size: 22px;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.1rem;
}

.feature-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
    line-height: 1.3;
}

.feature-text p {
    font-size: 0.8rem;
    color: var(--accent-color);
    opacity: 0.75;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CTA area */
.product-detail-actions {
    margin-top: 1rem;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

/* Technical Specifications Accordion */
.specs-section {
    margin-top: 5rem;
    padding-bottom: 8rem;
}

.specs-header {
    text-align: center;
    margin-bottom: 4rem;
}

.specs-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-main);
}

.specs-header p {
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 1.1rem;
}

.accordion-container {
    width: 100%;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(61, 194, 105, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.accordion-header {
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.2rem;
    user-select: none;
}

.accordion-header i {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Smooth accordion animation via max-height */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-content-inner {
    padding: 0 3rem 3rem;
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
    color: var(--accent-color);
}

/* Specs table inside accordion */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

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

.spec-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.spec-item:nth-child(4n+3),
.spec-item:nth-child(4n+4) {
    background: rgba(255, 255, 255, 0.025);
}

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

.spec-label {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 1rem;
}

.spec-value {
    color: var(--text-main);
    font-weight: 500;
    text-align: right;
    font-size: 1rem;
}

/* Not-found state */
.product-not-found {
    text-align: center;
    padding: 8rem 2rem;
}

.product-not-found h2 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.product-not-found p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Product Detail — Bottom CTA Banner */
.product-cta-section {
    margin-top: 0;
    padding: 6rem 0 8rem;
}

.product-cta-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 2rem;
    padding: 5rem 3rem;
    text-align: center;
    overflow: hidden;
}

.product-cta-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(61, 194, 105, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.product-cta-card h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-main);
    margin-bottom: 1rem;
    position: relative;
}

.product-cta-card p {
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 1.1rem;
    max-width: 520px;
    margin-inline: auto;
    margin-bottom: 3rem;
    position: relative;
}

.product-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

@media (max-width: 900px) {
    .product-detail-layout {
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .main-image-box {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .product-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .accordion-header {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }

    .accordion-content-inner {
        padding: 0 1.5rem 2rem;
    }

    .spec-item {
        padding: 0.8rem 0;
    }

    .product-cta-section {
        padding: 4rem 0 6rem;
    }

    .product-cta-card {
        padding: 3.5rem 1.5rem;
        border-radius: 1.5rem;
    }

    .product-cta-card h2 {
        font-size: 2rem;
    }

    .product-cta-card p {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .feature-text p {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .thumb-item {
        width: 60px;
        height: 60px;
    }

    .spec-label,
    .spec-value {
        font-size: 0.9rem;
    }

    .product-cta-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .product-cta-actions .btn {
        width: 100%;
    }
}

/* Override min-width for these smaller CTA buttons */
.product-cta-actions .btn {
    min-width: auto;
    padding: 0.9rem 2rem;
    font-size: 1rem;
}
