/*
Theme Name: Eldawlia Industrial Storefront V2
Theme URI: https://eldawlia-tools.com
Description: Reference-faithful Eldawlia Tools industrial WooCommerce storefront (staging build).
Author: Eldawlia Tools
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.3
Text Domain: eldawlia-industrial-v2
Tags: e-commerce, woocommerce, custom-colors, custom-logo, custom-menu, wide-blocks
License: CC BY 4.0
*/


/* ===================================================================
   CATEGORY SECTION V3 — premium four-card grid (scoped to .ed-cats-v3)
   =================================================================== */
body.home .ed-cats-v3 { background: #F7F8FA !important; padding: 62px 0 66px !important; }
.ed-cats-v3 .ed-container { max-width: 1280px !important; }
.ed-cats-v3__head { text-align: center !important; margin-bottom: 38px !important; }
.ed-cats-v3__eyebrow {
  display: inline-block !important;
  margin: 0 0 12px !important;
  padding: 6px 14px !important;
  background: #FFF1E5 !important;
  border-radius: 999px !important;
  color: #C65A0A !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .01em !important;
}
.ed-cats-v3__title {
  margin: 0 0 10px !important;
  color: #0D2942 !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: -.02em !important;
  text-wrap: balance !important;
}
.ed-cats-v3__sub {
  margin: 0 auto !important;
  max-width: 640px !important;
  color: #5A6B84 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
}
.ed-cats-v3__grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch !important;
}
.ed-cat3 {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  border: 1px solid #E3E8EF !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(9,33,58,.08) !important;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.ed-cat3:hover { transform: translateY(-3px) !important; box-shadow: 0 18px 38px rgba(9,33,58,.14) !important; }
.ed-cat3:focus-visible { outline: 3px solid #F47B00 !important; outline-offset: 3px !important; }
.ed-cat3__media {
  position: relative !important;
  display: block !important;
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
}
.ed-cat3__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform .3s ease !important;
}
.ed-cat3:hover .ed-cat3__media img { transform: scale(1.03) !important; }
.ed-cat3__accent {
  position: absolute !important;
  inset-inline-start: 0 !important;
  top: 0 !important;
  width: 78px !important;
  height: 78px !important;
  background: linear-gradient(135deg, #F47B00 0%, #C65A0A 100%) !important;
  clip-path: polygon(0 0, 100% 0, 0 100%) !important;
  opacity: .95 !important;
}
.ed-cat3__panel {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 112px !important;
  padding: 18px !important;
  background: linear-gradient(160deg, #0D2942 0%, #09213A 100%) !important;
}
.ed-cat3__copy { display: block !important; min-width: 0 !important; }
.ed-cat3__name {
  display: block !important;
  color: #FFFFFF !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-wrap: balance !important;
  overflow-wrap: anywhere !important;
}
.ed-cat3__desc {
  display: block !important;
  margin-top: 6px !important;
  color: #AFC4DD !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
}
.ed-cat3__arrow {
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
  display: grid !important;
  place-items: center !important;
  background: #F47B00 !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
}
.ed-cat3__arrow svg { width: 20px !important; height: 20px !important; fill: none !important; stroke: currentColor !important; stroke-width: 2.2 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
[dir="rtl"] .ed-cat3__arrow svg,
html[dir="rtl"] .ed-cat3__arrow svg { transform: scaleX(-1) !important; }
.ed-cats-v3__foot { text-align: center !important; margin-top: 34px !important; }
.ed-cats-v3__all {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  min-height: 48px !important;
  padding: 10px 24px !important;
  background: #FFFFFF !important;
  color: #C65A0A !important;
  border: 1px solid #C65A0A !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: background .18s ease, color .18s ease, transform .18s ease !important;
}
.ed-cats-v3__all svg { width: 18px !important; height: 18px !important; fill: none !important; stroke: currentColor !important; stroke-width: 1.9 !important; }
.ed-cats-v3__all:hover { background: #FFF1E5 !important; transform: translateY(-2px) !important; }
.ed-cats-v3__all:focus-visible { outline: 3px solid #F47B00 !important; outline-offset: 3px !important; }

@media (max-width: 1180px) {
  .ed-cats-v3__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  body.home .ed-cats-v3 { padding: 40px 0 48px !important; }
  .ed-cats-v3__head { margin-bottom: 26px !important; }
  .ed-cats-v3__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .ed-cat3 { border-radius: 14px !important; }
  .ed-cat3__panel { min-height: 96px !important; padding: 12px !important; gap: 8px !important; }
  .ed-cat3__name { font-size: 14px !important; }
  .ed-cat3__desc { font-size: 10.5px !important; line-height: 1.45 !important; margin-top: 4px !important; }
  .ed-cat3__arrow { flex-basis: 32px !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; }
  .ed-cat3__arrow svg { width: 17px !important; height: 17px !important; }
  .ed-cat3__accent { width: 54px !important; height: 54px !important; }
}
@media (max-width: 380px) {
  .ed-cats-v3__grid { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-cat3, .ed-cat3__media img, .ed-cats-v3__all { transition: none !important; }
  .ed-cat3:hover, .ed-cat3:hover .ed-cat3__media img, .ed-cats-v3__all:hover { transform: none !important; }
}

/* ZamZam wordmark — fill the brand frame like the other logos */
.dawlya-brand-logo[alt*="ZamZam"] { width: 126px !important; height: auto !important; max-width: none !important; object-fit: contain !important; }
.ed-brand img[alt*="ZamZam"] { height: 52px !important; width: auto !important; }

/* ===================================================================
   LAUNCH WELCOME POPUP — scoped .edlp
   =================================================================== */
.edlp { position: fixed; inset: 0; z-index: 1000000; display: grid; place-items: center; padding: 20px; }
.edlp[hidden] { display: none !important; }
.edlp__backdrop { position: absolute; inset: 0; background: rgba(4,18,35,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
body.edlp-open { overflow: hidden !important; }
.edlp__card {
  position: relative; z-index: 1;
  width: min(1040px, calc(100% - 24px));
  height: min(600px, calc(100dvh - 40px));
  overflow: hidden;
  background: linear-gradient(160deg, #0D2942 0%, #09213A 100%);
  border: 1px solid rgba(232,201,149,.28);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.edlp__close {
  position: absolute; left: 14px; top: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #FFFFFF; border: 0; color: #09213A; cursor: pointer;
}
.edlp__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.edlp__grid { display: grid; grid-template-columns: 46% 54%; height: 100%; direction: ltr; }
.edlp__visual { position: relative; height: 100%; overflow: hidden; background: #09213A; }
.edlp__art { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.edlp__art--mobile { display: none; }
.edlp__content {
  direction: rtl;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 12px;
  padding: 38px 42px;
  color: #FFFFFF;
}
.edlp__logo { width: 190px; height: auto; object-fit: contain; filter: brightness(0) invert(1); margin-bottom: 4px; }
.edlp__ribbon {
  display: inline-block; margin: 0;
  padding: 9px 18px;
  background: linear-gradient(90deg, #F47B00, #C65A0A);
  color: #FFFFFF; font-size: 14px; font-weight: 900;
  transform: skewX(-7deg);
  box-shadow: 0 8px 20px rgba(198,90,10,.32);
}
.edlp__title { margin: 0; font-size: clamp(30px, 3.4vw, 46px); font-weight: 900; line-height: 1.22; text-wrap: balance; }
.edlp__title span { color: #E8C995; }
.edlp__support { margin: 0; max-width: 44ch; font-size: 13.5px; line-height: 1.75; color: rgba(255,255,255,.78); }
.edlp__discount { display: flex; align-items: center; gap: 10px; background: #FFFFFF; padding: 6px 18px; border-radius: 4px; transform: rotate(-2deg); }
.edlp__pct { font-size: clamp(34px, 4vw, 52px); font-weight: 900; color: #C65A0A; line-height: 1.1; }
.edlp__until { font-size: 15px; font-weight: 800; color: #0D2942; }
.edlp__conditions { margin: 0; max-width: 46ch; font-size: 11px; line-height: 1.6; color: rgba(232,201,149,.8); }
.edlp__benefits { display: flex; align-items: flex-start; gap: 18px; margin-top: 2px; flex-wrap: wrap; }
.edlp__benefits span { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 88px; text-align: center; font-size: 10.5px; font-weight: 700; line-height: 1.45; color: rgba(255,255,255,.85); }
.edlp__benefits svg { width: 26px; height: 26px; fill: none; stroke: #F47B00; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.edlp__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 10px 28px; margin-top: 6px;
  background: #F47B00; color: #FFFFFF; border-radius: 999px;
  font-size: 16px; font-weight: 900; text-decoration: none;
  box-shadow: 0 10px 26px rgba(244,123,0,.3);
  transition: transform .18s ease, background .18s ease;
}
.edlp__cta svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }
html[dir="rtl"] .edlp__cta svg { transform: none; }
.edlp__cta:hover { transform: translateY(-2px); background: #C65A0A; }
.edlp__close:focus-visible, .edlp__cta:focus-visible, .edlp__dismiss:focus-visible { outline: 3px solid #E8C995; outline-offset: 3px; }
.edlp__dismiss { background: none; border: 0; color: rgba(255,255,255,.72); font-size: 12px; cursor: pointer; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.edlp__dismiss:hover { color: #FFFFFF; }

@media (max-width: 900px) {
  .edlp { padding: 12px; }
  .edlp__card { width: calc(100% - 24px); height: auto; max-height: 90dvh; overflow-y: auto; border-radius: 16px; }
  .edlp__grid { display: flex; flex-direction: column; }
  .edlp__visual { height: 220px; flex: 0 0 auto; }
  .edlp__art--desktop { display: none; }
  .edlp__art--mobile { display: block; }
  .edlp__content { padding: 22px 20px 26px; align-items: stretch; gap: 10px; }
  .edlp__logo { width: 150px; }
  .edlp__title { font-size: 30px; }
  .edlp__support { font-size: 13px; }
  .edlp__benefits { gap: 8px; justify-content: space-between; }
  .edlp__benefits span { width: 30%; font-size: 9.5px; }
  .edlp__cta { width: 100%; }
  .edlp__close { left: 10px; top: 10px; }
}
@media (max-width: 380px) {
  .edlp__visual { height: 180px; }
  .edlp__content { padding: 18px 14px 22px; }
  .edlp__benefits span { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .edlp__cta { transition: none !important; }
  .edlp__cta:hover { transform: none !important; }
}

/* popup refinements */
.edlp .edlp__title { color: #FFFFFF !important; }
.edlp__logo { filter: none !important; }
.edlp__card { height: min(620px, calc(100dvh - 40px)) !important; }
.edlp__content { gap: 8px !important; }
.edlp__title { font-size: clamp(30px, 3vw, 40px) !important; }
.edlp__support { font-size: 12.5px !important; line-height: 1.6 !important; }
.edlp__conditions { font-size: 10px !important; }
.edlp__benefits span { font-size: 10px !important; }
@media (max-width: 900px) {
  .edlp__card { height: auto !important; max-height: 90dvh !important; }
  .edlp__title { font-size: 28px !important; }
}

/* brand cards on /brands/ are links */
a.dawlya-brand-card { display: block !important; text-decoration: none !important; color: inherit !important; transition: transform .2s ease, border-color .2s ease !important; }
a.dawlya-brand-card:hover { transform: translateY(-3px) !important; border-color: #F47B00 !important; }
a.dawlya-brand-card:focus-visible { outline: 3px solid #F47B00 !important; outline-offset: 3px !important; }

/* New arrivals badge */
.ed-new-wrap { position: relative; }
.ed-new-badge { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; z-index: 2; background: #F47B00; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }

/* Special offers section */
.ed-offers { background: linear-gradient(160deg,#0D2942 0%,#09213A 100%) !important; }
.ed-sec-head--light .ed-sec-title, .ed-offers .ed-sec-title { color: #FFFFFF !important; }
.ed-offers .ed-sec-sub { color: rgba(255,255,255,.78) !important; }
.ed-sec-link--light { color: #E8C995 !important; border-color: rgba(232,201,149,.5) !important; }
.ed-sec-link--light:hover { background: rgba(244,123,0,.16) !important; color: #FFFFFF !important; }
.ed-offers__empty { padding: 44px 20px; text-align: center; color: #E8C995; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; font-size: 18px; font-weight: 800; }

/* Product comparison */
.cmp-btn { display: inline-flex; align-items: center; justify-content: center; margin: 8px; padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 700; color: #C65A0A; background: #FFF1E5; border: 1px solid #F2C9A5; border-radius: 8px; cursor: pointer; }
.cmp-btn.is-active { background: #C65A0A; color: #fff; }
.cmp-btn--single { margin: 16px 0 0; }
.cmp-bar { position: fixed; inset-block-end: 18px; inset-inline-start: 18px; z-index: 900000; display: none; align-items: center; gap: 8px; background: #0D2942; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 8px 6px 6px; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.cmp-bar.is-visible { display: flex; }
.cmp-bar button { border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.cmp-bar__open { background: #F47B00; color: #fff; }
.cmp-bar__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-inline-end: 6px; border-radius: 50%; background: #fff; color: #C65A0A; font-size: 12px; }
.cmp-bar__clear { background: rgba(255,255,255,.12); color: #fff; }
.cmp-modal { position: fixed; inset: 0; z-index: 950000; display: grid; place-items: center; padding: 16px; }
.cmp-modal[hidden] { display: none !important; }
.cmp-modal__backdrop { position: absolute; inset: 0; background: rgba(4,18,35,.72); backdrop-filter: blur(3px); }
.cmp-modal__card { position: relative; z-index: 1; width: min(1100px, 100%); max-height: 88dvh; overflow: auto; background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.cmp-modal__close { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #0D2942; color: #fff; font-size: 20px; cursor: pointer; }
.cmp-modal h2 { margin: 0 0 18px; color: #0D2942; font-size: 24px; font-weight: 900; }
.cmp-modal__scroll { overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table th, .cmp-table td { border: 1px solid #E3E8EF; padding: 10px; text-align: start; vertical-align: top; min-width: 170px; }
.cmp-table thead th { background: #0D2942; color: #fff; }
.cmp-table thead img { display: block; width: 90px; height: 90px; object-fit: contain; margin: 0 auto 8px; background: #fff; border-radius: 8px; }
.cmp-remove { float: inline-start; border: 0; background: #F47B00; color: #fff; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; }
.cmp-btn:focus-visible, .cmp-bar button:focus-visible, .cmp-modal button:focus-visible { outline: 3px solid #F47B00; outline-offset: 2px; }

/* Fixed WhatsApp button */
.ed-wa-float { position: fixed; left: 20px; bottom: 26px; z-index: 50000; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25D366; color: #fff; box-shadow: 0 10px 26px rgba(37,211,102,.35); transition: transform .18s ease, box-shadow .18s ease; }
.ed-wa-float svg { width: 30px; height: 30px; fill: currentColor; }
.ed-wa-float:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 34px rgba(37,211,102,.45); }
.ed-wa-float:focus-visible { outline: 3px solid #0D2942; outline-offset: 3px; }
.ed-wa-float__tip { position: absolute; left: 66px; white-space: nowrap; background: #0D2942; color: #fff; font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 8px; opacity: 0; visibility: hidden; transition: opacity .16s ease; }
.ed-wa-float:hover .ed-wa-float__tip, .ed-wa-float:focus-visible .ed-wa-float__tip { opacity: 1; visibility: visible; }
@media (max-width: 700px) { .ed-wa-float { width: 48px; height: 48px; left: 12px; bottom: 96px; } .ed-wa-float svg { width: 26px; height: 26px; } .ed-wa-float__tip { display: none; } }
@media (prefers-reduced-motion: reduce) { .ed-wa-float { transition: none; } .ed-wa-float:hover { transform: none; } }
