/**
 * Phone Exchange – Single Product Page Styles
 *
 * 1:1 replica of React ProductDetail page.
 * Uses the two-tier CSS variable architecture (bare HSL + --pe- prefixed).
 *
 * @package Phone_Exchange_Child
 * @since   1.0.0
 */

/* ==========================================================================
   0. STOREFRONT OVERRIDES — Single Product
   ========================================================================== */

/* Remove Storefront's default single product layout */
.pe-product-page .site-main {
    padding-top: 0 !important;
}

/* Remove Storefront product wrapper styles */
.pe-product-page div.product {
    margin: 0 !important;
    padding: 0 !important;
}

/* Kill Storefront's default single product gallery styles */
.pe-product-page .woocommerce-product-gallery,
.pe-product-page .woocommerce-product-gallery__wrapper,
.pe-product-page .summary,
.pe-product-page .related.products,
.pe-product-page .up-sells.upsells {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Remove Storefront's default tabs styles */
.pe-product-page .woocommerce-tabs {
    padding: 0 !important;
}

/* Remove any Storefront before_content spacing */
.pe-product-page #content > .col-full {
    padding: 0 !important;
    max-width: none !important;
}

/* Breadcrumb container — match the grid's 1200px constraint */
.pe-single-product > .woocommerce-breadcrumb {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .pe-single-product > .woocommerce-breadcrumb {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1200px) {
    .pe-single-product > .woocommerce-breadcrumb {
        padding-left: 0;
        padding-right: 0;
    }
}


/* ==========================================================================
   1. PAGE LAYOUT
   ========================================================================== */

.pe-single-product {
    padding-bottom: 6rem; /* space for mobile sticky CTA */
}

@media (min-width: 768px) {
    .pe-single-product {
        padding-bottom: 3.5rem;
    }
}

.pe-single-product__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .pe-single-product__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        padding: 0 2rem;
    }
}

@media (min-width: 1200px) {
    .pe-single-product__grid {
        padding: 0;
    }
}

.pe-single-product__info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}


/* ==========================================================================
   2. IMAGE GALLERY
   ========================================================================== */

.pe-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Main image container */
.pe-gallery__main {
    position: relative;
    aspect-ratio: 1 / 1;
    background: hsl(var(--muted, 30, 15%, 92%));
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: grab;
}

.pe-gallery__main:active {
    cursor: grabbing;
}

.pe-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Nav arrows */
.pe-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: hsla(var(--card, 0, 0%, 100%), 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    padding: 0.375rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.pe-gallery__arrow:hover {
    background: hsl(var(--card, 0, 0%, 100%));
}

.pe-gallery__arrow--prev {
    left: 0.5rem;
}

.pe-gallery__arrow--next {
    right: 0.5rem;
}

/* Dots indicator */
.pe-gallery__dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.375rem;
    z-index: 2;
}

.pe-gallery__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: hsla(var(--card, 0, 0%, 100%), 0.6);
    transition: background 0.2s;
    padding: 0;
}

.pe-gallery__dot--active {
    background: hsl(var(--primary, 0, 0%, 12%));
}

/* Thumbnails */
.pe-gallery__thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.pe-gallery__thumb {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
    padding: 0;
    background: none;
}

@media (min-width: 768px) {
    .pe-gallery__thumb {
        width: 5rem;
        height: 5rem;
    }
}

.pe-gallery__thumb--active {
    border-color: hsl(var(--primary, 0, 0%, 12%));
}

.pe-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ==========================================================================
   3. PRODUCT HEADER (brand, model, storage/color subtitle)
   ========================================================================== */

.pe-single-product__brand {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}

.pe-single-product__title {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0;
    color: hsl(var(--foreground, 0, 0%, 10%));
}

@media (min-width: 768px) {
    .pe-single-product__title {
        font-size: 1.875rem;
    }
}

.pe-single-product__subtitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}

.pe-single-product__subtitle-sep {
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}


/* ==========================================================================
   4. GRADE & FONNIT CARD
   ========================================================================== */

.pe-grade-card {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pe-grade-card__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pe-grade-card__badge {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.pe-grade-card__info-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    padding: 0;
    display: flex;
    transition: color 0.2s;
}

.pe-grade-card__info-btn:hover {
    color: hsl(var(--foreground, 0, 0%, 10%));
}

/* Tooltip */
.pe-grade-card__tooltip {
    position: relative;
    display: inline-flex;
}

.pe-grade-card__tooltip-content {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: hsl(var(--foreground, 0, 0%, 10%));
    color: hsl(var(--background, 30, 25%, 96%));
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 260px;
    white-space: normal;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pe-grade-card__tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-grade-card__tooltip:hover .pe-grade-card__tooltip-content {
    display: block;
}

/* FONNIT row */
.pe-grade-card__fonnit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.pe-grade-card__fonnit svg {
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
}

.pe-grade-card__fonnit-label {
    font-weight: 500;
}

.pe-grade-card__fonnit-desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}

/* Notes */
.pe-grade-card__notes {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    font-style: italic;
    margin: 0;
}


/* ==========================================================================
   6. PRICE BLOCK
   ========================================================================== */

.pe-price-block {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pe-price-block__current {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.875rem;
    font-weight: 700;
    color: hsl(var(--foreground, 0, 0%, 10%));
}

@media (min-width: 768px) {
    .pe-price-block__current {
        font-size: 2.25rem;
    }
}

.pe-price-block__original {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    text-decoration: line-through;
}

.pe-price-block__discount {
    display: inline-flex;
    align-items: center;
    background: hsl(var(--accent, 190, 100%, 45%));
    color: hsl(var(--accent-foreground, 0, 0%, 100%));
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Savings line */
.pe-price-savings {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--accent, 190, 100%, 45%));
}

.pe-price-savings svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}


/* ==========================================================================
   7. VARIANT CHIPS (Grade / Storage / Color)
   ========================================================================== */

.pe-variant-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pe-variant-group__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}

.pe-variant-group__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pe-variant-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border, 0, 0%, 90%));
    background: hsl(var(--card, 0, 0%, 100%));
    color: hsl(var(--foreground, 0, 0%, 10%));
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.pe-variant-chip:hover {
    border-color: hsla(var(--primary, 0, 0%, 12%), 0.5);
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-variant-chip--active {
    background: hsl(var(--primary, 0, 0%, 12%));
    color: hsl(var(--primary-foreground, 0, 0%, 100%));
    border-color: hsl(var(--primary, 0, 0%, 12%));
}

.pe-variant-chip--active:hover {
    color: hsl(var(--primary-foreground, 0, 0%, 100%));
}


/* ==========================================================================
   8. QUICK BUY
   ========================================================================== */

.pe-quick-buy__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    background: linear-gradient(135deg, hsl(var(--accent, 190, 100%, 45%)), hsl(175, 80%, 40%));
    color: #fff;
    transition: opacity 0.2s;
}

.pe-quick-buy__trigger:hover {
    opacity: 0.9;
}

.pe-quick-buy__trigger svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Expanded form */
.pe-quick-buy__form-wrap {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: peFadeIn 0.3s ease;
}

.pe-quick-buy__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pe-quick-buy__header-title {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
}

.pe-quick-buy__header-title svg {
    color: hsl(var(--accent, 190, 100%, 45%));
    width: 1rem;
    height: 1rem;
}

.pe-quick-buy__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    display: flex;
    transition: background 0.2s;
}

.pe-quick-buy__close:hover {
    background: hsl(var(--muted, 30, 15%, 92%));
}

.pe-quick-buy__desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}

.pe-quick-buy__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pe-quick-buy__field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-quick-buy__field input {
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--border, 0, 0%, 90%));
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: hsl(var(--card, 0, 0%, 100%));
    color: hsl(var(--foreground, 0, 0%, 10%));
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 0.25rem;
}

.pe-quick-buy__field input:focus {
    outline: none;
    border-color: hsl(var(--accent, 190, 100%, 45%));
    box-shadow: 0 0 0 2px hsla(var(--accent, 190, 100%, 45%), 0.2);
}

.pe-quick-buy__error {
    font-size: 0.75rem;
    color: hsl(0, 84%, 60%);
    margin: 0;
}

.pe-quick-buy__submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    background: linear-gradient(135deg, hsl(var(--accent, 190, 100%, 45%)), hsl(175, 80%, 40%));
    color: #fff;
    transition: opacity 0.2s;
}

.pe-quick-buy__submit:hover {
    opacity: 0.9;
}

/* Success state */
.pe-quick-buy__success {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.pe-quick-buy__success-icon {
    font-size: 1.5rem;
}

.pe-quick-buy__success-title {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.pe-quick-buy__success-desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}


/* ==========================================================================
   9. ADD TO CART BUTTON
   ========================================================================== */

.pe-add-to-cart {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    background: hsl(var(--primary, 0, 0%, 12%));
    color: hsl(var(--primary-foreground, 0, 0%, 100%));
    transition: opacity 0.2s;
}

.pe-add-to-cart:hover {
    opacity: 0.85;
}

.pe-add-to-cart svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Hide default WC add to cart form/button */
.pe-product-page .cart .single_add_to_cart_button,
.pe-product-page .cart .quantity,
.pe-product-page form.cart {
    display: none !important;
}

/* ==========================================================================
   9b. ACTIONS ROW (Add to Cart + Wishlist)
   ========================================================================== */

.pe-single-product__actions {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.pe-single-product__actions .pe-add-to-cart {
    flex: 1;
}

.pe-single-product__wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    min-width: 3rem;
    padding: 0;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    box-shadow: none !important;
}

.pe-single-product__wishlist:hover {
    color: hsl(0, 72%, 51%);
    border-color: hsl(0, 72%, 51%);
}

.pe-single-product__wishlist--active {
    color: hsl(0, 72%, 51%);
    border-color: hsl(0, 72%, 51%);
}

.pe-single-product__wishlist--active svg {
    fill: hsl(0, 72%, 51%);
}

.pe-single-product__wishlist svg {
    width: 1.25rem;
    height: 1.25rem;
}


/* ==========================================================================
   10. INSTALLMENT CARDS
   ========================================================================== */

.pe-installments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pe-installments__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}

.pe-installments__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .pe-installments__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pe-installment-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: hsl(var(--card, 0, 0%, 100%));
    border: 1px solid hsl(var(--border, 0, 0%, 90%));
    border-radius: 0.5rem;
    padding: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: left;
    width: 100%;
}

.pe-installment-card:hover {
    border-color: hsla(var(--primary, 0, 0%, 12%), 0.5);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.pe-installment-card__icon {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 50%;
    padding: 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pe-installment-card__icon svg {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--accent, 190, 100%, 45%));
}

.pe-installment-card__name {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.pe-installment-card__price {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}


/* ==========================================================================
   11. STORE CARD (on product page)
   ========================================================================== */

.pe-product-store {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pe-product-store__icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: hsl(var(--accent, 190, 100%, 45%));
}

.pe-product-store__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pe-product-store__name {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.pe-product-store__address,
.pe-product-store__hours {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0.125rem 0 0;
}

.pe-product-store__phone {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--accent, 190, 100%, 45%));
    text-decoration: none;
    display: inline-block;
    margin-top: 0.25rem;
}

.pe-product-store__phone:hover {
    text-decoration: underline;
}

/* "Задай въпрос" button */
.pe-ask-question {
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border, 0, 0%, 90%));
    border-radius: 0.5rem;
    cursor: pointer;
    background: transparent;
    color: hsl(var(--foreground, 0, 0%, 10%));
    transition: border-color 0.2s, background 0.2s;
}

@media (min-width: 768px) {
    .pe-ask-question {
        display: flex;
    }
}

.pe-ask-question:hover {
    border-color: hsl(var(--primary, 0, 0%, 12%));
    background: hsl(var(--secondary, 30, 15%, 92%));
}


/* ==========================================================================
   12. STICKY MOBILE CTA
   ========================================================================== */

.pe-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: hsla(var(--background, 30, 25%, 96%), 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid hsl(var(--border, 0, 0%, 90%));
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .pe-sticky-cta {
        display: none;
    }
}

.pe-sticky-cta__buy,
.pe-sticky-cta__compare {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.pe-sticky-cta__buy {
    background: hsl(var(--primary, 0, 0%, 12%));
    color: hsl(var(--primary-foreground, 0, 0%, 100%));
}

.pe-sticky-cta__buy:hover {
    opacity: 0.85;
}

.pe-sticky-cta__compare {
    background: transparent;
    border: 1px solid hsl(var(--border, 0, 0%, 90%));
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-sticky-cta__compare:hover {
    border-color: hsl(var(--primary, 0, 0%, 12%));
    background: hsl(var(--secondary, 30, 15%, 92%));
}


/* ==========================================================================
   13. TABS SECTION
   ========================================================================== */

.pe-product-tabs {
    margin-top: 2.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .pe-product-tabs {
        margin-top: 3.5rem;
        padding: 0 2rem;
    }
}

@media (min-width: 1200px) {
    .pe-product-tabs {
        padding: 0;
    }
}

/* Tab navigation */
.pe-product-tabs__nav {
    display: flex;
    border-bottom: 1px solid hsl(var(--border, 0, 0%, 90%));
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pe-product-tabs__nav::-webkit-scrollbar {
    display: none;
}

.pe-product-tabs__btn {
    flex-shrink: 0;
    padding: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    transition: color 0.2s, border-color 0.2s;
}

@media (min-width: 768px) {
    .pe-product-tabs__btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

.pe-product-tabs__btn:hover {
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-product-tabs__btn--active {
    color: hsl(var(--foreground, 0, 0%, 10%));
    border-bottom-color: hsl(var(--primary, 0, 0%, 12%));
}

/* Tab content panels */
.pe-product-tabs__panel {
    display: none;
    padding-top: 1.5rem;
}

.pe-product-tabs__panel--active {
    display: block;
}

/* Description tab */
.pe-tab-description {
    max-width: 42rem;
}

.pe-tab-description h3 {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0 0 1rem;
}

.pe-tab-description p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    line-height: 1.7;
    margin: 0;
}

.pe-tab-description h4 {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 1.5rem 0 0.5rem;
}

.pe-tab-description__includes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pe-tab-description__includes li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}

.pe-tab-description__includes li svg {
    width: 0.875rem;
    height: 0.875rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
}

/* Device tab ("За устройството") */
.pe-tab-device {
    max-width: 42rem;
}

.pe-tab-device__section {
    padding: 1rem 0;
    border-bottom: 1px solid hsl(var(--border, 30, 10%, 88%));
}

.pe-tab-device__section:first-child {
    padding-top: 0;
}

.pe-tab-device__section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pe-tab-device__heading {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0 0 0.625rem;
}

.pe-tab-device__description {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-tab-device__description p {
    margin: 0 0 0.5rem;
}

.pe-tab-device__description p:last-child {
    margin-bottom: 0;
}

.pe-tab-device__grade-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pe-tab-device__grade-desc {
    font-size: 0.875rem;
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-tab-device__fonnit {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}

.pe-tab-device__fonnit svg {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
}

.pe-tab-device__fonnit-sub {
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}

.pe-tab-device__battery {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pe-tab-device__battery svg {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
}

.pe-tab-device__battery-info {
    flex: 1;
}

.pe-tab-device__battery-pct {
    font-weight: 600;
    font-size: 0.9375rem;
    display: block;
    margin-bottom: 0.375rem;
}

.pe-tab-device__battery-bar {
    width: 100%;
    max-width: 200px;
    height: 6px;
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 3px;
    overflow: hidden;
}

.pe-tab-device__battery-fill {
    height: 100%;
    background: hsl(var(--accent, 190, 100%, 45%));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.pe-tab-device__includes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pe-tab-device__includes li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.pe-tab-device__includes li svg {
    width: 0.875rem;
    height: 0.875rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
}

.pe-tab-device__warranty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground, 0, 0%, 10%));
}

.pe-tab-device__warranty svg {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
}

.pe-tab-device__notes {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
    line-height: 1.5;
}

/* Specs tab */
.pe-tab-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

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

.pe-spec-card {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 0.5rem;
    padding: 1rem;
}

.pe-spec-card svg {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    margin-bottom: 0.5rem;
}

.pe-spec-card__label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0;
}

.pe-spec-card__value {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0.125rem 0 0;
}

/* Warranty tab */
.pe-tab-warranty {
    max-width: 42rem;
}

.pe-tab-warranty h3 {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0 0 1rem;
}

.pe-tab-warranty__card {
    background: hsl(var(--secondary, 30, 15%, 92%));
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pe-tab-warranty__card svg {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--accent, 190, 100%, 45%));
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.pe-tab-warranty__card-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.pe-tab-warranty__card-desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

.pe-tab-warranty__contact {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
    margin: 1rem 0 0;
}

/* Reviews tab (empty state) */
.pe-tab-reviews-empty {
    text-align: center;
    padding: 3rem 0;
    color: hsl(var(--muted-foreground, 0, 0%, 45%));
}

.pe-tab-reviews-empty__title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
}

.pe-tab-reviews-empty__desc {
    font-size: 0.875rem;
    margin: 0;
}


/* ==========================================================================
   14. RELATED PRODUCTS SECTION
   ========================================================================== */

.pe-related-section {
    margin-top: 2.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .pe-related-section {
        margin-top: 3.5rem;
        padding: 0 2rem;
    }
}

@media (min-width: 1200px) {
    .pe-related-section {
        padding: 0;
    }
}

.pe-related-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.pe-related-section__title {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

@media (min-width: 768px) {
    .pe-related-section__title {
        font-size: 1.25rem;
    }
}

.pe-related-section__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--primary, 0, 0%, 12%));
    text-decoration: none;
}

.pe-related-section__link:hover {
    text-decoration: underline;
}

.pe-related-section__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .pe-related-section__grid {
        gap: 1.25rem;
    }
}


/* ==========================================================================
   15. GRADE BADGE COLORS (reuse across card + single product)
   ========================================================================== */

.condition-badge-excellent {
    background: hsl(142, 71%, 90%);
    color: hsl(142, 71%, 29%);
}

.condition-badge-good {
    background: hsl(48, 96%, 89%);
    color: hsl(32, 95%, 30%);
}

.condition-badge-fair {
    background: hsl(0, 0%, 92%);
    color: hsl(0, 0%, 40%);
}


/* ==========================================================================
   16. ANIMATION
   ========================================================================== */

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