/*
Theme Name: Astra Child
Template: astra
Description: תבנית בת ל-Astra עבור alo digital
Version: 1.1.0
Text Domain: astra-child
*/

/* =========================================================
   alo digital – עיצוב כהה בהשראת הלוגו
   ========================================================= */
:root {
  --alo-bg: #04060A;
  --alo-surface: #0C121B;
  --alo-surface-2: #111A27;
  --alo-line: #1C2736;
  --alo-fg: #F4F7FB;
  --alo-muted: #98A6B9;
  --alo-blue: #1F66F0;
  --alo-cyan: #3FB0FF;
  --alo-grad: linear-gradient(90deg, #1F66F0, #08B2FF);
  --alo-radius: 16px;
  --alo-font-display: "Rubik", "Heebo", Arial, sans-serif;
  --alo-font-body: "Heebo", Arial, sans-serif;
}

/* ---------- בסיס ---------- */
body,
body .site,
body #page,
body #content,
body .site-content,
body .ast-separate-container,
body .ast-separate-container .site-content,
body .ast-plain-container .site-content {
  background: var(--alo-bg);
  color: var(--alo-fg);
}
body, body button, body input, body select, body textarea { font-family: var(--alo-font-body); }
body h1, body h2, body h3, body h4, body h5, body h6,
body .entry-title, body .page-title { font-family: var(--alo-font-display); color: var(--alo-fg); font-weight: 700; }
body a { color: var(--alo-cyan); }
body a:hover { color: #fff; }
body .ast-separate-container .ast-article-post,
body .ast-separate-container .ast-article-single,
body .ast-separate-container .comments-area {
  background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: var(--alo-radius);
}
:focus-visible { outline: 3px solid var(--alo-cyan); outline-offset: 2px; }

/* ---------- שורה עליונה ---------- */
.alo-topbar {
  background: #000; border-bottom: 1px solid var(--alo-line);
  color: var(--alo-muted); font-size: 14px; text-align: center; padding: 8px 16px;
}
.alo-topbar strong { color: var(--alo-fg); font-weight: 500; }
.alo-topbar span + span::before { content: "·"; margin-inline: 10px; color: var(--alo-line); }

/* ---------- כותרת עליונה ---------- */
body .main-header-bar,
body .ast-primary-header-bar,
body .ast-above-header-bar,
body .ast-below-header-bar,
body .site-header {
  background: var(--alo-bg); border-bottom: 1px solid var(--alo-line);
}
body .main-header-menu .menu-link,
body .ast-builder-menu .menu-item > .menu-link,
body .site-title a, body .site-description { color: var(--alo-fg); }
body .main-header-menu .menu-item:hover > .menu-link,
body .main-header-menu .current-menu-item > .menu-link { color: var(--alo-cyan); }
body .main-header-menu .sub-menu { background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: 12px; }
body .ast-header-search .search-field,
body .ast-search-menu-icon .search-field,
body .widget_search .search-field {
  background: var(--alo-surface-2); border: 1px solid var(--alo-line); color: var(--alo-fg);
  border-radius: 999px; padding: 10px 18px;
}
body .ast-header-search .search-field::placeholder { color: var(--alo-muted); }
body .ast-site-header-cart a, body .ast-header-account-link, body .ast-header-search .ast-icon { color: var(--alo-fg); }
body .ast-site-header-cart .count, body .ast-cart-menu-wrap .count {
  background: var(--alo-blue); color: #fff; border-radius: 999px;
}

/* ---------- כפתורים ---------- */
body .ast-button, body .button, body button.button, body input[type="submit"], body input[type="button"],
body .wp-block-button__link, body .woocommerce a.button, body .woocommerce button.button,
body .woocommerce input.button, body .woocommerce #respond input#submit,
body .woocommerce a.button.alt, body .woocommerce button.button.alt {
  background: var(--alo-blue); color: #fff; border: 0; border-radius: 999px; font-weight: 700; padding: 12px 26px;
  transition: background-color .15s, box-shadow .15s;
}
body .ast-button:hover, body .button:hover, body input[type="submit"]:hover,
body .wp-block-button__link:hover, body .woocommerce a.button:hover,
body .woocommerce button.button:hover, body .woocommerce button.button.alt:hover {
  background: var(--alo-cyan); color: #04060A; box-shadow: 0 0 0 4px rgba(63,176,255,.18);
}
body .woocommerce a.button.disabled, body .woocommerce button.button:disabled { opacity: .45; }

/* ---------- טפסים ---------- */
body input[type="text"], body input[type="email"], body input[type="tel"], body input[type="number"],
body input[type="password"], body input[type="search"], body textarea, body select,
body .woocommerce form .form-row input.input-text, body .woocommerce form .form-row textarea,
body .select2-container--default .select2-selection--single {
  background: var(--alo-surface-2); border: 1px solid var(--alo-line); color: var(--alo-fg); border-radius: 12px;
}
body .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--alo-fg); }
body .select2-dropdown { background: var(--alo-surface); color: var(--alo-fg); border-color: var(--alo-line); }
body input:focus, body textarea:focus, body select:focus { border-color: var(--alo-cyan); outline: 0; box-shadow: 0 0 0 3px rgba(63,176,255,.2); }

/* ---------- רשת מוצרים וכרטיסים ---------- */
body .woocommerce ul.products,
body.woocommerce-page ul.products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none;
}
body .woocommerce ul.products::before, body .woocommerce ul.products::after { display: none; }
body .woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product {
  float: none; width: auto !important; margin: 0 !important; padding: 14px;
  background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: var(--alo-radius);
  display: flex; flex-direction: column; position: relative; min-width: 0;
  transition: border-color .15s, transform .15s;
}
body .woocommerce ul.products li.product:hover { border-color: var(--alo-cyan); }
body .woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
body .woocommerce ul.products li.product a.woocommerce-LoopProduct-link > img {
  background: #fff; border-radius: 12px; overflow: hidden;
}
body .woocommerce ul.products li.product img { margin: 0 0 12px; border-radius: 12px; }
body .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--alo-fg); font-family: var(--alo-font-body); font-size: 16px; font-weight: 700; line-height: 1.4; padding: 0; min-height: 2.8em;
}
body .woocommerce ul.products li.product .price { color: var(--alo-fg); font-weight: 700; font-size: 20px; margin-top: auto; font-variant-numeric: tabular-nums; }
body .woocommerce .price ins { text-decoration: none; color: var(--alo-cyan); }
body .woocommerce .price del { color: var(--alo-muted); font-weight: 400; font-size: .8em; }
body .woocommerce ul.products li.product .button { width: 100%; text-align: center; margin-top: 10px; background: transparent; border: 2px solid var(--alo-blue); color: var(--alo-fg); }
body .woocommerce ul.products li.product .button:hover { background: var(--alo-blue); color: #fff; }
body .woocommerce ul.products li.product .star-rating { color: #FFB85C; }
body .woocommerce span.onsale {
  background: var(--alo-grad); color: #fff; border-radius: 999px; min-height: 0; min-width: 0; line-height: 1; padding: 7px 12px; font-weight: 700; top: 12px; inset-inline-start: 12px; inset-inline-end: auto; left: auto; right: auto;
}
body .woocommerce-result-count, body .woocommerce-ordering select { color: var(--alo-muted); }

/* ---------- עיגולי קטגוריות (ארוז ב-.alo-cats) ---------- */
body .alo-cats .woocommerce ul.products {
  display: flex; gap: 18px; overflow-x: auto; padding-block: 6px 12px; scrollbar-width: thin;
}
body .alo-cats .woocommerce ul.products li.product-category {
  flex: 0 0 120px; width: 120px !important; background: none; border: 0; padding: 0; text-align: center; align-items: center;
}
body .alo-cats li.product-category a { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--alo-fg); text-decoration: none; }
body .alo-cats li.product-category img {
  width: 108px; height: 108px; object-fit: contain; padding: 14px; margin: 0;
  border-radius: 50%; background: var(--alo-surface-2); border: 2px solid var(--alo-line);
}
body .alo-cats li.product-category:hover img { border-color: var(--alo-cyan); }
body .alo-cats li.product-category .woocommerce-loop-category__title { font-size: 15px; font-weight: 500; color: var(--alo-fg); padding: 0; margin: 0; }
body .alo-cats li.product-category mark.count { display: none; }

/* ---------- עמוד מוצר ---------- */
body.single-product div.product .product_title { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; }
body.single-product div.product p.price, body.single-product div.product span.price {
  color: var(--alo-cyan); font-family: var(--alo-font-display); font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums;
}
body.single-product div.product div.images,
body.single-product div.product .woocommerce-product-gallery {
  background: #fff; border-radius: var(--alo-radius); padding: 12px; border: 1px solid var(--alo-line);
}
body .woocommerce div.product div.images .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body .woocommerce div.product div.images .flex-control-thumbs li { width: 72px; float: none; }
body .woocommerce div.product div.images .flex-control-thumbs li img {
  border: 2px solid var(--alo-line); border-radius: 10px; opacity: .7; padding: 2px;
}
body .woocommerce div.product div.images .flex-control-thumbs li img.flex-active,
body .woocommerce div.product div.images .flex-control-thumbs li img:hover { opacity: 1; border-color: var(--alo-blue); }
body .woocommerce div.product form.cart .variations { border: 0; margin-bottom: 14px; }
body .woocommerce div.product form.cart .variations th, body .woocommerce div.product form.cart .variations td { border: 0; padding: 6px 0; background: none; }
body .woocommerce div.product form.cart .variations label { color: var(--alo-fg); font-weight: 700; }
body .woocommerce div.product form.cart .reset_variations { color: var(--alo-muted); font-size: 14px; }
body .woocommerce div.product form.cart .single_add_to_cart_button { flex: 1; padding: 16px 28px; font-size: 18px; }
body .woocommerce div.product form.cart div.quantity .qty { background: var(--alo-surface-2); border: 1px solid var(--alo-line); color: var(--alo-fg); border-radius: 12px; min-height: 52px; }
body .woocommerce div.product .woocommerce-variation-add-to-cart,
body .woocommerce div.product form.cart:not(.variations_form) { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
body .woocommerce div.product .woocommerce-variation-price .price { font-size: 26px; }
body .woocommerce div.product .stock { color: var(--alo-cyan); font-weight: 500; }
body .woocommerce div.product .product_meta { color: var(--alo-muted); font-size: 14px; border-top: 1px solid var(--alo-line); padding-top: 14px; }

/* בחירת צבע ונפח ככפתורים (תוסף Variation Swatches for WooCommerce) */
body .variable-items-wrapper { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
body .variable-items-wrapper .variable-item.button-variable-item {
  background: var(--alo-surface); color: var(--alo-fg); border: 1px solid var(--alo-line); border-radius: 12px; min-width: 72px; padding: 8px 16px; box-shadow: none; font-weight: 500;
}
body .variable-items-wrapper .variable-item.button-variable-item.selected,
body .variable-items-wrapper .variable-item.button-variable-item:hover { border-color: var(--alo-blue); box-shadow: 0 0 0 2px var(--alo-blue); }
body .variable-items-wrapper .variable-item.color-variable-item { border-radius: 50%; box-shadow: 0 0 0 2px var(--alo-line); }
body .variable-items-wrapper .variable-item.color-variable-item.selected,
body .variable-items-wrapper .variable-item.color-variable-item:hover { box-shadow: 0 0 0 3px var(--alo-bg), 0 0 0 5px var(--alo-blue); }
body .variable-items-wrapper .variable-item.disabled { opacity: .35; }

/* לשוניות פרטי מוצר */
body .woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin-bottom: 0; }
body .woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--alo-line); }
body .woocommerce div.product .woocommerce-tabs ul.tabs li { background: none; border: 0; border-radius: 0; }
body .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
body .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
body .woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--alo-muted); font-weight: 700; }
body .woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--alo-fg); border-bottom: 3px solid var(--alo-blue); }
body .woocommerce div.product .woocommerce-tabs .panel { background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: var(--alo-radius); padding: 22px; margin-top: 16px; }
body .woocommerce table.shop_attributes th, body .woocommerce table.shop_attributes td { border-color: var(--alo-line); background: none; color: var(--alo-fg); }

/* ---------- עגלה ותשלום ---------- */
body .woocommerce table.shop_table, body .woocommerce-cart table.cart {
  background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: var(--alo-radius); color: var(--alo-fg); border-collapse: separate; overflow: hidden;
}
body .woocommerce table.shop_table th, body .woocommerce table.shop_table td { border-color: var(--alo-line); color: var(--alo-fg); }
body .woocommerce .cart_totals, body .woocommerce-checkout #order_review,
body .woocommerce-checkout #payment { background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: var(--alo-radius); padding: 18px; }
body .woocommerce-checkout #payment div.payment_box { background: var(--alo-surface-2); color: var(--alo-fg); }
body .woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--alo-surface-2); }
body .woocommerce-message, body .woocommerce-info, body .woocommerce-error {
  background: var(--alo-surface); color: var(--alo-fg); border-top-color: var(--alo-blue);
}
body .woocommerce-message::before, body .woocommerce-info::before { color: var(--alo-cyan); }
body .woocommerce-breadcrumb, body .woocommerce-breadcrumb a, body .ast-breadcrumbs a { color: var(--alo-muted); }

/* ---------- דף הבית ---------- */
.alo-wrap { max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.alo-hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 18px; align-content: center;
  min-height: 360px; padding: 48px clamp(20px, 5vw, 56px); border-radius: 22px; border: 1px solid var(--alo-line);
  background: radial-gradient(60% 90% at 85% 50%, rgba(31,102,240,.35), transparent 70%), #07101D;
}
.alo-hero::after {
  content: ""; position: absolute; z-index: -1; inset-inline-end: 5%; top: 50%; width: min(320px, 55%); aspect-ratio: 1; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%231F66F0'/%3E%3Cstop offset='1' stop-color='%2308B2FF'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='url(%23g)' stroke-width='7' stroke-linecap='round'%3E%3Cpath d='M33.64 14.51A15 15 0 1 1 14.36 14.51'/%3E%3Cpath d='M24 6V23'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .5; filter: drop-shadow(0 0 40px rgba(31,102,240,.7));
}
.alo-hero .alo-eyebrow { color: var(--alo-cyan); font-weight: 700; font-size: 14px; letter-spacing: .04em; margin: 0; }
.alo-hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.15; margin: 0; max-width: 16ch; }
.alo-hero p.alo-lead { color: var(--alo-muted); font-size: 18px; max-width: 44ch; margin: 0; }
.alo-hero .alo-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.alo-btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--alo-blue); color: #fff !important; border: 2px solid var(--alo-blue); }
.alo-btn.ghost { background: transparent; border-color: var(--alo-line); }
.alo-btn:hover { background: var(--alo-cyan); border-color: var(--alo-cyan); color: #04060A !important; }

.alo-section { padding-block: 36px 8px; }
.alo-section > h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 3vw, 32px); margin: 0 0 18px; }
.alo-section > h2::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--alo-grad); flex: none; }

.alo-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--alo-line); border-radius: var(--alo-radius); background: var(--alo-surface); margin-top: 24px; }
.alo-trust div { padding: 18px 20px; border-inline-start: 1px solid var(--alo-line); min-width: 0; }
.alo-trust div:first-child { border-inline-start: 0; }
.alo-trust strong { display: block; font-family: var(--alo-font-display); color: var(--alo-cyan); font-size: 17px; }
.alo-trust span { color: var(--alo-muted); font-size: 14px; }

.alo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.alo-card { background: var(--alo-surface); border: 1px solid var(--alo-line); border-radius: var(--alo-radius); padding: 22px; min-width: 0; }
.alo-card h3 { font-size: 20px; margin: 0 0 6px; }
.alo-card p { color: var(--alo-muted); margin: 0; }

/* ---------- פוטר ---------- */
body .site-footer, body .site-primary-footer-wrap, body .site-below-footer-wrap, body .site-above-footer-wrap {
  background: #000; color: var(--alo-muted); border-top: 1px solid var(--alo-line);
}
body .site-footer a { color: var(--alo-muted); }
body .site-footer a:hover { color: var(--alo-cyan); }
body .site-footer .widget-title, body .site-footer h2, body .site-footer h3 { color: var(--alo-fg); font-size: 18px; }
body .site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* ---------- ווצאפ צף ---------- */
.alo-wa {
  position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 999; display: inline-flex; align-items: center; gap: 8px;
  background: #1F9D55; color: #fff !important; padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.alo-wa:hover { background: #26b865; }

@media (max-width: 860px) {
  .alo-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alo-trust div:nth-child(3) { border-inline-start: 0; }
  .alo-trust div:nth-child(n+3) { border-top: 1px solid var(--alo-line); }
  .alo-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body .woocommerce ul.products, body.woocommerce-page ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body .woocommerce ul.products li.product { padding: 10px; }
  .alo-hero { min-height: 0; padding-block: 32px; }
  .alo-wa span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
