/* Eylar PDP details.phtml extracted CSS — pulled out of details.phtml on 2026-05-11 */
/* Backup: ~/seo_backups/details.phtml.20260511.bak */
/* BEST SELLER BADGE */
    .best-seller-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        background: #ffb300;
        color: #000;
        font-weight: 900;
        font-size: 0.9rem;
        padding: 6px 12px;
        border-radius: 50px;
        text-transform: uppercase;
        z-index: 120;
        display: flex;
        align-items: center;
        gap: 5px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .best-seller-badge span {
        font-size: 1.25rem;
    }

    /* === SALE ITEM HIGHLIGHT === */
    .related-products-grid .sale-highlight {
        position: relative;
        background: linear-gradient(145deg, #fff8f8, #ffffff);
        transform: scale(1.01);
        transition: all 0.3s ease;
        overflow: visible !important;
        z-index: 1;
    }

    .related-products-grid .sale-highlight:hover {
        transform: scale(1.05);
    }

    /* === SALE BADGE === */
    .discount-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        background: linear-gradient(135deg, #ff4d4d, #c70000);
        color: #fff;
        font-weight: 800;
        font-size: 1rem;
        padding: 6px 12px;
        border-radius: 50px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 1;
        visibility: visible;
        display: inline-block;
        z-index: 999;
        pointer-events: none;
    }

    /* === BLACK FRIDAY PILL === */
    .black-friday-pill {
        position: absolute;
        top: 10px;
        left: 10px;
        background: #000;
        color: #fff;
        font-weight: 900;
        font-size: 1.1rem;
        padding: 6px 14px;
        border-radius: 50px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        z-index: 1000;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
        pointer-events: none;
    }

    /* === PRICE STYLES === */
    .product-price {
        position: relative;
        display: inline-block;
        margin-top: 8px;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    }

    .product-price .old-price {
        color: #888;
        text-decoration: line-through;
        font-size: 1.1rem;
        margin-right: 8px;
        opacity: 0.7;
    }

    .product-price .special-price {
        color: #d50000;
        font-size: 1.6rem;
        font-weight: 800;
        text-shadow: 0 2px 6px rgba(213, 0, 0, 0.3);
        letter-spacing: 0.3px;
    }

    /* === MOBILE === */
    @media (max-width: 768px) {
        
        .discount-badge {
            top: 8px;
            right: 8px;
            font-size: 0.8rem;
            padding: 4px 10px;
        }

        .black-friday-pill {
            top: 8px;
            left: 8px;
            font-size: 0.75rem;
            padding: 4px 10px;
        }

        .product-price .special-price {
            font-size: 1.4rem;
        }

        .product-price .old-price {
            font-size: 1rem;
        }
    }

.second-bar {
        margin-top: 50px;
        border-top: 3px solid #f0f0f0;
        padding-top: 20px;
    }

    .second-bar .section-title {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 25px;
        text-align: center;
        color: #111;
    }

    /* === Desktop: 6 per row === */
    .second-bar .related-products-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
        justify-items: center;
        align-items: stretch;
    }

    .second-bar .related-product-item {
        position: relative;
        width: 100%;
        text-align: center;
    }

    /* === Sale highlights === */
    .second-bar .sale-highlight {
        background: linear-gradient(145deg, #fff8f8, #ffffff);
        transform: scale(1.01);
        transition: all 0.3s ease;
    }

    .second-bar .sale-highlight:hover {
        transform: scale(1.05);
    }

    .second-bar .discount-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        background: linear-gradient(135deg, #ff4d4d, #c70000);
        color: #fff;
        font-weight: 800;
        font-size: 1rem;
        padding: 6px 12px;
        border-radius: 50px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        z-index: 999;
    }

    .second-bar .black-friday-pill {
        position: absolute;
        top: 10px;
        left: 10px;
        background: #000;
        color: #fff;
        font-weight: 900;
        font-size: 1.1rem;
        padding: 6px 14px;
        border-radius: 50px;
        text-transform: uppercase;
        z-index: 1000;
    }

    /* === Price styling === */
    .second-bar .product-price {
        margin-top: 8px;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    }

    .second-bar .product-price .old-price {
        color: #888;
        text-decoration: line-through;
        font-size: 1.1rem;
        margin-right: 8px;
        opacity: 0.7;
    }

    .second-bar .product-price .special-price {
        color: #d50000;
        font-size: 1.6rem;
        font-weight: 800;
        text-shadow: 0 2px 6px rgba(213, 0, 0, 0.3);
    }

    /* === Tablet: 3 per row === */
    @media (max-width: 1024px) {
        .second-bar .related-products-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }
    }

    /* === Mobile: 2 per row (6 total visible in 3 rows) === */
    @media (max-width: 768px) {

.upsell-grid.upsell-one {
    grid-template-columns: 100% !important;

}

        .second-bar .related-products-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .second-bar .discount-badge {
            top: 8px;
            right: 8px;
            font-size: 0.8rem;
            padding: 4px 10px;
        }

        .second-bar .black-friday-pill {
            top: 8px;
            left: 8px;
            font-size: 0.75rem;
            padding: 4px 10px;
        }
    }

.no-reviews {
        text-align: center;
        font-size: 14px;
        margin: 20px;
    }

    .eylar-product-reviews {
        margin-top: 60px;
        padding: 50px 30px;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
        max-width: 99%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Header */
    .block-title {
        font-size: 2.8rem;
        font-weight: 800;
        text-align: center;
        color: #111;
        margin-bottom: 10px;
    }

    .average-rating {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font-size: 1.6rem;
        color: #222;
    }

    .stars {
        font-size: 2.4rem;
        color: #ccc;
    }

    .stars .star.filled {
        color: #f5b301;
    }

    .rating-text {
        font-weight: 700;
    }

    /* Reviews */
    .review-item {
        border-bottom: 1px solid #eee;
        padding: 25px;
    }

    .review-stars {
        font-size: 2.2rem;
        color: #ccc;
        margin-bottom: 8px;
        text-align: left;
    }

    .review-stars .star.filled {
        color: #f5b301;
    }

    .review-title {
        font-size: 1.8rem;
        font-weight: 700;
        color: #000;
        margin-bottom: 5px;
    }

    .review-meta {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .reviewer-name {
        font-size: 1.5rem;
        color: #444;
        font-weight: 600;
    }

    .verified-badge {
        background: #e8f6ed;
        color: #1b7d2a;
        font-size: 1.2rem;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 30px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .review-content {
        font-size: 1.5rem;
        line-height: 2.3rem;
        color: #333;
        background: #fafafa;
        padding: 20px 25px;
        border-radius: 10px;
        box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
    }

    /* Read More */
    .hidden-review {
        display: none;
    }

    .toggle-reviews-btn {
        display: block;
        margin: 30px auto 0;
        background: #111;
        color: #fff;
        border: none;
        padding: 14px 32px;
        border-radius: 40px;
        font-weight: 700;
        font-size: 1.4rem;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .toggle-reviews-btn:hover {
        background: #ff4d4d;
    }

    /* Review Form */
    .review-form-wrapper {
        margin-top: 60px;
        padding-top: 40px;
        border-top: 1px solid #eee;
    }

    .review-form-title {
        font-size: 2rem;
        font-weight: 800;
        color: #111;
        text-align: center;
        margin-bottom: 25px;
    }

    .review-form-wrapper .action.submit.primary {
        background: #111;
        border: none;
        border-radius: 8px;
        padding: 14px 32px;
        font-weight: 700;
        color: #fff;
        font-size: 1.4rem;
        transition: all 0.3s ease;
    }

    .review-form-wrapper .action.submit.primary:hover {
        background: #ff4d4d;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .eylar-product-reviews {
            padding: 30px 15px;
        }

        .block-title {
            font-size: 2rem;
        }

        .average-rating {
            flex-direction: column;
            font-size: 1.4rem;
            gap: 6px;
        }

        .stars {
            font-size: 2rem;
        }

        .review-stars {
            font-size: 1.8rem;
        }

        .review-title {
            font-size: 1.6rem;
        }

        .review-content {
            font-size: 1.3rem;
            padding: 15px 18px;
            line-height: 2rem;
        }

        .verified-badge {
            font-size: 1.1rem;
            padding: 3px 8px;
        }
    }

.aplus-section {
        margin: 20px 0;
        padding: 20px;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
        font-size: 16px;
        line-height: 1.7;
        color: #333;
        clear: both;
    }

    .more-information-section,
    .details-section {
        margin: 20px 0;
        padding: 20px;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
        clear: both;
    }

    .more-information-section .table-caption {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 25px;
        color: #111;
        border-bottom: 3px solid #ddd;
        padding-bottom: 10px;
        display: block;
    }

    .more-information-section table.additional-attributes {
        width: 100%;
        border-collapse: collapse;
        font-size: 16px;
        line-height: 1.6;
    }

    .more-information-section table.additional-attributes th,
    .more-information-section table.additional-attributes td {
        padding: 5px 20px;
        font-size: 16px;
    }

    .more-information-section table.additional-attributes th {
        width: 35%;
        font-weight: 700;
        color: #000;
        background: #f8f8f8;
    }

    .more-information-section table.additional-attributes td {
        color: #333;
    }

    .more-information-section .more-information-image img,
    .details-section .details-image img {
        max-width: 80%;
        border-radius: 14px;
        margin: 0 auto;
        display: block;
    }

    .details-section .col-md-6 {
        font-size: 16px;
        line-height: 1.7;
        color: #333;
    }

    /* === Plain Text Modal Link === */
    .view-warning-text {
        color: #007bff;
        text-decoration: underline;
        cursor: pointer;
    }

    .view-warning-text:hover {
        color: #0056b3;
    }

    /* === Modal Styling === */
    .warning-modal {
        display: none;
        position: fixed;
        z-index: 9999;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.6);
    }

    .warning-modal-content {
        background-color: #fff;
        margin: 10% auto;
        padding: 30px;
        border-radius: 12px;
        width: 90%;
        max-width: 600px;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
        font-size: 16px;
        line-height: 1.6;
    }

    .warning-close {
        color: #aaa;
        float: right;
        font-size: 26px;
        font-weight: bold;
        cursor: pointer;
    }

    .warning-close:hover {
        color: #000;
    }

    /* === Mobile Responsive === */
    @media (max-width: 768px) {
        .aplus-section {
            padding: 25px 15px;
        }

        .more-information-section,
        .details-section {
            padding: 25px 15px;
        }

        .more-information-section .row,
        .details-section .row {
            flex-direction: column;
        }

        .more-information-section .col-md-6,
        .details-section .col-md-6 {
            max-width: 100%;
            flex: 0 0 100%;
            margin-bottom: 20px;
        }

        .details-section .description-wrapper .product.attribute.description.mobile-collapsed {
            max-height: 220px;
            overflow: hidden;
            position: relative;
        }

        .details-section .description-wrapper .product.attribute.description.mobile-collapsed::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background: linear-gradient(to top, #fff, rgba(255, 255, 255, 0));
        }

        .read-more-btn {
            display: block;
            margin: 15px auto 0;
            padding: 10px 18px;
            font-size: 15px;
            font-weight: 600;
            color: #007bff;
            background: #f5f5f5;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            text-align: center;
        }

        .more-information-section table.additional-attributes,
        .more-information-section table.additional-attributes tr,
        .more-information-section table.additional-attributes th,
        .more-information-section table.additional-attributes td {
            display: block;
            width: 100%;
        }

        .more-information-section table.additional-attributes tr {
            background: #fafafa;
            border: 1px solid #e5e5e5;
            border-radius: 10px;
            margin-bottom: 15px;
            padding: 15px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
        }

        .more-information-section table.additional-attributes th {
            font-size: 15px;
            font-weight: 700;
            color: #007bff;
            margin-bottom: 6px;
            background: none;
            padding: 0;
            border: none;
        }

        .more-information-section table.additional-attributes td {
            font-size: 15px;
            font-weight: 400;
            color: #333;
            padding: 0;
        }

        .more-information-section .table-caption {
            font-size: 1.6rem;
            margin-bottom: 20px;
            text-align: center;
        }
    }

    .related-category-products {
        margin: 0;
        background: #fff;
        border-radius: 18px;
        width: 100%;
    }

    .related-category-products .section-title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 30px;
        text-align: center;
        color: #111;
    }

    /* === Base Grid === */
    .related-products-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 25px;
        width: 100%;
    }

    .related-product-item {
        position: relative;
        text-align: center;
        border-radius: 12px;
        padding: 20px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        box-sizing: border-box;
    }

    .related-product-item:hover {
        background: #f5f5f5;
        transform: translateY(-4px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    }

    .related-product-item img {
        width: 100%;
        max-width: 220px;
        height: auto;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .related-product-item .product-name {
        font-size: 1.5rem;
        font-weight: 600;
        color: #111;
        margin: 8px 0;
        line-height: 1.4;
    }

    .related-product-item .product-price {
        font-size: 1.5rem;
        color: #111;
        font-weight: 600;
    }

    /* === RESPONSIVE BREAKPOINTS === */
    @media (max-width: 1400px) {
        .related-products-grid {
            grid-template-columns: repeat(5, 1fr);
        }
    }

    @media (max-width: 1200px) {
        .related-products-grid {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    @media (max-width: 992px) {
        .related-products-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
        }
    }

    /* ✅ MOBILE: Stack 2 per row */
    @media (max-width: 768px) {
        .related-products-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .related-product-item img {
            max-width: 100%;
        }

        .related-product-item .product-name {
            font-size: 1.2rem;
        }

        .related-product-item .product-price {
            font-size: 1.2rem;
        }
    }

    /* === Hide upsell section === */
    .upsell {
        display: none;
    }

    /* === Highlight featured product safely (no layout shift) === */
    .related-products-grid .featured-first {
        position: relative;
    }

    .related-products-grid .featured-first::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 12px;
        pointer-events: none;
        z-index: 2;
    }

    /* === BEST SELLER BADGE for featured product === */
    .related-products-grid .featured-first {
        position: relative;
        z-index: 2;
        transform: scale(1.03);
        transition: all 0.3s ease;
    }

    /* Glow on hover */
    .related-products-grid .featured-first:hover {
        transform: scale(1.06);
        box-shadow: 0 0 35px rgba(255, 212, 3, 0.6);
    }

    /* Add “Best Seller” badge */
    .related-products-grid .featured-first::after {
        content: "⭐ Best Seller";
        position: absolute;
        top: 10px;
        left: 10px;
        background: linear-gradient(135deg, #ffd403, #ffb700);
        color: #111;
        font-weight: 700;
        font-size: 0.95rem;
        padding: 6px 14px;
        border-radius: 8px;
        text-transform: uppercase;
        z-index: 3;
        pointer-events: none;
    }

    /* Glowing outline (safe for mobile grid) */
    .related-products-grid .featured-first::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 12px;
        pointer-events: none;
        z-index: 2;
    }


    /* Responsive badge scaling */
    @media (max-width: 768px) {
        .related-products-grid .featured-first::after {
            font-size: 0.8rem;
            top: 8px;
            left: 8px;
            padding: 4px 10px;
        }
    }

    /* === SALE PRICE STYLING === */
    .product-price {
        margin-top: 8px;
        display: inline-block;
        position: relative;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    }

    /* Original crossed-out price */
    .product-price .old-price {
        color: #888;
        text-decoration: line-through;
        font-size: 1.2rem;
        margin-right: 0;
        opacity: 0.8;
        padding-bottom: 2px;
    }

    /* New sale price */
    .product-price .special-price {
        color: #d0021b;
        font-size: 1.7rem;
        font-weight: 800;
        text-shadow: 0 2px 6px rgba(208, 2, 27, 0.2);
    }

    /* Subtle pulse effect to attract attention */
    .product-price .special-price {
        animation: salePulse 2s infinite alternate;
    }

.upsell-title { display:none !important; }

/* Hide Magento messages behind modal */
body.upsell-open .messages { display: none !important; }

/* === FIX: Center + and - buttons === */
.qty-box button {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    line-height:1 !important;
    font-size:18px !important;
    width:32px !important;
    height:32px !important;
}

/* === Overlay === */
#upsellPopup {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.65);
    z-index:999999;
    text-align:center;
}
#upsellPopup::before {
    content:"";
    display:inline-block;
    height:100%;
    vertical-align:middle;
}

/* === Modal === */
.upsell-modal-wrapper {
    display:inline-block;
    vertical-align:middle;
    background:#fff;
    width:95%;
    max-width:760px;
    padding:25px;
    border-radius:18px;
    box-shadow:0 15px 40px rgba(0,0,0,0.35);
    animation:fadeIn .25s ease-out;
    max-height:90vh;
    overflow-y:auto;
    position:relative;
}

/* X button */
.upsell-close-btn {
    position:absolute;
    top:12px;
    right:12px;
    border:none !important;
    color:#000;
    width:32px;
    height:32px;
    font-size:20px;
    font-weight:900;
    border-radius:50%;
    cursor:pointer;
    line-height:29px;
}
.upsell-close-btn:hover { background:#ccc; }

/* Title */
.upsell-title { font-size:26px;font-weight:800;color:#111;margin-bottom:4px; }

/* Increased size */
.upsell-sub { font-size:17px;color:#444;margin-bottom:18px; }

/* Success message */
#upsellMessage {
    display:none;
    background:#e6f5e6;
    border-left:4px solid #2a8f2a;
    padding:10px 16px;
    border-radius:8px;
    margin-bottom:14px;
    font-weight:700;
    color:#2a662a;
}

/* === SUCCESS OVERLAY TOAST STYLE === */
#upsellMessage.toast-overlay {
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%, -50%) !important;
    background:rgba(255,255,255,0.95) !important;
    padding:18px 26px !important;
    border-radius:12px !important;
    border-left:none !important;
    margin:0 !important;
    font-size:16px !important;
    box-shadow:0 8px 22px rgba(0,0,0,0.25) !important;
    pointer-events:none !important;
    z-index:9999999 !important;
}

/* Grid */
.upsell-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
}

/* MOBILE FIXES */
@media only screen and (max-width: 768px) {
    .upsell-title { font-size:20px !important; }

    .upsell-grid {
        grid-template-columns:repeat(2,1fr) !important;
        gap:12px !important;
    }

    .upsell-card { padding:10px !important; }
    .upsell-modal-wrapper { padding:16px !important; }
    .upsell-img { height:105px !important; }
    .upsell-name { font-size:13px !important; min-height:32px !important; }

    .qty-box button { width:32px !important; height:32px !important; }
    .qty-box input { width:32px !important; font-size:14px !important; }

    .add-upsell-btn { font-size:14px !important; padding:8px !important; }

    .add-upsell-btn {
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        gap:6px !important;
        min-height:38px !important;
    }

    .upsell-actions {
        display:flex !important;
        flex-direction:column !important;
        gap:10px !important;
        margin-top:20px !important;
    }
    .upsell-actions button { width:100% !important; }

    #upsellPopup {
        align-items:center !important;
        justify-content:center !important;
    }
}

/* Card */
.upsell-card {
    border:1px solid #e3e3e3;
    padding:14px;
    border-radius:12px;
    background:#fff;
    text-align:center;
    transition:.25s;
}
.upsell-card:hover {
    transform:translateY(-4px);
    box-shadow:0 8px 22px rgba(0,0,0,0.12);
}

/* Image */
.upsell-img { width:100%;height:130px;object-fit:contain;margin-bottom:8px; }

/* Name */
.upsell-name { font-size:12px;font-weight:700;color:#111;min-height:40px;margin-bottom:6px; }

/* Price */
.upsell-price .old { text-decoration:line-through;color:#777;margin-right:6px; }
.upsell-price .new { color:#b12704;font-size:15px;font-weight:800; }

/* Quantity */
.qty-box {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:6px;
    margin-bottom:10px;
}
.qty-box input {
    width:38px;
    text-align:center;
    border:1px solid #ccc;
    border-radius:6px;
}

/* === BUTTON STYLES === */
.add-upsell-btn {
    width:100%;
    padding:10px;
    background:#a80000 !important;
    border:2px solid #7a0000;
    border-radius:8px;
    cursor:pointer;
    color:#fff !important;
    font-weight:700;
    font-size:15px;
    transition:.2s;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    position:relative !important;
}

/* Hide text while keeping layout stable */
.add-upsell-btn.loading .btn-text {
    opacity:0 !important;
    width:0 !important;
    margin:0 !important;
    padding:0 !important;
}

/* PERFECT CENTERED SPINNER */
/* Spinner (default: fully hidden) */
.spinner {
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;

    width:20px !important;
    height:20px !important;

    border:3px solid #fff !important;
    border-top:3px solid #d00 !important;
    border-radius:50% !important;

    animation:spin .8s linear infinite !important;

    margin:0 !important;
    padding:0 !important;

    /* prevents flex forcing it visible */
    flex-shrink:0 !important;
}

/* ONLY show spinner when button is loading */
.add-upsell-btn.loading .spinner {
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
}

/* While loading, hide text cleanly */
.add-upsell-btn.loading .btn-text {
    opacity:0 !important;
    visibility:hidden !important;
}

.add-upsell-btn.loading { background:#555 !important; }

/* Footer */
.upsell-actions { text-align:right;margin-top:20px; }
.upsell-btn { padding:0 20px;border-radius:8px;font-weight:700;cursor:pointer; }
.upsell-btn.secondary { background:#fff;border:2px solid #ddd; }
.upsell-btn.secondary:hover {
    background:#a80000 !important;
    border-color:#a80000 !important;
    color:#fff !important;
}
.upsell-btn.primary { background:#a80000;color:#fff;border:2px solid #a80000; }

@keyframes spin { 100% { transform:rotate(360deg);} }

/* Hide 3rd+ on mobile */
@media only screen and (max-width: 768px) {
    #upsellPopup .upsell-grid > *:nth-child(n+3) {
        display:none !important;
    }

    #upsellMessage.toast-overlay {
        width:90% !important;
        font-size:14px !important;
    }
}

/* Hide Magento's default page success message */
.page-wrapper .messages .message-success {
    display: none !important;
}

/* === SINGLE & DOUBLE ITEM LAYOUT FIX === */

/* 1 item → centered 33% column */
.upsell-grid.upsell-one {
    display: grid !important;
    grid-template-columns: 33%;
    justify-content: center !important;
    justify-items: center !important;
}

/* Ensure the card centers and stays same size */
.upsell-grid.upsell-one .upsell-card {
    width: 100% !important;
    max-width: 260px !important;
    margin: 0 auto !important;
}

/* 2 items → two 33% columns centered */
.upsell-grid.upsell-two {
    display: grid !important;
    grid-template-columns: 33% 33% !important;
    justify-content: center !important;
    justify-items: center !important;
    gap: 18px !important;
}

