/**
 * Pricing – BanBat Industrial Showroom
 * Synchronized with BB Industrial Theme (bb-* variables)
 */

/* ---------- VARIABLES ---------- */
:root {
    --p2-bg: var(--bb-cream, #f5f0e8);
    --p2-bg-alt: #ffffff;
    --p2-glass-bg: rgba(245, 240, 232, 0.88);
    --p2-glass-border: rgba(0, 0, 0, 0.08);
    --p2-glass-bg-strong: rgba(245, 240, 232, 0.98);

    --p2-accent: var(--bb-orange, #e84c1e);
    --p2-accent-rgb: 232, 76, 30;
    --p2-accent-glow: rgba(232, 76, 30, 0.2);
    --p2-accent-light: rgba(232, 76, 30, 0.12);

    --p2-text: var(--bb-text, #1e160e);
    --p2-text-muted: var(--bb-muted, #7a6a58);

    --p2-border: var(--bb-border, #d8d2c8);
    --p2-border-light: var(--bb-cream-dark, #edeae2);

    --p2-radius: 0.375rem;
    --p2-transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   UNIFIED SHOWROOM – One Screen Layout
   ========================================================= */
.p2-showroom {
    position: relative;
    height: calc(100vh - 70px);
    background: var(--p2-bg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 65% 35%;
}

/* Soft ambient gradients — BB orange tint */
.p2-showroom::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(232, 76, 30, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.p2-showroom::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(232, 76, 30, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- GLASSMORPHISM ---------- */
.p2-glass {
    background: var(--p2-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--p2-glass-border);
    border-radius: var(--p2-radius);
    color: var(--p2-text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* =========================================================
   LEFT COLUMN – Product Stage
   ========================================================= */
.p2-stage-col {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    overflow: hidden;
}

/* 3D Stage */
.p2-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    min-height: 0;
}

.p2-product-wrapper {
    position: relative;
    width: 100%;
    max-width: 80%;
    /* transform-style: preserve-3d removed to fix mix-blend-mode */
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.p2-product-wrapper.stage {
    isolation: isolate;
}

.p2-product-img {
    width: 100%;
    height: auto;
    border-radius: var(--p2-radius);
    object-fit: cover;
    display: block;
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(232, 76, 30, 0.05);
    opacity: 0;
    transform: scale(0.5);
    position: relative;
    z-index: 0;
}

.p2-color-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    mix-blend-mode: multiply;

    transition: background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-radius: var(--p2-radius);
}

/* Glow under product */
.p2-product-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 15%;
    right: 15%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

/* --- Bottom Row: Labels + Color Bar --- */
.p2-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    flex-shrink: 0;
}

.p2-glass-labels {
    display: flex;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(10px);
}

.p2-label-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--p2-bg-alt);
    border: 1px solid var(--p2-border);
    color: var(--p2-text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.p2-label-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.p2-label-badge .material-symbols-outlined {
    color: var(--p2-text-muted);
}

/* Color Bar */
.p2-color-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--p2-bg-alt);
    border: 1px solid var(--p2-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.p2-color-btn {
    width: 40px;
    height: 32px;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    padding: 0;

    /* Scalloped edge mask (Awning shape) */
    -webkit-mask-image:
        linear-gradient(to bottom, black calc(100% - 5px), transparent calc(100% - 5px)),
        radial-gradient(circle at 5px 0px, black 5px, transparent 5.5px);
    -webkit-mask-position: top, bottom left;
    -webkit-mask-size: 100% 100%, 10px 5px;
    -webkit-mask-repeat: no-repeat, repeat-x;

    mask-image:
        linear-gradient(to bottom, black calc(100% - 5px), transparent calc(100% - 5px)),
        radial-gradient(circle at 5px 0px, black 5px, transparent 5.5px);
    mask-position: top, bottom left;
    mask-size: 100% 100%, 10px 5px;
    mask-repeat: no-repeat, repeat-x;

    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* 3D Inner shading for fabric fold effect */
.p2-color-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* The awning fold line */
.p2-color-btn::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.15);
    box-shadow: 0 1px 0 rgba(255,255,255,0.15);
    pointer-events: none;
    z-index: 1;
}

.p2-color-btn:hover {
    transform: translateY(-4px) scale(1.05);
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.25));
}

.p2-color-btn.active {
    transform: translateY(-6px) scale(1.15);
    filter: drop-shadow(0 0 10px rgba(232, 76, 30, 0.4)) drop-shadow(0 6px 8px rgba(0,0,0,0.3));
    z-index: 2;
}

.p2-color-btn.active::after {
    background:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center center / 16px 16px,
        radial-gradient(circle at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.35) 12px, transparent 13px),
        linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.3) 100%);
}

@media (max-width: 768px) {
    .p2-color-btn {
        width: 50px;
        height: 42px;

        -webkit-mask-image:
            linear-gradient(to bottom, black calc(100% - 6px), transparent calc(100% - 6px)),
            radial-gradient(circle at 5px 0px, black 5px, transparent 5.5px);
        -webkit-mask-size: 100% 100%, 10px 6px;

        mask-image:
            linear-gradient(to bottom, black calc(100% - 6px), transparent calc(100% - 6px)),
            radial-gradient(circle at 5px 0px, black 5px, transparent 5.5px);
        mask-size: 100% 100%, 10px 6px;
    }

    .p2-color-btn::before {
        bottom: 6px;
    }
}

.p2-color-btn .color-name {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    background: var(--p2-text);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.p2-color-btn:hover .color-name,
.p2-color-btn.active .color-name {
    opacity: 1;
}

/* Spec Strip */
.p2-specs-strip {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.p2-spec-pill {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    background: var(--p2-bg-alt);
    border: 1px solid var(--p2-border);
    color: var(--p2-text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.p2-spec-pill .material-symbols-outlined {
    font-size: 0.85rem;
    color: var(--p2-accent);
}

/* ---------- HOTSPOTS ---------- */
.p2-hotspot {
    position: absolute;
    z-index: 15;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.p2-hotspot.visible {
    opacity: 1;
}

.p2-hotspot-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--p2-accent);
    box-shadow: 0 0 10px var(--p2-accent-glow);
    animation: p2-pulse 2s ease-in-out infinite;
    transition: transform 0.3s ease;
    border: 2px solid #fff;
}

.p2-hotspot:hover .p2-hotspot-dot {
    transform: scale(1.3);
}

@keyframes p2-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--p2-accent-glow); }
    70% { box-shadow: 0 0 0 10px rgba(232, 76, 30, 0); }
}

.p2-hotspot-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(232, 76, 30, 0.25);
    animation: p2-ring-expand 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes p2-ring-expand {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.p2-hotspot-card {
    position: absolute;
    top: -8px;
    left: calc(100% + 10px);
    width: 180px;
    padding: 0.75rem;
    border-radius: var(--p2-radius);
    background: var(--p2-bg-alt);
    border: 1px solid var(--p2-glass-border);
    opacity: 0;
    transform: translateX(-8px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.p2-hotspot:hover .p2-hotspot-card {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.p2-hotspot-card h4 {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--p2-accent);
    margin-bottom: 0.2rem;
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
}

.p2-hotspot-card p {
    font-size: 0.65rem;
    color: var(--p2-text-muted);
    line-height: 1.4;
    margin: 0;
}

/* =========================================================
   RIGHT COLUMN – Configurator Panel
   ========================================================= */
.p2-config-col {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
    background: var(--p2-bg);
    border-left: 1px solid var(--p2-border);
    box-shadow: -10px 0 30px rgba(0,0,0,0.02);
}

/* Scrollbar styling */
.p2-config-col::-webkit-scrollbar { width: 4px; }
.p2-config-col::-webkit-scrollbar-track { background: transparent; }
.p2-config-col::-webkit-scrollbar-thumb {
    background: var(--p2-border);
    border-radius: 4px;
}

/* --- Price Hero Badge --- */
.p2-price-hero {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.p2-price-from {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--p2-text-muted);
    margin-bottom: 0.2rem;
}

.p2-price-big {
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    font-size: 2rem;
    font-weight: 900;
    color: var(--p2-accent);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* --- Section containers (Bento Cards) --- */
.p2-section {
    background: #ffffff;
    border: 1px solid var(--p2-border);
    border-radius: var(--p2-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    flex-shrink: 0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.p2-section:hover {
    border-color: rgba(232, 76, 30, 0.25);
    box-shadow: 0 4px 16px rgba(232, 76, 30, 0.06);
}

.p2-sec-title {
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--p2-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.p2-sec-title .material-symbols-outlined {
    font-size: 1rem;
    color: var(--p2-accent);
}

.p2-auto-tag {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: rgba(232, 76, 30, 0.1);
    color: var(--p2-accent);
    margin-left: auto;
}

/* --- Dimensions --- */
.p2-dim-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.p2-dim-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.p2-dim-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.p2-dim-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--p2-radius);
    background: rgba(232, 76, 30, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--p2-accent);
    flex-shrink: 0;
}

.p2-dim-head strong {
    font-size: 0.75rem;
    color: var(--p2-text);
    display: block;
    line-height: 1.1;
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
}

.p2-dim-head small {
    font-size: 0.6rem;
    color: var(--p2-text-muted);
    font-weight: 500;
}

.p2-range-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.p2-range-row input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--p2-border);
    outline: none;
    cursor: pointer;
}

.p2-range-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--p2-accent);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(232, 76, 30, 0.15), 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.p2-range-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(232, 76, 30, 0.2), 0 3px 8px rgba(0,0,0,0.15);
}

.p2-range-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--p2-accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 3px rgba(232, 76, 30, 0.15), 0 2px 5px rgba(0,0,0,0.1);
}

.p2-dim-val {
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    background: var(--p2-accent);
    padding: 0.35rem 0.8rem;
    border-radius: var(--p2-radius);
    min-width: 3.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(232, 76, 30, 0.2);
}

/* Area pill */
.p2-area-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--p2-radius);
    background: #fff;
    border: 1px solid var(--p2-border);
    font-size: 0.7rem;
    color: var(--p2-text-muted);
    margin-top: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.p2-area-pill .material-symbols-outlined {
    font-size: 0.9rem;
    color: var(--p2-accent);
}

.p2-area-pill strong {
    color: var(--p2-accent);
    font-size: 0.75rem;
}

/* --- Breakdown Table (Receipt Ledger) --- */
.p2-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.p2-bk-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
}

.p2-bk-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--p2-text);
    white-space: nowrap;
}

.p2-bk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--p2-accent);
    flex-shrink: 0;
}

/* The dotted line connecting name to price */
.p2-bk-leader {
    flex-grow: 1;
    border-bottom: 1px dashed var(--p2-border);
    margin: 0 0.5rem;
    position: relative;
    top: -4px;
    opacity: 0.6;
}

.p2-bk-detail {
    font-size: 0.7rem;
    color: var(--p2-text-muted);
    font-weight: 500;
    white-space: nowrap;
    background: #ffffff;
    padding: 0 0.3rem;
}

.p2-bk-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--p2-text);
    white-space: nowrap;
    text-align: right;
    background: #ffffff;
    padding-left: 0.3rem;
}

/* --- Total Bar --- */
.p2-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(232, 76, 30, 0.06) 0%, rgba(232, 76, 30, 0.02) 100%);
    border: 1px solid rgba(232, 76, 30, 0.18);
    border-radius: var(--p2-radius);
    box-shadow: 0 2px 12px rgba(232, 76, 30, 0.05);
}

.p2-total-info {
    flex: 1;
}

.p2-total-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--p2-text-muted);
    display: block;
    margin-bottom: 0.15rem;
}

.p2-total-val {
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--p2-accent);
    letter-spacing: -0.01em;
}

/* Order Button – BB Industrial Style */
.p2-btn-order {
    padding: 0.75rem 2rem;
    border: none;
    background-color: var(--p2-accent);
    color: #fff;
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.p2-btn-order:hover {
    background-color: var(--bb-orange2, #ff5a28);
    color: #fff;
    transform: translateY(-2px);
}

.p2-btn-order:active {
    transform: scale(0.97) translateY(0);
}

.p2-btn-order .material-symbols-outlined {
    font-size: 1.1rem;
}

/* --- Notes Section --- */
.p2-notes-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--p2-radius);
    background: #ffffff;
    border: 1px solid var(--p2-border);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.p2-note-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--p2-text-muted);
    line-height: 1.5;
}

.p2-note-item .material-symbols-outlined {
    font-size: 1rem;
    color: var(--p2-accent);
    background: rgba(232, 76, 30, 0.1);
    padding: 0.2rem;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: -0.1rem;
}

.p2-note-item a {
    color: var(--p2-accent);
    font-weight: 800;
    text-decoration: none;
}

.p2-note-item a:hover {
    text-decoration: underline;
    color: var(--p2-text);
}

.p2-note-item strong {
    color: var(--p2-text);
}

.p2-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.p2-note-icon {
    font-size: 1rem;
    color: var(--p2-accent);
    background: rgba(232, 76, 30, 0.08);
    padding: 0.3rem;
    border-radius: var(--p2-radius);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.p2-note-item p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--p2-text-muted);
}

.p2-notes-section {
    background: rgba(232, 76, 30, 0.02) !important;
    border: 1px dashed rgba(232, 76, 30, 0.2) !important;
}

/* ---------- PRICE PULSE ---------- */
.p2-price-pulse {
    animation: p2PricePulse 0.5s ease-out;
}

@keyframes p2PricePulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.04); color: var(--bb-orange2, #ff5a28); }
    100% { transform: scale(1); }
}

/* ---------- MOBILE BOTTOM BAR ---------- */
.p2-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--bb-cream, #f5f0e8);
    border-top: 2px solid var(--p2-accent);
    padding: 0.75rem 1.25rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 12px));
    display: none;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* --- Large desktop (≥1600px) --- */
@media (min-width: 1600px) {
    .p2-price-big { font-size: 2.2rem; }
    .p2-product-wrapper { max-width: 80%; }
}

/* --- Tablet (≤991px) – stack vertically --- */
@media (max-width: 991.98px) {
    .p2-showroom {
        height: auto;
        min-height: calc(100vh - 70px);
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .p2-stage-col {
        min-height: 55vh;
        padding: 1.5rem;
    }

    .p2-config-col {
        border-left: none;
        border-top: 1px solid var(--p2-border);
        padding: 1.5rem;
        /*padding-bottom: calc(1.5rem + 80px);*/
        overflow-y: visible;
        background: var(--bb-cream, #f5f0e8);
    }

    .p2-hotspot { display: none !important; }

    .p2-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .p2-bottom-row {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* --- Mobile (≤575px) --- */
@media (max-width: 575.98px) {
    .p2-product-wrapper { max-width: 100%; }

    .p2-stage-col {
        min-height: 45vh;
        padding: 1rem;
    }

    .p2-config-col {
        padding: 1.25rem 1rem;
        /*padding-bottom: calc(1.25rem + 80px);*/
    }

    .p2-price-big { font-size: 1.5rem; }

    .p2-dim-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .p2-total-bar { display: none; }

    .p2-specs-strip {
        gap: 0.4rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }
    .p2-specs-strip::-webkit-scrollbar { display: none; }

    .p2-spec-pill {
        font-size: 0.6rem;
        padding: 0.35rem 0.6rem;
    }

    .p2-color-btn {
        width: 1.6rem;
        height: 1.6rem;
    }

    .p2-color-btn .color-name { display: none !important; }
    .p2-glass-labels { display: none !important; }

    .p2-section { padding: 0.85rem 1rem; }

    .p2-note-item { font-size: 0.6rem; }
}

/* ---------- FADE UTILITY ---------- */
.p2-fade-in {
    animation: p2FadeIn 0.5s ease forwards;
}

@keyframes p2FadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- GOOGLE MATERIAL ICONS OVERRIDE ---------- */
.p2-showroom .material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
}

/* =========================================================
   STAGE LAYOUT (SWIPER + HERO IMAGE)
   ========================================================= */
.p2-stage {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.p2-thumb-col {
    width: 150px;
    flex-shrink: 0;
}

.p2-gallery-swiper {
    height: 100%;
    max-height: 400px;
}

.p2-product-wrapper {
    flex-grow: 1;
}

.p2-gal-img {
    width: 100%;
    height: 70px;
    object-fit: cover;
}

.p2-gallery-wrapper { padding: 0; }

.p2-gallery-item {
    display: block;
    border-radius: var(--p2-radius);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--p2-border);
    height: 100%;
}

.p2-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.p2-gallery-item:hover {
    border-color: var(--p2-accent);
}

.p2-gallery-item img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.p2-gallery-item:hover img {
    transform: scale(1.1);
}

.p2-gallery-item.p2-selected {
    border-color: var(--p2-accent);
}
.p2-gallery-item.p2-selected::after {
    box-shadow: inset 0 0 0 2px var(--p2-accent);
}

.swiper-slide {
    height: 100% !important;
    border-radius: var(--p2-radius) !important;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .p2-stage { flex-direction: column; }
    .p2-thumb-col { width: 100%; height: auto; }
    .p2-gallery-swiper { height: auto; max-height: none; }
    .p2-gal-img { height: 60px; }
    .swiper-slide { height: auto !important; }
}

/* --- Thickness Tier Buttons --- */
.p2-tier-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.p2-tier-btn {
    flex: 1 1 auto;
    min-width: 80px;
    padding: 0.5rem 1rem;
    background: var(--p2-bg-alt);
    border: 1px solid var(--p2-border);
    border-radius: var(--p2-radius);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--p2-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    letter-spacing: 0.02em;
}

.p2-tier-btn:hover {
    border-color: var(--p2-accent);
    color: var(--p2-accent);
    background: rgba(232, 76, 30, 0.05);
    transform: translateY(-1px);
}

.p2-tier-btn.active {
    background: var(--p2-accent);
    border-color: var(--p2-accent);
    color: #fff;
    box-shadow: 0 4px 10px rgba(232, 76, 30, 0.3);
    transform: translateY(-2px);
}

.tarp-style-card, .measure-method-card {
    cursor: pointer !important;
}

.tarp-style-card,
.measure-method-card {
    border: 1px solid var(--p2-border) !important;
    transition: var(--p2-transition);
}

.tarp-style-card:hover,
.measure-method-card:hover {
    border-color: var(--p2-accent) !important;
    background: rgba(232, 76, 30, 0.04);
    transform: translateY(-1px);
}

.tarp-style-card.active,
.measure-method-card.active {
    border: 2px solid var(--p2-accent) !important;
    background: rgba(232, 76, 30, 0.06);
    box-shadow: 0 4px 12px rgba(232, 76, 30, 0.12);
}

.tarp-style-card.active .fw-bold,
.measure-method-card.active .fw-bold,
.measure-method-card.active .material-symbols-outlined {
    color: var(--p2-accent) !important;
}

.p2-dim-item .form-select.truck-dimension-input {
    border: 0;
    background-color: transparent;
    box-shadow: none;
    font-weight: 800;
    color: var(--p2-accent);
    padding-left: 0;
}

.p2-dim-item .form-select.truck-dimension-input:disabled,
.p2-stepper-input[readonly] {
    color: var(--p2-text-muted);
    opacity: 0.85;
}

/* --- Modern Stepper Input --- */
.p2-stepper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--p2-border);
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--p2-transition);
}

.p2-stepper:focus-within {
    border-color: var(--p2-accent);
    box-shadow: 0 0 0 3px rgba(232, 76, 30, 0.15);
}

.p2-stepper-btn {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: var(--p2-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.p2-stepper-btn:hover {
    background: rgba(232, 76, 30, 0.08);
    color: var(--p2-accent);
}

.p2-stepper-btn:active { transform: scale(0.9); }

.p2-stepper-btn .material-symbols-outlined { font-size: 1.2rem; }

.p2-stepper-input {
    flex: 1;
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-family: var(--bb-font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--p2-accent);
    outline: none;
    -moz-appearance: textfield;
}

.p2-stepper-input::-webkit-outer-spin-button,
.p2-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.p2-stepper-unit {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--p2-text-muted);
    padding-right: 0.75rem;
    user-select: none;
}

/* Small Stepper for Accessories */
.p2-stepper-sm {
    padding: 0.15rem;
    border-radius: var(--p2-radius);
    background: rgba(0,0,0,0.02);
    box-shadow: none;
    border: 1px solid var(--p2-border-light);
}

.p2-stepper-sm .p2-stepper-btn {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.25rem;
}

.p2-stepper-sm .p2-stepper-btn .material-symbols-outlined { font-size: 1rem; }
.p2-stepper-sm .p2-stepper-input { font-size: 0.9rem; }

/* Hide global mobile CTA to prioritize pricing specific mobile bar */
.bb-mobile-cta {
    display: none !important;
}
