/* ================================================================
   WPO Product Experience — Phase 1 (Elementor-compatible)
   ================================================================ */

/* ── Hidden by plugin class (applied via JS) ─────────────────── */
.wpe-hidden-by-plugin {
    display: none !important;
}

/* ── Also hide via CSS for known selectors (belt + suspenders) ─ */
.wpe-product-page .product_title,
.wpe-product-page h1.entry-title,
.wpe-product-page .summary > .price,
.wpe-product-page .summary > .woocommerce-product-details__short-description,
.wpe-product-page .summary > .product_meta {
    display: none !important;
}

/* Elementor widget hiding */
.wpe-product-page .elementor-widget-theme-page-title,
.wpe-product-page .elementor-widget-woocommerce-product-title,
.wpe-product-page .elementor-widget-wc-product-title,
.wpe-product-page .elementor-widget-woocommerce-product-price,
.wpe-product-page .elementor-widget-wc-product-price,
.wpe-product-page .elementor-widget-woocommerce-product-short-description,
.wpe-product-page .elementor-widget-wc-product-short-description,
.wpe-product-page .elementor-widget-woocommerce-product-rating,
.wpe-product-page .elementor-widget-wc-product-rating,
.wpe-product-page .elementor-widget-woocommerce-product-meta,
.wpe-product-page .elementor-widget-wc-product-meta {
    display: none !important;
}

/* Hide old cropper/visualiser buttons */
.wpe-product-page .wpo-mc-inline {
    display: none !important;
}
.wpe-product-page .rv-open-btn {
    display: none !important;
}

/* Hide the Elementor add-to-cart widget (contains Product Add-Ons, dimensions, etc.)
   Our modal handles all of this now. */
/* Hide the WooCommerce add-to-cart widget (our modal replaces it,
   and the room visualiser is now embedded in WPE). */
.wpe-product-page .elementor-widget-woocommerce-product-add-to-cart {
    display: none !important;
}

/* ── Panel Container ─────────────────────────────────────────── */

.wpe-panel {
    max-width: 480px;
}

/* ── Product Title ───────────────────────────────────────────── */

.wpe-product-title {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.25;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

/* ── Short Description ───────────────────────────────────────── */

.wpe-short-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 24px;
}

.wpe-short-desc p {
    margin: 0;
}

.wpe-short-desc a {
    color: #c0392b;
    text-decoration: none;
}

.wpe-short-desc a:hover {
    text-decoration: underline;
}

/* ── Section Labels ──────────────────────────────────────────── */

.wpe-section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
}

/* ── Colorways ───────────────────────────────────────────────── */

.wpe-colorways {
    margin-bottom: 28px;
}

.wpe-colorway-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpe-colorway-swatch {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.wpe-colorway-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpe-colorway-swatch.active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a;
}

.wpe-colorway-swatch:hover:not(.active) {
    border-color: #aaa;
}

/* ── Materials ───────────────────────────────────────────────── */

.wpe-materials {
    margin-bottom: 28px;
}

.wpe-materials-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.wpe-material-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.wpe-material-pill {
    padding: 10px 18px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.3;
    white-space: nowrap;
}

.wpe-material-pill:hover {
    border-color: #888;
}

.wpe-material-pill.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.wpe-material-desc {
    font-size: 0.8rem;
    color: #888;
    margin: 4px 0 0 0;
    min-height: 1.2em;
    transition: opacity 0.15s ease;
}

/* ── Price Section ───────────────────────────────────────────── */

.wpe-price-section {
    margin-bottom: 28px;
}

.wpe-price-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
}

.wpe-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wpe-price-regular {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.wpe-price-current {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
}

.wpe-price-unit {
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
}

/* ── CTA Buttons ─────────────────────────────────────────────── */

.wpe-cta-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.wpe-btn-primary {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: center;
    line-height: 1;
}

.wpe-btn-primary:hover {
    background: #333;
}

.wpe-btn-secondary {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: #fff;
    color: #1a1a1a;
    border: 1.5px solid #1a1a1a;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1;
}

.wpe-btn-secondary:hover {
    background: #f5f5f5;
}

/* ── Visualize Button ────────────────────────────────────────── */

.wpe-btn-visualize {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: #555;
    border: 1px dashed #ccc;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 28px;
}

.wpe-btn-visualize:hover {
    border-color: #888;
    color: #333;
    background: #fafafa;
}

.wpe-btn-visualize svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* ── Trust Badges ────────────────────────────────────────────── */

.wpe-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
}

.wpe-trust-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.4;
}

.wpe-trust-badge svg {
    flex-shrink: 0;
    color: #2d7a3a;
    margin-top: 1px;
}

/* ================================================================
   Existing Form Wrapper (Phase 1 — reveal on "Customize" click)
   ================================================================ */

.wpe-existing-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

.wpe-existing-form.open {
    max-height: 3000px;
    opacity: 1;
}

.wpe-existing-form-inner {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 24px;
    margin: 24px 0 16px;
    background: #fafafa;
}

.wpe-existing-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e5e5;
}

.wpe-existing-form-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #333;
}

.wpe-existing-form-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #888;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpe-existing-form-close:hover {
    color: #333;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 1024px) {
    .wpe-panel {
        max-width: 100%;
    }

    .wpe-product-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .wpe-product-title {
        font-size: 1.2rem;
    }

    .wpe-material-pills {
        flex-direction: column;
    }

    .wpe-material-pill {
        text-align: center;
    }

    .wpe-btn-primary,
    .wpe-btn-secondary {
        padding: 14px 20px;
        font-size: 0.8rem;
    }

    .wpe-existing-form-inner {
        padding: 16px;
    }

    .wpe-colorway-swatch {
        width: 40px;
        height: 40px;
    }
}

/* ================================================================
   Animations
   ================================================================ */

.wpe-panel {
    animation: wpe-fade-in 0.35s ease-out;
}

@keyframes wpe-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wpe-material-pill:active {
    transform: scale(0.97);
}

.wpe-btn-primary:active,
.wpe-btn-secondary:active {
    transform: scale(0.98);
}
