/*
Theme Name: Twenty Twenty-Four
Theme URI: https://wordpress.org/themes/twentytwentyfour/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs, such as presenting a business, blogging and writing or showcasing work. A multitude of possibilities open up with just a few adjustments to color and typography. Twenty Twenty-Four comes with style variations and full page designs to help speed up the site building process, is fully compatible with the site editor, and takes advantage of new design tools introduced in WordPress 6.4.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.0
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfour
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/




/* کانتینر اصلی محصولات */
.wc-block-product-template__responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* ایجاد ستون‌های منعطف */
    gap: 20px;
    padding: 20px;
    list-style: none; /* حذف نشانه‌های لیست */
}

/* هر آیتم محصول */
.wc-block-product-template__responsive>li {
    background-color: #f7f7f7;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
}

/* لینک به صفحه محصول (شامل تصویر و عنوان) */
.wc-block-product-template__responsive li.wc-block-product > div[data-block-name="woocommerce/product-image"],
.wc-block-product-template__responsive li.wc-block-product > h3.wp-block-post-title {
    margin-bottom: 10px;
    width: 100%; /* اطمینان از اشغال تمام عرض برای لینک دهی */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wc-block-product-template__responsive li.wc-block-product > div[data-block-name="woocommerce/product-image"] a {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
}

/* تصویر محصول */
.wc-block-product-template__responsive li.wc-block-product > div[data-block-name="woocommerce/product-image"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* جلوگیری از فضای اضافی زیر تصویر */
}

/* عنوان محصول */
.wc-block-product-template__responsive li.wc-block-product > h3.wp-block-post-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    text-align: center; /* اطمینان از وسط چین بودن عنوان */
}

.wc-block-product-template__responsive li.wc-block-product > h3.wp-block-post-title a {
    text-decoration: none;
    color: inherit;
    display: block; /* عنوان هم لینک شود و کل عرض را بگیرد */
}

/* قیمت محصول */
.wc-block-product-template__responsive li.wc-block-product > div[data-block-name="woocommerce/product-price"] {
    font-size: 1em;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 10px;
}

/* دکمه افزودن به سبد خرید / اطلاعات بیشتر */
.wc-block-product-template__responsive li.wc-block-product > div[data-block-name="woocommerce/product-button"] a.wp-block-button__link {
    background-color: #4caf50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: auto; /* چسباندن دکمه به پایین در صورت لزوم */
    font-size: small; /* مطابق با کلاس has-small-font-size */
}

.wc-block-product-template__responsive li.wc-block-product > div[data-block-name="woocommerce/product-button"] a.wp-block-button__link:hover {
    background-color: #45a049;
}

/* استایل برای زمانی که موس روی آیتم قرار می‌گیرد (اختیاری) */
.wc-block-product-template__responsive li.wc-block-product:hover {
    background-color: #eee;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    transition: all 0.2s ease-in-out;
}