/* Cart Popup Overlay */
.ag-cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ag-cart-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Modal */
.ag-cart-popup {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ag-cart-popup-overlay.show .ag-cart-popup {
    transform: scale(1);
}

/* Checkmark icon */
.ag-cart-popup-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2d7a3a;
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

/* Title */
.ag-cart-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

/* Subtitle */
.ag-cart-popup-sub {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
}

/* Buttons */
.ag-cart-popup-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ag-cart-popup-btn {
    display: block;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    border: none;
    line-height: 1.2;
}

.ag-cart-popup-continue {
    background: #f0f2f5;
    color: #1a1a1a;
}

.ag-cart-popup-continue:hover {
    background: #e2e6ea;
}

.ag-cart-popup-accessories {
    background: #fff;
    color: #2d7a3a;
    border: 2px solid #2d7a3a;
}

.ag-cart-popup-accessories:hover {
    background: #f0f8f1;
}

.ag-cart-popup-go {
    background: #2d7a3a;
    color: #fff;
}

.ag-cart-popup-go:hover {
    background: #236b2f;
}

/* ── Upsells inside the cart popup (matches the FBT box on the product page) ── */
.ag-cart-popup-upsells {
    text-align: left;
    margin: 0 0 20px;
    padding: 20px;
    border: 1.5px solid #d4edda;
    background: #f9fdf9;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(45, 122, 58, 0.06);
    box-sizing: border-box;
}

.ag-cart-popup-upsells[hidden] {
    display: none;
}

.ag-cart-popup-upsells__title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}

.ag-cart-popup-upsells__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ag-cart-popup-upsell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: border-color 150ms, box-shadow 150ms;
}

.ag-cart-popup-upsell:hover {
    border-color: #d4edda;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ag-cart-popup-upsell__link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.ag-cart-popup-upsell__img {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f3;
}

.ag-cart-popup-upsell__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ag-cart-popup-upsell__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ag-cart-popup-upsell__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-cart-popup-upsell__price {
    font-size: 13px;
    font-weight: 700;
    color: #2f6120;
    line-height: 1.3;
}

.ag-cart-popup-upsell__cta {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 150ms;
}

.ag-cart-popup-upsell__cta--add {
    background: #2f6120;
    color: #fff;
    border: 1.5px solid #2f6120;
}

.ag-cart-popup-upsell__cta--add:hover {
    background: #1a3a10;
    border-color: #1a3a10;
    color: #fff;
}

.ag-cart-popup-upsell__cta--added {
    background: #e8f5e9;
    color: #2f6120;
    border: 1.5px solid #c8e6c9;
    cursor: default;
    pointer-events: none;
}

.ag-cart-popup-upsell__cta--options {
    background: #fff;
    color: #2f6120;
    border: 1.5px solid #2f6120;
}

.ag-cart-popup-upsell__cta--options:hover {
    background: #2f6120;
    color: #fff;
}
