/* Tesla Store — Product detail page */
.content-wrapper.product-detail-page {
    background: var(--amazon-bg, #eaeded);
    padding: 0.75rem 0 2.5rem;
    min-height: calc(100vh - 115px);
}

.product-breadcrumb {
    font-size: 0.8125rem;
    color: var(--amazon-text-muted, #565959);
    margin-bottom: 0.875rem;
}

.product-breadcrumb a {
    color: var(--amazon-link, #007185);
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--amazon-orange-dark, #c7511f);
    text-decoration: underline;
}

.product-breadcrumb .separator {
    margin: 0 0.35rem;
    color: #adb1b8;
}

.product-detail-page .star-rating .bi-star-fill {
    color: var(--primary-color, #ff9900);
}

.product-detail-page .star-rating .bi-star {
    color: #d5d9d9;
}

/* Main product card */
.product-hero-card {
    background: #fff;
    border: 1px solid #e3e6e6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 17, 17, 0.06);
    margin-bottom: 1.5rem;
}

.product-hero-gallery-col {
    padding: 1.25rem;
    border-bottom: 1px solid #e3e6e6;
}

.product-hero-info-col {
    padding: 1.25rem 1.5rem 1.5rem;
}

@media (min-width: 992px) {
    .product-hero-gallery-col {
        border-bottom: none;
        border-right: 1px solid #e3e6e6;
    }

    .product-hero-info-col {
        position: sticky;
        top: 125px;
        align-self: flex-start;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
}

/* Gallery — thumbnails left, main image right */
.product-gallery-layout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.thumbnail-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    width: 56px;
    max-height: 420px;
    overflow-y: auto;
}

.thumbnail-item {
    width: 56px;
    height: 56px;
    border: 2px solid #e3e6e6;
    border-radius: 8px;
    padding: 2px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    border-color: #adb1b8;
}

.thumbnail-item.is-active {
    border-color: var(--primary-color, #ff9900);
    box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.product-gallery-layout .main-image {
    flex: 1;
    min-width: 0;
    background: #f7fafa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.product-gallery-layout .main-image img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.product-gallery-placeholder {
    width: 100%;
    min-height: 280px;
    background: #f7fafa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-placeholder i {
    font-size: 3.5rem;
    color: #adb1b8;
}

/* Mobile: thumbnails below main image */
@media (max-width: 575.98px) {
    .product-gallery-layout {
        flex-direction: column-reverse;
    }

    .thumbnail-column {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.25rem;
    }
}

/* Product info */
.product-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.product-category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amazon-nav, #232f3e);
    background: #f0f2f2;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-category-link:hover {
    background: #fff8eb;
    color: var(--amazon-nav, #232f3e);
}

.product-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
    line-height: 1.35;
    margin: 0 0 0.625rem;
}

.product-store-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--amazon-link, #007185);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.product-store-link:hover {
    color: var(--amazon-orange-dark, #c7511f);
    text-decoration: underline;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.product-rating .star-rating i {
    font-size: 0.875rem;
}

.product-rating .rating-text {
    font-size: 0.8125rem;
    color: var(--amazon-link, #007185);
}

.product-rating .rating-text strong {
    color: var(--amazon-text, #0f1111);
    font-weight: 600;
}

.product-price-block {
    margin: 1rem 0;
    padding: 0.875rem 0;
    border-top: 1px solid #e3e6e6;
    border-bottom: 1px solid #e3e6e6;
}

.product-price-label {
    font-size: 0.75rem;
    color: var(--amazon-text-muted, #565959);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-price-current {
    font-size: 1.875rem;
    font-weight: 700;
    color: #b12704;
    margin: 0;
    line-height: 1.2;
}

.product-price-original {
    font-size: 0.9375rem;
    color: var(--amazon-text-muted, #565959);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.product-short-desc {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--amazon-text, #0f1111);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.product-description {
    font-size: 0.875rem;
    color: var(--amazon-text-muted, #565959);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-description--clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-attributes h6 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-option-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1.5px solid #d5d9d9;
    background: #fff;
    color: var(--amazon-nav, #232f3e);
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-option-btn:hover {
    border-color: #adb1b8;
    background: #f7fafa;
}

.product-option-btn.is-active {
    border-color: var(--primary-color, #ff9900);
    background: #fff8eb;
}

.product-purchase-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-quantity-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--amazon-text, #0f1111);
    margin-bottom: 0.375rem;
}

.product-quantity-group {
    max-width: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d5d9d9;
}

.product-quantity-group .btn {
    background: #f7fafa;
    border: none;
    color: var(--amazon-nav, #232f3e);
    font-weight: 700;
    padding: 0.45rem 0.65rem;
    font-size: 1rem;
    line-height: 1;
}

.product-quantity-group .btn:hover {
    background: #e3e6e6;
}

.product-quantity-group .form-control {
    border: none;
    border-left: 1px solid #d5d9d9;
    border-right: 1px solid #d5d9d9;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.45rem 0.25rem;
}

.product-stock {
    font-size: 0.8125rem;
    color: var(--amazon-text-muted, #565959);
}

.product-stock.in-stock {
    color: #067d62;
    font-weight: 600;
}

.product-actions-primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}

.product-actions-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.product-actions .products-btn-lg {
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    white-space: nowrap;
}

.product-actions-secondary .products-btn-lg {
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
}

/* Tabs */
.product-tabs-section {
    margin-top: 0;
}

.product-tabs-card {
    background: #fff;
    border: 1px solid #e3e6e6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 17, 17, 0.06);
}

.product-tabs {
    border-bottom: 1px solid #e3e6e6;
    padding: 0 0.5rem;
    background: #fafafa;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.product-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--amazon-text-muted, #565959);
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    border-radius: 0;
    background: transparent;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.product-tabs .nav-link:hover {
    color: var(--amazon-text, #0f1111);
}

.product-tabs .nav-link.active {
    color: var(--amazon-nav, #232f3e);
    border-bottom-color: var(--primary-color, #ff9900);
    background: #fff;
}

.product-tab-panel {
    padding: 1.25rem 1.5rem 1.5rem;
    min-height: 200px;
}

.product-about-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
    margin-bottom: 0.75rem;
}

.product-specs-table {
    margin: 0;
    border-color: #e3e6e6;
}

.product-specs-table th {
    width: 32%;
    background: #f7fafa;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--amazon-text, #0f1111);
    border-color: #e3e6e6;
    padding: 0.625rem 0.875rem;
}

.product-specs-table td {
    font-size: 0.875rem;
    color: var(--amazon-text-muted, #565959);
    border-color: #e3e6e6;
    padding: 0.625rem 0.875rem;
}

.product-tab-panel h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
}

/* Reviews */
.review-summary-score {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
    line-height: 1;
}

.review-bar-label {
    width: 56px;
    font-size: 0.8125rem;
    color: var(--amazon-text-muted, #565959);
}

.review-bar .progress {
    height: 10px;
    border-radius: 5px;
    background: #e3e6e6;
}

.review-bar .progress-bar {
    background: var(--primary-color, #ff9900);
    border-radius: 5px;
}

.review-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e3e6e6;
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-item .badge-verified {
    background: #e7f4f8;
    color: #007185;
    font-size: 0.75rem;
    font-weight: 600;
}

.review-form .form-select:focus,
.review-form .form-control:focus {
    border-color: var(--primary-color, #ff9900);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
}

/* Comments */
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--amazon-nav, #232f3e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.comment-item {
    padding-bottom: 0.875rem;
    margin-bottom: 0.875rem;
    border-bottom: 1px solid #e3e6e6;
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Related products */
.product-related-section {
    margin-top: 1.5rem;
}

.product-related-section .section-heading {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
    margin-bottom: 1rem;
}

.related-product-card {
    background: #fff;
    border: 1px solid #e3e6e6;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-product-card:hover {
    border-color: rgba(255, 153, 0, 0.4);
    box-shadow: 0 4px 16px rgba(15, 17, 17, 0.08);
}

.related-product-card .card-img-wrap {
    height: 160px;
    overflow: hidden;
    background: #f7fafa;
}

.related-product-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-card .card-body {
    padding: 0.875rem;
}

.related-product-card .card-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--amazon-text, #0f1111);
    margin-bottom: 0.375rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-product-card .card-price {
    color: #b12704;
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
}

.product-empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.product-empty-state i {
    font-size: 2rem;
    color: #adb1b8;
    margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
    .content-wrapper.product-detail-page {
        padding: 0.5rem 0 2rem;
    }

    .product-title {
        font-size: 1.125rem;
    }

    .product-price-current {
        font-size: 1.5rem;
    }

    .product-actions-primary,
    .product-actions-secondary {
        grid-template-columns: 1fr;
    }

    .product-hero-info-col {
        padding: 1rem 1.125rem 1.25rem;
    }

    .product-tab-panel {
        padding: 1rem;
    }
}
