/* M7trf shop + category archives: same clean white card pattern as the homepage (m7-home-v2).
   Fonts come from m7-home-v2.css (enqueued as a dependency). Scoped to body.m7-shop. */
body.m7-shop{
  --m7-line:#ebe8f2; --m7-soft:#f6f5fa; --m7-fg:#16131f; --m7-muted:#6e6880;
  --m7-accent:#7c4dff; --m7-accent-hover:#6a3bf0; --m7-accent-soft:#f1ecff;
}
body.m7-shop .elementor-location-archive,
body.m7-shop .etheme-elementor-sidebar,
body.m7-shop .etheme-product-grid,
body.m7-shop .woocommerce-ordering,
body.m7-shop .products-per-page{font-family:"M7 Tajawal",Tahoma,sans-serif}

/* grid */
body.m7-shop .etheme-product-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px!important;margin:0!important}
body.m7-shop .etheme-product-grid::before,body.m7-shop .etheme-product-grid::after{display:none!important}
body.m7-shop .etheme-product-grid .etheme-product-grid-item{width:auto!important;max-width:none!important;margin:0!important;float:none!important;
  background:#fff;border:1px solid var(--m7-line);border-radius:16px;padding:10px!important;display:flex!important;flex-direction:column;gap:6px;
  transition:box-shadow .2s,border-color .2s;overflow:hidden}
body.m7-shop .etheme-product-grid .etheme-product-grid-item:hover{border-color:#d9d2ee;box-shadow:0 8px 24px rgba(40,20,90,.08)}

/* image */
body.m7-shop .etheme-product-grid-image{position:relative;margin:0!important;border-radius:12px;overflow:hidden;background:#fff;aspect-ratio:1}
body.m7-shop .etheme-product-grid-image>a{display:block;height:100%}
body.m7-shop .etheme-product-grid-image img{width:100%!important;height:100%!important;object-fit:contain;object-position:50% 50%!important;border-radius:0!important;transition:transform .3s}
body.m7-shop .etheme-product-grid-item:hover .etheme-product-grid-image>a>img{transform:scale(1.04)}
body.m7-shop .etheme-product-hover-swap-image img{object-fit:contain}

/* badges */
body.m7-shop .etheme-product-grid-image .acoplw-badge{display:block;height:100%}
body.m7-shop .outofstock .acoplw-badge-icon{display:none!important}
body.m7-shop .outofstock .etheme-product-grid-image img{opacity:.55}
body.m7-shop .outofstock .etheme-product-grid-image::after{content:"غير متوفر";position:absolute;top:8px;right:8px;background:#6e6880;color:#fff;font-size:12px;font-weight:700;border-radius:6px;padding:2px 8px;line-height:1.5;z-index:2}
body.m7-shop .product_tag-used .etheme-product-grid-image::before,
body.m7-shop .product_cat-used-gaming-pc .etheme-product-grid-image::before{content:"مستعمل";position:absolute;top:8px;left:8px;background:var(--m7-accent);color:#fff;font-size:12px;font-weight:700;border-radius:6px;padding:2px 8px;line-height:1.5;z-index:2}
body.m7-shop .onsale{border:0!important;background:#e5484d!important;color:#fff!important;border-radius:6px!important;font-size:12px!important;font-weight:700;padding:2px 8px!important;min-width:0!important;min-height:0!important;line-height:1.5!important}

/* content */
body.m7-shop .etheme-product-grid-content{padding:2px 2px 0!important;display:flex;flex-direction:column;gap:4px;flex:1;text-align:right}
body.m7-shop .etheme-product-grid-categories{font-size:12px;margin:0!important}
body.m7-shop .etheme-product-grid-categories a{color:var(--m7-muted)!important}
body.m7-shop .etheme-product-grid-title{font-size:14px!important;font-weight:700!important;line-height:1.5!important;margin:0!important;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:3em}
body.m7-shop .etheme-product-grid-title a{color:var(--m7-fg)!important}
body.m7-shop .etheme-product-grid-title a:hover{color:var(--m7-accent)!important}
body.m7-shop .etheme-product-grid-item .price{display:flex!important;flex-wrap:wrap;align-items:baseline;gap:6px;margin:2px 0 0!important;font-size:16px!important;font-weight:800;color:var(--m7-fg)!important}
body.m7-shop .etheme-product-grid-item .price ins{text-decoration:none;color:var(--m7-fg)!important;order:-1}
body.m7-shop .etheme-product-grid-item .price del{font-size:13px;font-weight:400;color:var(--m7-muted)!important;opacity:1}
body.m7-shop .etheme-product-grid-item .star-rating-wrapper:empty{display:none}

/* button */
body.m7-shop .etheme-product-grid-button{margin-top:auto!important;width:100%!important;display:flex!important;align-items:center;justify-content:center;
  background:var(--m7-accent-soft)!important;color:var(--m7-accent)!important;border:0!important;border-radius:10px!important;
  padding:10px 12px!important;font-size:14px!important;font-weight:700!important;line-height:1.3!important;text-transform:none!important;letter-spacing:0!important;min-height:0!important;height:auto!important;transition:background .15s,color .15s}
body.m7-shop .etheme-product-grid-button:hover{background:var(--m7-accent)!important;color:#fff!important}
body.m7-shop .etheme-product-grid-button.added{background:#1f9d55!important;color:#fff!important}
body.m7-shop .etheme-product-grid-item .added_to_cart{display:none!important}

/* sidebar filters */
body.m7-shop .etheme-elementor-sidebar .sidebar-widget{background:#fff;border:1px solid var(--m7-line);border-radius:16px;padding:16px!important;margin-bottom:14px!important}
body.m7-shop .etheme-elementor-sidebar .widget-title{font-size:16px!important;font-weight:800!important;color:var(--m7-fg)!important;margin-bottom:10px!important;border:0!important;padding:0!important}
body.m7-shop .etheme-elementor-sidebar .widget-title span{border:0!important;padding:0!important}
body.m7-shop .etheme-elementor-sidebar a{color:var(--m7-fg)}
body.m7-shop .etheme-elementor-sidebar a:hover{color:var(--m7-accent)}
body.m7-shop .etheme-elementor-sidebar input[type=checkbox],body.m7-shop .etheme-elementor-sidebar input[type=radio]{accent-color:var(--m7-accent)}
body.m7-shop .etheme-elementor-sidebar .etheme-widget_local_search,body.m7-shop .etheme-elementor-sidebar input[type=text],body.m7-shop .etheme-elementor-sidebar input[type=number]{border:1px solid var(--m7-line)!important;border-radius:10px!important;background:var(--m7-soft)!important}
body.m7-shop .etheme-elementor-sidebar .button,body.m7-shop .etheme-elementor-sidebar button[type=submit]{background:var(--m7-accent)!important;border-color:var(--m7-accent)!important;color:#fff!important;border-radius:10px!important}

/* toolbar */
body.m7-shop .woocommerce-ordering select,body.m7-shop .products-per-page select{border:1px solid var(--m7-line)!important;border-radius:10px!important;background-color:#fff!important}

/* pagination */
body.m7-shop .woocommerce-pagination ul{border:0!important;display:flex;gap:6px;justify-content:center}
body.m7-shop .woocommerce-pagination ul li{border:0!important}
body.m7-shop .woocommerce-pagination a,body.m7-shop .woocommerce-pagination span{border:1px solid var(--m7-line)!important;border-radius:10px!important;min-width:38px;height:38px;display:inline-grid!important;place-items:center;color:var(--m7-fg)!important;background:#fff!important}
body.m7-shop .woocommerce-pagination span.current{background:var(--m7-accent)!important;border-color:var(--m7-accent)!important;color:#fff!important}

@media (max-width:1100px){body.m7-shop .etheme-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:760px){
  body.m7-shop .etheme-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
  body.m7-shop .etheme-product-grid .etheme-product-grid-item{padding:8px!important;border-radius:14px}
  body.m7-shop .etheme-product-grid-title{font-size:13px!important}
  body.m7-shop .etheme-product-grid-item .price{font-size:15px!important}
  body.m7-shop .etheme-product-grid-button{font-size:13px!important;padding:9px 8px!important}
}
@media (prefers-reduced-motion:reduce){body.m7-shop .etheme-product-grid *{transition:none!important}}
