/*
Theme Name: Hapomeo
Theme URI: https://hapoomeo.com/
Author: Mahya Zare
Author URI: https://virapeak.ir/
Description: قالب اختصاصی هاپومیو تبدیل شده از HTML
Version: 1.9.0
Text Domain: hapomeo
*/

/* Path: wp-content/themes/hapomeo/style.css
توضیحات: این فایل شناسه اصلی قالب شماست. فونت‌های شما را هم اینجا نگه می‌داریم.
*/
@font-face {
    font-family: 'PeydaWeb';
    src: url('fonts/PeydaWebVF.woff2') format('woff2'),
         url('fonts/PeydaWebVF.woff') format('woff');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --hapomeo-font-family: 'PeydaWeb', Tahoma, Arial, sans-serif;
}

html,
body {
    font-family: var(--hapomeo-font-family) !important;
}

button,
input,
select,
textarea {
    font-family: inherit !important;
}

a.post-edit-link {
    width: 100%;
    background: #e9f1f2;
    display: block;
    margin: 20px auto;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
}

/* استایل‌های پایه اگر نیاز باشد اینجا اضافه می‌شوند */
body {
    font-family: var(--hapomeo-font-family) !important;
}

a.post-edit-link {
    width: 100%;
    background: #e9f1f2;
    display: block;
    margin: 20px auto;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
}


/* ... (کدهای قبلی فونت‌ها و ...) ...
*/

/* استایل اسکرول‌بار اختصاصی (طبق فایل cart.html) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* رفع تداخل استایل‌های پیش‌فرض ووکامرس */
.woocommerce-cart-form input[type="number"] {
    -moz-appearance: textfield;
    /* حذف فلش‌های پیش‌فرض فایرفاکس */
}

.woocommerce-cart-form input[type="number"]::-webkit-outer-spin-button,
.woocommerce-cart-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    /* حذف فلش‌های پیش‌فرض کروم/سافاری */
    margin: 0;
}

/* استایل دکمه‌های +/- */
.quantity button:focus {
    outline: none;
}

/* پنهان کردن هدر جدول پیش‌فرض ووکامرس اگر هنوز لود می‌شود */
.shop_table thead {
    display: none;
}

.shop_table {
    border: none !important;
}

.shop_table td {
    border: none !important;
    padding: 0 !important;
}

/* ... کدهای قبلی ... */

/* مخفی کردن جدول محصولات پیش‌فرض ووکامرس در صفحه تسویه حساب */
/* چون ما لیست سفارشی خودمان را در سایدبار داریم */
.woocommerce-checkout-review-order-table thead,
.woocommerce-checkout-review-order-table tbody {
    display: none;
}

/* نمایش فوتر جدول (جمع کل و حمل و نقل) */
.woocommerce-checkout-review-order-table tfoot {
    display: table-footer-group;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 10px 0;
    border-top: 1px solid #f1f5f9; /* slate-100 */
    color: #64748b; /* slate-500 */
    font-size: 0.875rem;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    border-top: 2px solid #fdba74; /* orange-300 */
    padding-top: 15px;
    color: #1e293b; /* slate-800 */
    font-weight: 800;
    font-size: 1.1rem;
}
.woocommerce-checkout-review-order-table .order-total td strong {
    color: #ea580c; /* orange-600 */
}

/* * FIX: WooCommerce Checkout AJAX Errors - TOAST STYLE (FIXED TOP)
 * مسیر فایل: themes/your-theme/style.css
 * این استایل ارورها را به صورت شناور در بالای صفحه نمایش می‌دهد
 */

/* 1. کانتینر اصلی ارورها - تبدیل به حالت شناور (Fixed) */
.woocommerce-NoticeGroup {
    position: fixed !important;
    top: 30px !important;
    /* فاصله از بالای صفحه */
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    /* نمایش روی تمام عناصر حتی هدر */
    width: auto !important;
    max-width: 90vw !important;
    /* در موبایل کل عرض را نگیرد */
    min-width: 320px !important;
    /* حداقل عرض */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    pointer-events: none !important;
    /* امکان کلیک روی عناصر زیرین در فضاهای خالی */
}

/* 2. استایل دهی به باکس ارور و سایر پیام‌ها */
ul.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
    pointer-events: auto !important;
    /* فعال کردن کلیک روی خود پیام */
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 10px !important;

    /* سایه قوی برای جدا شدن از پس‌زمینه چون روی محتواست */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    animation: slideDownFade 0.4s ease-out !important;
    /* انیمیشن ورود */
}

/* انیمیشن برای ظاهر شدن نرم از بالا */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. استایل لیست ارور (قرمز) */
ul.woocommerce-error {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;

    background-color: #FEF2F2 !important;
    /* زمینه سفید مایل به قرمز */
    border: 1px solid #FECACA !important;
    border-right: 4px solid #EF4444 !important;
    /* خط رنگی سمت راست */

    padding: 16px 20px !important;
    border-radius: 12px !important;
    list-style: none !important;
}

/* 4. استایل هر خط ارور - اصلاح شده برای جلوگیری از تداخل آیکون */
ul.woocommerce-error li {
    position: relative !important;
    /* مرجع برای آیکون مطلق */
    display: block !important;
    padding-right: 30px !important;
    /* فضای خالی سمت راست برای آیکون */
    padding-left: 0 !important;
    width: 100% !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #991B1B !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* آیکون هشدار - اصلاح شده با پوزیشن مطلق */
ul.woocommerce-error li::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900;

    /* تنظیم موقعیت آیکون به صورت مطلق */
    position: absolute !important;
    right: 0 !important;
    top: 3px !important;
    /* تنظیم دقیق ارتفاع */

    font-size: 18px;
    color: #EF4444;
    margin: 0 !important;
}

/* مخفی کردن آیکون‌های پیش‌فرض */
.woocommerce-error::before,
.woocommerce-error::after {
    display: none !important;
}

/* 5. استایل پیام‌های آبی (Info) */
.woocommerce-info {
    background-color: #EFF6FF !important;
    border: 1px solid #BFDBFE !important;
    border-right: 4px solid #3B82F6 !important;
    color: #1E40AF !important;
    padding: 16px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center;
    list-style: none !important;
}

/* دکمه‌های داخل پیام‌ها */
.woocommerce-error .button,
.woocommerce-info .button,
.woocommerce-message .button {
    background: #fff !important;
    border: 1px solid currentColor !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    margin-right: auto !important;
    font-size: 12px !important;
    cursor: pointer !important;
    text-decoration: none !important;
}



@media screen and (min-width: 1024px) {

    .woocommerce-error,
    .woocommerce-info,
    .woocommerce-message {
        padding-right: 68px!important;
        padding-top: 22px!important;
    }
}
.logoh {width: 180px;}

.woocommerce-account .woocommerce-MyAccount-navigation {
    float: right;
    width: 100%!important;
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: left;
    width:100%!important;
}



.entry-content table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 0.5rem;
    direction: rtl;
}

.entry-content thead {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 700;
}

.entry-content th,
.entry-content td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* استایل یکی در میان (Zebra) */
.entry-content tr:nth-child(even) {
    background-color: #f9fafb;
}

/* حالت هاور برای سطرها */
.entry-content tr:hover {
    background-color: #eff6ff;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-duration: 200ms;
}

/* ایجاد اسکرول افقی برای جداول بزرگ در موبایل */
.entry-content {
    overflow-x: auto;
}

.entry-content table {
    min-width: 100%;
    /* جلوگیری از فشرده شدن بیش از حد ستون‌ها */
}


.text-blue-500 {
    --tw-text-opacity: 1;
    color: rgb(81 146 148)!important;
}

.hover\:text-blue-500:hover {
    --tw-text-opacity: 1;
    color: rgb(81 146 148)!important;
}
@media only screen and (max-width: 768px) {
    iframe#goftino_w {
        bottom: 80px !important;
    }
}

/* حذف سایه تصویر محصول در تمام لیست‌ها، اسلایدرها و محصولات مرتبط ووکامرس */
.product-card-container img,
.product-card-container [class*="drop-shadow"],
.woocommerce ul.products li.product img,
.woocommerce .related.products li.product img,
.woocommerce .upsells.products li.product img,
.woocommerce .cross-sells li.product img,
.wc-block-grid__product-image img,
.wc-block-components-product-image img,
.wp-block-woocommerce-product-collection img.wp-post-image {
    box-shadow: none !important;
    --tw-drop-shadow: drop-shadow(0 0 transparent) !important;
}

/* دکمه افزودن کارت محصول: ظاهر جمع‌وجور با ناحیه لمس استاندارد */
.product-card-container .product-card-action {
    min-width: 44px;
    height: 44px;
    align-items: center;
    flex: 0 0 44px;
    justify-content: center;
}

.product-card-container .product-card-price {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.product-card-container .product-add-control {
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.product-card-container .product-add-control::after {
    content: '';
    position: absolute;
    inset: -4px;
}

.product-card-container .product-add-control:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.35);
    outline-offset: 2px;
}

.product-card-container .product-add-control:active {
    transform: scale(0.94);
}

@media only screen and (max-width: 767px) {
    .product-card-container .product-card-footer {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: end !important;
        column-gap: 4px !important;
    }

    .product-card-container .product-card-price-line {
        max-width: 100%;
        gap: 2px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
        letter-spacing: -0.2px;
    }

    .product-card-container .product-card-currency {
        flex: 0 0 auto;
        font-size: 9px !important;
    }

    .product-card-container .product-card-variable-price {
        height: auto !important;
        min-height: 40px;
        align-content: flex-end;
        font-size: 12px !important;
        line-height: 1.25 !important;
    }

    .product-card-container .product-add-control,
    .product-card-container .product-add-status,
    .product-card-container .loading-spinner {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }

    .product-card-container .product-add-control {
        font-size: 13px !important;
    }
}
