/* =====================================================
   FLEXI COMMERCE — CART PAGE
   Clean Premium UI
===================================================== */


/* =====================================================
   CART PAGE
===================================================== */

.fc-cart-page {
    width: 100%;
    padding: 50px 20px 80px;
    background: #f7f8fa;
    box-sizing: border-box;
}

.fc-cart-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    box-sizing: border-box;
}


/* =====================================================
   CART HEADER
===================================================== */

.fc-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    width: 100%;
    margin-bottom: 28px;

    box-sizing: border-box;
}

.fc-cart-title {
    margin: 0;
    padding: 0;

    color: #17251e;

    font-size: 32px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.fc-cart-header-count {
    margin: 0;
    padding: 0;

    color: #6b7280;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;

    white-space: nowrap;
}


/* =====================================================
   CART LAYOUT
===================================================== */

.fc-cart-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        340px;

    gap: 24px;

    align-items: start;
}


/* =====================================================
   COMMON CARDS
===================================================== */

.fc-cart-items-card,
.fc-cart-summary-card,
.fc-empty-cart {
    background: #ffffff;

    border: 1px solid #e5e9e6;
    border-radius: 18px;

    box-sizing: border-box;
}


/* =====================================================
   CART ITEMS CARD
===================================================== */

.fc-cart-items-card {
    overflow: hidden;

    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.04);
}

.fc-cart-items {
    width: 100%;
    padding: 0 22px;

    box-sizing: border-box;
}


/* =====================================================
   CART ITEM
===================================================== */

.fc-cart-item {
    position: relative;

    display: grid;

    grid-template-columns:
        92px
        minmax(0, 1fr)
        auto
        auto;

    gap: 18px;

    align-items: center;

    min-width: 0;

    /*
     * Extra bottom space is intentional.
     * It keeps the Remove button completely
     * below the product price.
     */
    padding: 22px 0 66px;

    border-bottom: 1px solid #eceff2;

    box-sizing: border-box;

    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}

.fc-cart-item:last-child {
    border-bottom: 0;
}

.fc-cart-item:hover {
    background: #fcfdfc;
}


/* =====================================================
   PRODUCT IMAGE
===================================================== */

.fc-cart-item-image {
    width: 92px;
    height: 92px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid #edf0ed;
    border-radius: 12px;

    background: #f7f8f7;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.fc-cart-item-image a {
    display: block;

    width: 100%;
    height: 100%;
}

.fc-cart-item-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.fc-cart-item-image:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}

.fc-cart-placeholder-image {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 100% !important;
    height: 100% !important;

    font-size: 30px;

    text-decoration: none;
}


/* =====================================================
   PRODUCT INFORMATION
===================================================== */

.fc-cart-item-main {
    min-width: 0;
}

.fc-cart-item-title {
    display: inline-block;

    max-width: 100%;

    color: #17251e !important;

    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;

    text-decoration: none !important;

    overflow-wrap: anywhere;

    transition:
        color 0.18s ease;
}

.fc-cart-item-title:hover {
    color: #173b2b !important;
}

.fc-cart-item-sku {
    margin-top: 5px;

    color: #8a918d;

    font-size: 12px;
    line-height: 1.4;
}

.fc-cart-item-price {
    margin-top: 10px;

    color: #47534c;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}


/* =====================================================
   REMOVE BUTTON
===================================================== */

/*
 * IMPORTANT:
 * This button remains attached to the product item,
 * but the extra bottom spacing above guarantees that
 * it never overlaps the product price.
 */

.fc-cart-remove {
    position: absolute;

    left: 110px;
    bottom: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 0 13px !important;

    border: 1px solid #e2b8b5 !important;
    border-radius: 8px !important;

    background: #fff8f7 !important;
    color: #a33a32 !important;

    font-family: inherit !important;

    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 600 !important;

    text-decoration: none !important;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
}

.fc-cart-remove:hover {
    background: #fff0ee !important;

    border-color: #d99a95 !important;

    color: #7f211b !important;

    text-decoration: none !important;

    box-shadow:
        0 4px 12px rgba(180, 35, 24, 0.08);
}

.fc-cart-remove:active {
    transform: scale(0.96);
}

.fc-cart-remove:focus-visible {
    outline: 2px solid #b42318 !important;
    outline-offset: 3px;
}


/* =====================================================
   QUANTITY CONTROL
===================================================== */

.fc-cart-item-quantity {
    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 116px;

    height: 40px;

    overflow: hidden;

    border: 1px solid #d8dfda !important;
    border-radius: 10px !important;

    background: #ffffff !important;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04);

    box-sizing: border-box;
}


/* =====================================================
   QUANTITY BUTTONS
===================================================== */

.fc-cart-qty-button {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 38px !important;
    min-width: 38px !important;

    height: 40px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: #f7f9f7 !important;
    color: #173b2b !important;

    font-family: inherit !important;

    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.12s ease;
}

.fc-cart-qty-button:hover {
    background: #173b2b !important;
    color: #ffffff !important;
}

.fc-cart-qty-button:active {
    transform: scale(0.92);
}

.fc-cart-qty-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* =====================================================
   QUANTITY INPUT
===================================================== */

.fc-cart-quantity {
    display: block !important;

    width: 40px !important;
    min-width: 40px !important;

    height: 40px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    border-left:
        1px solid #e0e5e1 !important;

    border-right:
        1px solid #e0e5e1 !important;

    border-radius: 0 !important;

    background: #ffffff !important;

    color: #17251e !important;

    font-family: inherit !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    text-align: center !important;

    box-shadow: none !important;
    outline: none !important;

    appearance: textfield !important;
    -moz-appearance: textfield !important;

    box-sizing: border-box;
}

.fc-cart-quantity:focus {
    outline: none !important;
    box-shadow: none !important;
}

.fc-cart-quantity::-webkit-outer-spin-button,
.fc-cart-quantity::-webkit-inner-spin-button {
    margin: 0;

    -webkit-appearance: none;
    appearance: none;
}


/* =====================================================
   LINE TOTAL
===================================================== */

.fc-cart-item-total {
    min-width: 90px;

    color: #17251e;

    font-size: 16px;

    text-align: right;
}

.fc-cart-item-total strong {
    font-weight: 700;
}


/* =====================================================
   CART FOOTER ACTIONS
===================================================== */

.fc-cart-footer-actions {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 20px 22px;

    border-top: 1px solid #eceff2;

    background: #ffffff;

    box-sizing: border-box;
}


/* =====================================================
   COMMON BUTTON
===================================================== */

.fc-cart-secondary-button,
.fc-cart-primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 0 20px;

    border-radius: 10px;

    box-sizing: border-box;

    font-family: inherit;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
}


/* =====================================================
   CONTINUE SHOPPING
===================================================== */

.fc-cart-secondary-button {
    border: 1px solid #e1e5e2;

    background: #f3f5f4;

    color: #17251e;

    cursor: pointer;
}

.fc-cart-secondary-button:hover {
    background: #e9edea;

    border-color: #d6ddd8;

    color: #17251e;
}

.fc-cart-secondary-button:active {
    transform: translateY(1px);
}


/* =====================================================
   CLEAR CART
===================================================== */

.fc-cart-clear-button {
    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px !important;

    border: 1px solid #e0aaa6 !important;
    border-radius: 9px !important;

    background: #ffffff !important;

    color: #a33a32 !important;

    font-family: inherit !important;

    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    text-decoration: none !important;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
}

.fc-cart-clear-button:hover {
    background: #fff4f3 !important;

    border-color: #d58f89 !important;

    color: #7f211b !important;

    box-shadow:
        0 4px 14px rgba(180, 35, 24, 0.08);
}

.fc-cart-clear-button:active {
    transform: scale(0.96);
}

.fc-cart-clear-button:focus-visible {
    outline: 2px solid #b42318 !important;
    outline-offset: 3px;
}


/* =====================================================
   CART SUMMARY
===================================================== */

.fc-cart-summary-card {
    padding: 24px;

    border: 1px solid #e5e9e6;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;
}

.fc-cart-summary-card h2 {
    margin: 0 0 20px;

    color: #17251e;

    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
}


/* =====================================================
   SUMMARY ROW
===================================================== */

.fc-cart-summary-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 13px 0;

    border-bottom: 1px solid #eceff2;

    color: #66706a;

    font-size: 14px;
}

.fc-cart-summary-row strong {
    color: #17251e;
    font-weight: 700;
}


/* =====================================================
   TOTAL
===================================================== */

.fc-cart-summary-total {
    padding-top: 20px;

    border-bottom: 0;

    font-size: 18px;
}

.fc-cart-summary-total strong {
    color: #173b2b;

    font-size: 21px;
}


/* =====================================================
   CHECKOUT BUTTON
===================================================== */

.fc-cart-checkout-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 50px;

    margin-top: 15px;

    padding: 0 18px;

    border: 1px solid #173b2b !important;
    border-radius: 10px !important;

    background: #173b2b !important;

    color: #ffffff !important;

    font-family: inherit !important;

    font-size: 15px !important;
    font-weight: 700 !important;

    line-height: 1.2 !important;

    cursor: pointer;

    text-align: center;

    transition:
        background 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;

    box-sizing: border-box;

    -webkit-tap-highlight-color: transparent;
}

.fc-cart-checkout-button:hover {
    background: #102c20 !important;

    box-shadow:
        0 8px 18px rgba(23, 59, 43, 0.18);
}

.fc-cart-checkout-button:active {
    transform: translateY(1px);
}

.fc-cart-checkout-button:focus-visible {
    outline: 2px solid #173b2b;
    outline-offset: 3px;
}


/* =====================================================
   CHECKOUT NOTE
===================================================== */

.fc-cart-checkout-note {
    margin: 10px 0 0;

    color: #8a918d;

    font-size: 12px;

    line-height: 1.5;

    text-align: center;
}


/* =====================================================
   EMPTY CART
===================================================== */

.fc-empty-cart {
    max-width: 650px;

    margin: 30px auto;

    padding: 60px 25px;

    text-align: center;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.05);
}

.fc-empty-cart-icon {
    margin-bottom: 15px;

    font-size: 48px;
    line-height: 1;

    opacity: 0.8;
}

.fc-empty-cart h2 {
    margin: 0 0 10px;

    color: #17251e;

    font-size: 24px;
}

.fc-empty-cart p {
    margin: 0 0 25px;

    color: #666666;

    font-size: 14px;

    line-height: 1.6;
}


/* =====================================================
   PRIMARY BUTTON
===================================================== */

.fc-cart-primary-button {
    background: #173b2b;
    color: #ffffff;
}

.fc-cart-primary-button:hover {
    background: #102c20;

    color: #ffffff;

    box-shadow:
        0 8px 18px rgba(23, 59, 43, 0.16);
}


/* =====================================================
   UPDATING STATE
===================================================== */

.fc-cart-item.is-updating {
    opacity: 0.45;

    filter: saturate(0.7);

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        filter 0.2s ease;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

    .fc-cart-page {
        padding: 40px 18px 60px;
    }

    .fc-cart-layout {
        grid-template-columns: minmax(0, 1fr);

        gap: 20px;
    }

    .fc-cart-summary-card {
        position: static;
    }

    .fc-cart-summary-card h2 {
        font-size: 20px;
    }

    .fc-cart-item {
        grid-template-columns:
            82px
            minmax(0, 1fr)
            auto;

        gap: 16px;
    }

    .fc-cart-item-image {
        width: 82px;
        height: 82px;
    }

    .fc-cart-item-total {
        min-width: 80px;
    }
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 650px) {

    .fc-cart-page {
        padding: 26px 12px 40px;
    }

    .fc-cart-container {
        width: 100%;
    }


    /* ---------------------------------------------
       CART HEADER
    --------------------------------------------- */

    .fc-cart-header {
        align-items: flex-start;

        gap: 8px;

        margin-bottom: 16px;
    }

    .fc-cart-title {
        font-size: 25px;

        line-height: 1.2;
    }

    .fc-cart-header-count {
        padding-top: 3px;

        font-size: 12px;
    }


    /* ---------------------------------------------
       CART CARDS
    --------------------------------------------- */

    .fc-cart-items-card,
    .fc-cart-summary-card,
    .fc-empty-cart {
        border-radius: 14px;
    }


    /* ---------------------------------------------
       CART ITEMS
    --------------------------------------------- */

    .fc-cart-items {
        padding: 0 13px;
    }

    .fc-cart-item {

        display: grid;

        grid-template-columns:
            68px
            minmax(0, 1fr);

        grid-template-rows:
            auto
            auto;

        column-gap: 12px;

        row-gap: 12px;

        align-items: start;

        min-width: 0;

        padding:
            16px 0
            58px;
    }


    /* ---------------------------------------------
       PRODUCT IMAGE
    --------------------------------------------- */

    .fc-cart-item-image {

        grid-column: 1;
        grid-row: 1;

        width: 68px;
        height: 68px;

        border-radius: 10px;
    }


    /* ---------------------------------------------
       PRODUCT INFORMATION
    --------------------------------------------- */

    .fc-cart-item-main {

        grid-column: 2;
        grid-row: 1;

        min-width: 0;

        padding-right: 44px;
    }

    .fc-cart-item-title {

        display: block;

        max-width: 100%;

        font-size: 14px;

        line-height: 1.4;

        overflow-wrap: anywhere;
    }

    .fc-cart-item-sku {

        margin-top: 4px;

        font-size: 11px;

        line-height: 1.35;
    }

    .fc-cart-item-price {

        margin-top: 7px;

        font-size: 13px;

        line-height: 1.35;
    }


    /* ---------------------------------------------
       MOBILE TOTAL
    --------------------------------------------- */

    .fc-cart-item-total {

        position: absolute;

        top: 16px;
        right: 0;

        min-width: auto;

        max-width: 40%;

        font-size: 14px;

        line-height: 1.3;

        text-align: right;

        white-space: nowrap;
    }


    /* ---------------------------------------------
       QUANTITY CONTROL
    --------------------------------------------- */

    .fc-cart-item-quantity {

        grid-column: 2;
        grid-row: 2;

        justify-self: start;

        width: auto !important;

        min-width: 108px;

        height: 38px;
    }

    .fc-cart-qty-button {

        width: 35px !important;

        min-width: 35px !important;

        height: 38px !important;

        font-size: 17px !important;
    }

    .fc-cart-quantity {

        width: 38px !important;

        min-width: 38px !important;

        height: 38px !important;

        font-size: 13px !important;
    }


    /* ---------------------------------------------
       REMOVE BUTTON
    --------------------------------------------- */

    .fc-cart-remove {

        left: 80px;

        bottom: 14px;

        min-height: 32px;

        padding: 0 12px !important;

        border-radius: 7px !important;

        font-size: 11px !important;
    }


    /* ---------------------------------------------
       CART FOOTER
    --------------------------------------------- */

    .fc-cart-footer-actions {

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 10px;

        padding: 16px 13px;
    }

    .fc-cart-secondary-button {

        width: 100%;

        min-height: 44px;

        font-size: 14px;
    }

    .fc-cart-clear-button {

        align-self: center;

        min-height: 38px;

        padding: 0 15px !important;

        font-size: 12px !important;
    }


    /* ---------------------------------------------
       SUMMARY
    --------------------------------------------- */

    .fc-cart-summary-card {

        padding: 18px;
    }

    .fc-cart-summary-card h2 {

        margin-bottom: 14px;

        font-size: 19px;
    }

    .fc-cart-summary-row {

        gap: 12px;

        padding: 11px 0;

        font-size: 13px;
    }

    .fc-cart-summary-total {

        padding-top: 16px;

        font-size: 16px;
    }

    .fc-cart-summary-total strong {

        font-size: 20px;
    }


    /* ---------------------------------------------
       CHECKOUT BUTTON
    --------------------------------------------- */

    .fc-cart-checkout-button {

        width: 100%;

        min-height: 52px;

        margin-top: 13px;

        padding:
            0 16px;

        border-radius: 10px !important;

        font-size: 14px !important;

        line-height: 1.25 !important;

        touch-action: manipulation;
    }

    .fc-cart-checkout-button:active {

        transform: scale(0.99);
    }

    .fc-cart-checkout-note {

        margin-top: 8px;

        padding: 0 8px;

        font-size: 11px;

        line-height: 1.45;
    }


    /* ---------------------------------------------
       EMPTY CART
    --------------------------------------------- */

    .fc-empty-cart {

        margin: 20px auto;

        padding:
            45px 20px;
    }

    .fc-empty-cart-icon {

        margin-bottom: 13px;

        font-size: 42px;
    }

    .fc-empty-cart h2 {

        font-size: 21px;
    }

    .fc-empty-cart p {

        margin-bottom: 20px;

        font-size: 13px;
    }
}


/* =====================================================
   VERY SMALL DEVICES
===================================================== */

@media (max-width: 380px) {

    .fc-cart-page {

        padding:
            22px 9px 35px;
    }


    /* ---------------------------------------------
       HEADER
    --------------------------------------------- */

    .fc-cart-title {

        font-size: 23px;
    }

    .fc-cart-header-count {

        font-size: 11px;
    }


    /* ---------------------------------------------
       ITEMS
    --------------------------------------------- */

    .fc-cart-items {

        padding-left: 11px;
        padding-right: 11px;
    }

    .fc-cart-item {

        grid-template-columns:
            60px
            minmax(0, 1fr);

        column-gap: 10px;

        row-gap: 10px;

        padding:
            14px 0
            56px;
    }


    /* ---------------------------------------------
       IMAGE
    --------------------------------------------- */

    .fc-cart-item-image {

        width: 60px;
        height: 60px;

        border-radius: 9px;
    }


    /* ---------------------------------------------
       PRODUCT INFO
    --------------------------------------------- */

    .fc-cart-item-main {

        padding-right: 36px;
    }

    .fc-cart-item-title {

        font-size: 13px;

        line-height: 1.35;
    }

    .fc-cart-item-sku {

        font-size: 10px;
    }

    .fc-cart-item-price {

        margin-top: 6px;

        font-size: 12px;
    }


    /* ---------------------------------------------
       TOTAL
    --------------------------------------------- */

    .fc-cart-item-total {

        top: 14px;
        right: 0;

        max-width: 42%;

        font-size: 13px;
    }


    /* ---------------------------------------------
       QUANTITY
    --------------------------------------------- */

    .fc-cart-item-quantity {

        min-width: 102px;

        height: 36px;
    }

    .fc-cart-qty-button {

        width: 33px !important;

        min-width: 33px !important;

        height: 36px !important;

        font-size: 16px !important;
    }

    .fc-cart-quantity {

        width: 36px !important;

        min-width: 36px !important;

        height: 36px !important;

        font-size: 12px !important;
    }


    /* ---------------------------------------------
       REMOVE
    --------------------------------------------- */

    .fc-cart-remove {

        left: 70px;

        bottom: 12px;

        min-height: 30px;

        padding:
            0 10px !important;

        font-size: 10px !important;
    }


    /* ---------------------------------------------
       SUMMARY
    --------------------------------------------- */

    .fc-cart-summary-card {

        padding: 16px;
    }

    .fc-cart-summary-card h2 {

        font-size: 18px;
    }

    .fc-cart-summary-row {

        font-size: 12px;

        padding: 10px 0;
    }

    .fc-cart-summary-total strong {

        font-size: 19px;
    }


    /* ---------------------------------------------
       CHECKOUT
    --------------------------------------------- */

    .fc-cart-checkout-button {

        min-height: 50px;

        font-size: 13px !important;
    }
}


/* =====================================================
   TOUCH DEVICES
===================================================== */

@media (hover: none) and (pointer: coarse) {

    .fc-cart-item:hover {

        background: transparent;
    }

    .fc-cart-item-image:hover {

        transform: none;

        box-shadow: none;
    }

    .fc-cart-checkout-button:hover {

        box-shadow: none;
    }

    .fc-cart-remove:hover {

        box-shadow: none;
    }

    .fc-cart-clear-button:hover {

        box-shadow: none;
    }

    .fc-cart-secondary-button:hover {

        background: #f3f5f4;

        border-color: #e1e5e2;
    }

    .fc-cart-qty-button {

        min-height: 36px !important;
    }
}


/* =====================================================
   ACCESSIBILITY / REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

    .fc-cart-item,
    .fc-cart-item-image,
    .fc-cart-remove,
    .fc-cart-qty-button,
    .fc-cart-checkout-button,
    .fc-cart-clear-button,
    .fc-cart-secondary-button {

        transition: none !important;
    }
}