/* ==========================================================
   CART UI
========================================================== */

.elite-cart-toast {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 99999;

    max-width: 360px;

    padding: 13px 18px;

    border-radius: 10px;

    background: #111;
    color: #fff;

    border: 1px solid rgba(255, 90, 0, .45);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, .22);

    font-size: 14px;
    font-weight: 600;

    opacity: 0;

    transform:
        translateY(12px);

    pointer-events: none;

    transition:
        opacity .2s ease,
        transform .2s ease;
}

.elite-cart-toast.is-visible {
    opacity: 1;

    transform:
        translateY(0);
}

.elite-cart-toast.is-error {
    border-color:
        rgba(255, 70, 70, .55);
}

.elite-product-cart-button.is-loading,
.elite-product-modal-cart.is-loading {
    opacity: .7;

    cursor:
        wait;
}

@media (max-width: 600px) {

    .elite-cart-toast {
        right: 14px;
        left: 14px;
        bottom: 14px;

        max-width: none;
    }
}

/* ==========================================================
   ELITE FITNESS - CART
========================================================== */

.cart-page-main {
    background: #fff;
}

.cart-page-section {
    padding: 54px 0 80px;
}

.cart-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 32px;
}

.cart-page-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #ff6a00;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

.cart-page-title {
    margin: 0;
    color: #111;
    font-family: 'Oswald', Arial, sans-serif;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    font-weight: 700;
}

.cart-page-subtitle {
    max-width: 620px;
    margin: 12px 0 0;
    color: #666;
    font-size: 16px;
    line-height: 1.7;
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.cart-continue-link:hover {
    color: #ff6a00;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr);
    gap: 26px;
    align-items: start;
}

.cart-items-panel,
.cart-summary-panel {
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .06);
}

.cart-panel-header {
    padding: 22px 24px;
    border-bottom: 1px solid #ededed;
}

.cart-panel-header h2 {
    margin: 0;
    color: #111;
    font-size: 21px;
}

.cart-panel-header p {
    margin: 5px 0 0;
    color: #777;
    font-size: 13px;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #ededed;
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fafafa;
}

.cart-item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.cart-item-topline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.cart-item-category {
    display: block;
    margin-bottom: 6px;
    color: #ff6a00;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cart-item-name {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
}

.cart-item-name a {
    color: #111;
    text-decoration: none;
}

.cart-item-name a:hover {
    color: #ff6a00;
}

.cart-item-variant {
    margin: 7px 0 0;
    color: #555;
    font-size: 13px;
}

.cart-item-sku {
    margin: 7px 0 0;
    color: #888;
    font-size: 12px;
}

.cart-item-price {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.cart-item-price strong {
    color: #111;
    font-size: 20px;
}

.cart-item-price del {
    color: #999;
    font-size: 12px;
}

.cart-item-bottomline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px 28px;
}

.cart-item-stock,
.cart-item-quantity,
.cart-item-total {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.cart-item-stock {
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.cart-item-stock span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.cart-item-stock.is-in-stock {
    background: #edf8f2;
    color: #07864d;
}

.cart-item-stock.is-in-stock span {
    background: #0b9b59;
}

.cart-item-stock.is-out-of-stock {
    background: #fff1f1;
    color: #d93030;
}

.cart-item-stock.is-out-of-stock span {
    background: #d93030;
}

.cart-item-quantity span,
.cart-item-total span {
    color: #777;
}

.cart-item-quantity strong,
.cart-item-total strong {
    color: #111;
}

.cart-items-note {
    padding: 14px 24px;
    border-top: 1px solid #ededed;
    background: #fafafa;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
}

.cart-summary-panel {
    position: sticky;
    top: 24px;
    overflow: hidden;
}

.cart-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 21px 22px;
    background: #111;
    color: #fff;
}

.cart-summary-header span {
    font-size: 18px;
    font-weight: 800;
}

.cart-summary-header strong {
    color: #ff8a3d;
    font-size: 12px;
}

.cart-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
}

.cart-summary-lines > div,
.cart-summary-total {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cart-summary-lines span,
.cart-summary-lines strong {
    font-size: 14px;
}

.cart-summary-lines span {
    color: #666;
}

.cart-summary-lines strong {
    max-width: 180px;
    color: #111;
    text-align: right;
    font-weight: 700;
}

.cart-summary-total {
    margin: 0 22px;
    padding: 18px 0 20px;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.cart-summary-total span {
    color: #111;
    font-weight: 700;
}

.cart-summary-total strong {
    color: #111;
    font-size: 25px;
}

.cart-summary-note {
    margin: 18px 22px 0;
    color: #777;
    font-size: 12px;
    line-height: 1.65;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
}

.cart-primary-button,
.cart-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: .2s ease;
}

.cart-primary-button {
    border: 1px solid #ff6a00;
    background: #ff6a00;
    color: #fff;
}

.cart-primary-button:hover {
    background: #e85f00;
    border-color: #e85f00;
}

.cart-secondary-button {
    border: 1px solid #bbb;
    background: #fff;
    color: #111;
}

.cart-secondary-button:hover {
    border-color: #ff6a00;
    color: #ff6a00;
}

.cart-empty-state {
    max-width: 720px;
    margin: 50px auto 0;
    padding: 56px 32px;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .05);
}

.cart-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fff2e9;
    font-size: 28px;
}

.cart-empty-state h2 {
    margin: 0;
    color: #111;
    font-size: 28px;
}

.cart-empty-state p {
    max-width: 520px;
    margin: 12px auto 24px;
    color: #666;
    font-size: 15px;
    line-height: 1.7;
}

.cart-message {
    padding: 18px 20px;
    border-radius: 10px;
    font-size: 14px;
}

.cart-message-error {
    border: 1px solid rgba(210, 48, 48, .25);
    background: #fff5f5;
    color: #a82020;
}

.cart-message-error strong {
    display: block;
    margin-bottom: 4px;
}

.cart-message-error span {
    display: block;
    color: #6f6f6f;
}


/* ==========================================================
   CART ACTIONS
========================================================== */

.cart-item {
    position: relative;
    transition:
        opacity .22s ease,
        transform .22s ease,
        background .22s ease;
}

.cart-item:hover {
    background: linear-gradient(
        90deg,
        #fff,
        #fffaf6
    );
}

.cart-item.is-updating {
    opacity: .64;
    pointer-events: none;
}

.cart-item.is-removing {
    opacity: 0;
    transform: translateX(18px);
}

.cart-item-quantity {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.cart-item-quantity-label {
    color: #777;
    font-size: 13px;
}

.cart-quantity-control {
    display: inline-flex;
    align-items: center;
    height: 34px;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

.cart-qty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.cart-qty-button:hover:not(:disabled) {
    background: #fff1e7;
    color: #ff6a00;
}

.cart-qty-button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.cart-qty-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-right: 1px solid #ececec;
    border-left: 1px solid #ececec;
    color: #111;
    font-size: 13px;
    font-weight: 800;
}

.cart-remove-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #f0d1d1;
    border-radius: 8px;
    background: #fff7f7;
    color: #c62d2d;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.cart-remove-button:hover {
    border-color: #e9a9a9;
    background: #fff0f0;
    color: #a61e1e;
}

.cart-remove-button span {
    font-size: 17px;
    line-height: 1;
}

.cart-action-status {
    position: fixed;
    z-index: 1000;
    right: 24px;
    bottom: 24px;
    max-width: min(360px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid #dfeee5;
    border-radius: 10px;
    background: #f3fbf6;
    color: #11713f;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: .2s ease;
}

.cart-action-status.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cart-action-status.is-error {
    border-color: #f0caca;
    background: #fff4f4;
    color: #a82020;
}

.cart-item-total strong {
    min-width: 118px;
}

/* ==========================================================
   RESPONSIVE CART ACTIONS
========================================================== */

@media (max-width: 980px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .cart-page-section {
        padding: 38px 0 60px;
    }

    .cart-page-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .cart-continue-link {
        white-space: normal;
    }

    .cart-item {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 14px;
        padding: 18px;
    }

    .cart-item-image {
        width: 96px;
        height: 96px;
    }

    .cart-item-topline {
        flex-direction: column;
        gap: 12px;
    }

    .cart-item-price {
        align-items: flex-start;
    }

    .cart-item-bottomline {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .cart-item-quantity {
        width: 100%;
        justify-content: space-between;
    }

    .cart-item-total {
        width: 100%;
        justify-content: space-between;
    }

    .cart-remove-button {
        align-self: flex-start;
    }

    .cart-panel-header,
    .cart-items-note {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 520px) {
    .cart-page-title {
        font-size: 42px;
    }

    .cart-item-name {
        font-size: 18px;
    }

    .cart-summary-total strong {
        font-size: 22px;
    }
}