/* /cart/cart.css — the cart page's own styles, all in one file now
   instead of 2 (this used to just @import a separate cart-styles/
   partial for everything below). The imports here are genuinely shared —
   either site-wide (variables/base/navbar/toast/footer/cookie-banner) or
   used by several other pages too (product-strip, for the Wishlist/
   Recently Viewed rows — also used on landing, marketplace and
   product-details) — so they stay as real imports rather than being
   copied in here. */
@import url(/landing/landing-styles/variables.css);
@import url(/landing/landing-styles/base.css);
@import url(/landing/landing-styles/navbar.css);
@import url(/landing/landing-styles/toast.css);
@import url(/marketplace/marketplace-styles/marketplace-products.css);
@import url(/marketplace/marketplace-styles/product-strip.css);
@import url(/landing/landing-styles/footer.css);
@import url(/landing/landing-styles/cookie-banner.css);

body{
    background: var(--surface);
}

.cart-header{
    background: var(--surface);
    border-radius: 12px;
    padding: 40px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 60px;
}
.cart-header h1{
    font-family: var(--headers);
    color: var(--second-color);
    font-size: 32px;
    margin: 0 0 6px;
}
.cart-header p{
    color: var(--muted-text);
    font-size: 14px;
    margin: 0;
}

.continue-shopping{
    color: var(--second-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    margin-top: 8px;
}
.continue-shopping:hover{
    text-decoration: underline;
}
.cart-layout{
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    padding: 0 2rem 60px;
    align-items: start;
}

.order-summary{
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 90px;
}

.order-summary h2{
    font-family: var(--headers);
    font-size: 20px;
    margin: 0 0 16px;
}

.summary-row{
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted-text);
    margin-bottom: 10px;
}

.delivery-note{
    color: var(--second-color);
    font-size: 12px;
    text-transform: capitalize;
}

/* One row per vendor in the cart, shown above the fee/total lines — each
   vendor sets their own delivery fee, so a multi-vendor cart needs to make
   clear which fee belongs to which store. */
.vendor-delivery-breakdown{
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.vendor-delivery-row{
    align-items: flex-start;
    gap: 10px;
}

.vendor-delivery-name{
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.vendor-delivery-option{
    text-align: right;
    font-size: 13px;
}

.summary-total{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin: 14px 0 20px;
}
.summary-total h3{
    margin: 0;
}

.checkout-btn{
    width: 100%;
    background: var(--second-color);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    font-family: var(--headers);
}
.checkout-btn:hover{
    background: var(--button-hovers);
    transform: translateY(-1px);
}

.secure-note{
    text-align: center;
    font-size: 12px;
    color: var(--muted-text);
    margin: 10px 0 20px;
}

.secure-note svg{
    height: 15px;
}

.studex-guarantee{
    background: #f7f2ef;
    border-radius: 10px;
    padding: 14px;
    font-size: 12.5px;
    color: var(--muted-text);
}
.studex-guarantee p:first-child{
    color: var(--main-text);
    margin: 0 0 4px;
}
.studex-guarantee p:last-child{
    margin: 0;
}

.cart-items{
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item{
    display: flex;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    align-items: center;
    transition: box-shadow 0.25s ease;
}
.cart-item:hover{
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.cart-item img{
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.cart-item-info{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-category{
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--second-color);
    margin-bottom: 5px;
}

.cart-item-name{
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--main-text);
    font-family: var(--headers);
}

.cart-item-variant{
    font-size: 12px;
    color: var(--main-text);
    font-weight: 600;
    margin: 2px 0;
}
.cart-item-vendor{
    font-size: 12px;
    color: var(--muted-text);
    margin: 0;
}
.cart-item-vendor span{
    color: var(--second-color);
}

.cart-item-actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.remove-item, .save-for-later{
    font-family: var(--body-font);
    font-size: 12px;
}

.qty-stepper{
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
}
.qty-stepper button{
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--second-color);
    width: 22px;
    height: 22px;
}
.qty-stepper .qty-input{
    font-size: 14px;
    font-weight: 600;
    width: 32px;
    text-align: center;
    border: none;
    background: none;
    color: var(--main-text);
    font-family: var(--body-font);
    -moz-appearance: textfield;
}
.qty-stepper .qty-input::-webkit-outer-spin-button,
.qty-stepper .qty-input::-webkit-inner-spin-button{
    -webkit-appearance: none;
    margin: 0;
}
.qty-stepper .qty-input:focus{
    outline: none;
}

.qty-increase:hover, .qty-decrease:hover{
    transition: var(--transition);
    border: 1px solid transparent;
    background-color: var(--surface);
    border-radius: 50%;
}

.cart-item-icons{
    display: flex;
    align-items: center;
    gap: 14px;
}
.cart-item-icons button{
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-text);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    transition: color 0.2s ease;
}
.cart-item-icons button:hover{
    color: var(--second-color);
}

.cart-item-price{
    text-align: right;
    flex-shrink: 0;
}
.cart-item-price h3{
    font-size: 17px;
    margin: 0;
    color: var(--main-text);
    font-family: var(--headers);
}
.cart-item-price .old-price{
    font-size: 13px;
    color: var(--muted-text);
    text-decoration: line-through;
    margin: 0;
}

/* Skeleton loading state */
.skeleton{
    background: linear-gradient(90deg, var(--surface) 25%, var(--border) 37%, var(--surface) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 8px;
}
@keyframes skeleton-shimmer{
    0%{ background-position: 100% 50%; }
    100%{ background-position: 0 50%; }
}
.skeleton-cart-item{
    display: flex;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    align-items: center;
}
.skeleton-cart-img{ width: 90px; height: 90px; border-radius: 10px; flex-shrink: 0; }
.skeleton-cart-info{ flex: 1; display: flex; flex-direction: column; gap: 10px; }
.skeleton-cart-category{ width: 80px; height: 10px; }
.skeleton-cart-name{ width: 60%; height: 18px; }
.skeleton-cart-vendor{ width: 40%; height: 12px; }
.skeleton-cart-actions{ width: 90%; height: 24px; margin-top: 6px; }
.skeleton-cart-price{ width: 60px; height: 20px; flex-shrink: 0; }

/* Empty Cart  */
.empty-cart{
    text-align: center;
    padding: 100px 20px;
}
.empty-cart h2{
    font-family: var(--headers);
    font-size: 24px;
    margin: 0 0 10px;
}
.empty-cart p{
    color: var(--muted-text);
    margin: 0 0 24px;
}
.continue-shopping-btn{
    display: inline-block;
    background: var(--second-color);
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
}
.continue-shopping-btn:hover{
    background: var(--button-hovers);
}

@media (max-width: 900px){
    .cart-layout{
        grid-template-columns: 1fr;
        padding: 0 20px 60px;
    }
    .order-summary{
        position: static;
    }
    .cart-header{
        padding: 28px 20px;
        margin-top: 40px;
    }
}
@media (max-width: 480px){
    .cart-item{ flex-wrap: wrap; }
    .cart-item-price{ text-align: left; width: 100%; padding-left: 106px; }

    .cart-item-actions{
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }
    .cart-item-icons{
        width: 100%;
        gap: 16px;
    }
    .remove-item, .save-for-later{
        white-space: nowrap;
    }
}
