/* =============================================
   MODERN CART & SHOP UI REDESIGN
   ============================================= */

/* ==========================================
   CART PAGE - MODERN CARD LAYOUT
   ========================================== */
.cart-page {
    padding: 40px 0 60px;
    background: #f7f8fa;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual Cart Item Card */
.cart-item-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    gap: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

/* Product image */
.cart-item-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    position: static; /* reset any wrongly applied absolute */
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product name & mobile price */
.cart-item-details {
    flex: 1;
    min-width: 0;
    margin-left: 0; /* override the wrongly applied mobile style on desktop */
}

.cart-item-details h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    line-height: 1.4;
    white-space: normal;
}

.cart-item-details h4 a {
    color: inherit;
    text-decoration: none;
}

.cart-item-details h4 a:hover { color: #ff6b00; }

.cart-item-price-mobile {
    display: none; /* hidden on desktop */
}

/* Right-side actions (price, qty, total, delete) */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.cart-item-price-desktop {
    font-size: 14px;
    color: #888;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

/* Modern Pill Quantity Selector */
.modern-qty {
    display: flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 50px;
    padding: 6px;
    border: 1px solid #eee;
    gap: 4px;
}

.modern-qty button.cart-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.modern-qty button.cart-qty-btn:hover {
    background: #ff6b00;
    color: #fff;
}

.modern-qty input {
    background: transparent;
    border: none;
    width: 38px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #1a1a2e;
    -moz-appearance: textfield;
    outline: none;
}

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

/* Item total */
.cart-item-total {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a2e;
    min-width: 80px;
    text-align: right;
}

/* Delete button */
.modern-remove-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff5f5;
    color: #e11d48;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.modern-remove-btn:hover {
    background: #e11d48;
    color: #fff;
}

/* Cart Summary Sidebar */
.cart-summary {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    position: sticky;
    top: 90px;
}

.cart-summary h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    color: #1a1a2e;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f7f7f7;
}

.summary-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px dashed #eee;
}

.summary-row.total span:last-child {
    color: #ff6b00;
}

/* Coupon */
.coupon-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.coupon-form input.coupon-input {
    flex: 1;
    padding: 12px 15px;
    border: 1.5px solid #eee;
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.coupon-form input.coupon-input:focus { border-color: #ff6b00; }

.coupon-form button.apply-coupon {
    padding: 12px 20px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.coupon-form button.apply-coupon:hover { background: #ff6b00; }

.cart-summary .btn-primary {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cart-summary .btn-outline {
    width: 100%;
    padding: 13px;
    margin-top: 10px;
    border-radius: 50px;
    display: block;
    text-align: center;
    font-weight: 600;
}

/* ==============================================
   PRODUCT & SHOP CARDS REDESIGN (GLOBAL)
   ============================================== */
.product-card {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
    border-color: rgba(255,107,0,0.15);
}

.product-card .add-to-cart {
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    width: 100%;
    padding: 12px;
}

/* Product page button */
.product-actions-group .btn-primary {
    border-radius: 50px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #e05500);
    box-shadow: 0 8px 20px rgba(255,107,0,0.25);
    border: none;
}

.product-actions-group .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255,107,0,0.35);
}

/* Product main image */
.product-main-image {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

/* ==========================================
   MOBILE RESPONSIVE CART
   ========================================== */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .cart-item-card {
        flex-wrap: wrap;
        padding: 14px;
        gap: 0;
    }

    .cart-item-image {
        width: 72px;
        height: 72px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .cart-item-details {
        flex: 1;
        padding-left: 14px;
    }

    .cart-item-details h4 { font-size: 14px; }

    .cart-item-price-mobile {
        display: block;
        font-size: 14px;
        font-weight: 700;
        color: #ff6b00;
        margin-top: 4px;
    }

    .cart-item-actions {
        width: 100%;
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px dashed #eee;
        justify-content: space-between;
        gap: 12px;
    }

    .cart-item-price-desktop, .cart-item-total { display: none; }

    .modern-remove-btn {
        width: 34px;
        height: 34px;
    }
}
