/**
 * Mini Cart Styles
 */

/* Side Basket */
#side-basket {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

#side-basket.active {
    left: 0;
}

/* Basket Overlay */
.basket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.basket-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Dismiss Button */
#dismiss-basket {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

#dismiss-basket:hover {
    background: #e0e0e0;
}

#dismiss-basket i {
    font-size: 20px;
    color: #666;
}

/* Basket Header */
.basket-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.basket-header .order-numbers {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.basket-header .order-numbers span {
    font-weight: 400;
    color: #666;
    font-size: 14px;
}

/* Basket List */
.basket-list-item {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.basket-list-item .item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.basket-list-item .item:last-child {
    border-bottom: none;
}

.basket-list-item .item-inner {
    display: flex;
    gap: 12px;
}

.basket-list-item .product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

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

.basket-list-item .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.basket-list-item .product-info .name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.basket-list-item .product-info .name:hover {
    color: #2196F3;
}

/* Product Options */
.product-options {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 4px 0 6px;
}

.product-options .option {
    font-size: 11px;
    color: #555;
    background: #eef0f2;
    padding: 2px 7px;
    border-radius: 10px;
    width: fit-content;
    white-space: nowrap;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.product-options .option i {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.7;
}

.product-options .option-color {
    border-right: 2px solid #b0b8c1;
}

.product-options .option-size {
    border-right: 2px solid #c5b0d5;
}

/* Data Section */
.basket-list-item .data {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.basket-list-item .price-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.basket-list-item .price-content .discount {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 2px;
}

.basket-list-item .price-content .discount .del {
    text-decoration: line-through;
    color: #535355;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.basket-list-item .price-content .discount .percentage {
    font-size: 11px;
    font-weight: 600;
    background-color: #ef4444;
    color: #fff;
    line-height: normal;
    padding: 1px 6px;
    border-radius: 999px;
}

.basket-list-item .price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.basket-list-item .price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.basket-list-item .price .number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.basket-list-item .price .toman {
    font-size: 11px;
    color: #666;
}

.basket-list-item .count {
    font-size: 12px;
    color: #999;
}

.basket-list-item .btn-delete {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.basket-list-item .btn-delete:hover {
    background: #ff4757;
    border-color: #ff4757;
}

.basket-list-item .btn-delete:hover i {
    color: white;
}

.basket-list-item .btn-delete i {
    font-size: 14px;
    color: #999;
    transition: color 0.3s ease;
}

/* Empty Box */
.empty-box {
    text-align: center;
    padding: 60px 20px;
}

.empty-box .thumb {
    margin-bottom: 20px;
}

.empty-box .thumb img {
    max-width: 120px;
    opacity: 0.5;
}

.empty-box h6 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.empty-box p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Basket Footer */
.basket-pays {
    padding: 15px;
    border-top: 1px solid #eee;
    background: white;
}

.basket-pays .goto-cart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary, #0e4fc7);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.basket-pays .goto-cart:hover {
    background: var(--primary-dark, var(--primary, #0e4fc7));
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #0e4fc7) 35%, transparent);
}

.basket-pays .goto-cart .count-price {
    color: var(--primary, #0e4fc7);
}

.basket-pays .count-price {
    font-size: 16px;
    font-weight: 600;
}

.basket-pays .btn-text {
    font-size: 14px;
}

/* Badge */
.btn-basket .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Scrollbar */
.basket-list-item::-webkit-scrollbar {
    width: 6px;
}

.basket-list-item::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.basket-list-item::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.basket-list-item::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #side-basket {
        width: 100%;
        left: -100%;
    }

    #side-basket.active {
        left: 0;
    }
}

/* Animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#side-basket.active .item {
    animation: slideInLeft 0.3s ease forwards;
}

#side-basket.active .item:nth-child(1) {
    animation-delay: 0.1s;
}

#side-basket.active .item:nth-child(2) {
    animation-delay: 0.15s;
}

#side-basket.active .item:nth-child(3) {
    animation-delay: 0.2s;
}

#side-basket.active .item:nth-child(4) {
    animation-delay: 0.25s;
}

#side-basket.active .item:nth-child(5) {
    animation-delay: 0.3s;
}