/**
 * HubTrend conditional WooCommerce product-loop bundle.
 * Generated from v9 component files without selector changes.
 */

/* Product card styles */
/* ===== بطاقة المنتج ===== */
.woocommerce ul.products li.product {
  position: relative;
  background: var(--ast-global-color-4);
  border: 1px solid var(--ast-global-color-6);
  border-radius: 12px;
  padding: 5px;
  margin: 0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--ast-global-color-2);
}

/* ===== صور المنتج ===== */
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
  display: block;
  position: relative;
  border-radius: 12px;
}
.woocommerce ul.products li.product img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.woocommerce ul.products li.product:hover img {
  transform: scale(1.025);
}
.woocommerce-js ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
  margin-bottom: 0;
  border-radius: 12px;
}

/* ===== معلومات المنتج ===== */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px;
  color: var(--ast-global-color-2);
  line-height: 1.4;
  padding: 0 5px;
  transition: color 0.3s ease;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title:hover {
  color: var(--ast-global-color-7);
}

/* السعر */
.woocommerce ul.products li.product .price {
  color: var(--ast-global-color-1);
  font-size: 16px;
  font-weight: 600;
  margin: 0 5px;
  padding: 0 5px;
  display: block;
}
.woocommerce ul.products li.product .price del {
  color: var(--ast-global-color-3);
  opacity: 0.75;
  font-weight: 400;
  font-size: 0.9em;
  margin: 0 5px;
}
.woocommerce ul.products li.product .price ins {
  text-decoration: none;
}

/* ===== زر الإضافة إلى السلة ===== */
.woocommerce-js ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  display: none;
}

/* Brand styles */
/*===================================================================================
 * FILE: hub-trend-product-brand.css
 * PURPOSE: Style product brand logo in WooCommerce cards and single product page
 * VERSION: 2.0.0 - Added clickable brand links and enhanced interactions
 *----------------------------------------------------------------------------------*/

/* الحاوية الرئيسية للعلامة التجارية */
.product-brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px !important;
    justify-content: center;
    flex-wrap: wrap;
}

/* نص "Brand" */
.product-brand-logo-wrapper .brand-label {
    color: #415161;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* عنصر العلامة التجارية الفردي */
.brand-item {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

/* حاوية العلامة التجارية مع التلميح */
.brand-tooltip-container {
    position: relative;
    display: inline-block;
}

/* 🔗 رابط العلامة التجارية */
.brand-link {
    display: inline-block;
    /* text-decoration: none; */
    border: none;
    background: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    /* padding: 0px; */
}

.brand-link:hover,
.brand-link:focus {
    transform: translateY(-2px);
    background: rgba(65, 81, 97, 0.05);
    outline: none;
}

.brand-link:focus-visible {
    outline: 2px solid #3a8bbb;
    outline-offset: 2px;
}

/* شعار العلامة التجارية */
.brand-tooltip-container img.brand-logo {
    max-height: 35px;
    max-width: 90px;
    width: auto !important;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    box-shadow: none !important;
    display: block;
}

/* تأثيرات Hover للشعار */
.brand-link:hover img.brand-logo,
.brand-link:focus img.brand-logo {
    transform: scale(1.08);
    filter: brightness(1.1);
}

/* التلميح */
.brand-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 220px;
    background-color: #415161;
    color: #fff;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 8px;
    padding: 8px 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* السهم الصغير للتلميح */
.brand-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #415161 transparent transparent transparent;
}

/* إظهار التلميح عند Hover */
.brand-tooltip-container:hover .brand-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* تحسينات للصفحة المفردة */
.single-product .product-brand-logo-wrapper {
    justify-content: center;
    margin: 0px 0;
    gap: 10px;
}

.single-product .brand-label {
    font-size: 14px;
    color: #2c3e50;
}

.single-product .brand-tooltip-container img.brand-logo {
    max-height: 35px;
    max-width: 90px;
}

/* تحسينات لبطاقات المنتجات */
.woocommerce-loop-product__footer .product-brand-logo-wrapper {
    margin: 8px 0 4px 0;
    gap: 6px;
}

.woocommerce-loop-product__footer .brand-label {
    font-size: 12px;
}

.woocommerce-loop-product__footer .brand-tooltip-container img.brand-logo {
    max-height: 35px;
    max-width: 90px;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .product-brand-logo-wrapper {
        gap: 6px;
        margin: 6px 0;
    }

    .brand-label {
        font-size: 12px;
    }

    .brand-tooltip-container img.brand-logo {
        max-height: 35px;
        max-width: 90px;
    }

    .brand-tooltip {
        width: 180px;
        font-size: 11px;
        padding: 6px 8px;
    }

    .single-product .product-brand-logo-wrapper {
        justify-content: center;
        margin-top: 0px;
        margin-bottom: 0px;
    }
}

/* تحسينات للأجهزة التي تلمس فقط */
@media (hover: none) and (pointer: coarse) {
    .brand-tooltip {
        display: none; /* إخفاء التلميح على الأجهزة التي لا تدعم hover */
    }

    .brand-link:active img.brand-logo {
        transform: scale(0.95);
    }
}

/* دعم تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .brand-link,
    .brand-tooltip-container img.brand-logo,
    .brand-tooltip {
        transition: none;
    }

    .brand-link:hover,
    .brand-link:focus {
        transform: none;
    }
}

/* حالات خاصة للروابط */
.brand-link[aria-describedby] {
    position: relative;
}

/* تحسينات للوصول */
.brand-link:focus {
    box-shadow: 0 0 0 2px #3a8bbb, 0 0 0 4px rgba(58, 139, 187, 0.3);
}

/* تأثير النقر النشط */
.brand-link:active {
    transform: scale(0.95);
}

/* تحسينات للشعارات ذات الخلفيات البيضاء */
.brand-logo[src*="white"] {
    background: #f8f9fa;
    padding: 3px;
    border-radius: 4px;
}

/* دعم RTL */
.rtl .product-brand-logo-wrapper {
    direction: rtl;
}

.rtl .brand-tooltip {
    left: auto;
    right: 50%;
    transform: translateX(50%) translateY(5px);
}

.rtl .brand-tooltip::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.rtl .brand-tooltip-container:hover .brand-tooltip {
    transform: translateX(50%) translateY(0);
}

/* تحسينات للأرشيف (صفحة العلامة التجارية) */
.tax-product_brand .product-brand-logo-wrapper {
    justify-content: center;
    margin: 5px 0;
}

.tax-product_brand .brand-tooltip-container img.brand-logo {
    max-height: 35px;
    max-width: 90px;
}

/* تأثيرات تحميل سلسة */
.brand-logo {
    opacity: 0;
    animation: brandLogoFadeIn 0.5s ease forwards;
}

@keyframes brandLogoFadeIn {
    to {
        opacity: 1;
    }
}

/* حالة عدم وجود صورة */
.brand-item:not(:has(img)) {
    display: none;
}

/* Product swatch styles */
  /* إخفاء كلمة Color */
  .archive .woocommerce-loop-product__title label[for="pa_color_unique_0"] {
    display: none !important;
  }

   /* Selected Swatch */
   .cfvsw-selected-swatch {
    border-color: var(--ast-global-color-1);
    background: rgb(0 98 165 / 10%);
    color: var(--ast-global-color-1);
    transform: scale(1.05);
    font-weight: 600;
  }
  .cfvsw-selected-label {
      content: " : ";
      font-weight: 600;
      color: var(--ast-global-color-1);
  }

  .woocommerce-js div.product form.cart .single_variation_wrap .single_variation {
      margin-bottom: 0;
  }

  /* تحسين جدول المتغيرات */
  .theme-astra table.variations {
    width: 100%;
    margin: 0px 0;
  }

  .theme-astra table.variations td {
    padding: 0px 0;
    border: none;
  }

  .theme-astra table.variations td.value {
    padding: 0 !important;
  }

  /* Swatch المحدد */
    table.cfvsw-shop-variations,
  .cfvsw-shop-variations tbody,
  .cfvsw-shop-variations td,
  .cfvsw-shop-variations tr {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .cfvsw-swatches-container {
    justify-content: center;
  }

/* Product sharing styles */
/* ==========================================================================
   Hub Trend - Product Share Icons Styles
   Version: 2.0.0
   Description: Unified styles for product share icons (WhatsApp, Facebook, X, Copy Link)
   Updated: Fixed button/link consistency and enhanced visual design
   ========================================================================== */

/* الحاوية الرئيسية */
.product-action-icons {
    animation: hubtrend-fadeUp 0.5s ease forwards;
    padding: 0px;
}

/* تأثير الظهور */
@keyframes hubtrend-fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* الأيقونات الفردية - تطبيق موحد على الروابط والأزرار */
.product-action-icons a,
.product-action-icons button.copy-product-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #bfbfbf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #F2F5F7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    /* إعادة تعيين أنماط الزر */
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1;
}


/* إصلاح محاذاة Flex للتأكد من التساوي */
.product-action-icons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    margin-top: 5px;
}

.product-action-icons > * {
    flex: 0 0 auto;
}

/* تنسيق الأيقونات */
.product-action-icons i {
    color: #415161;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تأثيرات Hover عامة - تطبيق على الجميع */
.product-action-icons a:hover,
.product-action-icons button.copy-product-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* WhatsApp - ألوان محددة */
.share-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

/* Facebook - ألوان محددة */
.share-facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

/* Twitter - ألوان محددة */
.share-x-twitter:hover {
    color: #000 !important;
    background: #000;
    border-color: #fff;
}

/*  إذا عدت لاستخدام button - استهدف button.copy-product-link */
button.copy-product-link:hover,
button.copy-product-link.hubtrend-copying,
button.copy-product-link.hubtrend-copied {
    background: #aa0000;
    border-color: #aa0000;
}

button.copy-product-link.hubtrend-copying {
    transform: scale(0.95) translateY(-3px);
}

/* إضافة تأثير النجاح */
button.copy-product-link.hubtrend-copied {
    background: #07ae44 !important;
    border-color: #07ae44 !important;
    transform: scale(1.1) translateY(-3px);

}
/* إضافة تأثير الفشل */
button.copy-product-link.hubtrend-failed {
    background: #000 !important;
    border-color: #000 !important;
    transform: scale(1.1) translateY(-3px);
}
.share-whatsapp:hover i,
.share-facebook:hover i,
.share-x-twitter:hover i,
button.copy-product-link:hover i,
button.copy-product-link.hubtrend-copying i,
button.copy-product-link.hubtrend-copied i,
button.copy-product-link.hubtrend-failed i {
    color: #ffffff;
}

/* تحسينات إضافية للتأكد من التساوي */
.product-action-icons a:focus,
.product-action-icons button.copy-product-link:focus {
    outline: 2px solid #07ae44;
    outline-offset: 2px;
}

.product-action-icons a:active,
.product-action-icons button.copy-product-link:active {
    transform: translateY(-1px);
}

/* التكيف مع الجوال */
@media (max-width: 921px) {
    .product-action-icons {
        gap: 8px;
        margin-top: 0px;
        margin-bottom: 5px;
    }

    .product-action-icons a,
    .product-action-icons button.copy-product-link {
        width: 26px;
        height: 26px;
    }

    .product-action-icons i {
        font-size: 16px;
    }

    .product-action-icons a:hover,
    .product-action-icons button.copy-product-link:hover {
        transform: translateY(-2px);
    }

    /* تحديث حالات النسخ للجوال */
    button.copy-product-link.hubtrend-copying,
    button.copy-product-link.hubtrend-copied,
    button.copy-product-link.hubtrend-failed {
        transform: translateY(-2px);
    }
}

/* دعم تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .product-action-icons {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .product-action-icons a,
    .product-action-icons button.copy-product-link {
        transition: none;
    }

    .product-action-icons a:hover,
    .product-action-icons button.copy-product-link:hover {
        transform: none;
    }

    button.copy-product-link.hubtrend-copying,
    button.copy-product-link.hubtrend-copied,
    button.copy-product-link.hubtrend-failed {
        transform: none;
    }
}

/* تحسينات للأجهزة التي تلمس فقط */
@media (hover: none) and (pointer: coarse) {
    .product-action-icons a:hover,
    .product-action-icons button.copy-product-link:hover {
        transform: none;
    }
}

/* حالة التحميل الأولي */
.product-action-icons.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Sale badge styles */
.woocommerce span.onsale,
.wc-block-grid__product .wc-block-grid__product-onsale {
    color: var(--ast-global-color-4);
}

.woocommerce-js.single-product .sale:not(.ast-product-gallery-layout-vertical-slider)>span.onsale
 {
    top: 0px;
}

.woocommerce-js.single-product .sale>span.onsale {
    font-size: 12px;
}

.woocommerce-js div.product span.onsale {
    min-height: 40px;
    min-width: 40px;
    line-height: 40px;
}
