/* =========================
شروع برگه محصولات تکی
========================= */
.woocommerce div.product {
    margin: 0px 5% !important;
}

.woocommerce div.product div.images img {
    display: block;
    width: auto !important;
    height: auto;

}

.woocommerce-breadcrumb a {
  color: #fff !important;
}

nav.woocommerce-breadcrumb {
    margin: 1% !important;
    padding: 20px !important;
    background-color: #b80303;
    border-radius: 10px;
    width: 80%;
    color: white !important;
}

@media (max-width: 600px) {
 nav.woocommerce-breadcrumb {
  margin: 5% !important;
  width: none;
}}

h1.product_title.entry-title {
    font-size: 22px;
    margin-top: 60px !important;
}

button.single_add_to_cart_button.button.alt {
    background-color: #0058b5;
    border-radius: 10px;
}

button.single_add_to_cart_button.button.alt:hover {
    background-color: red;
    border-radius: 10px;
}

.woocommerce .quantity .qty {
    padding: 10px 0px !important;
    border: 0px !important;
    background-color: #b80303 !important;
    border-radius: 10px !important;
    color: white !important;
}


.single_add_to_cart_button.button.alt {
  font-family: iranyekan;
}

.attribute_value {
  padding-right: 20px !important;
}

.shop_attributes.woocommerce-group-attributes-layout-1 {
  font-family: iranyekan !important;
}

/* استایل‌های کلی برای بخش محصولات مشابه */
.related.products ul.products {
    display: flex;
  flex-wrap: nowrap;
    padding: 0;
    list-style: none;
}

/* استایل برای هر آیتم محصول (کارت) */
.related.products ul.products li.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

/* افکت هاور روی کارت */
.related.products ul.products li.product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* استایل عکس محصول */
.related.products ul.products li.product img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* استایل عنوان محصول */
.related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    margin-bottom: 10px;
    min-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
   
}

/* استایل قیمت */
.related.products ul.products li.product .price {
    font-size: 1.2em;
    font-weight: bold;
    color: #d32f2f;
    margin-top: auto;
    margin-bottom: 10px;
    display: block;
}

/* استایل دکمه */
.related.products ul.products li.product .button {
    display: inline-block;
    background-color: #4CAF50;
    color: white !important;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 auto;
    max-width: 80%;
    line-height: 1.4;
}

/* افکت هاور روی دکمه */
.related.products ul.products li.product .button:hover {
    background-color: #45a049;
}



@media (max-width: 768px) {
    .related.products ul.products {
        flex-wrap: wrap; /* در موبایل حتماً wrap باشد */
        gap: 10px;
    }
    .related.products ul.products li.product {
        flex: 0 0 100%; /* 1 ستون */
        max-width: 100%;
        padding: 10px;
    }
    .related.products ul.products li.product img {
        height: auto;
        margin-bottom: 10px;
    }
    .related.products ul.products li.product .button {
        padding: 8px 15px;
        font-size: 0.9em;
    }
     .related.products ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px;
        min-height: 30px;
    }
}
/* گالری عکس در همان صفحه */
.woocommerce div.product div.images {
    position: relative;
}

.woocommerce-product-gallery__wrapper {
    position: relative;
}

/* مودال گالری */
.product-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.product-gallery-modal.active {
    display: flex !important;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: #fff;
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 100000;
}

.modal-close:hover {
    background: #ff4444;
    color: white;
    transform: scale(1.1);
}


.product-gallery-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* --- استایل‌های دکمه درخواست طراحی نصب (زیر افزودن به سبد خرید) --- */
.car-install-cta-container {
    background-color: #fdfdfd;
    border-radius: 10px;
    border: 1px dashed #007bff; /* خط‌چین آبی برای جلب توجه متمایز */
    padding: 15px;
    text-align: center;
    margin: 60px 0 0 0; /* ایجاد فاصله مناسب از دکمه بالایی */
    clear: both; /* جلوگیری از تداخل با دکمه‌های فلوت شده */
}

.car-install-cta-text {
    font-size: 14px;
    color: #444444;
    line-height: 1.6;
    margin-bottom: 12px;
    font-weight: 500;
}

.car-install-cta-button {
    display: inline-block;
    background-color: #007bff; /* رنگ آبی */
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.15);
    width: 100%; /* دکمه به صورت تمام‌عرض زیر دکمه خرید قرار می‌گیرد */
    box-sizing: border-box;
}

.car-install-cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 86, 179, 0.25);
}

/* --- استایل‌های مربوط به مودال گالری خودتان --- */
.product-gallery-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 99999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.product-gallery-modal.active { opacity: 1; pointer-events: auto; }
.modal-image { max-width: 90%; max-height: 90%; border-radius: 4px; }
.modal-close {
    position: absolute; top: 20px; right: 20px;
    color: #fff; font-size: 40px; cursor: pointer;
}

