/* Cart page responsive styles */
.cart-container {
    max-width: 90%;
    margin: 100px auto 15px;
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.6rem;
box-shadow: 0 0 8px rgba(255, 0, 0, 0.24);
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.heading {
    text-align: center;
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

.heading span {
    background: #ff0000;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
background: linear-gradient(90deg, #8b0000, #ff0000);
    border-radius: 2px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    background: #ffffff;
    border-radius: 0.5rem;
box-shadow: 0 0 12px rgba(255, 0, 0, 0.26);
    border: 1px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
background: linear-gradient(90deg, #8b0000, #ff0000);
    border-radius: 0 2px 2px 0;
}

.cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.cart-item img {
    width: 250px;
    height: 150px;
    object-fit: cover;
    border-radius: 0.3rem;

    margin-right: 30px;
    margin-left: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 0rem;
    /* border: 2px solid rgba(255,255,255,0.8); */
box-shadow: 0 0 12px rgba(255, 0, 0, 0.26);
    transition: all 0.3s ease;
}

.cart-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cart-item-content {
    flex: 1;
    min-width: 0;
}

.cart-item-content h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    word-break: break-word;
    font-weight: 600;
    line-height: 1.3;
}

.cart-item-content > div:first-of-type {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.cart-item-price {
    font-size: 0.8rem;
background:black;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.cart-item-quantity {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #f8f9fa;
    border-radius: 0.6rem;
    padding: 0.2rem;
    width: fit-content;
    border: 1px solid #e9ecef;
    gap: 0.3rem;
}

.quantity-form {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.quantity-btn {
    width: 1.5rem;
    height: 1.5rem;
background: linear-gradient(90deg, #8b0000, #ff0000);
box-shadow: 0 0 8px rgba(255, 0, 0, 0.24);

    border: 2px solid #e9ecef;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ffffff;
    font-weight: 600;
}

.quantity-btn:hover {
background: linear-gradient(90deg, #ff0000, #8b0000);
box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
    color: #fff;
    border-color: #ff6b35;
    transform: scale(1.1);
}

.quantity {
    font-size: 0.8rem;
    margin: 0 0.5rem;
    min-width: 1rem;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
}

.cart-item-total {
    text-align: right;
    margin-left: 0.6rem;
    min-width: 80px;
}

.cart-item-total-price {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-item-remove {
    color: #dc3545;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    text-decoration: none;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.3rem 0.8rem;
    border-radius: 0.6rem;
    background: rgba(220,53,69,0.1);
    border: 1px solid rgba(220,53,69,0.2);
    font-weight: 500;
}

.cart-item-remove:hover {
    color: #fff;
    background: linear-gradient(135deg, #dc3545, #c82333);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220,53,69,0.3);
}

.cart-item-remove i {
    margin-right: 0.4rem;
    font-size: 0.8rem;
}

.cart-summary {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.cart-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 2px 2px 0 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.summary-row:hover {
    background: rgba(255,255,255,0.5);
    border-radius: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
}

.summary-row.subtotal {
    color: #6c757d;
    font-weight: 500;
}

.summary-row.shipping {
    color: #6c757d;
    font-weight: 500;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 2px solid rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 0.6rem;
}

.cart-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 0.6rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.cart-actions .btn:first-child {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

.cart-actions .btn:first-child:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.4);
}

.cart-actions .btn:last-child {
background: linear-gradient(90deg, #8b0000, #ff0000);
box-shadow: 0 0 12px rgba(255, 0, 0, 0.24);
    color: #fff;
    border: none;
}

.cart-actions .btn:last-child:hover {
background: linear-gradient(90deg, #ff0000, #8b0000);
box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);

    transform: translateY(-3px);
}

.cart-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cart-actions .btn:hover::before {
    left: 100%;
}

.empty-cart-message {
    text-align: center;
    padding: 1.5rem 0.8rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0.6rem;
    border: 2px dashed #dee2e6;
    position: relative;
    overflow: hidden;
}

.empty-cart-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.empty-cart-message i {
    font-size: 2rem;
    background: linear-gradient(135deg, #dee2e6, #adb5bd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.empty-cart-message h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-cart-message p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.empty-cart-message .btn {
background: linear-gradient(90deg, #8b0000, #ff0000);
box-shadow: 0 0 8px rgba(255, 0, 0, 0.24);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 0.6rem;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.empty-cart-message .btn:hover {
    transform: translateY(-3px);
background: linear-gradient(90deg, #ff0000, #8b0000);
box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

/* Responsive Design for All Devices */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .cart-container {
        max-width: 1140px;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .cart-container {
        max-width: 95%;
    }
    .cart-item img {
        width: 220px;
        height: 130px;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .cart-container {
        margin: 80px auto 15px;
        padding: 0.8rem;
    }
    
    .heading {
        font-size: 1.4rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .cart-item img {
        width: 100%;
        max-width: 300px;
        height: 180px;
        margin: 0 0 1rem 0;
        align-self: center;
    }
    
    .cart-item-content {
        width: 100%;
        /* margin-bottom: 1rem; */
                justify-content: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .cart-item-content h3 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .cart-item-total {
        width: 100%;
        text-align: center;
        margin: 0;
        gap: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .cart-actions .btn {
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) {
    .cart-container {
        max-width: 95%;
        margin: 60px auto 15px;
        padding: 0.6rem;
    }
    
    .heading {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .heading::after {
        width: 60px;
        height: 3px;
    }
    
    .cart-item {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .cart-item img {
        max-width: 250px;
        height: 150px;
    }
    
    .cart-item-content h3 {
        font-size: 1.1rem;
    }
    
    .cart-item-content > div:first-of-type {
        font-size: 0.75rem;
    }
    
    .cart-item-price {
        font-size: 0.85rem;
    }
    
    .cart-item-total-price {
        font-size: 0.95rem;
    }
    
    .cart-item-remove {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .cart-summary {
        padding: 0.8rem;
    }
    
    .summary-row {
        font-size: 0.85rem;
    }
    
    .summary-row.total {
        font-size: 1rem;
    }
}

/* Mobile Medium (480px to 575px) */
@media (max-width: 575px) {
    .cart-container {
        max-width: 98%;
        margin: 50px auto 10px;
        padding: 0.5rem;
    }
    
    .heading {
        font-size: 1.2rem;
    }
    
    .cart-item {
        padding: 0.6rem;
    }
    
    .cart-item img {
        max-width: 200px;
        height: 120px;
    }
    
    .cart-item-content h3 {
        font-size: 1rem;
    }
    
    .cart-item-quantity {
        justify-content: center;
        margin: 0.5rem 0;
    }
    
    .quantity-btn {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.8rem;
    }
    
    .quantity {
        font-size: 0.9rem;
        margin: 0 0.8rem;
    }
    
    .cart-item-total {
        flex-direction: column;
        gap: 0rem;
    }
    
    .cart-actions .btn {
        padding: 0.7rem;
        font-size: 0.85rem;
        min-width: auto;
    }
}

/* Mobile Small (320px to 479px) */
@media (max-width: 479px) {
    .cart-container {
        max-width: 100%;
        margin: 90px 10px 10px 10px;
        padding: 0.4rem;
        border-radius: 0.4rem;
    }
    
    .heading {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .heading::after {
        width: 50px;
        height: 2px;
    }
    
    .cart-item {
        padding: 0.5rem;
        margin-bottom: 0.6rem;
        border-radius: 0.4rem;
    }
    
    .cart-item img {
        max-width: 180px;
        height: 100px;
        border-radius: 0.2rem;
    }
    
    .cart-item-content h3 {
        font-size: 0.95rem;
        line-height: 1.2;
    }
    
    .cart-item-content > div:first-of-type {
        font-size: 0.7rem;
    }
    
    .cart-item-price {
        font-size: 0.8rem;
    }
    
    .cart-item-total-price {
        font-size: 0.9rem;
    }
    
    .cart-item-remove {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .cart-item-remove i {
        margin-right: 0.2rem;
        font-size: 0.7rem;
    }
    
    .cart-summary {
        padding: 0.6rem;
        border-radius: 0.4rem;
    }
    
    .summary-row {
        font-size: 0.8rem;
        padding: 0.2rem 0;
    }
    
    .summary-row.total {
        font-size: 0.95rem;
    }
    
    .cart-actions {
        gap: 0.6rem;
    }
    
    .cart-actions .btn {
        padding: 0.6rem;
        font-size: 0.8rem;
        border-radius: 0.4rem;
    }
    
    .empty-cart-message {
        padding: 1rem 0.5rem;
        border-radius: 0.4rem;
    }
    
    .empty-cart-message i {
        font-size: 1.5rem;
    }
    
    .empty-cart-message h3 {
        font-size: 1rem;
    }
    
    .empty-cart-message p {
        font-size: 0.75rem;
    }
    
    .empty-cart-message .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
    .cart-container {
        margin: 30px auto 5px;
        padding: 0.3rem;
    }
    
    .heading {
        font-size: 1rem;
    }
    
    .cart-item img {
        max-width: 150px;
        height: 90px;
    }
    
    .cart-item-content h3 {
        font-size: 0.9rem;
    }
    
    .quantity-btn {
        width: 1.6rem;
        height: 1.6rem;
    }
    
    .cart-actions .btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .cart-container {
        margin: 20px auto 10px;
    }
    
    .cart-item {
        flex-direction: row;
        align-items: center;
    }
    
    .cart-item img {
        width: 120px;
        height: 80px;
        margin: 0 1rem 0 0;
    }
    
    .cart-item-content {
        margin-bottom: 0;
    }
    
    .cart-actions {
        flex-direction: row;
    }
}
