/* =========================================================
   SUPPLIER-SHOP3
   CART PAGE
   CSS ONLY
========================================================= */

.cart-page {
    width: min(1200px, 92%);
    margin: 45px auto 70px;
    direction: rtl;
}


/* =========================================================
   ERROR
========================================================= */

.cart-page .error-box {
    width: 100%;
    margin: 0 0 20px;
    padding: 14px 18px;
    box-sizing: border-box;

    text-align: center;

    color: #f5e9e5;
    background: rgba(150, 60, 60, .12);

    border: 1px solid rgba(200, 100, 100, .22);
    border-radius: 16px;

    line-height: 1.8;
    font-size: 14px;
}


/* =========================================================
   TITLE
========================================================= */

.cart-title {
    position: relative;

    margin: 0 0 40px;

    text-align: center;

    color: #dae7ed;

    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;

    line-height: 1.5;
}

.cart-title::after {
    content: "";

    display: block;

    width: 70px;
    height: 4px;

    margin: 12px auto 0;

    border-radius: 50px;

    background: linear-gradient(
        90deg,
        #A56F63,
        #D99B7F
    );
}


/* =========================================================
   CART LIST
========================================================= */

.cart-list {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 22px;
}


/* =========================================================
   CART ITEM
========================================================= */

.cart-item {
    position: relative;

    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 28px;

    padding: 22px;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.09),
            rgba(255,255,255,.04)
        );

    border: 1px solid rgba(255,255,255,.11);

    border-radius: 26px;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 15px 40px rgba(0,0,0,.28);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;

    overflow: hidden;
}

.cart-item:hover {
    transform: translateY(-3px);

    border-color:
        rgba(217,155,127,.32);

    box-shadow:
        0 20px 50px rgba(0,0,0,.38);
}


/* =========================================================
   IMAGE
========================================================= */

.cart-image {
    flex: 0 0 170px;

    width: 170px;
    height: 170px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 10px;

    box-sizing: border-box;

    background:
        rgba(15,48,64,.58);

    border:
        1px solid rgba(217,155,127,.08);

    border-radius: 22px;

    overflow: hidden;
}

.cart-image img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    object-position: center;

    border-radius: 16px;

    transition: transform .3s ease;
}

.cart-item:hover .cart-image img {
    transform: scale(1.04);
}


/* =========================================================
   INFO
========================================================= */

.cart-info {
    flex: 1 1 auto;

    width: auto;
    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
}

.cart-info h3 {
    width: 100%;

    margin: 0 0 12px;

    color: #dae7ed;

    font-size: 21px;
    font-weight: 800;

    line-height: 1.7;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   UNIT PRICE
========================================================= */

.unit-price {
    width: 100%;

    margin: 0 0 7px;

    color: #9eafb7;

    font-size: 14px;
    font-weight: 500;

    line-height: 1.9;
}

.unit-price .old-price {
    color: #8999a1;

    text-decoration: line-through;
}

.unit-price .discount-price {
    color: #D99B7F;

    font-weight: 800;
}

.discount-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-right: 8px;

    padding: 3px 9px;

    color: #f5e9e5;

    background:
        rgba(165,111,99,.20);

    border:
        1px solid rgba(217,155,127,.20);

    border-radius: 50px;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   ITEM TOTAL
========================================================= */

.item-price {
    width: 100%;

    margin: 0;

    color: #D99B7F;

    font-size: 23px;
    font-weight: 800;

    line-height: 1.5;
}


/* =========================================================
   QUANTITY
========================================================= */

.quantity {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    margin: 18px 0 10px;

    padding: 8px 12px;

    background:
        rgba(7,28,38,.50);

    border:
        1px solid rgba(217,155,127,.08);

    border-radius: 50px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        0 4px 15px rgba(0,0,0,.20),
        inset 0 1px 0 rgba(255,255,255,.05);
}

.quantity form {
    display: flex;

    margin: 0;
    padding: 0;
}


/* =========================================================
   QUANTITY BUTTON
========================================================= */

.quantity button {
    all: unset;

    box-sizing: border-box;

    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #dae7ed;

    background:
        rgba(217,155,127,.06);

    border:
        2px solid rgba(217,155,127,.12);

    border-radius: 50%;

    font-size: 0;
    line-height: 1;

    cursor: pointer;

    transition:
        all .25s ease;
}

.quantity form:first-of-type button::before {
    content: "−";

    color: #D99B7F;

    font-size: 22px;
    font-weight: 300;
}

.quantity form:last-of-type button::before {
    content: "+";

    color: #D99B7F;

    font-size: 22px;
    font-weight: 300;
}

.quantity button:hover {
    background:
        linear-gradient(
            135deg,
            rgba(217,155,127,.20),
            rgba(165,111,99,.15)
        );

    border-color: #D99B7F;

    transform:
        translateY(-2px)
        scale(1.08);

    box-shadow:
        0 8px 25px rgba(165,111,99,.30);
}

.quantity button:active {
    transform: scale(.88);
}

.quantity button:focus-visible {
    outline: 2px solid #D99B7F;
    outline-offset: 3px;
}


/* =========================================================
   QUANTITY NUMBER
========================================================= */

.quantity span {
    min-width: 50px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    color: #dae7ed;

    font-size: 20px;
    font-weight: 700;

    user-select: none;

    background:
        rgba(217,155,127,.04);

    border-radius: 12px;

    padding: 0 8px;

    position: relative;
}

.quantity span::after {
    content: "";

    position: absolute;

    bottom: 6px;
    left: 20%;

    width: 60%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(217,155,127,.20),
            transparent
        );

    border-radius: 50px;
}


/* =========================================================
   DELETE
========================================================= */

.delete-btn {
    all: unset;

    box-sizing: border-box;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    margin-top: 4px;

    padding: 8px 18px;

    color: #c98282;

    background:
        rgba(150,60,60,.06);

    border:
        1.5px solid rgba(200,100,100,.10);

    border-radius: 50px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition: all .3s ease;
}

.delete-btn:hover {
    color: #f5e9e5;

    background:
        rgba(165,111,99,.15);

    border-color:
        rgba(217,155,127,.30);

    transform: translateY(-1px);
}

.delete-btn:focus-visible {
    outline: 2px solid #D99B7F;
    outline-offset: 4px;
}


/* =========================================================
   SUMMARY
========================================================= */

.cart-summary {
    width: 100%;

    margin-top: 35px;

    padding: 30px;

    box-sizing: border-box;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.09),
            rgba(255,255,255,.04)
        );

    border:
        1px solid rgba(255,255,255,.11);

    border-radius: 26px;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 18px 45px rgba(0,0,0,.28);
}

.cart-summary h2 {
    margin: 0 0 22px;

    color: #dae7ed;

    font-size: 24px;
    font-weight: 800;

    line-height: 1.6;
}

.cart-summary h2 span {
    color: #D99B7F;
}


/* =========================================================
   CART BUTTON
========================================================= */

.cart-btn {
    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 190px;
    min-height: 50px;

    padding: 14px 35px;

    box-sizing: border-box;

    color: #f5e9e5;

    background:
        linear-gradient(
            135deg,
            #A56F63,
            #D99B7F
        );

    border: none;

    border-radius: 50px;

    text-decoration: none;

    font-size: 15px;
    font-weight: 800;

    box-shadow:
        0 10px 30px rgba(165,111,99,.25);

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        filter .3s ease;

    overflow: hidden;
}

.cart-btn:hover {
    transform:
        translateY(-3px)
        scale(1.02);

    box-shadow:
        0 16px 40px rgba(165,111,99,.35);

    filter: brightness(1.05);
}

.cart-btn:active {
    transform: scale(.96);
}

.cart-btn:focus-visible {
    outline: 2px solid #D99B7F;
    outline-offset: 4px;
}


/* =========================================================
   EMPTY CART
========================================================= */

.empty-cart {
    width: 100%;

    padding: 65px 25px;

    box-sizing: border-box;

    text-align: center;

    color: #dae7ed;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.08),
            rgba(255,255,255,.04)
        );

    border:
        1px solid rgba(255,255,255,.11);

    border-radius: 26px;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 18px 45px rgba(0,0,0,.25);

    line-height: 1.8;
}

.empty-cart h2,
.empty-cart h3 {
    margin-bottom: 12px;

    color: #dae7ed;

    font-weight: 800;
}

.empty-cart p {
    margin: 0;

    color: #9eafb7;

    line-height: 1.8;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 992px) {

    .cart-page {
        width: 94%;
        margin-top: 35px;
    }

    .cart-item {
        gap: 20px;
        padding: 18px;
    }

    .cart-image {
        flex-basis: 145px;

        width: 145px;
        height: 145px;
    }

    .cart-info h3 {
        font-size: 19px;
    }

    .item-price {
        font-size: 21px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .cart-page {
        width: 92%;

        margin: 25px auto 50px;
    }

    .cart-title {
        font-size: 26px;
        margin-bottom: 28px;
    }

    .cart-list {
        gap: 16px;
    }

    .cart-item {
        width: 100%;

        flex-direction: column;

        align-items: center;

        text-align: center;

        gap: 18px;

        padding: 20px 16px;

        border-radius: 22px;
    }

    .cart-image {
        flex: 0 0 auto;

        width: min(190px, 70vw);
        height: min(190px, 70vw);

        border-radius: 20px;
    }

    .cart-info {
        width: 100%;

        align-items: center;
    }

    .cart-info h3 {
        font-size: 19px;
        margin-bottom: 10px;
    }

    .unit-price {
        font-size: 13px;
    }

    .item-price {
        font-size: 22px;
    }

    .quantity {
        gap: 10px;

        padding: 6px 10px;

        border-radius: 40px;
    }

    .quantity button {
        width: 30px;
        height: 30px;
    }

    .quantity form:first-of-type button::before,
    .quantity form:last-of-type button::before {
        font-size: 20px;
    }

    .quantity span {
        min-width: 44px;
        height: 38px;

        font-size: 18px;
    }

    .delete-btn {
        margin-top: 6px;

        padding: 7px 16px;

        font-size: 12px;
    }

    .cart-summary {
        margin-top: 25px;

        padding: 25px 18px;

        border-radius: 22px;
    }

    .cart-summary h2 {
        font-size: 21px;
    }

    .cart-btn {
        width: 100%;

        min-width: 0;

        min-height: 48px;

        padding: 14px 20px;
    }

    .empty-cart {
        padding: 50px 20px;

        border-radius: 22px;
    }

    .cart-page .error-box {
        font-size: 13px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .cart-page {
        width: 94%;
    }

    .cart-title {
        font-size: 23px;
    }

    .cart-image {
        width: 160px;
        height: 160px;
    }

    .cart-item {
        padding: 16px 12px;
    }

    .cart-info h3 {
        font-size: 17px;
    }

    .item-price {
        font-size: 20px;
    }

    .quantity {
        gap: 8px;

        padding: 5px 8px;
    }

    .quantity button {
        width: 28px;
        height: 28px;

        border-width: 1.5px;
    }

    .quantity form:first-of-type button::before,
    .quantity form:last-of-type button::before {
        font-size: 18px;
    }

    .quantity span {
        min-width: 38px;
        height: 34px;

        font-size: 16px;
    }

    .quantity span::after {
        bottom: 4px;
    }

    .cart-summary {
        padding: 22px 15px;
    }

    .cart-summary h2 {
        font-size: 19px;
    }

    .empty-cart {
        padding: 40px 15px;
    }

    .delete-btn {
        font-size: 11px;

        padding: 5px 12px;

        min-height: 32px;
    }

    .discount-badge {
        margin-right: 4px;
        font-size: 10px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 360px) {

    .cart-page {
        width: 95%;
    }

    .cart-title {
        font-size: 21px;
    }

    .cart-image {
        width: 140px;
        height: 140px;
    }

    .cart-item {
        padding: 14px 10px;
    }

    .cart-info h3 {
        font-size: 16px;
    }

    .item-price {
        font-size: 18px;
    }

    .quantity {
        gap: 6px;
    }

    .quantity button {
        width: 27px;
        height: 27px;
    }

    .quantity span {
        min-width: 36px;
        height: 32px;

        font-size: 15px;
    }

    .cart-summary h2 {
        font-size: 18px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cart-item,
    .cart-image img,
    .quantity button,
    .delete-btn,
    .cart-btn {
        transition: none !important;
    }

    .cart-item:hover {
        transform: none;
    }

    .cart-image img:hover {
        transform: none;
    }

    .quantity button:hover {
        transform: none !important;
    }

    .cart-btn:hover {
        transform: none;
    }
}