/* ============================================
   ShirazGate - استایل‌های صفحه محصولات
   ============================================ */

/* --- ۱. محصولات مرتبط (Related Products) --- */

div:has(> .relative > .swiper-container):not(.border-y):not(.border):not([class*="border-"]),
.sg-related-section-target {
    background: #ebf1f7 !important;
    border: 1px solid #d0dbe7 !important;
    border-top: 5px solid #002e57 !important;
    border-radius: 24px !important;
    padding: 24px 16px !important;
    box-shadow: 0 10px 30px rgba(0, 46, 87, 0.04) !important;
    position: relative !important;
}

div:has(> .relative > .swiper-container):not(.border-y):not(.border):not([class*="border-"]) > h2,
.sg-related-section-target > h2 {
    color: #002e57 !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}

.sg-related-section-target .swiper-container .overflow-hidden,
div:has(> .relative > .swiper-container):not(.border-y) .swiper-container .overflow-hidden {
    overflow: visible !important;
    padding: 10px 4px !important;
}

/* جلوگیری از overflow کاروسل صفحه اصلی */
.border-y.lg\:border-x.-mx-16.lg\:mx-0 {
    overflow: hidden !important;
}

.swiper-slide a.flex.flex-col {
    background: #ffffff !important;
    border: 1.5px solid #d9e2ec !important;
    border-radius: 18px !important;
    padding: 14px 10px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    text-decoration: none !important;
}

.swiper-slide a.flex.flex-col:hover {
    border-color: #002e57 !important;
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 32px rgba(0, 46, 87, 0.12) !important;
}

.swiper-slide .thumbnail-holder {
    width: 100% !important;
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border-radius: 14px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    padding: 6px !important;
    box-sizing: border-box !important;
}

.swiper-slide .thumbnail-holder img.thumbnail {
    width: 100% !important;
    height: 100% !important;
    max-width: 125px !important;
    max-height: 125px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    transition: transform 0.3s ease !important;
}

.swiper-slide a.flex.flex-col:hover .thumbnail-holder img.thumbnail {
    transform: scale(1.05) !important;
}

.swiper-slide h3 {
    color: #002e57 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    line-height: 1.45 !important;
    height: 38px !important;
    margin-bottom: 10px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.swiper-slide .fa-numbers {
    background: #002e57 !important;
    border-radius: 50px !important;
    padding: 8px 10px !important;
    text-align: center !important;
    transition: all 0.25s ease !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.swiper-slide .fa-numbers span,
.swiper-slide .fa-numbers strong {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
}

.swiper-slide a.flex.flex-col:hover .fa-numbers {
    background: #F4B860 !important;
}

.swiper-slide a.flex.flex-col:hover .fa-numbers span,
.swiper-slide a.flex.flex-col:hover .fa-numbers strong {
    color: #002e57 !important;
}

.swiper-container .swiper-button-prev,
.swiper-container .swiper-button-next {
    background-color: #002e57 !important;
    color: #ffffff !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 46, 87, 0.25) !important;
    transition: all 0.2s ease !important;
    z-index: 20 !important;
    opacity: 1 !important;
}

.swiper-container .swiper-button-prev:after,
.swiper-container .swiper-button-next:after {
    font-size: 14px !important;
    font-weight: bold !important;
}

.swiper-container .swiper-button-prev:hover,
.swiper-container .swiper-button-next:hover {
    background-color: #F4B860 !important;
    color: #002e57 !important;
    transform: scale(1.1) !important;
}

.swiper-container .swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}


/* --- ۲. تب‌بار محتوا (Tabs Content) --- */

.product-tabs {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 46, 87, 0.03) !important;
    padding: 4px 12px !important;
}

.product-tabs .tab-bg {
    background-color: #F4B860 !important;
    height: 3px !important;
    border-radius: 3px 3px 0 0 !important;
}

.product-tabs button[data-tab] {
    color: #64748b !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.product-tabs button[data-tab]:hover {
    color: #002e57 !important;
}

.product-tabs button[data-tab].active,
.product-tabs button[data-tab][class*="is-[active]"] {
    color: #002e57 !important;
    font-weight: 800 !important;
}

.tab-content.product-content-section,
.tab-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    padding: 24px !important;
    box-shadow: 0 6px 20px rgba(0, 46, 87, 0.03) !important;
    color: #334155 !important;
    line-height: 1.8 !important;
}

.tab-content h3 {
    color: #002e57 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    margin-top: 20px !important;
    margin-bottom: 12px !important;
    border-right: 4px solid #F4B860 !important;
    padding-right: 10px !important;
}

.tab-content h4 {
    color: #002e57 !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    margin-top: 16px !important;
    margin-bottom: 8px !important;
}

.tab-content ul {
    list-style-type: disc !important;
    padding-right: 20px !important;
    margin-bottom: 16px !important;
}

.tab-content ul li {
    margin-bottom: 6px !important;
}

#product-tab-3 table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
    margin-top: 12px !important;
}

#product-tab-3 table th,
#product-tab-3 table tr[style*="background-color"] th {
    background-color: #002e57 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    padding: 12px 14px !important;
    border: none !important;
    text-align: right !important;
}

#product-tab-3 table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-left: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    font-size: 0.85rem !important;
}

#product-tab-3 table tr:nth-child(even) td {
    background-color: #f8fafc !important;
}

#product-tab-3 table tr:hover td {
    background-color: #f1f5f9 !important;
}

.product-fields {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 12px !important;
}

.product-fields-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    transition: all 0.2s ease !important;
}

.product-fields-item:hover {
    border-color: #002e57 !important;
    background: #ffffff !important;
}

.product-fields-item-name {
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
}

.product-fields-item-value {
    color: #002e57 !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
}

.product-commenting .bg-light {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #002e57 !important;
}

.product-commenting-form textarea {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    transition: all 0.2s ease !important;
    background: #ffffff !important;
}

.product-commenting-form textarea:focus {
    border-color: #002e57 !important;
    box-shadow: 0 0 0 3px rgba(0, 46, 87, 0.1) !important;
    outline: none !important;
}

.product-commenting-form .btn-primary {
    background: #002e57 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-weight: 800 !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(0, 46, 87, 0.15) !important;
}

.product-commenting-form .btn-primary:hover {
    background: #F4B860 !important;
    color: #002e57 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(244, 184, 96, 0.3) !important;
}


/* --- ۳. نمای اصلی محصول (Product View) --- */

div[add-to-cart] {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 5px solid #002e57 !important;
    border-radius: 24px !important;
    padding: 28px !important;
    box-shadow: 0 16px 40px rgba(0, 46, 87, 0.06) !important;
    position: relative !important;
}

div[add-to-cart] .lightbox-container {
    background: linear-gradient(145deg, #f8fafc, #edf2f7) !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 20px !important;
    transition: all 0.3s ease !important;
}

div[add-to-cart] .lightbox-container:hover {
    border-color: #002e57 !important;
    box-shadow: 0 10px 25px rgba(0, 46, 87, 0.08) !important;
}

div[add-to-cart] .lightbox-item img.thumbnail {
    object-fit: contain !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

div[add-to-cart] .lightbox-container:hover img.thumbnail {
    transform: scale(1.05) !important;
}

div[add-to-cart] .product-attributes-item {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px 18px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #002e57 !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
}

div[add-to-cart] .product-attributes-item:hover {
    border-color: #F4B860 !important;
    background: #ffffff !important;
    transform: translateY(-2px) !important;
}

div[add-to-cart] .product-attributes-item:has(input:checked) {
    background: #002e57 !important;
    color: #ffffff !important;
    border-color: #002e57 !important;
    box-shadow: 0 6px 16px rgba(0, 46, 87, 0.22) !important;
}

div[add-to-cart] .product-attributes-item input[type="radio"] {
    accent-color: #F4B860 !important;
    margin-left: 8px !important;
    transform: scale(1.1) !important;
}

div[add-to-cart] .product-header-features > div {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-right: 3.5px solid #002e57 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    transition: all 0.25s ease !important;
}

div[add-to-cart] .product-header-features > div:hover {
    border-right-color: #F4B860 !important;
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(0, 46, 87, 0.05) !important;
}

div[add-to-cart] .product-header-features .text-dark {
    color: #002e57 !important;
    font-weight: 800 !important;
}

div[add-to-cart] .md\:border.md\:rounded {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 46, 87, 0.04) !important;
}

div[add-to-cart] .fa-numbers .text-lg.text-secondary {
    color: #002e57 !important;
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
}

div[add-to-cart] button.product-addtocart {
    background: linear-gradient(135deg, #002e57 0%, #00407a 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 20px !important;
    font-weight: 800 !important;
    font-size: 0.98rem !important;
    letter-spacing: 0.01em !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 8px 20px rgba(0, 46, 87, 0.25) !important;
    cursor: pointer !important;
}

div[add-to-cart] button.product-addtocart:hover {
    background: linear-gradient(135deg, #F4B860 0%, #e0a34b 100%) !important;
    color: #002e57 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 28px rgba(244, 184, 96, 0.4) !important;
}

div[add-to-cart] .md\:p-20.md\:border-t {
    border-top: 1px dashed #cbd5e1 !important;
    background: #f8fafc !important;
}

div[add-to-cart] .md\:p-20.md\:border-t .bg-light\/80 {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
}

div[add-to-cart] .md\:p-20.md\:border-t .bg-light\/80:hover {
    border-color: #002e57 !important;
}

div[add-to-cart] .md\:p-20.md\:border-t h4 {
    color: #002e57 !important;
    font-weight: 700 !important;
}