/* Category archive only. The shared card template is used elsewhere.
 * The extra html[lang] and .woocommerce specificity intentionally beats the
 * shared mobile card rules, including their !important quick-view hiding. */
.elwan-card-mobile-category-action-label,
.elwan-card-mobile-cart-icon { display: none; }
.elwan-mobile-category-toolbar { display: none; }
@media (max-width: 767px) {
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) #Content section.section > .section_wrapper,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) #Content .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) #elwan-archive-label { display: none !important; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .shop-filters {
    display: block !important;
    margin: 0 0 12px !important;
    padding: 0 12px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar { display: block !important; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-title {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 8px 0 12px !important;
    padding: 11px 28px !important;
    border-radius: 15px !important;
    background: #07345f !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    white-space: normal !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-controls {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 0 10px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-controls > * {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    min-width: 0 !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 7px !important;
    border: 1px solid #dce5ef !important;
    border-radius: 11px !important;
    background: #fff !important;
    box-shadow: 0 2px 7px rgba(7, 52, 95, .1) !important;
    color: #07345f !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    cursor: pointer !important;
    white-space: nowrap !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-controls[dir],
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar[dir="rtl"] .elwan-mobile-category-controls { direction: rtl !important; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar[dir="rtl"] .elwan-mobile-category-count { grid-column: 1; grid-row: 1; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar[dir="rtl"] .elwan-mobile-category-sort { grid-column: 2; grid-row: 1; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar[dir="rtl"] .elwan-mobile-category-filter { grid-column: 3; grid-row: 1; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-controls > *:focus-within,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-filter:focus-visible { outline: 2px solid #073b70 !important; outline-offset: 2px !important; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-sort select,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-count select.facetwp-per-page-select {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-count .facetwp-facet-products_per_page {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    opacity: 0 !important;
    z-index: 2 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-count .elwan-per-page-choices { display: none !important; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-sort::before,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-count::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-inline-end: 7px;
    margin-top: -4px;
    border-right: 2px solid #07345f;
    border-bottom: 2px solid #07345f;
    transform: rotate(45deg);
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-filter::before { content: '☰'; margin-inline-end: 5px; font-size: 15px; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar ~ .woocommerce-ordering,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag) .elwan-mobile-category-toolbar ~ .mfn-woo-list-options { display: none !important; }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .shop-filters .woocommerce-result-count {
    display: none !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .shop-filters .woocommerce-ordering,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .shop-filters .mfn-woo-list-options {
    display: none !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .shop-filters .facetwp-facet-products_per_page.elwan-per-page-enhanced > select {
    display: block !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .shop-filters .elwan-per-page-choices {
    display: none !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper > ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 10px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper > ul.products > li.product.elwan-product-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 318px !important;
    flex: initial !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid #e2e7ed !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 2px 6px rgba(0, 31, 65, .12) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .product-loop-thumb {
    height: 156px !important;
    min-height: 156px !important;
    margin: 0 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .image_frame,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .image_wrapper,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .image_wrapper > a,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .hover_box_product {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .product-loop-thumb img {
    display: block !important;
    width: 100% !important;
    height: 156px !important;
    object-fit: contain !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .mfn-ti-wishlist-button {
    z-index: 4 !important;
    color: #07345f !important;
    transform: scale(1.2);
    transform-origin: top left;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .onsale {
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    border-radius: 9px !important;
    background: #d60d20 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    padding: 6px 8px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card > .desc {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .mfn-woo-product-title {
    margin: 2px 0 6px !important;
    min-height: 2.8em !important;
    max-height: 2.8em !important;
    color: #07345f !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    text-align: center !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .mfn-woo-product-title a {
    color: inherit !important;
    font-size: 13px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-variation-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important;
    min-height: 25px !important;
    gap: 4px !important;
    margin: 0 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-meta-row {
    flex-direction: row !important;
    height: auto !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-color-field label,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-brand {
    display: none !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-color-circle {
    width: 14px !important;
    height: 14px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-stock {
    color: #07345f !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-stock.is-in-stock::before {
    color: #00883a !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-meta-row {
    min-height: 28px !important;
    margin: 3px 0 0 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-price {
    min-height: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #d60d20 !important;
    white-space: nowrap !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-price ins,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-price ins * {
    color: #d60d20 !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-price del,
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-price del * {
    color: #929cae !important;
    font-size: 11px !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card > .desc > .elwan-quick-view-btn {
    display: flex !important;
    position: relative !important;
    z-index: 20 !important;
    pointer-events: auto !important;
    min-height: 37px !important;
    margin: auto 0 0 !important;
    padding: 5px 4px !important;
    border-radius: 10px !important;
    background: #073b70 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-align: center !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card > .desc > .elwan-quick-view-btn .icon-search {
    display: none !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-default-action-label {
    display: none !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-mobile-category-action-label {
    display: inline !important;
  }
  html[lang] body:is(.tax-product_cat,.tax-product_brand,.tax-product_tag).woocommerce .products_wrapper li.elwan-product-card .elwan-card-mobile-cart-icon {
    display: inline !important;
    font-size: 16px !important;
  }
}

/* ELWAN: tag archive mobile-only refinements */
@media (max-width: 767px) {
  /* The generic RTL archive rule adds a 25px left offset to every filter child.
   * The tag toolbar must align with the product grid instead. */
  html[lang] body.tax-product_tag.woocommerce .shop-filters > .elwan-mobile-category-toolbar {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* The products-per-page control belongs in the top mobile toolbar only.
   * Hide the original lower control; the script moves its live FacetWP node
   * into .elwan-mobile-category-count, where this selector no longer applies. */
  html[lang] body.tax-product_tag.woocommerce .shop-filters > .facetwp-facet-products_per_page,
  html[lang] body.tax-product_tag.woocommerce .shop-filters > .mfn-woo-list-options {
    display: none !important;
  }

  /* Keep the two prices in a compact vertical stack on tag cards. */
  html[lang] body.tax-product_tag.woocommerce .products_wrapper li.elwan-product-card .elwan-card-price-original {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
  }
  html[lang] body.tax-product_tag.woocommerce .products_wrapper li.elwan-product-card .elwan-card-price-original del,
  html[lang] body.tax-product_tag.woocommerce .products_wrapper li.elwan-product-card .elwan-card-price-original ins {
    display: block !important;
    margin: 0 !important;
  }
}

