.img-fluid {
    max-width: 292px !important;
    min-width: 292px !important;
    max-height: 292px !important;
    min-height: 292px !important;
}
.img-fluid2 {
    max-width: 100px !important;
    min-width: 100px !important;
    max-height: 100px !important;
    min-height: 100px !important;
}
.img-fluid4 {
    max-width: 189px !important;
    min-width: 189px !important;
    max-height: 236px !important;
    min-height: 236px !important;
}
.img-fluid3 {
    width: 100% !important;
    height: auto !important;
}

/* From Uiverse.io by RiccardoRapelli */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch #input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider2 {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2196f3;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    z-index: 0;
    overflow: hidden;
}

.sun-moon {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: yellow;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

#input:checked + .slider2 {
    background-color: black;
}

#input:focus + .slider2 {
    box-shadow: 0 0 1px #2196f3;
}

#input:checked + .slider2 .sun-moon {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
    background-color: white;
    -webkit-animation: rotate-center 0.6s ease-in-out both;
    animation: rotate-center 0.6s ease-in-out both;
}

.moon-dot {
    opacity: 0;
    transition: 0.4s;
    fill: gray;
}

#input:checked + .slider2 .sun-moon .moon-dot {
    opacity: 1;
}

.slider2.round {
    border-radius: 34px;
}

.slider2.round .sun-moon {
    border-radius: 50%;
}

#moon-dot-1 {
    left: 10px;
    top: 3px;
    position: absolute;
    width: 6px;
    height: 6px;
    z-index: 4;
}

#moon-dot-2 {
    left: 2px;
    top: 10px;
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 4;
}

#moon-dot-3 {
    left: 16px;
    top: 18px;
    position: absolute;
    width: 3px;
    height: 3px;
    z-index: 4;
}

#light-ray-1 {
    left: -8px;
    top: -8px;
    position: absolute;
    width: 43px;
    height: 43px;
    z-index: -1;
    fill: white;
    opacity: 10%;
}

#light-ray-2 {
    left: -50%;
    top: -50%;
    position: absolute;
    width: 55px;
    height: 55px;
    z-index: -1;
    fill: white;
    opacity: 10%;
}

#light-ray-3 {
    left: -18px;
    top: -18px;
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: -1;
    fill: white;
    opacity: 10%;
}

.cloud-light {
    position: absolute;
    fill: #eee;
    animation-name: cloud-move;
    animation-duration: 6s;
    animation-iteration-count: infinite;
}

.cloud-dark {
    position: absolute;
    fill: #ccc;
    animation-name: cloud-move;
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-delay: 1s;
}

#cloud-1 {
    left: 30px;
    top: 15px;
    width: 40px;
}

#cloud-2 {
    left: 44px;
    top: 10px;
    width: 20px;
}

#cloud-3 {
    left: 18px;
    top: 24px;
    width: 30px;
}

#cloud-4 {
    left: 36px;
    top: 18px;
    width: 40px;
}

#cloud-5 {
    left: 48px;
    top: 14px;
    width: 20px;
}

#cloud-6 {
    left: 22px;
    top: 26px;
    width: 30px;
}

@keyframes cloud-move {
    0% {
        transform: translateX(0px);
    }

    40% {
        transform: translateX(4px);
    }

    80% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0px);
    }
}

.stars {
    transform: translateY(-32px);
    opacity: 0;
    transition: 0.4s;
}

.star {
    fill: white;
    position: absolute;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    animation-name: star-twinkle;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

#input:checked + .slider2 .stars {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
}

#star-1 {
    width: 20px;
    top: 2px;
    left: 3px;
    animation-delay: 0.3s;
}

#star-2 {
    width: 6px;
    top: 16px;
    left: 3px;
}

#star-3 {
    width: 12px;
    top: 20px;
    left: 10px;
    animation-delay: 0.6s;
}

#star-4 {
    width: 18px;
    top: 0px;
    left: 18px;
    animation-delay: 1.3s;
}

@keyframes star-twinkle {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.2);
    }

    80% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

.bg-222222 {
    background-color: #222222;
}
.bg-222222:hover {
    background-color: #f5b854;
}
.bg-222222 .color-f5b854 {
    color: #f5b854;
}
.bg-222222:hover .color-f5b854 {
    color: #222222;
}

.font-size20px {
    font-size: 20px !important;
}

.cart-container {
    margin: 10px;
    width: 30%;
    height: 90%;
    max-height: 90%;
    position: fixed;
    background-color: var(--bg);
    z-index: 100000;
    top: 2%;
    overflow: scroll;
    border-radius: 2%;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* ===== کارت محصول سبد خرید ===== */
.cart-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    transition: box-shadow 0.2s;
}

.cart-item-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.cart-item-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0; /* جلوگیری از سرریز عنوان‌های طولانی */
}

.cart-item-title {
    color: var(--color);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* عنوان طولانی با ... کوتاه میشه */
}

.cart-item-price {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f8f8;
    color: #1b1b1b;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #1b1b1b;
    color: #fff;
    border-color: #1b1b1b;
}

.qty-num {
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    color: var(--color);
}

.cart-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.2s;
}

.cart-item-remove:hover {
    opacity: 0.6;
}

.cart-item-total {
    font-size: 14px;
    font-weight: 700;
    color: #1b1b1b;
}

/* سبد خالی */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 0;
    color: #999;
}

.cart-empty i {
    font-size: 46px;
    opacity: 0.4;
}

/* فوتر جمع کل */
.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-top: 10px;
    background: #fafafa;
    border-radius: 12px;
    font-size: 15px;
    color: black;
}
.cart-footer span {
    color: black;
}

.cart-footer strong {
    font-size: 18px;
    color: black;
}
