/* Modern Cart Page Styles - Mobile First */

/* Cart Page Container */
.cart-page {
    padding: 20px 16px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60vh;
}

.cart-header {
    margin-bottom: 24px;
}

.cart-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #111;
    margin: 0;
    letter-spacing: -0.5px;
}

#cart-container {
    background: #fff;
    border-radius: 12px;
    padding: 0;
}

.cart-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cart-items {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    padding-bottom: 8px;
}

/* Modern Cart Item Styles */
.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Image */
.cart-item__image-wrapper {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
}

.cart-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #fafafa;
}

/* Details Section */
.cart-item__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cart-item__info {
    flex: 1;
    min-width: 0;
}

.cart-item__title {
    font-size: 15px;
    font-weight: 500;
    color: #111;
    margin: 0 0 4px 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.cart-item__variant {
    font-size: 13px;
    color: #666;
    margin: 0;
    text-transform: capitalize;
}

/* Remove Button */
.cart-item__remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 14px;
    padding: 0;
}

.cart-item__remove:hover {
    background: #ffebee;
    color: #e53935;
    transform: scale(1.05);
}

.cart-item__remove:active {
    transform: scale(0.95);
}

/* Footer with Quantity and Price */
.cart-item__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Quantity Controls */
.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    padding: 0;
}

.quantity-btn:hover {
    background: #f5f5f5;
    color: #111;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn i {
    font-size: 11px;
}

.quantity-input {
    width: 45px;
    height: 36px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #111;
    background: #fafafa;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    touch-action: manipulation;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Price */
.cart-item__price {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

/* Checkout Notification */
.checkout-notification {
    margin-bottom: 15px;
    width: 100%;
}

.notification-content {
    padding: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: fadeIn 0.3s ease-in-out;
}

.notification-content.error {
    background-color: #fff2f2;
    color: #d63031;
    border: 1px solid #fab1b1;
}

.notification-content i {
    font-size: 16px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modern Cart Summary */
.cart-summary {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin: 12px 0;
    position: sticky;
    top: 20px;
}

.cart-summary h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #111;
    letter-spacing: -0.3px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: #666;
}

.cart-summary__row span:last-child {
    font-weight: 500;
    color: #111;
}

.cart-summary__total {
    border-top: 2px solid #e0e0e0;
    margin-top: 16px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.cart-summary__total span:last-child {
    font-size: 22px;
    color: #111;
}

/* Buttons */
.cart-summary .button {
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    text-align: center;
    display: block;
}

.cart-summary .button--primary {
    background: #5A3518;
    color: #fff;
}

.cart-summary .button--primary:hover {
    background: #3D2817;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 53, 24, 0.3);
}

.cart-summary .button--primary:active {
    transform: translateY(0);
}

.cart-summary .button--secondary {
    background: #fff;
    color: #5A3518;
    border: 2px solid #5A3518;
}

.cart-summary .button--secondary:hover {
    background: #5A3518;
    color: #fff;
    border-color: #5A3518;
}

/* Empty Cart - Modern */
#empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cart__content {
    max-width: 400px;
}

.empty-cart__content i {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.empty-cart__content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.empty-cart__content p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.empty-cart__content .button {
    display: inline-block;
    padding: 14px 32px;
    background: #5A3518;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.empty-cart__content .button:hover {
    background: #3D2817;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 53, 24, 0.3);
}

.empty-cart__content .button:active {
    transform: translateY(0);
}

/* ======================================
   RESPONSIVE DESIGN
====================================== */

/* Tablet and Up (768px+) */
@media screen and (min-width: 768px) {
    .cart-page {
        padding: 40px 32px;
    }

    .cart-header h1 {
        font-size: 32px;
    }

    .cart-content {
        flex-direction: row;
        gap: 32px;
    }

    .cart-items {
        padding: 24px;
    }

    .cart-item {
        padding: 20px 0;
    }

    .cart-item__image-wrapper {
        width: 110px;
        height: 110px;
    }

    .cart-summary {
        width: 380px;
        flex-shrink: 0;
        margin: 0;
    }

    #cart-container {
        padding: 0;
    }
}

/* Desktop (1024px+) */
@media screen and (min-width: 1024px) {
    .cart-page {
        padding: 50px 40px;
    }

    .cart-header h1 {
        font-size: 36px;
    }

    .cart-item__image-wrapper {
        width: 120px;
        height: 120px;
    }

    .cart-item__title {
        font-size: 16px;
    }

    .cart-item__price {
        font-size: 18px;
    }

    .cart-summary {
        width: 400px;
    }

    .quantity-btn {
        width: 40px;
        height: 40px;
    }

    .quantity-input {
        width: 50px;
        height: 40px;
        font-size: 15px;
    }

    .cart-item__remove {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

