/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Star rating */
.fa-solid.fa-star {
    color: #ccc;
    font-size: 18px;
}
.fa-solid.fa-star.fill {
    color: #f1c40f;
}

/* Slick slider track */
.slick-track {
    display: flex !important;
}

/* Product image slider */
.single-product-cover .slick-slide img {
    width: 100%;
    height: auto;
    display: block;
}
.single-product-cover, .single-nav-thumb {
    position: relative;
}

/* Main product section */
.ms-single-product {
    margin-top: 20px; /* فاصله از منوی بالا تو دسکتاپ و تبلت */
}

/* Quantity selector */
.ms-single-qty {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}
.qty-plus-minus {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 45px;
    background: #fff;
    overflow: hidden;
}
.qty-decrease, .qty-increase {
    background: #f1f1f1;
    border: none;
    width: 40px;
    height: 100%;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    transition: background 0.2s;
}
.qty-decrease:hover, .qty-increase:hover {
    background: #e0e0e0;
}
.qty-input {
    width: 50px;
    height: 100%;
    text-align: center;
    border: none;
    font-size: 16px;
    background: #fff;
    outline: none;
    padding: 0;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Add to cart button */
.ms-single-cart {
    display: flex;
    align-items: center;
}
.ms-single-cart .btn {
    padding: 10px 15px;
    font-size: 16px;
    width: 100%;
    max-width: 200px;
    text-align: center;
}

/* Wishlist */
.ms-single-wishlist {
    display: flex;
    align-items: center;
}
.wishlist {
    display: inline-block;
    cursor: pointer;
    transition: color 0.3s;
}
.wishlist.active .svg_img {
    filter: brightness(0) saturate(100%) invert(22%) sepia(87%) saturate(2139%) hue-rotate(322deg) brightness(95%) contrast(102%);
}
.wishlist .svg_img {
    width: 22px; /* کمی کوچکتر برای تراز بهتر */
    height: 22px;
}
.wishlist-message {
    display: none;
    font-size: 14px;
    margin-left: 10px;
}

/* Slider arrows */
.slick-prev, .slick-next {
    width: 30px;
    height: 30px;
    background: #f1f1f1;
    border: none;
    border-radius: 50%;
    font-size: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.slick-prev:hover, .slick-next:hover {
    background: #e0e0e0;
}
.slick-prev {
    left: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.slick-next {
    right: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Variation options */
.ms-pro-variation-inner span {
    color: #000 !important;
}

/* Mobile styles */
@media (max-width: 768px) {
    .ms-single-product {
        margin-top: 10px; /* فاصله کمتر تو موبایل */
    }
    .ms-single-product .container {
        padding: 0 15px;
    }
    .single-pro-img {
        margin-bottom: 20px;
    }
    .single-pro-desc {
        padding: 0 15px;
    }
    .ms-single-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    .ms-single-price .final-price {
        font-size: 0.9rem;
    }
    .ms-single-price .mrp {
        font-size: 0.8rem;
    }
    .ms-single-qty {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
        align-items: center;
    }
    .qty-plus-minus {
        width: auto;
        height: 40px; /* کمی کوچکتر برای موبایل */
        border-radius: 6px;
    }
    .qty-input {
        width: 45px;
        font-size: 14px;
    }
    .qty-decrease, .qty-increase {
        width: 35px;
        font-size: 16px;
    }
    .ms-single-cart {
        width: 100%;
        max-width: 180px;
        margin-top: 0; /* حذف margin-top برای تراز بهتر */
    }
    .ms-single-cart .btn {
        padding: 8px 12px;
        font-size: 14px;
        height: 40px; /* هم‌تراز با qty-plus-minus */
        line-height: 1.5;
    }
    .ms-single-wishlist {
        width: auto;
        text-align: center;
        display: flex;
        align-items: center;
    }
    .wishlist .svg_img {
        width: 20px; /* کوچکتر برای موبایل */
        height: 20px;
    }
    .ms-pro-variation-content ul.ms-opt-size {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .ms-pro-variation-content ul.ms-opt-size li {
        flex: 0 0 45%;
        text-align: center;
    }
    .ms-pro-variation-content ul.ms-opt-size li a {
        font-size: 12px;
        padding: 4px;
    }
    .ms-single-pro-tab-nav ul.nav-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0 10px;
    }
    .ms-single-pro-tab-nav ul.nav-tabs li {
        flex: 0 0 45%;
        text-align: center;
    }
    .ms-single-pro-tab-nav ul.nav-tabs li a {
        font-size: 14px;
        padding: 8px;
    }
    .ms-t-review-avtar img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
    }
    .ms-t-review-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }
    .ms-t-review-content {
        width: 100%;
    }
    .ms-t-review-name {
        font-size: 12px;
    }
    .ms-t-review-rating i {
        font-size: 12px;
    }
    .ms-t-review-bottom p {
        font-size: 12px;
    }
    .ms-ratting-form textarea {
        width: 100%;
        font-size: 12px;
        padding: 6px;
    }
    .ms-ratting-form .ms-btn-2 {
        width: 100%;
        font-size: 12px;
        padding: 6px;
    }
    .single-product-cover .slick-slide img {
        max-height: 250px;
        object-fit: contain;
    }
    .single-nav-thumb .slick-slide img {
        max-height: 50px;
        object-fit: cover;
        margin: 0 5px;
    }
    .single-nav-thumb {
        padding: 5px 0;
    }
    .slick-prev, .slick-next {
        width: 25px;
        height: 25px;
        background-size: 10px;
    }
    .single-nav-thumb .slick-dots {
        margin-top: 5px;
    }
    .single-nav-thumb .slick-dots li button {
        width: 8px;
        height: 8px;
        background: #ccc;
        border-radius: 50%;
    }
    .single-nav-thumb .slick-dots li.slick-active button {
        background: #333;
    }
}

@media (max-width: 576px) {
    .ms-single-title {
        font-size: 0.9rem;
    }
    .ms-single-price .final-price {
        font-size: 0.8rem;
    }
    .ms-pro-variation-content ul.ms-opt-size li {
        flex: 0 0 100%;
    }
    .ms-single-pro-tab-nav ul.nav-tabs li {
        flex: 0 0 100%;
    }
    .ms-t-review-rating i {
        font-size: 10px;
    }
    .qty-plus-minus {
        height: 35px;
    }
    .qty-input {
        width: 40px;
        font-size: 14px;
    }
    .qty-decrease, .qty-increase {
        width: 30px;
        font-size: 16px;
    }
    .ms-single-cart {
        max-width: 160px;
    }
    .ms-single-cart .btn {
        padding: 6px 10px;
        font-size: 12px;
        height: 35px; /* هم‌تراز با qty-plus-minus */
    }
    .wishlist .svg_img {
        width: 18px;
        height: 18px;
    }
    .single-nav-thumb .slick-slide img {
        max-height: 45px;
    }
    .single-nav-thumb {
        padding: 3px 0;
    }
    .slick-prev, .slick-next {
        width: 20px;
        height: 20px;
        background-size: 8px;
    }
}

@media (max-width: 360px) {
    .ms-single-title {
        font-size: 0.85rem;
    }
    .ms-single-price .final-price {
        font-size: 0.75rem;
    }
    .ms-pro-variation-content ul.ms-opt-size li a {
        font-size: 11px;
        padding: 3px;
    }
    .ms-single-cart .btn {
        padding: 5px 8px;
        font-size: 11px;
        height: 30px;
    }
    .qty-plus-minus {
        height: 30px;
    }
    .qty-input {
        width: 35px;
        font-size: 12px;
    }
    .qty-decrease, .qty-increase {
        width: 25px;
        font-size: 14px;
    }
    .wishlist .svg_img {
        width: 16px;
        height: 16px;
    }
}
