﻿
/* Shopping Cart Unique Styles - Prefix: sc- */
body.sc-modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100vh;
    touch-action: none;
}

/* دکمه سبد خرید شناور */
.sc-cart-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #aebc80 0%, #8fa360 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(174, 188, 128, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

    .sc-cart-fab:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 30px rgba(174, 188, 128, 0.6);
    }

    .sc-cart-fab svg {
        width: 30px;
        height: 30px;
        fill: white;
    }

.sc-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 11px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: sc-badge-pulse 2s infinite;
}

@keyframes sc-badge-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Modal سبد خرید */
.sc-cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    backdrop-filter: blur(5px);
    overflow: hidden;
    touch-action: none;
}

    .sc-cart-modal.sc-active {
        display: flex;
        justify-content: center;
        align-items: center;
        animation: sc-fade-in 0.3s ease;
    }

@keyframes sc-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.sc-cart-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: sc-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sc-slide-up {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* هدر */
.sc-cart-header {
    background: linear-gradient(135deg, #aebc80 0%, #8fa360 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(174, 188, 128, 0.2);
    flex-shrink: 0;
}

.sc-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .sc-header-title h2 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
    }

.sc-cart-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.sc-close-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

    .sc-close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

/* محتوای سبد */
.sc-cart-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    background: linear-gradient(to bottom, #f8faf5, #ffffff);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .sc-cart-content::-webkit-scrollbar {
        display: none;
    }

.sc-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

    .sc-empty-cart svg {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
        opacity: 0.2;
        fill: #aebc80;
    }

    .sc-empty-cart h3 {
        font-size: 17px;
        margin-bottom: 8px;
        color: #666;
    }

    .sc-empty-cart p {
        color: #999;
        font-size: 13px;
        margin: 0;
    }

/* آیتم سبد خرید */
.sc-cart-item {
    background: white;
    border-radius: 15px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(174, 188, 128, 0.08);
    animation: sc-item-in 0.3s ease;
    border: 2px solid transparent;
    transition: all 0.3s;
}

    .sc-cart-item:hover {
        border-color: #aebc80;
        box-shadow: 0 3px 12px rgba(174, 188, 128, 0.15);
    }

@keyframes sc-item-in {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sc-cart-item.sc-package {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border: 2px solid #f7b731;
    position: relative;
}

.sc-package-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background: linear-gradient(135deg, #f7b731 0%, #fa8231 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(247, 183, 49, 0.3);
}

.sc-item-content {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.sc-item-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f4ea;
    border: 2px solid #f5f7f3;
}

.sc-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.sc-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    line-height: 1.4;
    margin: 0;
}

.sc-item-meta {
    font-size: 11px;
    color: #7d8d6f;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sc-meta-tag {
    background: #f0f4ea;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
}

.sc-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed #e8f0dd;
}

.sc-item-price {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sc-price-current {
    font-size: 15px;
    font-weight: 700;
    color: #aebc80;
}

.sc-price-original {
    font-size: 11px;
    color: #b0b0b0;
    text-decoration: line-through;
}

.sc-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f0f4ea;
    padding: 2px;
    border-radius: 10px;
}

.sc-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #aebc80;
    font-size: 18px;
    font-weight: 700;
}

    .sc-qty-btn:hover {
        background: #aebc80;
        color: white;
    }

    .sc-qty-btn:active {
        transform: scale(0.9);
    }

    .sc-qty-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.sc-qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #2d3436;
}

.sc-remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff0f0;
    color: #ff6b6b;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .sc-remove-btn:hover {
        background: #ff6b6b;
        color: white;
    }

    .sc-remove-btn:active {
        transform: scale(0.9);
    }

/* فوتر سبد */
.sc-cart-footer {
    background: white;
    padding: 15px;
    border-top: 2px solid #f0f4ea;
    flex-shrink: 0;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.03);
}

.sc-cart-summary {
    margin-bottom: 15px;
}

.sc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: #666;
}

    .sc-summary-row.sc-total {
        border-top: 2px solid #f0f4ea;
        margin-top: 6px;
        padding-top: 12px;
        font-size: 16px;
        font-weight: 700;
        color: #2d3436;
    }

        .sc-summary-row.sc-total .sc-amount {
            color: #aebc80;
            font-size: 19px;
        }

.sc-discount-badge {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.sc-shipping-free {
    color: #aebc80;
    font-weight: 600;
}

.sc-checkout-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #aebc80 0%, #8fa360 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(174, 188, 128, 0.3);
}

    .sc-checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(174, 188, 128, 0.4);
    }

    .sc-checkout-btn:active {
        transform: translateY(0);
    }

/* دمو */
.sc-demo-content {
    padding: 60px 20px;
    text-align: center;
    min-height: 150vh;
    background: linear-gradient(to bottom, #fafbf8, #f5f7f3);
}

    .sc-demo-content h1 {
        color: #aebc80;
        margin-bottom: 15px;
        font-size: 32px;
    }

    .sc-demo-content p {
        color: #666;
        font-size: 15px;
        line-height: 1.8;
    }

