/* ==================================================
   LITTLE HERO STUDIOS
   MERCH CART
================================================== */

.merch-cart {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: none;
}

.merch-cart.is-open {
    display: block;
}

.merch-cart-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(12, 16, 24, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.merch-cart-drawer {
    position: absolute;
    top: 0;
    right: 0;

    width: min(440px, 100%);
    height: 100%;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    box-shadow:
        -18px 0 48px rgba(0, 0, 0, 0.18);

    overflow-y: auto;
}

.merch-cart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 28px 26px 22px;

    border-bottom: 1px solid #ececec;
}

.merch-cart-eyebrow {
    display: block;

    margin-bottom: 4px;

    color: #f5a623;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.merch-cart-header h2 {
    margin: 0;

    color: #1f2937;

    font-size: 1.7rem;
    font-weight: 800;
}

.merch-cart-close {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 50%;

    background: #f4f4f2;
    color: #1f2937;

    cursor: pointer;
}

.merch-cart-items {
    flex: 1;

    padding: 24px;
}

.merch-cart-empty {
    min-height: 300px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.merch-cart-empty i {
    margin-bottom: 18px;

    color: #f5a623;

    font-size: 2rem;
}

.merch-cart-empty p {
    margin: 0 0 6px;

    color: #1f2937;

    font-weight: 800;
}

.merch-cart-empty span {
    color: #6b7280;

    font-size: 0.9rem;
}

.merch-cart-summary {
    padding: 22px 24px 26px;

    border-top: 1px solid #ececec;

    background: #fafaf8;
}

.merch-cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 10px;

    color: #4b5563;
}

.merch-cart-total-row {
    margin-top: 14px;

    color: #1f2937;

    font-size: 1.05rem;
}

.merch-cart-checkout-note {
    margin: 14px 0 18px;

    color: #6b7280;

    font-size: 0.8rem;
    line-height: 1.45;
}

.merch-cart-checkout-btn {
    width: 100%;
}

.merch-cart-continue-btn {
    width: 100%;

    margin-top: 10px;
    padding: 10px 14px;

    border: 0;

    background: transparent;
    color: #4b5563;

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}


/* CART TRIGGER INSIDE PRODUCT MODAL */

.merch-cart-trigger {
    position: relative;

    width: 50px;
    height: 50px;

    flex: 0 0 50px;

    display: grid;
    place-items: center;

    border: 1px solid #dededb;
    border-radius: 50%;

    background: #ffffff;
    color: #1f2937;

    font-size: 1rem;

    cursor: pointer;
}

.merch-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;

    min-width: 22px;
    height: 22px;

    display: grid;
    place-items: center;

    padding: 0 5px;

    border: 2px solid #ffffff;
    border-radius: 999px;

    background: #f5a623;
    color: #ffffff;

    font-size: 0.7rem;
    font-weight: 800;
}


/* ADD TO CART */

.merch-add-to-cart-btn {
    flex: 1;
}

body.merch-cart-open {
    overflow: hidden;
}


@media (max-width: 576px) {

    .merch-cart-drawer {
        width: 100%;
    }

    .merch-cart-header {
        padding: 22px 18px 18px;
    }

    .merch-cart-items {
        padding: 20px 18px;
    }

    .merch-cart-summary {
        padding: 20px 18px 24px;
    }
}

/* ==================================================
   MERCH MODAL COLOR HEADER + CART POSITION
================================================== */

.merch-modal-color-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.merch-modal-color-header>div {
    flex: 1;
}

/* ==================================================
   CART ITEM PRESENTATION
================================================== */

.merch-cart-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;

    padding: 18px 0;

    border-bottom: 1px solid #ececec;
}

.merch-cart-item.is-incomplete {
    padding: 16px;

    border: 1px solid #f5a623;
    border-radius: 14px;

    background: #fffaf1;
}

.merch-cart-item-image {
    width: 110px;
    height: 110px;

    display: block;

    object-fit: contain;

    border-radius: 12px;

    background: #f5f5f3;
}

.merch-cart-item-details {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.merch-cart-item-name {
    color: #1f2937;

    font-size: 0.98rem;
    font-weight: 800;
}

.merch-cart-item-variant {
    color: #4b5563;

    font-size: 0.88rem;
}

.merch-cart-item-price {
    color: #6b7280;

    font-size: 0.82rem;
}

.merch-cart-item-line-total {
    margin-top: 4px;

    color: #1f2937;

    font-size: 0.95rem;
}

.merch-cart-size-required {
    color: #b45309;
}


/* ==================================================
   QUANTITY CONTROLS
================================================== */

.merch-cart-quantity-controls {
    display: inline-flex;
    align-items: center;

    width: fit-content;

    margin-top: 6px;

    border: 1px solid #d8d8d5;
    border-radius: 999px;

    overflow: hidden;

    background: #ffffff;
}

.merch-cart-qty-btn {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border: 0;

    background: #ffffff;
    color: #1f2937;

    font-size: 1.1rem;
    font-weight: 800;

    cursor: pointer;
}

.merch-cart-qty-btn:hover {
    background: #f4f4f2;
}

.merch-cart-qty-value {
    min-width: 34px;

    text-align: center;

    color: #1f2937;

    font-size: 0.88rem;
    font-weight: 800;
}


/* ==================================================
   CART ITEM ACTIONS
================================================== */

.merch-cart-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 4px;
}

.merch-cart-change-size-btn,
.merch-cart-remove-btn {
    padding: 7px 11px;

    border-radius: 999px;

    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;

    cursor: pointer;
}

.merch-cart-change-size-btn {
    border: 1px solid #d8d8d5;

    background: #ffffff;
    color: #374151;
}

.merch-cart-change-size-btn:hover {
    border-color: #f5a623;
}

.merch-cart-remove-btn {
    border: 0;

    background: transparent;
    color: #b42318;
}

.merch-cart-remove-btn:hover {
    text-decoration: underline;
}


/* ==================================================
   SAME SIZE / DIFFERENT SIZE CHOICE
================================================== */

.merch-cart-add-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 8px;
    padding: 10px;

    border-radius: 12px;

    background: #f8f8f6;
}

.merch-cart-add-choice span {
    width: 100%;

    color: #4b5563;

    font-size: 0.78rem;
    font-weight: 700;
}

.merch-cart-add-choice button {
    padding: 7px 10px;

    border: 1px solid #d8d8d5;
    border-radius: 999px;

    background: #ffffff;
    color: #374151;

    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;

    cursor: pointer;
}

.merch-cart-add-choice button:hover {
    border-color: #f5a623;
}


/* ==================================================
   SIZE CHOOSER
================================================== */

.merch-cart-size-chooser {
    margin-top: 8px;
    padding: 12px;

    border: 1px solid #f5a623;
    border-radius: 12px;

    background: #fffaf1;
}

.merch-cart-size-status {
    display: block;

    margin-bottom: 8px;

    color: #4b5563;

    font-size: 0.78rem;
    font-weight: 700;
}

.merch-cart-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.merch-cart-size-option {
    min-width: 42px;
    height: 38px;

    padding: 0 9px;

    border: 1px solid #d8d8d5;
    border-radius: 9px;

    background: #ffffff;
    color: #1f2937;

    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;

    cursor: pointer;
}

.merch-cart-size-option:hover:not(:disabled) {
    border-color: #f5a623;
}

.merch-cart-size-option.is-unavailable,
.merch-cart-size-option:disabled {
    opacity: 0.4;

    cursor: not-allowed;
}

.merch-cart-size-cancel {
    margin-top: 10px;

    border: 0;

    background: transparent;
    color: #6b7280;

    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;

    cursor: pointer;
}


/* ==================================================
   EMPTY CART BUTTON
================================================== */

.merch-cart-empty-btn {
    width: 100%;

    margin-bottom: 12px;
    padding: 10px 14px;

    border: 1px solid #e2e2df;
    border-radius: 999px;

    background: #ffffff;
    color: #b42318;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}

.merch-cart-empty-btn:hover {
    border-color: #b42318;
}


/* ==================================================
   DISABLED CHECKOUT
================================================== */

.merch-cart-checkout-btn:disabled {
    opacity: 0.5;

    cursor: not-allowed;

    filter: grayscale(0.25);
}


/* ==================================================
   MOBILE CART ITEMS
================================================== */

@media (max-width: 576px) {

    .merch-cart-item {
        grid-template-columns: 92px 1fr;
        gap: 14px;
    }

    .merch-cart-item-image {
        width: 92px;
        height: 92px;
    }

}