/* --- Single Product Layout (Digikala Style) --- */

.hg-single-page-container {
    max-width: 1300px;
    margin: 0 auto;
}

.hg-product-wrapper {
    display: grid;
    grid-template-columns: 40% 58%; /* ستون گالری کوچکتر، ستون اطلاعات بزرگتر */
    gap: 2%;
    margin-bottom: 50px;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* ستون گالری */
.hg-col-gallery {
    position: sticky;
    top: 20px;
}
.woocommerce-product-gallery img {
    border-radius: 10px;
}

/* ستون اطلاعات */
.hg-col-summary {
    padding: 10px;
}

.hg-product-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

.hg-product-meta-top {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.hg-sku { margin-left: 15px; }

/* مخفی کردن قیمت پیش‌فرض ووکامرس (چون ما باکس شفافیت داریم) */
.hg-buy-box .price {
    display: none !important;
}
/* مگر اینکه محصول متغیر نباشد و بخواهیم قیمت واحد را ببینیم، 
   ولی معمولاً در طلا باکس ما همه‌کاره است. فعلا مخفی می‌کنیم. */

/* استایل دکمه افزودن به سبد خرید */
.single_add_to_cart_button {
    background-color: #ef394e !important; /* قرمز دیجی‌کالایی */
    color: #fff !important;
    padding: 15px 30px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s;
}
.single_add_to_cart_button:hover {
    background-color: #d32f2f !important;
}

/* تمیزکاری فرم متغیرها */
.variations td {
    display: block;
    padding: 5px 0;
}
.variations label {
    font-weight: bold;
    color: #555;
}
.reset_variations {
    font-size: 12px;
    margin-right: 10px;
    color: #999;
}

/* ریسپانسیو (موبایل) */
@media (max-width: 768px) {
    .hg-product-wrapper {
        grid-template-columns: 1fr; /* تک ستونه شدن */
    }
    .hg-col-gallery {
        position: static;
        margin-bottom: 20px;
    }
}

/* --- Product Grid & Cards (ویترین طلا) --- */

/* کانتینر بج‌ها */
.hg-loop-badges-container {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

/* استایل بج‌ها */
.hg-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.hg-badge.weight {
    background-color: #e3f2fd; /* آبی خیلی روشن */
    color: #1565c0; /* آبی تیره */
    border: 1px solid #bbdefb;
}

.hg-badge.ajrat {
    background-color: #fff3e0; /* نارنجی خیلی روشن */
    color: #e65100; /* نارنجی تیره */
    border: 1px solid #ffe0b2;
}

/* زیباسازی کارت محصول ووکامرس */
ul.products li.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 15px !important;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    text-align: right; /* راست چین برای فارسی */
}

ul.products li.product:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: var(--hg-primary);
}

/* اصلاح تصویر محصول */
ul.products li.product img {
    border-radius: 10px;
    margin-bottom: 10px !important;
}

/* اصلاح عنوان محصول */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: bold;
    color: #333;
    padding: 0 !important;
    margin-bottom: 5px !important;
}

/* قیمت */
ul.products li.product .price {
    font-size: 16px !important;
    color: #333 !important;
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

/* دکمه افزودن به سبد در آرشیو */
ul.products li.product .button {
    margin-top: 10px !important;
    border-radius: 8px !important;
    background-color: #f5f5f5 !important;
    color: #333 !important;
    width: 100%;
    text-align: center;
}
ul.products li.product .button:hover {
    background-color: var(--hg-primary) !important;
    color: #fff !important;
}

ul.products li.product {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 15px;      /* گرد کردن گوشه‌ها */
    padding: 15px !important;
    transition: all 0.3s ease; /* انیمیشن نرم */
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); /* سایه ملایم */
    overflow: hidden;
}

/* افکت هاور (وقتی موس روی محصول می‌رود) */
ul.products li.product:hover {
    transform: translateY(-5px); /* کمی بالا می‌رود */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--hg-primary);
}

/* 2. کانتینر بج‌های وزن و اجرت */
.hg-loop-badges-container {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    font-size: 11px;
    flex-wrap: wrap;
    justify-content: center; /* وسط چین */
}

/* استایل تکی بج‌ها */
.hg-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    line-height: 1;
}

.hg-badge.weight {
    background-color: #e3f2fd; /* پس‌زمینه آبی روشن */
    color: #1565c0;            /* متن آبی تیره */
}

.hg-badge.ajrat {
    background-color: #fff3e0; /* پس‌زمینه نارنجی روشن */
    color: #e65100;            /* متن نارنجی تیره */
}

/* 3. اصلاح عنوان محصول */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    font-weight: 700;
    color: #333;
    padding: 5px 0 !important;
    line-height: 1.4;
}

/* 4. اصلاح قیمت */
ul.products li.product .price {
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 800;
    margin-top: 5px;
    display: block;
}

ul.products li.product .price del {
    color: #aaa !important;
    font-size: 0.8em !important;
}

ul.products li.product .price ins {
    text-decoration: none;
}

/* 5. دکمه افزودن به سبد در لیست */
ul.products li.product .button {
    background-color: #f8f9fa !important;
    color: #555 !important;
    border-radius: 8px !important;
    margin-top: 10px !important;
    width: 100%;
    font-weight: normal !important;
}

ul.products li.product .button:hover {
    background-color: var(--hg-primary) !important; /* رنگ طلایی */
    color: #fff !important;
}

/* 6. بج "ویژه" (جایگزین حراج) */
span.onsale.hg-sale-badge {
    background-color: #ef394e !important; /* قرمز */
    color: #fff !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    padding: 3px 8px !important;
    font-weight: normal;
    min-height: auto;
    line-height: 1.5;
    top: 15px;
    right: 15px;
    left: auto;
}