/* ================================================
   NeuroPlanck Pricing Tiers — IM8 Style
   Brand Orange: rgb(233, 106, 51) / #E96A33
   ================================================ */

:root {
    --nppt-orange: #E96A33;
    --nppt-orange-light: rgba(233, 106, 51, 0.08);
    --nppt-orange-border: rgba(233, 106, 51, 0.15);
    --nppt-dark: #1a1a1a;
    --nppt-text: #333333;
    --nppt-text-light: #777777;
    --nppt-border: #e0e0e0;
    --nppt-bg: #ffffff;
    --nppt-green: #16a34a;
}

/* Container */
.nppt-pricing-tiers {
    margin: 15px 0;
}

/* ================================
   VERTICAL LAYOUT (IM8 Style)
   ================================ */
.nppt-tier-vertical {
    position: relative;
    border: 1.5px solid var(--nppt-border);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    background: var(--nppt-bg);
    overflow: hidden;
}

.nppt-tier-vertical:hover {
    border-color: #ccc;
}

.nppt-tier-vertical.nppt-active {
    border-color: var(--nppt-orange);
    box-shadow: 0 0 0 0.5px var(--nppt-orange);
    background: var(--nppt-bg);
}

/* Badge — IM8 Style: top right pill */
.nppt-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--nppt-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 0 0 10px 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    line-height: 1.3;
    z-index: 2;
}

/* Header Row */
.nppt-tier-header-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* IM8 Octagonal Radio Button */
.nppt-tier-radio {
    flex-shrink: 0;
    margin-top: 2px;
}

.nppt-radio-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #fff;
    transition: all 0.2s ease;
}

.nppt-radio-circle.nppt-radio-checked {
    border-color: var(--nppt-orange);
    background: var(--nppt-orange);
}

.nppt-radio-circle.nppt-radio-checked::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

/* Tier Info */
.nppt-tier-info {
    flex: 1;
    min-width: 0;
}

.nppt-tier-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--nppt-dark);
    line-height: 1.3;
}

/* Inline savings text in green */
.nppt-tier-title .nppt-savings {
    color: var(--nppt-green);
    font-weight: 600;
}

.nppt-tier-subtitle {
    font-size: 13px;
    color: var(--nppt-text-light);
    margin-top: 3px;
    line-height: 1.3;
}

/* Price Block — right aligned */
.nppt-tier-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
    margin-top: 10px;
}

.nppt-sale-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--nppt-dark);
    line-height: 1.2;
}

.nppt-regular-price {
    font-size: 14px;
    color: var(--nppt-text-light);
    margin-left: 6px;
}

.nppt-regular-price del {
    text-decoration: line-through;
}

.nppt-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

/* Meta Row — billing text and per-serving */
.nppt-tier-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-left: 36px;
}

.nppt-billing-desc {
    font-size: 12px;
    color: var(--nppt-text-light);
}

.nppt-per-serving {
    font-size: 11px;
    color: var(--nppt-text-light);
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Benefits (expanded content) — CSS max-height transition */
.nppt-tier-benefits {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease, padding 0.25s ease;
    padding: 0 0 0 36px;
    margin-top: 0;
    font-size: 14px;
    line-height: 2;
    color: var(--nppt-text);
}

.nppt-tier-vertical.nppt-active .nppt-tier-benefits {
    max-height: 500px;
    opacity: 1;
    margin-top: 14px;
    padding: 0 0 4px 36px;
}

/* Benefits list items with checkmarks */
.nppt-tier-benefits .nppt-benefit-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 2px 0;
}

.nppt-benefit-check {
    color: var(--nppt-orange);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ================================
   HORIZONTAL LAYOUT (Cards)
   ================================ */
.nppt-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.nppt-tier-horizontal {
    position: relative;
    border: 2px solid var(--nppt-border);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--nppt-bg);
}

.nppt-tier-horizontal:hover {
    border-color: #ccc;
}

.nppt-tier-horizontal.nppt-active {
    border-color: var(--nppt-orange);
    box-shadow: 0 0 0 1px var(--nppt-orange);
    background: var(--nppt-orange-light);
}

.nppt-tier-horizontal .nppt-badge {
    top: -1px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    white-space: nowrap;
    border-radius: 0 0 10px 10px;
}

.nppt-tier-horizontal .nppt-tier-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--nppt-dark);
}

.nppt-tier-horizontal .nppt-tier-price-block {
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
}

.nppt-tier-horizontal .nppt-sale-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--nppt-dark);
}

.nppt-tier-horizontal .nppt-regular-price {
    font-size: 13px;
}

.nppt-tier-horizontal .nppt-tier-subtitle {
    margin-top: 6px;
    font-size: 12px;
    color: var(--nppt-text-light);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    .nppt-horizontal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .nppt-tier-horizontal {
        padding: 16px 10px;
    }

    .nppt-tier-horizontal .nppt-tier-title {
        font-size: 13px;
    }

    .nppt-tier-horizontal .nppt-sale-price {
        font-size: 17px;
    }

    .nppt-tier-vertical {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .nppt-tier-title {
        font-size: 14px;
    }

    .nppt-sale-price {
        font-size: 17px;
    }

    .nppt-tier-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .nppt-tier-benefits {
        padding-left: 36px !important;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nppt-horizontal-grid {
        gap: 6px;
    }

    .nppt-tier-horizontal {
        padding: 12px 8px;
    }

    .nppt-badge {
        font-size: 9px;
        padding: 4px 10px;
    }
}

/* ================================================
   STICKY BAR OVERRIDE — IM8 Style
   ================================================ */

/* Hide default WC elements when tiers active */
.nppt-sticky-override .nppt-hidden {
    display: none !important;
}

/* Override Woodmart: show immediately + allow overflow */
.wd-sticky-btn.nppt-sticky-override {
    overflow: visible !important;
    transform: translate3d(0, 0, 0) !important;
}

.nppt-sticky-override .wd-sticky-btn-container,
.nppt-sticky-override .wd-sticky-btn-cart {
    overflow: visible !important;
}

/* Sticky wrapper */
.nppt-sticky-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Price block in sticky bar */
.nppt-sticky-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    line-height: 1.2;
}

.nppt-sticky-price {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    white-space: nowrap;
}

.nppt-sticky-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

/* ---- DROPDOWN SELECTOR ---- */
.nppt-sticky-dropdown-wrap {
    position: relative;
}

.nppt-sticky-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.nppt-sticky-selector:hover,
.nppt-dropdown-open .nppt-sticky-selector {
    border-color: var(--nppt-orange, #E96A33);
    box-shadow: 0 0 0 1px var(--nppt-orange, #E96A33);
}

.nppt-sticky-selected {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.nppt-sticky-tier-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nppt-sticky-arrow {
    color: #999;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nppt-dropdown-open .nppt-sticky-arrow {
    transform: rotate(180deg);
}

/* Dropdown options */
.nppt-sticky-options {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 9999;
}

.nppt-dropdown-open .nppt-sticky-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nppt-sticky-option {
    padding: 12px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.nppt-sticky-option:last-child {
    border-bottom: none;
}

.nppt-sticky-option:hover {
    background: #f9f9f9;
}

.nppt-sticky-option-active {
    background: rgba(233, 106, 51, 0.08);
    color: var(--nppt-orange, #E96A33);
    font-weight: 700;
}

/* ---- ADD-TO-CART BUTTON ---- */
.nppt-sticky-atc-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--nppt-orange, #E96A33) !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
    border: none;
    line-height: 1.4;
    flex-shrink: 0;
}

.nppt-sticky-atc-btn:hover {
    background: #d45a2a !important;
    transform: scale(1.02);
    color: #fff !important;
}

/* ================================================
   MOBILE — max-width: 768px
   ================================================ */
@media (max-width: 768px) {

    /* Force sticky bar visible (Woodmart hides it on mobile) */
    .wd-sticky-btn.nppt-sticky-override {
        display: flex !important;
        background-color: #fff !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
        padding: 6px 0 !important;
        height: 60px !important;
    }

    /* Show product image, hide title */
    .nppt-sticky-override .wd-sticky-btn-content {
        display: flex !important;
        align-items: center !important;
    }

    .nppt-sticky-override .wd-sticky-btn-thumbnail {
        display: block !important;
    }

    .nppt-sticky-override .wd-sticky-btn-thumbnail img {
        max-height: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        object-fit: cover;
        border-radius: 8px;
    }

    .nppt-sticky-override .wd-sticky-btn-info {
        display: none !important;
    }

    .nppt-sticky-override form.cart {
        display: none !important;
    }

    .nppt-sticky-override .wd-sticky-btn-cart {
        margin-inline: 0 !important;
    }

    /* Smaller dropdown on mobile */
    .nppt-sticky-override .nppt-sticky-selector {
        min-width: 120px;
        padding: 8px 12px;
    }

    .nppt-sticky-override .nppt-sticky-tier-name {
        font-size: 11px;
    }

    /* Smaller price on mobile */
    .nppt-sticky-price {
        font-size: 14px;
    }

    .nppt-sticky-atc-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .nppt-sticky-override .nppt-sticky-wrapper {
        gap: 8px;
    }
}