﻿/* ================================
   NAVBAR CART ICON & BADGE
   ================================ */


/* ================================
   CART ICON & BADGE
   ================================ */
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

#cart-icon-btn {
    background: transparent;
    border: none;
/*    color: #fff;*/
    font-size: 20px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    #cart-icon-btn:hover {
        color: #951f20;
    }

#cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #951f20;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    display: none;
}

    #cart-badge.pulse {
        animation: pulse-animation 0.3s ease;
    }

@keyframes pulse-animation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ================================
   CART SLIDER
   ================================ */
#cart-slider-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    #cart-slider-overlay.active {
        opacity: 1;
        visibility: visible;
    }

#cart-slider {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

    #cart-slider.open {
        right: 0;
    }

/* RTL Support */
.rtl-body #cart-slider {
    right: auto;
    left: -400px;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
}

    .rtl-body #cart-slider.open {
        left: 0;
        right: auto;
    }

/* Cart Header */
.cart-slider-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

    .cart-slider-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }

        .cart-slider-header h3 i {
            margin-right: 10px;
            color: #951f20;
        }

.rtl-body .cart-slider-header h3 i {
    margin-right: 0;
    margin-left: 10px;
}

#cart-slider-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s;
}

    #cart-slider-close:hover {
        color: #951f20;
    }

/* Cart Body */
.cart-slider-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Empty Cart Message */
#cart-empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

    #cart-empty-message i {
        font-size: 64px;
        margin-bottom: 20px;
        color: #ddd;
    }

    #cart-empty-message p {
        font-size: 16px;
        margin: 0;
    }

/* Cart Items */
.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

    .cart-item:hover {
        box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    }

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cart-item-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.cart-item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.cart-item-color,
.cart-item-design,
.cart-item-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: #fff;
    border-radius: 4px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.cart-item-tag {
    background: #fff3cd;
    color: #856404;
}

.cart-item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn-sm {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
}

    .qty-btn-sm:hover {
        background: #951f20;
        color: #fff;
        border-color: #951f20;
    }

.qty-value {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-weight: 700;
    color: #951f20;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.riyal-icon-xs {
    width: 12px;
    height: 12px;
}

.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: color 0.3s;
}

.rtl-body .cart-item-remove {
    right: auto;
    left: 10px;
}

.cart-item-remove:hover {
    color: #dc3545;
}

/* Cart Footer */
#cart-slider-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.cart-totals {
    margin-bottom: 15px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

    .cart-total-row.grand-total {
        font-size: 18px;
        font-weight: 700;
        color: #951f20;
        border-top: 2px solid #951f20;
        padding-top: 15px;
        margin-top: 10px;
    }

    .cart-total-row .price-with-icon {
        display: flex;
        align-items: center;
        gap: 5px;
    }

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-view-summary {
    background: #951f20;
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-view-summary:hover {
        background: #7a1819;
    }

.btn-continue-shopping {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-continue-shopping:hover {
        border-color: #951f20;
        color: #951f20;
    }

/* Body scroll lock when cart is open */
body.cart-open {
    overflow: hidden;
}

/* ================================
   ADD TO CART BUTTON
   ================================ */
.btn-add-to-cart {
    background: linear-gradient(135deg, #951f20 0%, #7a1819 100%);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

    .btn-add-to-cart:hover {
        background: linear-gradient(135deg, #7a1819 0%, #5a1213 100%);
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(149, 31, 32, 0.4);
    }

    .btn-add-to-cart:active {
        transform: translateY(0);
    }

    .btn-add-to-cart.adding {
        pointer-events: none;
    }

    .btn-add-to-cart i {
        font-size: 20px;
    }

    /* Success animation */
    .btn-add-to-cart.added {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    }

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 480px) {
    #cart-slider {
        width: 100%;
        right: -100%;
    }

    .rtl-body #cart-slider {
        left: -100%;
    }

    .cart-item {
/*        flex-direction: column;*/
        text-align: center;
    }

    .cart-item-image {
        width: 100%;
        height: 120px;
    }

    .cart-item-options {
        justify-content: center;
    }

    .cart-item-price-row {
        flex-direction: column;
        gap: 10px;
    }

    .cart-item-remove {
        top: 5px;
        right: 5px;
    }

    .rtl-body .cart-item-remove {
        right: auto;
        left: 5px;
    }
}



/* Cart link in navbar */
.navbar .cart-link {
    position: relative;
    display: inline-block;
}

    .navbar .cart-link i.fa-shopping-cart {
        font-size: 18px;
    }

/* Cart badge */
#cart-badge {
    position: absolute;
    top: 5px;
    right: 0px;
    background: #951f20;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 16px;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
}

    #cart-badge:not(:empty) {
        display: inline-block;
    }

/* RTL Support */
.rtl-body #cart-badge {
    right: auto;
    left: 0px;
}

/* Pulse animation when item added */
#cart-badge.pulse {
    animation: badge-pulse 0.3s ease;
}

@keyframes badge-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Hide badge when zero */
#cart-badge:empty,
#cart-badge[data-count="0"] {
    display: none;
}
.fa-shopping-cart {
    color: #2c3e50;

}
.fa-cube{
    font-size: small !important;
    margin-bottom:0 !important;
    display:inline !important;
}