/* ==========================================================================
   MATRIX ONLINE v2.0 — design system
   Structură: 1 Tokens · 2 Base · 3 Componente · 4 Header · 5 Homepage
              6 WooCommerce (PLP, PDP, cos, checkout) · 7 Footer · 8 Responsive
   Grid de spațiere: 8px. Breakpoints: 640 (mobil) · 1024 (tabletă) · 1200 (desktop)
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* Culori */
  --primary: #0052CC;
  --primary-dark: #003d99;
  --primary-soft: #e8f0fd;
  --navy: #08142d;            /* fundalul logo-ului – folosit pentru topbar/header */
  --ink: #1a1a1a;             /* text */
  --muted: #6C757D;           /* text secundar / secundar */
  --accent: #FF6B35;          /* CTA, promoții */
  --accent-dark: #e85a24;     /* hover CTA */
  --accent-text: #c2410c;     /* preț / text portocaliu pe alb (contrast AA) */
  --on-accent: #1a1a1a;       /* text pe butoane portocalii (contrast AA) */
  --bg: #ffffff;
  --bg-alt: #F8F9FA;
  --line: #e3e6ea;
  --success: #15803d;
  --danger: #b91c1c;
  --star: #f5a623;

  /* Spațiere (8px) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px;

  /* Rază, umbre, tranziții */
  --r-sm: 4px; --r-md: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .10);
  --t: 200ms ease;

  /* Tipografie */
  --font: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --container: 1200px;
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { margin: 0 0 var(--s2); color: var(--ink); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(26px, 3.5vw, 32px); }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 var(--s2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { padding: 0; margin: 0; list-style: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s3); }
.section { padding: var(--s8) 0; }
.section-alt { background: var(--bg-alt); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--ink); color: #fff; padding: var(--s1) var(--s2); }
.skip-link:focus { left: var(--s1); top: var(--s1); color: #fff; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.icon { flex: none; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* 3. COMPONENTE ------------------------------------------------------------ */
.btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 40px; padding: 8px var(--s3); border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer;
  background: var(--primary); color: #fff; transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background: var(--primary-dark); color: #fff; }
.btn-lg { min-height: 48px; padding: 12px var(--s4); font-size: 16px; }
.btn-accent, .woocommerce a.button.add_to_cart_button, .woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce button.single_add_to_cart_button, .woocommerce a.checkout-button, .woocommerce #place_order {
  background: var(--accent); color: var(--on-accent);
}
.btn-accent:hover, .woocommerce a.button.add_to_cart_button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.woocommerce button.single_add_to_cart_button:hover, .woocommerce a.checkout-button:hover, .woocommerce #place_order:hover {
  background: var(--accent-dark); color: var(--on-accent); transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s4); }
.section-head h1, .section-head h2 { margin: 0; }
.text-link { font-weight: 600; font-size: 14px; white-space: nowrap; }

input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="password"], input[type="number"], select, textarea,
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  width: 100%; min-height: 40px; padding: 8px 12px; background: #fff; border: 1px solid #c9ced4; border-radius: var(--r-sm); transition: border-color var(--t), box-shadow var(--t);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 82, 204, .18); }
.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: var(--danger); }
.woocommerce form .form-row.woocommerce-validated input.input-text { border-color: var(--success); }

.toast { position: fixed; right: var(--s3); bottom: var(--s3); z-index: 300; max-width: calc(100% - 48px); padding: 12px var(--s3); background: var(--ink); color: #fff; border-left: 4px solid var(--success); border-radius: var(--r-md); box-shadow: var(--shadow-md); font-weight: 500; transform: translateY(24px); opacity: 0; pointer-events: none; transition: transform 300ms ease, opacity 300ms ease; }
.toast.show { transform: none; opacity: 1; }
.toast.error { border-left-color: var(--danger); }

.newsletter-form { display: flex; flex-wrap: wrap; gap: var(--s1); position: relative; }
.newsletter-form input[type="email"] { flex: 1 1 200px; }
.form-msg { flex-basis: 100%; margin: 0; font-size: 13px; }
.form-msg.ok { color: #86efac; } .form-msg.err { color: #fca5a5; }

/* 4. HEADER ---------------------------------------------------------------- */
.topbar { background: #050d1f; color: #cbd5e1; font-size: 13px; }
.topbar-inner { display: flex; justify-content: center; gap: var(--s4); padding-top: 6px; padding-bottom: 6px; }
.topbar-inner span { display: inline-flex; align-items: center; gap: 6px; }

.site-header { position: sticky; top: 0; z-index: 100; background: #fff; transition: box-shadow var(--t); }
.site-header.scrolled { box-shadow: var(--shadow-md); }
body.admin-bar .site-header { top: 32px; }
.header-main { background: var(--navy); }
.header-inner { display: flex; align-items: center; gap: var(--s3); min-height: 72px; }
.brand { display: block; flex: none; line-height: 0; }
.brand-logo { width: 200px; height: auto; }
.mobile-menu-toggle { display: none; background: transparent; border: 0; color: #fff; padding: var(--s1); }

.header-search { position: relative; flex: 1; max-width: 640px; }
.header-search input[type="search"] { height: 44px; padding: 0 56px 0 var(--s2); border: 0; border-radius: var(--r-md); font-size: 15px; -webkit-appearance: none; }
.header-search button { position: absolute; right: 4px; top: 4px; width: 48px; height: 36px; border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: background var(--t); }
.header-search button:hover { background: var(--accent-dark); }
.search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 120; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); overflow: hidden; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-item:last-child { border-bottom: 0; }
.search-item:hover, .search-item:focus { background: var(--bg-alt); color: var(--ink); }
.search-item img { width: 40px; height: 40px; object-fit: contain; }
.search-name { flex: 1; font-size: 14px; line-height: 1.3; }
.search-price { font-weight: 700; color: var(--accent-text); font-size: 14px; white-space: nowrap; }
.search-empty { padding: var(--s2); color: var(--muted); font-size: 14px; }

.header-actions { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.action-link { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 6px 8px; color: #fff; font-size: 12px; border-radius: var(--r-sm); }
.action-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.cart-count { position: absolute; top: 0; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--accent); color: var(--on-accent); border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center; }

.main-nav { background: #fff; border-bottom: 1px solid var(--line); }
.main-nav-list { display: flex; gap: var(--s1); }
.main-nav-list a { display: block; padding: 12px var(--s2); color: var(--ink); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; }
.main-nav-list a:hover, .main-nav-list .current-menu-item > a { color: var(--primary); border-bottom-color: var(--primary); }
.main-nav-list .nav-promo { margin-left: auto; }
.main-nav-list .nav-promo a { color: var(--accent-text); }

/* 5. HOMEPAGE -------------------------------------------------------------- */
.hero { position: relative; height: clamp(380px, 52vw, 560px); background: var(--navy); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 500ms ease; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,13,31,.92) 0%, rgba(5,13,31,.65) 45%, rgba(5,13,31,.05) 80%); }
.hero-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; color: #fff; }
.hero-content h1 { color: #fff; font-size: clamp(28px, 4.4vw, 48px); max-width: 560px; margin-bottom: var(--s2); }
.hero-content p { max-width: 460px; font-size: 17px; color: #dbe4f0; margin-bottom: var(--s3); }
.hero-tag { display: inline-block; margin-bottom: var(--s2); padding: 4px 12px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s2); }
.hero-controls { position: absolute; z-index: 2; bottom: var(--s3); }
.slide-dots { display: flex; gap: var(--s1); }
.slide-dot { width: 32px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.4); transition: background var(--t), width var(--t); }
.slide-dot.active { width: 48px; background: var(--accent); }

.benefits { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); padding-top: var(--s3); padding-bottom: var(--s3); }
.benefit { display: flex; align-items: center; gap: var(--s2); color: var(--primary); }
.benefit strong, .benefit span { display: block; }
.benefit strong { color: var(--ink); font-size: 14px; }
.benefit span { color: var(--muted); font-size: 13px; }

.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); }
.category-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s1); padding: var(--s4) var(--s2); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); transition: box-shadow var(--t), transform var(--t), border-color var(--t); }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); color: var(--ink); }
.category-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--s1); border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.category-card h3 { margin: 0; font-size: 16px; }
.category-more { color: var(--muted); font-size: 13px; }

.newsletter-band { background: var(--navy); color: #fff; padding: var(--s6) 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.newsletter-inner h2 { color: #fff; margin-bottom: 4px; }
.newsletter-inner p { margin: 0; color: #cbd5e1; }
.newsletter-band .newsletter-form { flex: 1 1 360px; max-width: 480px; }

/* 6. WOOCOMMERCE ----------------------------------------------------------- */
.woocommerce-page .section-head, .woocommerce-breadcrumb { font-size: 13px; color: var(--muted); }
.woocommerce-breadcrumb { margin-bottom: var(--s3); }
.woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce-products-header__title, .product_title { font-size: clamp(24px, 3vw, 32px); }

/* Notificări */
.woocommerce-message, .woocommerce-info, .woocommerce-error { margin: 0 0 var(--s3); padding: 12px var(--s2); list-style: none; background: var(--bg-alt); border-left: 4px solid var(--primary); border-radius: var(--r-sm); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1); }
.woocommerce-message { border-color: var(--success); } .woocommerce-error { border-color: var(--danger); }

/* PLP: layout cu filtre în stânga */
.shop-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.filter-toggle { display: none; grid-column: 1 / -1; }
.shop-filters { position: sticky; top: 140px; padding: var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.filter-widget { padding-bottom: var(--s3); margin-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.filter-widget:last-child { margin: 0; padding: 0; border: 0; }
.filter-title { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: var(--s2); }
.shop-filters li { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.shop-filters li a { color: var(--ink); } .shop-filters li a:hover, .shop-filters li.chosen a { color: var(--primary); font-weight: 600; }
.shop-filters .count { color: var(--muted); }
.shop-filters .price_slider_wrapper .ui-slider { height: 6px; margin: var(--s2) 8px var(--s3); background: var(--line); border-radius: 3px; position: relative; }
.shop-filters .ui-slider .ui-slider-range { background: var(--primary); position: absolute; height: 100%; border-radius: 3px; }
.shop-filters .ui-slider .ui-slider-handle { position: absolute; top: -6px; width: 18px; height: 18px; margin-left: -9px; background: #fff; border: 2px solid var(--primary); border-radius: 50%; cursor: pointer; }
.shop-filters .price_slider_amount { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); font-size: 13px; }
.shop-filters .price_slider_amount .button { min-height: 32px; padding: 4px var(--s2); }

.woocommerce-result-count { float: left; margin: 0 0 var(--s3); line-height: 40px; color: var(--muted); font-size: 14px; }
.woocommerce-ordering { float: right; margin: 0 0 var(--s3); }
.woocommerce-ordering select { width: auto; }

/* Card produs (shop, homepage, produse similare) */
.woocommerce ul.products, ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); clear: both; }
.matrix-featured-products ul.products, .woocommerce .related ul.products, .woocommerce .upsells ul.products, .woocommerce .cross-sells ul.products { grid-template-columns: repeat(4, 1fr); }
/* Reset pentru stilurile implicite WooCommerce (float / width %) care strică grila */
.woocommerce ul.products::before, .woocommerce ul.products::after, ul.products::before, ul.products::after { content: none !important; display: none !important; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product, .woocommerce ul.products[class*="columns-"] li.product, .woocommerce-page ul.products[class*="columns-"] li.product { float: none !important; width: auto !important; max-width: none !important; margin: 0 !important; clear: none !important; min-width: 0; }
.woocommerce ul.products li.product a img, .woocommerce-page ul.products li.product a img { width: 100% !important; height: auto; aspect-ratio: 1 / 1; object-fit: contain; display: block; background: #fff; }
.woocommerce ul.products li.product .onsale, ul.products li.product .onsale { position: absolute; top: 12px; left: 12px; right: auto; margin: 0; min-height: 0; min-width: 0; padding: 4px 10px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); font-size: 12px; font-weight: 700; line-height: 1.4; z-index: 2; }
ul.products li.product { position: relative; display: flex; flex-direction: column; margin: 0; padding: var(--s2); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); transition: box-shadow var(--t), border-color var(--t); }
ul.products li.product:hover { box-shadow: var(--shadow-md); border-color: #cfd6de; }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; color: var(--ink); }
ul.products li.product a img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: var(--s2); border-radius: var(--r-sm); transition: transform 300ms ease; }
ul.products li.product:hover a img { transform: scale(1.05); }
ul.products li.product .woocommerce-loop-product__title { margin: 0 0 var(--s1); padding: 0; font-size: 15px; font-weight: 600; line-height: 1.35; min-height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.star-rating { position: relative; display: block; height: 16px; width: 80px; margin: 0 0 var(--s1); overflow: hidden; font-size: 14px; line-height: 16px; letter-spacing: 2px; font-family: star; }
.star-rating::before { content: "\2605\2605\2605\2605\2605"; color: #d6dae0; position: absolute; left: 0; top: 0; font-family: inherit; }
.star-rating span { position: absolute; left: 0; top: 0; overflow: hidden; padding-top: 1.5em; }
.star-rating span::before { content: "\2605\2605\2605\2605\2605"; position: absolute; left: 0; top: 0; color: var(--star); }
.price, ul.products li.product .price { display: block; margin: var(--s1) 0; color: var(--accent-text); font-size: 18px; font-weight: 700; }
.price del { color: var(--muted); font-size: 14px; font-weight: 400; margin-right: 6px; opacity: 1; }
.price ins { text-decoration: none; }
.onsale { position: absolute; top: 12px; left: 12px; z-index: 2; min-width: 0; min-height: 0; padding: 4px 10px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); font-size: 12px; font-weight: 700; line-height: 1.4; }
.stock-indicator { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s2); font-size: 13px; font-weight: 500; }
.stock-indicator::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.in-stock { color: var(--success); } .out-of-stock { color: var(--danger); }
ul.products li.product .button { width: 100%; margin-top: auto; }
ul.products li.product .added_to_cart { display: block; margin-top: var(--s1); text-align: center; font-size: 13px; font-weight: 600; }
.woocommerce-pagination { margin-top: var(--s4); text-align: center; }
.woocommerce-pagination ul { display: inline-flex; gap: 4px; }
.woocommerce-pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); }
.woocommerce-pagination .page-numbers.current, .woocommerce-pagination .page-numbers:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* PDP */
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.woocommerce div.product .woocommerce-product-gallery { position: relative; margin: 0; }
.woocommerce div.product .woocommerce-product-gallery__wrapper { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.woocommerce div.product .woocommerce-product-gallery img { width: 100%; }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 5; width: 36px; height: 36px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); font-size: 0; }
.woocommerce-product-gallery__trigger::before { content: "\1F50D"; font-size: 16px; }
.flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s1); margin-top: var(--s1); }
.flex-control-thumbs li img { border: 2px solid transparent; border-radius: var(--r-sm); opacity: .7; cursor: pointer; transition: opacity var(--t), border-color var(--t); }
.flex-control-thumbs li img:hover, .flex-control-thumbs li img.flex-active { opacity: 1; border-color: var(--primary); }
.woocommerce div.product .summary { margin: 0; }
.woocommerce div.product .summary .price { font-size: 28px; margin: var(--s2) 0; }
.woocommerce div.product .woocommerce-product-rating { display: flex; align-items: center; gap: var(--s1); margin-bottom: var(--s1); }
.woocommerce div.product .woocommerce-product-rating .star-rating { margin: 0; }
.woocommerce-product-details__short-description { color: #3d4349; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s3) 0; }
.woocommerce div.product form.cart .quantity input.qty { width: 80px; text-align: center; }
.woocommerce div.product form.cart .single_add_to_cart_button { flex: 1 1 220px; min-height: 52px; font-size: 17px; }
.woocommerce div.product form.cart table.variations { width: 100%; margin-bottom: var(--s2); }
.delivery-note { display: flex; align-items: center; gap: var(--s1); margin: 0 0 var(--s2); padding: 12px var(--s2); background: var(--bg-alt); border-radius: var(--r-md); color: #3d4349; font-size: 14px; }
.delivery-note .icon { color: var(--primary); }
.product_meta { padding-top: var(--s2); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.product_meta > span { display: block; margin-bottom: 4px; }

.woocommerce-tabs { grid-column: 1 / -1; margin-top: var(--s2); }
.woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: 0; border-bottom: 2px solid var(--line); }
.woocommerce-tabs ul.tabs li a { display: block; padding: 12px var(--s3); margin-bottom: -2px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.woocommerce-tabs ul.tabs li.active a, .woocommerce-tabs ul.tabs li a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.woocommerce-tabs .panel { padding: var(--s4) 0; }
.woocommerce-tabs .panel > h2:first-child { font-size: 20px; }
table.shop_attributes { width: 100%; border-collapse: collapse; }
table.shop_attributes th, table.shop_attributes td { padding: 12px var(--s2); border-bottom: 1px solid var(--line); text-align: left; font-style: normal; }
table.shop_attributes th { width: 32%; font-weight: 600; background: var(--bg-alt); }
table.shop_attributes td p { margin: 0; }
#reviews #comments ol.commentlist { margin: 0 0 var(--s4); }
#reviews li.review { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
#reviews .comment_container { display: flex; gap: var(--s2); }
#reviews .comment_container img.avatar { width: 48px; height: 48px; border-radius: 50%; }
#reviews .meta { margin: 4px 0; color: var(--muted); font-size: 13px; }
p.stars a { color: var(--star); font-size: 20px; letter-spacing: 2px; }
.related.products, .upsells.products, .cross-sells { grid-column: 1 / -1; margin-top: var(--s4); }
.related.products > h2, .upsells.products > h2, .cross-sells > h2 { margin-bottom: var(--s3); }

/* Coș și checkout */
table.shop_table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
table.shop_table th, table.shop_table td { padding: var(--s2); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.shop_table thead th { background: var(--bg-alt); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.shop_table img { width: 72px; height: 72px; object-fit: contain; }
table.shop_table td.product-name a { color: var(--ink); font-weight: 600; }
table.shop_table td.product-remove a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--danger); font-size: 20px; line-height: 1; }
table.shop_table td.product-remove a:hover { background: #fee2e2; }
table.shop_table .quantity input.qty { width: 72px; text-align: center; }
.woocommerce-cart-form .actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }
.woocommerce-cart-form .coupon { display: flex; gap: var(--s1); }
.woocommerce-cart-form .coupon input { width: 180px; }
.woocommerce-cart .cart-collaterals { display: flex; justify-content: flex-end; margin-top: var(--s4); }
.cart_totals { width: min(100%, 420px); padding: var(--s3); background: var(--bg-alt); border-radius: var(--r-md); }
.cart_totals h2 { font-size: 20px; }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.cart_totals td { text-align: right; }
.cart_totals .order-total .amount { color: var(--accent-text); font-size: 22px; font-weight: 700; }
.wc-proceed-to-checkout { margin-top: var(--s2); }
.wc-proceed-to-checkout a.checkout-button { display: flex; width: 100%; min-height: 52px; font-size: 17px; }
.return-to-shop { margin-top: var(--s3); }

.woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); align-items: start; }
.woocommerce-checkout #customer_details { grid-column: 1; }
.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; }
.woocommerce-checkout #order_review { grid-column: 2; grid-row: 1; margin-top: var(--s5); padding: var(--s3); background: var(--bg-alt); border-radius: var(--r-md); }
.woocommerce-checkout #order_review table.shop_table { background: transparent; border: 0; }
.woocommerce-checkout #payment { margin-top: var(--s2); }
.woocommerce-checkout #payment ul.payment_methods { padding: 0; margin-bottom: var(--s2); }
.woocommerce-checkout #payment .payment_box { padding: var(--s2); background: #fff; border-radius: var(--r-sm); font-size: 14px; }
.woocommerce-checkout #place_order { width: 100%; min-height: 52px; font-size: 17px; margin-top: var(--s2); }
.woocommerce form .form-row { margin-bottom: var(--s2); }
.woocommerce form .form-row label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 14px; }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: calc(50% - 8px); float: left; }
.woocommerce form .form-row-first { margin-right: 16px; }
.woocommerce form .form-row-wide { clear: both; }
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s4); }
.woocommerce-MyAccount-navigation li a { display: block; padding: 10px var(--s2); color: var(--ink); border-radius: var(--r-sm); }
.woocommerce-MyAccount-navigation li.is-active a, .woocommerce-MyAccount-navigation li a:hover { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* Pagini simple / blog */
.entry-content { max-width: 820px; }
.post-item { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }

/* 7. FOOTER ---------------------------------------------------------------- */
.site-footer { background: #0b1220; color: #cbd5e1; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: var(--s5); padding-top: var(--s8); padding-bottom: var(--s6); }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--s2); }
.site-footer a { color: #cbd5e1; } .site-footer a:hover { color: #fff; }
.footer-col a { display: block; padding: 4px 0; }
.footer-brand p { margin: var(--s2) 0; max-width: 320px; color: #94a3b8; }
.social { display: flex; gap: var(--s1); }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #334155; border-radius: 50%; transition: background var(--t), border-color var(--t); }
.social a:hover { background: var(--primary); border-color: var(--primary); }
.footer-newsletter p { color: #94a3b8; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s1); padding-top: var(--s3); padding-bottom: var(--s3); border-top: 1px solid #1e293b; font-size: 13px; color: #94a3b8; }

/* 8. RESPONSIVE (mobile-first corecturi) ----------------------------------- */
@media (max-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .matrix-featured-products ul.products, .woocommerce .related ul.products, .woocommerce .upsells ul.products, .woocommerce .cross-sells ul.products, .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, 1fr); }
  .woocommerce div.product { grid-template-columns: 1fr; gap: var(--s4); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; justify-self: start; }
  .shop-filters { display: none; position: static; }
  .shop-filters.open { display: block; }
  .woocommerce-checkout form.checkout { grid-template-columns: 1fr; }
  .woocommerce-checkout #order_review_heading, .woocommerce-checkout #order_review { grid-column: 1; grid-row: auto; }
  .woocommerce-checkout #order_review { margin-top: 0; }
}
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
@media (max-width: 800px) {
  .mobile-menu-toggle { display: block; order: 0; }
  .header-inner { flex-wrap: wrap; gap: var(--s1) var(--s2); min-height: 0; padding-top: var(--s1); padding-bottom: var(--s1); }
  .brand-logo { width: 150px; }
  .header-actions { order: 2; margin-left: auto; }
  .action-label { display: none; }
  .action-link { min-width: 44px; }
  .header-search { order: 3; flex: 1 0 100%; max-width: none; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav-list { flex-direction: column; gap: 0; }
  .main-nav-list a { padding: 14px var(--s1); border-bottom: 1px solid var(--line); }
  .main-nav-list .nav-promo { margin-left: 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--s2); }
  .section { padding: var(--s6) 0; }
  .topbar-hide-sm { display: none; }
  .benefits-grid { grid-template-columns: 1fr; gap: var(--s2); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-card { padding: var(--s3) var(--s1); }
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s1); }
  .hero-slide::after { background: linear-gradient(0deg, rgba(5,13,31,.92) 10%, rgba(5,13,31,.45) 100%); }
  .hero-content { justify-content: flex-end; padding-bottom: var(--s8); }
  .hero-content p { font-size: 15px; }
  ul.products, .woocommerce ul.products, .matrix-featured-products ul.products { gap: var(--s1); }
  ul.products li.product { padding: 12px; }
  ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }
  .price, ul.products li.product .price { font-size: 16px; }
  .woocommerce-result-count { float: none; line-height: 1.4; }
  .woocommerce-ordering { float: none; } .woocommerce-ordering select { width: 100%; }
  .woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; margin-right: 0; }
  .woocommerce-account .woocommerce { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s4); padding-top: var(--s6); }
  /* tabel coș → carduri */
  table.shop_table_responsive thead { display: none; }
  table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--line); padding: var(--s1) 0; }
  table.shop_table_responsive td { display: flex; justify-content: space-between; align-items: center; border: 0; padding: 8px var(--s2); text-align: right; }
  table.shop_table_responsive td::before { content: attr(data-title); font-weight: 600; color: var(--muted); text-align: left; }
  table.shop_table_responsive td.product-remove::before, table.shop_table_responsive td.product-thumbnail::before { content: none; }
  .woocommerce-cart-form .coupon { width: 100%; } .woocommerce-cart-form .coupon input { flex: 1; width: auto; }
  .toast { left: var(--s2); right: var(--s2); bottom: var(--s2); max-width: none; }
}

/* Pagini informative */
.page-content .entry-content { max-width: 860px; }
.page-content .entry-content h2 { margin: var(--s4) 0 var(--s1); font-size: 22px; }
.page-content .entry-content p, .page-content .entry-content li { line-height: 1.7; }
.page-content .lead { font-size: 18px; color: var(--ink); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2); margin: var(--s3) 0; }
.info-card { padding: var(--s2) var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.info-card h3 { margin: 0 0 var(--s1); font-size: 17px; }
.info-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Pagini profil: hero, statistici, pași, CTA, FAQ, formular */
.page-hero { padding: var(--s6) var(--s4); margin-bottom: var(--s3); background: linear-gradient(135deg, var(--navy), #0b2a5c); color: #fff; border-radius: var(--r-md); }
.page-content .page-hero h2 { margin: 0 0 var(--s2); font-size: clamp(24px, 3.4vw, 36px); color: #fff; }
.page-hero p { color: #dbe7fb; max-width: 680px; }
.page-hero .eyebrow { margin: 0 0 var(--s1); color: #5eead4; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-hero .btn { margin: var(--s1) var(--s1) 0 0; }
.page-hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2); margin: var(--s3) 0; }
.stat { padding: var(--s2); text-align: center; background: var(--primary-soft); border-radius: var(--r-md); }
.stat strong { display: block; font-size: 26px; color: var(--primary); }
.stat span { font-size: 14px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s2); padding: 0; margin: var(--s2) 0; list-style: none; counter-reset: st; }
.steps li { position: relative; padding: var(--s3) var(--s2) var(--s2); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); counter-increment: st; }
.steps li::before { content: counter(st); position: absolute; top: -14px; left: var(--s2); width: 28px; height: 28px; line-height: 28px; text-align: center; background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 50%; }
.steps strong, .steps span { display: block; }
.steps span { margin-top: 4px; color: var(--muted); font-size: 15px; }
.cta-band { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: space-between; margin: var(--s4) 0; padding: var(--s3); background: var(--primary-soft); border-radius: var(--r-md); }
.cta-band h3 { margin: 0 0 4px; } .cta-band p { margin: 0; color: var(--muted); }
.faq-item { margin: 0 0 var(--s1); padding: var(--s2); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: var(--s1) 0 0; color: var(--muted); }
.contact-form { display: grid; gap: var(--s2); max-width: 640px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.contact-form input, .contact-form textarea { padding: 12px; font: inherit; border: 1px solid var(--line); border-radius: var(--r-sm); }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.contact-form .hp { position: absolute; left: -9999px; }
.form-notice { padding: var(--s2); margin-bottom: var(--s2); border-radius: var(--r-sm); font-weight: 600; }
.form-notice.ok { background: #e7f6ec; color: #17653a; } .form-notice.err { background: #fdecec; color: #a12525; }
.muted-note { color: var(--muted); margin-top: var(--s2); }
@media (max-width: 640px) { .contact-form .form-row { grid-template-columns: 1fr; } .page-hero { padding: var(--s4) var(--s2); } }
.search-all { justify-content: center; font-weight: 600; color: var(--primary); }

/* Favorite */
ul.products li.product .wish-btn { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; background: #fff; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: color var(--t), border-color var(--t); }
.wish-btn:hover { color: #e11d48; border-color: #e11d48; }
.wish-btn.active { color: #e11d48; } .wish-btn.active svg { fill: currentColor; }
.wish-btn-inline { display: inline-flex; gap: 8px; align-items: center; width: auto; height: auto; margin-left: var(--s1); padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; cursor: pointer; }
.wish-empty { padding: var(--s6) 0; text-align: center; color: var(--muted); }
.wish-count[hidden] { display: none; }
.map-embed { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); } .map-embed iframe { display: block; width: 100%; }

/* Matrix Online - PDP gallery upgrade */
body.single-product div.product {
  display: grid !important;
  grid-template-columns: minmax(420px, 52%) minmax(320px, 1fr) !important;
  gap: 42px !important;
  align-items: start !important;
}

body.single-product div.product .woocommerce-product-gallery.images {
  width: 100% !important;
  max-width: 760px !important;
  float: none !important;
  clear: none !important;
}

body.single-product div.product .summary {
  width: 100% !important;
  float: none !important;
  clear: none !important;
}

body.single-product .woocommerce-product-gallery__wrapper {
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08) !important;
  overflow: hidden !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport {
  min-height: 460px !important;
  height: auto !important;
}

body.single-product .woocommerce-product-gallery__image img.wp-post-image,
body.single-product .woocommerce-product-gallery__image a img {
  width: 100% !important;
  min-height: 460px !important;
  object-fit: contain !important;
  background: #fff !important;
  padding: 18px !important;
}

body.single-product .flex-control-thumbs {
  display: flex !important;
  gap: 12px !important;
  margin-top: 16px !important;
  padding: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
}

body.single-product .flex-control-thumbs li {
  width: 92px !important;
  min-width: 92px !important;
  float: none !important;
  list-style: none !important;
}

body.single-product .flex-control-thumbs img {
  width: 92px !important;
  height: 92px !important;
  object-fit: contain !important;
  border: 1px solid #d7e0ea !important;
  border-radius: 12px !important;
  padding: 8px !important;
  background: #fff !important;
  opacity: 1 !important;
  cursor: pointer !important;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}

body.single-product .flex-control-thumbs img:hover,
body.single-product .flex-control-thumbs img.flex-active {
  border-color: #0052CC !important;
  box-shadow: 0 8px 18px rgba(0, 82, 204, .14) !important;
  transform: translateY(-1px) !important;
}

body.single-product .woocommerce-product-gallery__trigger {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #0052CC !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0, 82, 204, .24) !important;
}

@media (max-width: 991px) {
  body.single-product div.product {
    display: block !important;
  }

  body.single-product .woocommerce-product-gallery .flex-viewport {
    min-height: 320px !important;
  }

  body.single-product .woocommerce-product-gallery__image img.wp-post-image,
  body.single-product .woocommerce-product-gallery__image a img {
    min-height: 320px !important;
  }

  body.single-product .flex-control-thumbs li,
  body.single-product .flex-control-thumbs img {
    width: 76px !important;
    min-width: 76px !important;
    height: 76px !important;
  }
}