/* ============================================================
   MODUL X1 — restilizare front-end peste Flatsome
   Tot CSS-ul e scopat sub body.modul-x1-active.
   Variabilele de culoare sunt suprascrise inline din setări.
   ============================================================ */

.modul-x1-active {
  --x1-navy-900: #0a1f37;
  --x1-navy-800: #0c2340;
  --x1-navy-700: #14365a;
  --x1-orange-500: #f7841a;
  --x1-orange-600: #e0720c;
  --x1-green-500: #6fae3f;
  --x1-green-600: #5c9433;
  --x1-green-50:  #edf2ec;
  --x1-cream-100: #f5efe2;
  --x1-cream-200: #efe6d2;
  --x1-red-500: #e23b3b;
  --x1-stock:   #2e9e5b;
  --x1-ink-900: #0f1b2d;
  --x1-ink-700: #33414f;
  --x1-ink-500: #6b7785;
  --x1-line:    #e6e9ee;
  --x1-bg:      #f6f7f9;
  --x1-card:    #ffffff;
  --x1-radius:   10px;
  --x1-radius-sm: 6px;
  --x1-radius-lg: 16px;
  --x1-shadow-sm: 0 1px 3px rgba(15,27,45,.06), 0 1px 2px rgba(15,27,45,.04);
  --x1-shadow-md: 0 6px 20px rgba(15,27,45,.08);
}

/* Ascunde header-ul temei când folosim header-ul Modul X1 */
.modx1-custom-header #header { display: none !important; }

/* Containerul nostru */
.modul-x1-active .modx1-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Resetări locale (containerele + tot ce e în interiorul modulelor noastre) — border-box ca să nu apară scroll orizontal */
.modul-x1-active .modx1-header, .modul-x1-active .modx1-header *,
.modul-x1-active .modx1-nav, .modul-x1-active .modx1-nav *,
.modul-x1-active .modx1-home, .modul-x1-active .modx1-home * { box-sizing: border-box; }
.modul-x1-active .modx1-home img { max-width: 100%; }

/* normalize pagina blank Flatsome pe homepage */
.modul-x1-active .page-blank .modx1-home,
.modul-x1-active .modx1-home { margin-top: 0; }

/* ============================================================ HEADER */
.modx1-header { background: var(--x1-header-bg, #fff); border-bottom: 1px solid var(--x1-line); font-family: inherit; }
.modx1-header-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 24px 0; min-height: 92px; }
.modx1-logo { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.modx1-logo b { font-size: 26px; font-weight: 800; letter-spacing: .04em; color: var(--x1-navy-800); }
.modx1-logo b span { color: var(--x1-orange-500); }
.modx1-logo small { font-size: 9px; letter-spacing: .18em; color: var(--x1-ink-500); font-weight: 600; margin-top: 4px; }

.modx1-search { display: flex; width: 100%; max-width: 640px; margin: 0 auto; justify-self: center; }
/* Logo imagine (propriu sau din Flatsome) */
.modx1-logo-img { display: inline-flex; align-items: center; }
.modx1-logo-img img { max-height: 56px; width: auto; height: auto; display: block; }
.modx1-search input { flex: 1; height: 46px; border: 1.5px solid var(--x1-search-border, var(--x1-line)); border-right: 0; border-radius: var(--x1-radius) 0 0 var(--x1-radius); padding: 0 18px; font-size: 14px; outline: none; background: #fff; }
.modx1-search input:focus { border-color: var(--x1-search-btn, var(--x1-navy-700)); }
.modx1-search button { width: 56px; background: var(--x1-search-btn, var(--x1-navy-800)); color: #fff; border: 0; border-radius: 0 var(--x1-radius) var(--x1-radius) 0; display: grid; place-items: center; cursor: pointer; }
.modx1-search button:hover { filter: brightness(.92); }

.modx1-actions { display: flex; align-items: center; gap: 26px; }
.modx1-action { display: flex; align-items: center; gap: 10px; color: var(--x1-ink-700); text-decoration: none; }
.modx1-action { color: var(--x1-action-text, var(--x1-ink-700)); }
.modx1-action .modx1-ic { color: var(--x1-action-icon, var(--x1-navy-800)); display: inline-flex; }
.modx1-action .modx1-lbl { display: flex; flex-direction: column; line-height: 1.2; }
.modx1-action .modx1-lbl b { font-size: 13px; font-weight: 700; color: var(--x1-action-text, var(--x1-ink-900)); }
.modx1-action .modx1-lbl small { font-size: 11px; color: var(--x1-action-text, var(--x1-ink-500)); opacity: .7; }
.modx1-cart { position: relative; }
.modx1-cart .modx1-ic { position: relative; }
.modx1-badge { position: absolute; top: -6px; left: 14px; background: var(--x1-orange-500); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; font-style: normal; }

/* ============================================================ NAV */
.modx1-nav { background: var(--x1-header-bg, #fff); border-bottom: 1px solid var(--x1-line); }
.modx1-nav-inner { display: flex; align-items: stretch; }
.modx1-allcat { position: relative; display: flex; align-items: center; gap: 12px; width: 260px; background: var(--x1-allcat-bg, var(--x1-navy-800)); color: var(--x1-allcat-text, #fff); font-weight: 700; font-size: 13px; letter-spacing: .03em; padding: 0 22px; height: 52px; border-radius: var(--x1-radius) var(--x1-radius) 0 0; white-space: nowrap; cursor: pointer; }
.modx1-burger { display: inline-grid; gap: 3px; }
.modx1-burger i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.modx1-menu { display: flex; align-items: center; gap: 4px; padding-left: 22px; list-style: none; margin: 0; }
.modx1-menu li { margin: 0; }
.modx1-menu a { padding: 0 16px; height: 52px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--x1-menu-link, var(--x1-ink-700)); border-bottom: 2px solid transparent; text-decoration: none; transition: color .15s, border-color .15s; }
.modx1-menu a:hover { color: var(--x1-navy-800); border-bottom-color: var(--x1-navy-800); }
.modx1-menu li.modx1-hot a, .modx1-menu a.modx1-hot { color: var(--x1-orange-500); }
.modx1-menu li.modx1-hot a:hover { border-bottom-color: var(--x1-orange-500); }

/* mega dropdown categorii */
.modx1-cat-dropdown { position: absolute; top: 100%; left: 0; width: 280px; background: #fff; border: 1px solid var(--x1-line); border-top: 0; border-radius: 0 0 var(--x1-radius) var(--x1-radius); box-shadow: var(--x1-shadow-md); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; z-index: 60; }
.modx1-allcat:hover .modx1-cat-dropdown, .modx1-allcat:focus-within .modx1-cat-dropdown, .modx1-allcat.open .modx1-cat-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.modx1-cat-dropdown ul { list-style: none; margin: 0; padding: 6px 0; }
.modx1-cat-dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 18px; font-size: 13.5px; font-weight: 500; color: var(--x1-ink-700); text-decoration: none; }
.modx1-cat-dropdown a:hover { background: #f7f9fc; color: var(--x1-navy-800); }
.modx1-cat-dropdown .modx1-ci { color: var(--x1-navy-700); display: inline-flex; }
.modx1-cat-dropdown .modx1-cn { flex: 1; }
.modx1-cat-dropdown .modx1-arrow { color: #c4ccd6; }

/* ============================================================ HOME GRID */
.modx1-home { color: var(--x1-ink-900); padding-bottom: 10px; }
.modx1-top-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; padding-top: 0; align-items: start; }
/* Fără sidebar (niciun meniu/categorie) → conținutul ocupă toată lățimea (nu se string bannerele) */
.modx1-top-grid.no-sidebar { grid-template-columns: 1fr; }
.modx1-top-grid.no-sidebar .modx1-main { padding-top: 22px; }

/* sidebar — se conectează direct sub butonul „TOATE CATEGORIILE" din nav (fără header duplicat) */
.modx1-sidebar { background: #fff; border: 1px solid var(--x1-line); border-top: 0; border-radius: 0 0 var(--x1-radius) var(--x1-radius); overflow: visible; box-shadow: var(--x1-shadow-sm); align-self: start; }
.modx1-sidebar-head { background: var(--x1-navy-800); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .03em; padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.modx1-sidebar-head .modx1-burger i { width: 16px; }
.modx1-cat-list { list-style: none; margin: 0; padding: 0; }
.modx1-cat-list li { border-bottom: 1px solid #f1f3f6; margin: 0; position: relative; }
.modx1-cat-list li:last-child { border-bottom: 0; }
.modx1-cat-list a { display: flex; align-items: center; gap: 13px; padding: 11px 18px; font-size: 13.5px; font-weight: 500; color: var(--x1-ink-700); text-decoration: none; transition: background .12s, color .12s; }
.modx1-cat-list a:hover { background: #f7f9fc; color: var(--x1-navy-800); }
.modx1-cat-list .modx1-ci { color: var(--x1-navy-700); flex: 0 0 20px; display: grid; place-items: center; }
.modx1-cat-list a:hover .modx1-ci { color: var(--x1-orange-500); }
.modx1-cat-list .modx1-cn { flex: 1; }
.modx1-cat-list .modx1-arrow { color: #c4ccd6; display: inline-flex; }
/* SVG propriu (custom) în sidebar / mega-meniu — forțăm dimensiunea */
.modx1-ci .modx1-customsvg { display: inline-flex; }
.modx1-ci .modx1-customsvg svg { width: 20px; height: 20px; display: block; }
.modx1-cat-special { margin: 8px; padding: 12px 14px; border-radius: var(--x1-radius-sm); background: linear-gradient(135deg, #eef4ff, #e6eefc); display: flex; align-items: center; gap: 12px; text-decoration: none; }
.modx1-cat-special .modx1-ci { color: var(--x1-navy-700); display: inline-flex; }
.modx1-cat-special b { display: block; font-size: 12.5px; color: var(--x1-navy-800); }
.modx1-cat-special small { font-size: 11px; color: var(--x1-ink-500); }

/* ---------- Mega-meniu eMAG: flyout cu subcategorii la hover ---------- */
.modx1-flyout {
  position: absolute; left: 100%; top: -1px; min-width: 620px; max-width: 820px;
  background: #fff; border: 1px solid var(--x1-line); border-left: 3px solid var(--x1-orange-500);
  border-radius: 0 var(--x1-radius) var(--x1-radius) 0; box-shadow: var(--x1-shadow-lg);
  padding: 22px 26px; min-height: calc(100% + 2px);
  opacity: 0; visibility: hidden; transform: translateX(6px); transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 80;
}
.modx1-cat-list > li.modx1-has-flyout:hover > .modx1-flyout,
.modx1-cat-dropdown > .modx1-cat-list > li.modx1-has-flyout:hover > .modx1-flyout { opacity: 1; visibility: visible; transform: none; }
.modx1-flyout-inner { columns: 3 200px; column-gap: 30px; }
.modx1-flyout-col { break-inside: avoid; margin-bottom: 18px; display: inline-block; width: 100%; }
.modx1-flyout-h { display: block; font-weight: 700; font-size: 13.5px; color: var(--x1-navy-800); margin-bottom: 9px; text-decoration: none; }
.modx1-flyout-h:hover { color: var(--x1-orange-500); }
.modx1-flyout-col ul { list-style: none; margin: 0; padding: 0; }
.modx1-flyout-col ul li { border: 0; }
.modx1-flyout-col ul a { display: block; padding: 4px 0; font-size: 13px; color: var(--x1-ink-500); text-decoration: none; }
.modx1-flyout-col ul a:hover { color: var(--x1-orange-500); }

/* main */
.modx1-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; padding-top: 22px; }

/* hero */
.modx1-hero { position: relative; border-radius: var(--x1-radius-lg); overflow: hidden; min-height: 330px; color: #fff; box-shadow: var(--x1-shadow-md); background: radial-gradient(circle at 75% 30%, var(--x1-hero-bg-l, #14365a), var(--x1-hero-bg, #0a1f37) 70%); display: flex; }
.modx1-hero-img { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(90deg, var(--x1-hero-bg, #0a1f37) 0%, transparent 100%), url("../img/hero-tools.svg"); background-size: cover, cover; background-position: center, right center; background-repeat: no-repeat, no-repeat; }
.modx1-hero-body { position: relative; z-index: 1; padding: 46px 48px; max-width: 60%; display: flex; flex-direction: column; justify-content: center; }
.modx1-hero h1 { font-size: 46px; line-height: 1.02; font-weight: 800; margin: 0 0 16px; letter-spacing: -.01em; color: var(--x1-hero-text, #fff); }
.modx1-hero h1 .modx1-or { color: var(--x1-orange-500); }
.modx1-hero p { font-size: 16px; color: var(--x1-hero-text, #c7d2de); opacity: .82; margin: 0 0 26px; max-width: 360px; }
.modx1-hero-dots { position: absolute; bottom: 18px; left: 48px; display: flex; gap: 8px; z-index: 2; }
.modx1-hero-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: background .2s, width .2s; }
.modx1-hero-dots i.on { width: 22px; border-radius: 4px; background: var(--x1-orange-500); }

/* butoane */
.modx1-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: var(--x1-radius-sm); font-weight: 700; font-size: 14px; letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 0; transition: transform .12s, background .15s; }
.modx1-btn:active { transform: translateY(1px); }
.modx1-btn-orange { background: var(--x1-orange-500); color: #fff; box-shadow: 0 6px 16px rgba(247,132,26,.35); }
.modx1-btn-orange:hover { background: var(--x1-orange-600); color: #fff; }
.modx1-btn-navy { background: var(--x1-navy-800); color: #fff; }
.modx1-btn-navy:hover { background: var(--x1-navy-700); color: #fff; }
.modx1-btn-green { background: var(--x1-green-500); color: #fff; box-shadow: 0 6px 16px rgba(111,174,63,.3); }
.modx1-btn-green:hover { background: var(--x1-green-600); color: #fff; }

/* promo cards */
.modx1-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.modx1-promo { border-radius: var(--x1-radius); padding: 24px 26px; position: relative; overflow: hidden; min-height: 150px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--x1-line); }
.modx1-promo.gray { background: var(--x1-promo1-bg, #eef1f5); }
.modx1-promo.green { background: var(--x1-promo2-bg, #edf2ec); }
.modx1-promo .modx1-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--x1-ink-500); text-transform: uppercase; margin-bottom: 6px; }
.modx1-promo h3 { font-size: 22px; font-weight: 800; margin: 0 0 4px; color: var(--x1-ink-900); }
.modx1-promo h3 em { font-style: normal; color: var(--x1-orange-500); }
.modx1-promo p { font-size: 13px; color: var(--x1-ink-500); margin: 0 0 16px; }
.modx1-promo .modx1-btn { align-self: flex-start; padding: 10px 20px; }
.modx1-promo-ill { position: absolute; right: -10px; bottom: -10px; opacity: .9; z-index: 0; }
.modx1-promo.gray .modx1-promo-ill { color: #b9c3cf; }
.modx1-promo.green .modx1-promo-ill { color: #aecb97; }
.modx1-promo > *:not(.modx1-promo-ill) { position: relative; z-index: 1; }

/* banner */
.modx1-banner { margin-top: 24px; border-radius: var(--x1-radius-lg); overflow: hidden; min-height: 230px; display: flex; align-items: center; border: 1px solid var(--x1-cream-200); background-color: var(--x1-banner-bg, #f5efe2); background-image: linear-gradient(90deg, var(--x1-banner-bg, #f5efe2) 0%, transparent 72%), url("../img/banner-garden.svg"); background-size: cover, cover; background-position: center, right center; background-repeat: no-repeat, no-repeat; }
.modx1-banner-body { padding: 36px 44px; max-width: 50%; }
.modx1-banner .modx1-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--x1-green-600); text-transform: uppercase; margin-bottom: 10px; }
.modx1-banner h2 { font-size: 34px; line-height: 1.08; font-weight: 800; margin: 0 0 22px; color: var(--x1-navy-900); max-width: 320px; }

/* sections */
.modx1-section { margin-top: 38px; }
.modx1-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modx1-section-head h2 { font-size: 24px; font-weight: 800; margin: 0; color: var(--x1-cat-title, var(--x1-ink-900)); }
.modx1-link { font-size: 13px; font-weight: 700; color: var(--x1-navy-800); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.modx1-link:hover { color: var(--x1-orange-500); }
.modx1-arrows { display: flex; gap: 8px; }
.modx1-arrows button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--x1-line); display: grid; place-items: center; color: var(--x1-ink-700); background: #fff; cursor: pointer; }
.modx1-arrows button:hover { border-color: var(--x1-navy-800); color: var(--x1-navy-800); }

/* tabs */
.modx1-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--x1-line); margin-bottom: 20px; }
.modx1-tabs button { padding: 0 2px 12px; font-size: 14px; font-weight: 600; color: var(--x1-ink-500); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; cursor: pointer; }
.modx1-tabs button.on { color: var(--x1-navy-800); border-bottom-color: var(--x1-orange-500); }
.modx1-products.modx1-tabpane { display: none; }
.modx1-products.modx1-tabpane.on { display: grid; }

/* products grid + card */
.modx1-products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.modx1-card { background: var(--x1-card); border: 1px solid var(--x1-line); border-radius: var(--x1-radius); overflow: hidden; position: relative; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s; }
.modx1-card:hover { box-shadow: var(--x1-shadow-md); transform: translateY(-3px); border-color: #d9dee6; }
.modx1-card-media-wrap { position: relative; }
.modx1-card-media { aspect-ratio: 1/1; background: #f3f5f8; display: grid; place-items: center; text-decoration: none; }
.modx1-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.modx1-card-media .modx1-ph { color: #9aa7b5; width: 64px; height: 64px; }
/* Wrapper de poziționare pentru butonul YITH (stilizat de tema Flatsome) */
.modx1-card-wish { position: absolute; top: 10px; right: 10px; z-index: 3; margin: 0; }
.modx1-card-wish .wishlist-popup { display: none !important; } /* doar declanșator pentru AJAX YITH */
.modx1-card-wish .yith-wcwl-add-to-wishlist { margin: 0; }
/* Fallback minim dacă stilul temei pentru .wishlist-button nu e încărcat */
.modx1-card-wish .wishlist-button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--x1-shadow-sm); border: 0; color: var(--x1-ink-500); cursor: pointer; padding: 0; }
.modx1-card-wish .wishlist-button:hover { color: var(--x1-red-500); }
.modx1-card-wish .wishlist-button.wishlist-added { color: var(--x1-red-500); }
.modx1-discount { position: absolute; top: 10px; left: 10px; background: var(--x1-red-500); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; z-index: 2; }
.modx1-card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.modx1-card-body .modx1-cat { font-size: 11px; color: var(--x1-ink-500); }
.modx1-card-body h4 { font-size: 13.5px; font-weight: 700; margin: 0; color: var(--x1-ink-900); line-height: 1.3; }
.modx1-card-body h4 a { color: inherit; text-decoration: none; }
.modx1-card-body h4 a:hover { color: var(--x1-navy-800); }
.modx1-sub { font-size: 12px; color: var(--x1-ink-500); }
.modx1-rating { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--x1-ink-500); }
.modx1-rating .modx1-stars { color: var(--x1-star, #f5a623); letter-spacing: 1px; }
.modx1-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.modx1-price .modx1-now { font-size: 17px; font-weight: 800; color: var(--x1-ink-900); }
.modx1-price .modx1-now del { font-size: 12px; font-weight: 500; color: var(--x1-ink-500); }
.modx1-price .modx1-old { font-size: 12px; color: var(--x1-ink-500); text-decoration: line-through; }
.modx1-price .modx1-off { font-size: 12px; font-weight: 700; color: var(--x1-red-500); }
.modx1-instock { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--x1-stock); margin-top: 4px; }
.modx1-instock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--x1-stock); }

/* ============================================================ RESPONSIVE */
@media (max-width: 1080px) {
  .modul-x1-active .modx1-products { grid-template-columns: repeat(3, 1fr); }
  .modul-x1-active .modx1-top-grid { grid-template-columns: 260px 1fr; }
}
@media (max-width: 860px) {
  .modul-x1-active .modx1-header-main { grid-template-columns: auto 1fr; gap: 16px; }
  .modul-x1-active .modx1-search { grid-column: 1 / -1; order: 3; }
  .modul-x1-active .modx1-action .modx1-lbl { display: none; }
  .modul-x1-active .modx1-top-grid { grid-template-columns: 1fr; }
  .modul-x1-active .modx1-sidebar { display: none; }
  .modul-x1-active .modx1-allcat { width: auto; }
  .modul-x1-active .modx1-main { padding-top: 18px; }
  .modul-x1-active .modx1-promos { grid-template-columns: 1fr; }
  .modul-x1-active .modx1-products { grid-template-columns: repeat(2, 1fr); }
  .modul-x1-active .modx1-hero-body { max-width: 100%; }
  .modul-x1-active .modx1-hero h1 { font-size: 34px; }
  .modul-x1-active .modx1-banner-body { max-width: 80%; }
  .modul-x1-active .modx1-menu { overflow-x: auto; }
}
