/**
 * Cart Styles - Card Layout Design
 * @package HelloElementorChild
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans:wght@400;600&display=swap');

/* ============================================
   MAIN CART WRAPPER
   ============================================ */
div.mindwellness-cart-wrapper {
    display: flex;
    flex-direction: row;
    gap: 40px;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    font-family: 'Sofia Sans', sans-serif;
}

/* ============================================
   LEFT COLUMN - Products
   ============================================ */
div.mindwellness-cart-products {
    flex: 1;
    width: 65%;
    max-width: 65%;
}

/* ============================================
   CART ITEMS WRAPPER
   ============================================ */
.cart-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================
   CART ITEM CARD
   ============================================ */
.cart-item-card {
    background: #F6F7F7;
    border-radius: 32px;
    padding: 32px;
    min-height: 231px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.3s ease;
}

.cart-item-card.updating {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   CART ITEM CONTENT
   ============================================ */
.cart-item-content {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    position: relative;
}

/* ============================================
   PRODUCT IMAGE
   ============================================ */
.cart-item-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.cart-item-image a {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
}

.cart-item-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ============================================
   PRODUCT INFO
   ============================================ */
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    min-width: 0;
    align-self: flex-start;
}

.cart-item-info-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   PRODUCT TITLE
   ============================================ */
.cart-item-title {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 24px;
    font-weight: 500;
    font-style: normal;
    color: #152221;
    margin: 0;
    line-height: 100%;
    letter-spacing: 0%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-title a {
    color: #152221;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.cart-item-title a:hover {
    color: #338ABA;
}

/* ============================================
   PRODUCT META (IVPA OPTIONS)
   ============================================ */
.cart-item-meta {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 14px;
    color: #98A0B1;
    line-height: 1.6;
}

.cart-item-meta dl.variation {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0;
    row-gap: 4px;
    align-items: baseline;
}

.cart-item-meta dl.variation dt,
.cart-item-meta dl.variation dd {
    margin: 0;
}

.cart-item-meta dl.variation dt {
    font-weight: 400;
    color: #98A0B1;
    grid-column: 1;
}

.cart-item-meta dl.variation dd {
    font-weight: 400;
    color: #152221;
    grid-column: 2;
}

.cart-item-meta dl.variation dd p {
    display: inline;
    margin: 0;
}

.cart-item-meta dl.variation dd::before,
.cart-item-meta dl.variation dd::after {
    content: "";
}

/* ============================================
   REMOVE BUTTON
   ============================================ */
.cart-item-remove {
    position: absolute;
    left: 0;
    top: 136px;
}

.cart-item-remove .remove-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    padding: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cart-item-remove .remove-button:hover {
    transform: scale(1.05);
}

.cart-item-remove .remove-button svg {
    width: 44px;
    height: 44px;
}

/* ============================================
   QUANTITY COUNTER
   ============================================ */
.cart-item-quantity {
    flex-shrink: 0;
}

.cart-item-quantity .quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #FFFFFF;
    border: 1px solid #338ABA;
    border-radius: 40px;
    padding: 0 8px;
    width: 146px;
    height: 44px;
    box-sizing: border-box;
}

.cart-item-quantity .quantity button.minus {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    order: 1;
}

.cart-item-quantity .quantity button.plus {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    order: 3;
}

.cart-item-quantity .quantity button.minus:hover,
.cart-item-quantity .quantity button.plus:hover {
    transform: scale(1.1);
}

.cart-item-quantity .quantity button.minus svg,
.cart-item-quantity .quantity button.plus svg {
    width: 44px;
    height: 44px;
    display: block;
}

.cart-item-quantity .quantity button.minus svg path,
.cart-item-quantity .quantity button.plus svg path {
    fill: #338ABA;
}

.cart-item-quantity .quantity input[type="number"],
.cart-item-quantity .quantity input.qty {
    flex: 1;
    width: auto;
    max-width: 50px;
    min-width: 30px;
    text-align: center;
    border: none;
    background: transparent;
    font-family: 'Sofia Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 24px;
    color: #152221;
    padding: 0 8px;
    margin: 0;
    appearance: textfield;
    -moz-appearance: textfield;
    order: 2;
}

.cart-item-quantity .quantity input[type="number"]::-webkit-outer-spin-button,
.cart-item-quantity .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-quantity .quantity input[type="number"]:focus {
    outline: none;
}

/* ============================================
   PRODUCT PRICE
   ============================================ */
.cart-item-price {
    flex-shrink: 0;
    font-family: 'Sofia Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #152221;
    min-width: 100px;
    text-align: right;
}

.cart-item-price .woocommerce-Price-amount {
    font-family: 'Sofia Sans', sans-serif;
    font-weight: 400;
}

.cart-item-price .woocommerce-Price-currencySymbol {
    font-weight: 400;
}

/* ============================================
   RIGHT COLUMN - Order Summary
   ============================================ */
div.mindwellness-cart-totals {
    flex: 0 0 auto;
    width: 367px;
    max-width: 367px;
}

.mindwellness-cart-totals .cart-collaterals {
    background: #F6F7F7;
    border-radius: 8px;
    padding: 32px;
    position: sticky;
    top: 20px;
}

.mindwellness-cart-totals .cross-sells {
    display: none;
}

/* ============================================
   CART TOTALS
   ============================================ */
.mindwellness-cart-totals .cart_totals {
    font-family: 'Sofia Sans', sans-serif;
    background: transparent;
}

.mindwellness-cart-totals .cart_totals h2 {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #152221;
    margin: 0 0 24px 0;
}

.mindwellness-cart-totals .cart_totals table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    background: transparent;
}

.mindwellness-cart-totals .cart_totals tbody {
    display: block;
    background: transparent;
}

.mindwellness-cart-totals .cart_totals tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border: none;
    background: transparent;
}

.mindwellness-cart-totals .cart_totals th,
.mindwellness-cart-totals .cart_totals td {
    display: block;
    padding: 0;
    border: none;
    font-family: 'Sofia Sans', sans-serif;
    font-size: 16px;
    background: transparent;
}

.mindwellness-cart-totals .cart_totals th {
    font-weight: 400;
    text-align: left;
    color: #98A0B1;
}

.mindwellness-cart-totals .cart_totals td {
    text-align: right;
    font-weight: 400;
    color: #152221;
}

.mindwellness-cart-totals .cart_totals td .woocommerce-Price-amount {
    font-weight: 400;
}

.mindwellness-cart-totals .cart_totals td span {
    background: transparent;
}

.mindwellness-cart-totals .cart_totals .shipping-calculator-button,
.mindwellness-cart-totals .cart_totals .shipping-calculator-form {
    display: none;
}

.mindwellness-cart-totals .cart_totals .order-total {
    border-top: 1px solid #E0E0E0;
    padding-top: 16px;
    margin-top: 8px;
}

.mindwellness-cart-totals .cart_totals .order-total th,
.mindwellness-cart-totals .cart_totals .order-total td {
    font-size: 20px;
    font-weight: 400;
    color: #152221;
}

/* ============================================
   CHECKOUT BUTTON
   ============================================ */
.mindwellness-cart-totals .wc-proceed-to-checkout {
    margin-top: 24px;
}

.mindwellness-cart-totals .wc-proceed-to-checkout .checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    background: #338ABA;
    color: #FFFFFF;
    text-align: center;
    padding: 14px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-family: 'Sofia Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    border: 1px solid #338ABA;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mindwellness-cart-totals .wc-proceed-to-checkout .checkout-button:hover {
    background: rgba(51, 138, 186, 0.2);
    color: #338ABA;
    border: 1px solid #338ABA;
    transform: none;
    box-shadow: none;
}

.mindwellness-cart-totals .wc-proceed-to-checkout .checkout-button .checkout-text {
    display: inline-block;
}

.mindwellness-cart-totals .wc-proceed-to-checkout .checkout-button .checkout-arrow {
    width: 14px;
    height: 14px;
    display: inline-block;
    flex-shrink: 0;
}

.mindwellness-cart-totals .wc-proceed-to-checkout .checkout-button .checkout-arrow path {
    stroke: #FFFFFF;
    transition: stroke 0.3s ease;
}

.mindwellness-cart-totals .wc-proceed-to-checkout .checkout-button:hover .checkout-arrow path {
    stroke: #338ABA;
}

/* ============================================
   HIDE DEFAULT WOOCOMMERCE ELEMENTS
   ============================================ */
.woocommerce-cart-form .actions {
    display: none;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media screen and (max-width: 1024px) {
    div.mindwellness-cart-products {
        width: 60%;
        max-width: 60%;
    }
    
    div.mindwellness-cart-totals {
        width: 35%;
        max-width: 35%;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media screen and (max-width: 768px) {
    div.mindwellness-cart-wrapper {
        flex-direction: column;
        gap: 24px;
    }
    
    div.mindwellness-cart-products,
    div.mindwellness-cart-totals {
        width: 100%;
        max-width: 100%;
    }
    
    .mindwellness-cart-totals .cart-collaterals {
        position: static;
    }
    
    .cart-item-content {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-image a {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-image img {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-price {
        width: 100%;
        text-align: left;
        order: 4;
    }
    
    .cart-item-quantity {
        order: 3;
    }
    
    .cart-item-remove {
        bottom: -40px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */
@media screen and (max-width: 480px) {
    .cart-item-card {
        padding: 20px;
        border-radius: 24px;
    }
    
    .mindwellness-cart-products .cart-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .cart-item-title {
        font-size: 18px;
    }
    
    .cart-item-content {
        gap: 12px;
    }
}
