/* ============ PRODUCT DETAIL PAGE ============ */

/* TOP LAYOUT: gallery + info */
.pd-top {
    background: var(--white);
    padding: 32px 0 56px;
}
.pd-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* GALLERY */

.pd-main-img {
    border-radius: var(--radius);
    background: var(--bg);
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.pd-main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
}
.pd-img-placeholder {
    font-size: 14px;
    color: var(--text-light);
}
.pd-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.pd-thumb {
    width: 72px;
    height: 54px;
    border-radius: var(--radius-xs);
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
    overflow: hidden;
}
.pd-thumb:hover,
.pd-thumb.active {
    border-color: var(--accent);
}
.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pd-img-placeholder-sm {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 600;
}

/* INFO PANEL */
.pd-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.pd-sku {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}
.pd-rating {
    font-size: 13px;
    color: #f59e0b;
}
.pd-rating em {
    font-style: normal;
    color: var(--text-primary);
    font-weight: 600;
    margin-left: 4px;
}
.pd-title {
    font-family: var(--font-accent);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    line-height: 1.15;
}

.pd-price-block {
    margin-bottom: 24px;
}
.pd-price {
    font-family: var(--font-accent);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.pd-price-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.5;
}

.pd-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pd-cart-btn {
    padding: 16px 36px;
    font-size: 15px;
}
.pd-offer-btn {
    padding: 16px 28px;
    font-size: 14px;
}

.pd-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 28px;
    transition: var(--transition);
}
.pd-download:hover {
    gap: 10px;
}

/* Key specs grid */
.pd-key-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}
.pd-ks {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pd-ks span {
    font-size: 11px;
    color: var(--text-light);
}
.pd-ks strong {
    font-size: 14px;
    font-weight: 600;
}

/* Benefits row */
.pd-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.pd-benefit {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.pd-benefit svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* ===== TABS ===== */
.pd-tabs-section {
    background: var(--bg);
    padding: 56px 0 80px;
}
.pd-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.pd-tab {
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 600;
    padding: 14px 28px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.pd-tab:hover {
    color: var(--text-primary);
}
.pd-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.pd-tab-panel {
    display: none;
}
.pd-tab-panel.active {
    display: block;
}

/* Specs table */
.specs-table {
    max-width: 720px;
}
.specs-group-title {
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    padding: 20px 0 12px;
    border-bottom: 2px solid var(--accent);
}
.specs-group-title:first-child {
    padding-top: 0;
}
.specs-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.specs-row span {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}
.specs-row strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    flex: 1;
}

/* Description */
.pd-description {
    max-width: 720px;
}
.pd-desc-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}
.pd-desc-hl {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.pd-desc-hl svg {
    flex-shrink: 0;
    margin-top: 3px;
}
.pd-desc-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Services */
.pd-services {
    max-width: 720px;
}
.pd-services > p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.pd-services-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pd-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== DELIVERY ===== */
.pd-delivery {
    background: var(--white);
    padding: 56px 0;
}
.pd-delivery-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 36px;
    max-width: 640px;
}
.pd-delivery-box h3 {
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}
.pd-delivery-tk {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.pd-tk-logo {
    width: 80px;
    height: 40px;
    border-radius: var(--radius-xs);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-light);
}
.pd-delivery-input {
    display: flex;
    gap: 12px;
}
.pd-delivery-input input {
    flex: 1;
    font-family: var(--font-body);
    font-size: 14px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--bg-card);
}
.pd-delivery-input input:focus {
    border-color: var(--accent);
}

/* ===== RELATED ===== */
.pd-related {
    background: var(--bg);
    padding: 56px 0;
}
.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 28px;
}
.pd-related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}
.pd-related-card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}
.pd-related-img {
    height: 120px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd-related-body {
    padding: 12px;
}
.pd-related-status {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}
.pd-related-body h4 {
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

/* ===== ACCESSORIES ===== */
.pd-accessories {
    background: var(--white);
    padding: 56px 0;
}

/* ===== Q&A ===== */
.pd-qa {
    background: var(--bg);
    padding: 56px 0;
}
.qa-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 24px;
}
.qa-question,
.qa-answer {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.qa-answer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.qa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
}
.qa-staff {
    background: var(--accent-light);
    color: var(--accent);
}
.qa-question strong,
.qa-answer strong {
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}
.qa-question span,
.qa-answer span {
    font-size: 12px;
    color: var(--text-light);
}
.qa-question p,
.qa-answer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-top: 8px;
}
.qa-contacts {
    margin-top: 8px;
    font-size: 13px;
}
.qa-contacts a {
    color: var(--accent);
    font-weight: 600;
}

/* ===== REVIEWS ===== */
.pd-reviews {
    background: var(--white);
    padding: 56px 0;
}
.review-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 24px;
}
.review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.review-header strong {
    font-size: 15px;
    display: block;
}
.review-stars {
    color: #f59e0b;
    font-size: 14px;
    margin-top: 2px;
}
.review-date {
    font-size: 12px;
    color: var(--text-light);
    margin-left: auto;
}
.review-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.review-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .pd-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .pd-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pd-key-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .pd-main-img {
        height: 280px;
    }
    .pd-actions {
        flex-direction: column;
    }
    .pd-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .pd-tabs {
        overflow-x: auto;
        gap: 0;
    }
    .pd-tab {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pd-key-specs {
        grid-template-columns: 1fr;
    }
    .pd-delivery-input {
        flex-direction: column;
    }
    .qa-question,
    .qa-answer {
        flex-direction: column;
        gap: 8px;
    }
}
.pd-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
}

/* Fix: constrain thumb strip width, scroll hidden */
.pd-thumbs-wrap .pd-thumbs-scroll {
    max-width: 480px;
    scroll-snap-type: x mandatory;
    overflow: hidden;
    flex: 0 1 480px;
}
.pd-thumb {
    scroll-snap-align: start;
    min-width: 72px;
}

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

.main-gallery {
    /* max-width: 632px; */
    gap: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#product-carousel .f-carousel__slide {
    max-width: 632px;
    max-height: 420px;
    cursor: pointer;
}

#product-carousel-navigation {
    --f-carousel-slide-width: 72px;
    --f-carousel-spacing: 8px;
}

#product-carousel-navigation .f-carousel__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    max-height: 54px;
    border: 2px solid var(--border);
}
