/* =========================
شروع برگه محصولات تکی
========================= */
.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;
}


/* برای موبایل (کمتر از 600px) - 1 ستون */
@media (max-width: 599px) {
    .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: 180px;
        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;
    }
}
