/* ═══════════════════════════════════════════════════════
   Nova PDP Redesign – Modern Saudi e-commerce style
   Inspired by Noon · Extra · Jarir · Amazon · Apple
   ═══════════════════════════════════════════════════════ */

.nova-pdp-page {
    --pdp-border: #e7ebf1;
    --pdp-bg-soft: #f7f9fc;
    --pdp-title: #101828;
    --pdp-muted: #667085;
    --pdp-price: #0f172a;
}

/* ── Breadcrumb ── */
.nova-pdp-page .breadcrumb {
    margin-bottom: 1.25rem;
    font-size: 0.825rem;
}

.nova-pdp-page .breadcrumb-item a {
    color: #475467;
    text-decoration: none;
}

.nova-pdp-page .breadcrumb-item a:hover {
    color: var(--color-accent, #0066cc);
}

/* ── Surfaces ── */
.nova-pdp-surface {
    border: 1px solid var(--pdp-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(16, 24, 40, 0.07);
    background: #fff;
}

.nova-pdp-gallery-surface {
    padding: 1.25rem;
}

.nova-pdp-buybox {
    position: relative;
    padding: 1.5rem 1.75rem;
}

/* ── Brand pill ── */
.nova-pdp-brand-line {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-accent, #0a65cc);
    background: #ebf4ff;
    border: 1px solid #d5e7ff;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Title ── */
.nova-pdp-title {
    color: var(--pdp-title);
    line-height: 1.32;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.nova-pdp-sku {
    color: var(--pdp-muted) !important;
    font-size: 0.8rem;
}

/* ── Price ── */
.nova-pdp-price-row {
    border-top: 1px solid #edf1f7;
    border-bottom: 1px solid #edf1f7;
    padding: 0.85rem 0;
    flex-wrap: wrap;
    align-items: center !important;
}

.nova-pdp-price-now {
    color: var(--pdp-price);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
}

.nova-pdp-price-old {
    font-size: 1rem;
    color: #94a3b8;
}

.nova-pdp-discount-badge {
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
}

/* New: percentage discount badge (red pill like Noon) */
.nova-pdp-discount-pct-badge {
    background: #fff1f0;
    color: #c0392b;
    border: 1px solid #fcd5d2;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.26rem 0.62rem;
    white-space: nowrap;
}

/* ── Short description – accent left border instead of grey box ── */
.nova-pdp-short-desc {
    background: #fff;
    border: none;
    border-left: 3px solid var(--color-accent, #0a65cc);
    border-radius: 0 8px 8px 0;
    padding: 0.72rem 0.9rem;
    color: #344054 !important;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-top: 0.85rem !important;
}

[dir="rtl"] .nova-pdp-short-desc {
    border-left: none;
    border-right: 3px solid var(--color-accent, #0a65cc);
    border-radius: 8px 0 0 8px;
}

/* ── Divider ── */
.nova-pdp-divider {
    margin: 1.1rem 0;
    border-color: #edf1f7;
}

/* ── Cart block ── */
.nova-pdp-cart-block {
    margin-top: 1rem !important;
    background: #f9fbfe;
    border: 1px solid #e4ecf7;
    border-radius: 16px;
    padding: 0.9rem;
}

.nova-pdp-cart-form {
    gap: 0.7rem !important;
    flex-wrap: wrap;
}

/* Qty stepper – taller to match buttons */
.nova-pdp-qty-wrap {
    border: 1.5px solid #d0dbe8 !important;
    border-radius: 12px !important;
    background: #fff;
    height: 52px;
    overflow: hidden;
}

.nova-pdp-qty-btn {
    color: #0f172a;
    font-weight: 800;
    min-width: 38px;
    font-size: 1.1rem;
    transition: background 0.15s;
}

.nova-pdp-qty-btn:hover {
    background: #f0f4fa;
}

.nova-pdp-cart-form #qtyInput {
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    font-size: 1rem;
    height: 52px;
}

/* CTA buttons – taller, lift-on-hover */
.nova-pdp-cart-form .pdp-action-btn {
    border-radius: 12px;
    font-weight: 800;
    min-height: 52px;
    font-size: 0.96rem;
    letter-spacing: 0.01em;
    transition: transform 0.12s, box-shadow 0.12s;
}

.nova-pdp-cart-form .pdp-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.nova-pdp-cart-form .pdp-buy-now-btn {
    border: 1.5px solid #131313;
    background: #131313;
    color: #fff;
    border-radius: 12px;
    min-height: 52px;
    font-weight: 800;
}

.nova-pdp-cart-form .pdp-buy-now-btn:hover {
    background: #000;
    color: #fff;
}

.nova-pdp-cart-form .pdp-cart-link-btn {
    border-radius: 12px;
    min-width: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Stock hint ── */
.nova-pdp-stock-hint {
    display: block;
    background: #eefbf4;
    border: 1px solid #c9efd8;
    color: #116637 !important;
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
    font-size: 0.84rem;
}

/* ── Variant pills – CSS class-based selection ── */
.variant-btn {
    min-height: 36px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1.5px solid #d0dbe8 !important;
    background: #fff !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.14s ease !important;
    padding: 0.3rem 0.75rem !important;
    cursor: pointer !important;
}

.variant-btn:hover {
    border-color: var(--color-accent, #0a65cc) !important;
    background: #f0f6ff !important;
}

.variant-btn.is-selected {
    background: var(--color-accent, #0a65cc) !important;
    border-color: var(--color-accent, #0a65cc) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(10, 101, 204, 0.28);
}

/* ── Color swatch variant (auto-detected via JS) ── */
.variant-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    display: inline-block;
    flex-shrink: 0;
}

.variant-swatch:hover {
    transform: scale(1.12);
    border-color: #94a3b8;
}

.variant-swatch.is-selected {
    border-color: var(--color-accent, #0a65cc);
    box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.22);
    transform: scale(1.08);
}

.variant-swatch.is-white {
    border-color: #cbd5e1 !important;
}

/* ── Trust badges – horizontal icon row ── */
.nova-pdp-trust-badges {
    margin-top: 0.5rem;
}

.nova-pdp-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.nova-pdp-trust-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #f9fbff;
    border: 1px solid #e4eaf4;
    border-radius: 12px;
    padding: 0.55rem 0.9rem 0.55rem 0.6rem;
    flex: 1 1 calc(50% - 0.55rem);
    min-width: 130px;
    color: inherit;
}

a.nova-pdp-trust-item--link {
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.nova-pdp-trust-item--link:hover {
    border-color: #c9d6ea;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.nova-pdp-trust-icon-wrap {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ebf4ff;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1.05rem;
    color: var(--color-accent, #0a65cc);
}

.nova-pdp-trust-label {
    font-size: 0.79rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

/* Legacy trust card (kept for compatibility) */
.nova-pdp-trust-card {
    border-color: #e4eaf4 !important;
    background: #f9fbff;
    border-radius: 12px !important;
    padding: 0.54rem 0.48rem !important;
}

.nova-pdp-trust-icon {
    color: #0f172a;
}

/* ── Specs table – alternating rows, no inline styles ── */
.nova-pdp-specs-block {
    border: 1px solid #ebf0f7;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    margin-top: 0.85rem;
}

.nova-pdp-specs-title {
    color: #0f172a;
    font-size: 0.88rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e8edf5;
    margin: 0;
    font-weight: 700;
}

.nova-pdp-specs-table {
    margin: 0 !important;
    border: none !important;
}

.nova-pdp-specs-table td {
    padding: 0.55rem 0.85rem;
    border-color: #edf1f6 !important;
    font-size: 0.875rem;
    vertical-align: middle;
}

.nova-pdp-specs-table tr:nth-child(odd) td {
    background: #f8fafd;
}

.nova-pdp-specs-table tr:nth-child(even) td {
    background: #fff;
}

.nova-pdp-specs-table td:first-child {
    color: #475467;
    font-weight: 600;
    width: 38%;
}

/* Features table generated inside product HTML description */
.product-html-content .nova-product-features-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.35rem 0 1.6rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}
.product-html-content .nova-product-features-table thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    padding: 0.85rem 1rem;
    font-weight: 700;
    text-align: start;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.product-html-content .nova-product-features-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    vertical-align: top;
    line-height: 1.55;
}
.product-html-content .nova-product-features-table tr:last-child td {
    border-bottom: 0;
}
.product-html-content .nova-product-features-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}
.product-html-content .nova-product-features-table td:first-child {
    width: 34%;
    font-weight: 650;
}

/* ── Section headings – accent left border ── */
.nova-pdp-section {
    border: 1px solid #eaedf3;
    border-radius: 20px;
    background: #fff;
    padding: 1.25rem 1.4rem;
}

.nova-pdp-section-heading {
    font-size: 1.05rem;
    font-weight: 800;
    color: #101828;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--color-accent, #0a65cc);
    line-height: 1.3;
}

[dir="rtl"] .nova-pdp-section-heading {
    padding-left: 0;
    padding-right: 0.75rem;
    border-left: none;
    border-right: 3px solid var(--color-accent, #0a65cc);
}

/* ── Review cards ── */
.nova-pdp-review-card {
    border: 1px solid #ebeff6;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
    transition: box-shadow 0.18s, transform 0.18s;
}

.nova-pdp-review-card:hover {
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.09);
    transform: translateY(-1px);
}

.nova-pdp-review-form-card {
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfdff 0%, #f8fbff 100%);
}

/* ── Rating distribution bars ── */
.nova-pdp-rating-summary {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.nova-pdp-rating-big {
    text-align: center;
    min-width: 70px;
    flex-shrink: 0;
}

.nova-pdp-rating-big .score {
    font-size: 2.5rem;
    font-weight: 800;
    color: #101828;
    line-height: 1;
}

.nova-pdp-rating-big .out-of {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.nova-pdp-rating-big .stars-row {
    color: #f59e0b;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.nova-pdp-rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.nova-pdp-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.77rem;
}

.nova-pdp-bar-row .bar-label {
    min-width: 26px;
    text-align: right;
    color: #475467;
    font-weight: 600;
}

.nova-pdp-bar-row .bar-track {
    flex: 1;
    height: 7px;
    background: #e5eaf3;
    border-radius: 999px;
    overflow: hidden;
}

.nova-pdp-bar-row .bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #f59e0b;
    transition: width 0.5s ease;
}

.nova-pdp-bar-row .bar-count {
    min-width: 20px;
    color: #94a3b8;
}

/* ── Sticky mobile CTA bar ── */
.nova-pdp-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(16, 24, 40, 0.1);
    gap: 0.65rem;
    align-items: center;
}

.nova-pdp-sticky-cta.is-visible {
    display: flex;
}

.nova-pdp-sticky-cta .sticky-price-wrap {
    flex: 1;
    min-width: 0;
}

.nova-pdp-sticky-cta .nova-mprice {
    gap: 0.2rem;
}

.nova-pdp-sticky-cta .nova-mprice__now,
.nova-pdp-sticky-cta .sticky-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.nova-pdp-sticky-cta .nova-mprice__tease--sticky {
    padding: 0.2rem 0;
    border: none;
    background: transparent;
}

.nova-pdp-sticky-cta .nova-mprice__tease-label {
    font-size: 0.65rem;
}

.nova-pdp-sticky-cta .nova-mprice__tease-amount {
    font-size: 0.78rem;
}

.nova-pdp-sticky-cta .sticky-btn {
    flex: 0 0 auto;
    min-width: 42%;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
}

/* Hide sticky CTA on desktop */
@media (min-width: 768px) {
    .nova-pdp-sticky-cta {
        display: none !important;
    }
}

.nova-pdp-page .card-nova {
    border-radius: 14px;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .nova-pdp-title {
        font-size: 1.2rem;
        line-height: 1.42;
    }

    .nova-pdp-price-now {
        font-size: 1.55rem;
    }

    .nova-pdp-buybox {
        border-radius: 16px;
        padding: 1.1rem 1.25rem;
    }

    .nova-pdp-gallery-surface {
        border-radius: 16px;
        padding: 0.9rem;
    }

    .nova-pdp-section {
        border-radius: 16px;
        padding: 1rem 1.1rem;
    }

    .nova-pdp-trust-item {
        flex: 1 1 100%;
    }

    .nova-pdp-rating-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .nova-pdp-rating-bars {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .nova-pdp-cart-form .pdp-primary-actions {
        width: 100%;
    }

    .nova-pdp-cart-form .pdp-action-btn {
        flex: 1 1 0;
    }

    .nova-pdp-cart-form .pdp-cart-link-btn {
        display: none;
    }

    .nova-pdp-price-row {
        padding: 0.65rem 0;
    }

    .nova-pdp-review-card,
    .nova-pdp-review-form-card {
        border-radius: 12px;
    }

    .nova-pdp-buybox {
        padding: 1rem;
    }

    .nova-pdp-section-heading {
        font-size: 0.96rem;
    }
}
