/*
Theme Name: El Camino
Template: astra
Description: Tienda mayorista El Camino: diseño del prototipo aprobado sobre Astra.
Version: 1.0.0
Text Domain: elcamino
*/

/* Light only, on purpose: product photos are shot on white and the store pages (checkout,
   account) must look the same for every buyer. Tokens come from the logo and the client's
   banners: yellow and orange of the wordmark, royal blue of the banners. */
:root {
  --elc-bg: #F3F6FB; --elc-surface: #FFFFFF; --elc-surface-2: #E9F0FA; --elc-well: #FFFFFF;
  --elc-ink: #0E1B30; --elc-ink-2: #4A5872; --elc-ink-3: #6B7890; --elc-line: #D8E1EE; --elc-line-2: #C5D2E4;
  --elc-bar: #0667DA; --elc-bar-2: #0553B3; --elc-brand-text: #0557C2;
  --elc-accent: #FCCC18; --elc-accent-2: #F2BE00; --elc-on-accent: #0E1B30;
  --elc-price: #B04800; --elc-orange: #E46000;
  --elc-paper: #FBFCFE; --elc-rule: #C9D9F0; --elc-margin: #E41824;
  --elc-ok: #1C7F47; --elc-ok-bg: #E3F4EA; --elc-warn: #8A5A00; --elc-warn-bg: #FFF4D1;
  --elc-shadow: 0 1px 2px rgba(14, 27, 48, .06), 0 6px 18px rgba(14, 27, 48, .06);
  --elc-display: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --elc-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --elc-r: 12px;
  color-scheme: light;
}

body { background: var(--elc-bg); color: var(--elc-ink); font-family: var(--elc-body); -webkit-font-smoothing: antialiased; }
body, button, input, select, textarea { font-family: var(--elc-body); }
h1, h2, h3, h4, .entry-title, .product_title, .woocommerce-loop-product__title {
  font-family: var(--elc-display); font-weight: 600; color: var(--elc-ink); text-wrap: balance; letter-spacing: -.005em;
}
a { color: var(--elc-brand-text); }
:focus-visible { outline: 3px solid #0B57D0; outline-offset: 2px; }
.elc-wrap { max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
.elc-eyebrow { font: 600 12.5px/1.2 var(--elc-body); letter-spacing: .09em; text-transform: uppercase; color: var(--elc-ink-3); }
.elc-ico { flex: none; }
.elc-select { user-select: all; }

/* ---------- header ---------- */
.elc-header { background: var(--elc-surface); border-bottom: 1px solid var(--elc-line); position: sticky; top: 0; z-index: 99; }
.admin-bar .elc-header { top: 32px; }
.elc-header-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding-block: 14px; }
.elc-logo img { height: 46px; width: auto; display: block; }
.elc-search { display: flex; align-items: center; background: var(--elc-surface-2); border: 1px solid var(--elc-line); border-radius: 999px; padding: 0 6px 0 16px; max-width: 560px; width: 100%; justify-self: center; margin: 0; }
.elc-search input[type=search] { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 11px 8px; font-size: 15px; color: var(--elc-ink); outline: none; }
.elc-search:focus-within { border-color: var(--elc-brand-text); box-shadow: 0 0 0 3px rgba(5, 87, 194, .2); }
.elc-search button { border: 0; background: var(--elc-bar); color: #fff; border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; cursor: pointer; }
.elc-search button .elc-ico { width: 18px; height: 18px; }
.elc-actions { display: flex; align-items: center; gap: 4px; }
.elc-hbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: var(--elc-ink); text-decoration: none; white-space: nowrap; }
.elc-hbtn:hover { background: var(--elc-surface-2); color: var(--elc-ink); }
.elc-hbtn.is-pending span { background: var(--elc-warn-bg); color: var(--elc-warn); font: 600 12px/1 var(--elc-body); padding: 5px 9px; border-radius: 999px; }
.elc-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--elc-accent); color: var(--elc-on-accent); font: 700 12px/20px var(--elc-body); text-align: center; }

.elc-catbar { background: var(--elc-bar); }
.elc-catbar .elc-wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.elc-catbar .elc-wrap::-webkit-scrollbar { display: none; }
.elc-catbar a { color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; padding: 11px 14px; white-space: nowrap; border-bottom: 3px solid transparent; }
.elc-catbar a:hover { background: var(--elc-bar-2); color: #fff; }
.elc-catbar a[aria-current="page"] { border-bottom-color: var(--elc-accent); }
.elc-catbar a:focus-visible { outline-color: #fff; outline-offset: -3px; }

.elc-notice { background: var(--elc-warn-bg); color: var(--elc-warn); border-bottom: 1px solid var(--elc-line); font-size: 14.5px; }
.elc-notice .elc-wrap { display: flex; gap: 10px; align-items: center; padding-block: 10px; }
.elc-notice.is-ok { background: var(--elc-ok-bg); color: var(--elc-ok); }

/* ---------- buttons (ours and WooCommerce's) ---------- */
.elc-btn, body .woocommerce a.button, body .woocommerce button.button, body .woocommerce input.button,
body .woocommerce #respond input#submit, body .woocommerce button.button.alt, body .woocommerce a.button.alt,
body .woocommerce .single_add_to_cart_button, body .woocommerce #place_order {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 12px 20px;
  font: 600 15.5px/1.2 var(--elc-body); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; text-transform: none; letter-spacing: 0;
  background: var(--elc-accent); color: var(--elc-on-accent);
}
.elc-btn:hover, body .woocommerce a.button:hover, body .woocommerce button.button:hover, body .woocommerce input.button:hover,
body .woocommerce button.button.alt:hover, body .woocommerce a.button.alt:hover, body .woocommerce .single_add_to_cart_button:hover, body .woocommerce #place_order:hover {
  background: var(--elc-accent-2); color: var(--elc-on-accent);
}
.elc-btn-secondary { background: transparent; border-color: var(--elc-brand-text); color: var(--elc-brand-text); }
.elc-btn-secondary:hover { background: var(--elc-surface-2); color: var(--elc-brand-text); }
.elc-btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .8); color: #fff; }
.elc-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
body .woocommerce button.button:disabled, body .woocommerce button.button.disabled { opacity: .5; }

/* ---------- home ---------- */
.home #content > .ast-container { display: block; }
.elc-home { padding-block: 28px 64px; }
.elc-section { margin-top: 56px; }
.elc-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.elc-section-head h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0; }
.elc-more { font-weight: 600; text-decoration: none; }
.elc-more:hover { text-decoration: underline; }

.elc-hero { background: #0667DA; color: #fff; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.elc-hero-copy { padding: 44px 40px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.elc-hero-copy .elc-eyebrow { color: #FCCC18; }
.elc-hero h1 { color: #fff; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; margin: 0; }
.elc-hero p { color: #E3ECFA; font-size: 17px; max-width: 46ch; margin: 0; }
.elc-hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.elc-hero-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: #CFE0F8; font-size: 14px; font-variant-numeric: tabular-nums; }
.elc-hero-facts strong { color: #fff; font-weight: 600; }
.elc-hero-img { display: grid; place-items: center; }
/* the banner photo melts into the blue instead of showing its rectangle */
.elc-hero-img img { width: 100%; height: auto; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  mask-composite: intersect; }

.elc-brands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.elc-brand { display: flex; flex-direction: column; border-radius: var(--elc-r); overflow: hidden; border: 1px solid var(--elc-line); background: var(--elc-surface); text-decoration: none; color: var(--elc-ink); transition: transform .15s, box-shadow .15s; }
.elc-brand:hover { transform: translateY(-2px); box-shadow: var(--elc-shadow); color: var(--elc-ink); }
/* three of the four logos are white artwork: the tile stays dark */
.elc-brand-logo { height: 120px; display: grid; place-items: center; padding: 20px 22px; background: #14233D; }
.elc-brand-logo img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.elc-brand-meta { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--elc-line); }
.elc-brand-meta span:last-child { color: var(--elc-ink-3); }

.elc-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.elc-cat { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px; background: var(--elc-surface); border: 1px solid var(--elc-line); border-radius: var(--elc-r); text-decoration: none; color: var(--elc-ink); transition: border-color .15s; }
.elc-cat:hover { border-color: var(--elc-brand-text); color: var(--elc-ink); }
.elc-well { display: block; aspect-ratio: 4 / 3; background: var(--elc-well); border-radius: 8px; overflow: hidden; }
.elc-well img { width: 100%; height: 100%; object-fit: contain; display: block; }
.elc-cat-name { font: 600 17px/1.2 var(--elc-display); }
.elc-cat small { color: var(--elc-ink-3); font-size: 13.5px; }

/* ruled school notebook, with the red margin line: the one bold moment on the page */
.elc-ruled { position: relative; background-color: var(--elc-paper); background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--elc-rule) 31px 32px); background-position: 0 12px; border: 1px solid var(--elc-line); border-radius: var(--elc-r); padding: 44px 28px 36px 92px; overflow: hidden; }
.elc-ruled::before { content: ""; position: absolute; top: 0; bottom: 0; left: 70px; width: 2px; background: var(--elc-margin); opacity: .85; }
.elc-ruled h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 32px; margin: 0 0 32px; }
.elc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.elc-steps li { position: relative; counter-increment: step; margin: 0; }
.elc-steps li::before { content: counter(step); position: absolute; left: -62px; top: -2px; width: 36px; text-align: right; font: 600 30px/32px var(--elc-display); color: var(--elc-orange); }
.elc-steps h3 { font-size: 19px; line-height: 32px; margin: 0; }
.elc-steps p { line-height: 32px; color: var(--elc-ink-2); margin: 0; }
.elc-ruled .elc-btn { margin-top: 32px; }

.elc-promo { display: block; border-radius: var(--elc-r); overflow: hidden; border: 1px solid var(--elc-line); }
.elc-promo img { width: 100%; height: auto; display: block; }

/* ---------- product grid (shop, categories, search, home) ---------- */
body .woocommerce ul.products, body.woocommerce ul.products {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; margin: 0; padding: 0;
}
body .woocommerce ul.products::before, body .woocommerce ul.products::after, body.woocommerce ul.products::before, body.woocommerce ul.products::after { display: none; }
body .woocommerce ul.products li.product, body.woocommerce ul.products li.product {
  width: auto !important; margin: 0 !important; float: none !important; padding: 0 !important;
  display: flex; flex-direction: column; background: var(--elc-surface); border: 1px solid var(--elc-line); border-radius: var(--elc-r);
  overflow: hidden; text-align: left; transition: transform .15s, box-shadow .15s;
}
body .woocommerce ul.products li.product:hover, body.woocommerce ul.products li.product:hover { transform: translateY(-2px); box-shadow: var(--elc-shadow); }
ul.products li.product .astra-shop-thumbnail-wrap { background: var(--elc-well); border-bottom: 1px solid var(--elc-line); }
ul.products li.product .astra-shop-thumbnail-wrap img { aspect-ratio: 1; object-fit: contain; width: 100%; margin: 0 !important; }
ul.products li.product .astra-shop-summary-wrap { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px !important; flex: 1; }
ul.products li.product .ast-woo-product-category { font: 600 12px/1.2 var(--elc-body); letter-spacing: .09em; text-transform: uppercase; color: var(--elc-ink-3); margin: 0; }
ul.products li.product .woocommerce-loop-product__title { font-size: 17px !important; line-height: 1.25; margin: 0 !important; padding: 0 !important; color: var(--elc-ink); }
.elc-pack { display: flex; align-items: center; gap: 6px; color: var(--elc-ink-2); font-size: 13.5px; }
.elc-pack .elc-ico { width: 15px; height: 15px; }
.elc-sku { color: var(--elc-ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
ul.products li.product .price { margin-top: auto !important; padding-top: 8px; border-top: 1px dashed var(--elc-line); display: block; color: var(--elc-price) !important; font: 600 19px/1.25 var(--elc-display) !important; }
ul.products li.product .price .elc-unidad { font: 400 12.5px/1.35 var(--elc-body); color: var(--elc-ink-3); }
ul.products li.product .price .elc-bloqueo { font: 500 13.5px/1.35 var(--elc-body); color: var(--elc-ink-2); }

/* ---------- product page ---------- */
.single-product div.product .product_title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.single-product div.product .woocommerce-product-gallery { background: var(--elc-well); border: 1px solid var(--elc-line); border-radius: 16px; overflow: hidden; }
.single-product div.product p.price, .single-product div.product .woocommerce-variation-price .price { color: var(--elc-price); font: 600 30px/1.15 var(--elc-display); }
.single-product div.product .price .elc-unidad { display: inline-block; margin-top: 8px; padding: 5px 10px; border-radius: 8px; background: var(--elc-surface-2); font: 500 14.5px/1.3 var(--elc-body); color: var(--elc-ink-2); }
.single-product .woocommerce-product-details__short-description { color: var(--elc-ink-2); font-size: 16.5px; }
.single-product .woocommerce-product-details__short-description ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; border: 1px solid var(--elc-line); border-radius: var(--elc-r); overflow: hidden; background: var(--elc-surface); }
.single-product .woocommerce-product-details__short-description li { padding: 10px 14px; border-bottom: 1px solid var(--elc-line); font-size: 15px; margin: 0; }
.single-product .woocommerce-product-details__short-description li:last-child { border-bottom: 0; }

/* variation choices as buttons (assets/elc.js); the original select stays as the source of truth */
.single-product table.variations, .single-product table.variations tbody, .single-product table.variations tr,
.single-product table.variations th, .single-product table.variations td { display: block; border: 0; padding: 0; background: none; }
.single-product table.variations th.label { margin: 14px 0 8px; }
.single-product table.variations th.label label { font: 600 14.5px/1.3 var(--elc-body); }
.elc-pills-src { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none; }
.elc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.elc-pill { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--elc-line-2); background: var(--elc-surface); color: var(--elc-ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: 500 14.5px/1.2 var(--elc-body); }
.elc-pill:hover { border-color: var(--elc-brand-text); }
.elc-pill[aria-pressed="true"] { border-color: var(--elc-brand-text); background: var(--elc-surface-2); color: var(--elc-brand-text); font-weight: 600; }
.elc-pill:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.elc-sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); flex: none; }
.single-product .reset_variations { display: inline-block; margin-top: 10px; font-size: 13.5px; }
.single-product .single_variation_wrap, .single-product form.cart { margin-top: 18px; }
.single-product form.cart .quantity input.qty { border-radius: 10px; border: 1.5px solid var(--elc-line-2); height: 46px; }
.single-product .product_meta { font-size: 13.5px; color: var(--elc-ink-3); border-top: 1px solid var(--elc-line); padding-top: 12px; margin-top: 18px; }

/* visitors and pending accounts: no quantity / disabled button, the gate box explains instead */
.elc-visitante.single-product .summary > p.price, .elc-pendiente.single-product .summary > p.price, .elc-rechazado.single-product .summary > p.price,
.elc-visitante .woocommerce-variation-price, .elc-pendiente .woocommerce-variation-price, .elc-rechazado .woocommerce-variation-price,
.elc-visitante .woocommerce-variation-add-to-cart, .elc-pendiente .woocommerce-variation-add-to-cart, .elc-rechazado .woocommerce-variation-add-to-cart { display: none !important; }
.elc-gate { display: flex; gap: 14px; align-items: flex-start; background: var(--elc-surface-2); border-radius: 12px; padding: 16px; margin: 18px 0; }
.elc-gate h3 { font-size: 17px; margin: 0 0 4px; }
.elc-gate p { color: var(--elc-ink-2); font-size: 14.5px; margin: 0; }
.elc-gate .elc-gate-ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.elc-gate .elc-btn { padding: 8px 14px; font-size: 14px; border-radius: 8px; }

/* ---------- my account: sign in / register ---------- */
.elc-why { max-width: 760px; margin-bottom: 24px; }
.elc-why h1 { font-size: clamp(28px, 3.2vw, 38px); margin: 6px 0 8px; }
.elc-why p { color: var(--elc-ink-2); font-size: 16.5px; }
.elc-why ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.elc-why li { display: flex; gap: 10px; align-items: flex-start; color: var(--elc-ink-2); }
.elc-why li .elc-ico { color: var(--elc-ok); margin-top: 2px; }
.woocommerce-account #customer_login .u-column1, .woocommerce-account #customer_login .u-column2 {
  background: var(--elc-surface); border: 1px solid var(--elc-line); border-radius: 16px; padding: 24px;
}
.woocommerce-account #customer_login h2 { font-size: 22px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row select, .woocommerce form .form-row textarea {
  border: 1.5px solid var(--elc-line-2); border-radius: 10px; padding: 11px 12px; background: var(--elc-surface);
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row select:focus { border-color: var(--elc-brand-text); box-shadow: 0 0 0 3px rgba(5, 87, 194, .2); outline: none; }
.woocommerce form .form-row label { font-weight: 600; font-size: 14.5px; }

/* ---------- order (cart) and checkout ---------- */
.woocommerce-cart table.shop_table, .woocommerce-checkout table.shop_table { background: var(--elc-surface); border: 1px solid var(--elc-line); border-radius: var(--elc-r); border-collapse: separate; overflow: hidden; }
.woocommerce-cart .cart_totals h2, .woocommerce-checkout h3 { font-size: 20px; }
.woocommerce-checkout #payment { background: var(--elc-surface-2); border-radius: var(--elc-r); }

/* ---------- footer ---------- */
.elc-footer { background: #0E1B30; color: #C9D4E5; padding-block: 44px 28px; margin-top: 64px; }
.elc-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.elc-footer h2 { font: 600 12.5px/1.2 var(--elc-body); letter-spacing: .09em; text-transform: uppercase; color: #FCCC18; margin: 0 0 12px; }
.elc-footer a { color: #E8EEF8; text-decoration: none; display: block; padding: 3px 0; }
.elc-footer a:hover { text-decoration: underline; color: #fff; }
.elc-footer p { margin: 0 0 8px; }
.elc-footer-logo { background: #fff; border-radius: 10px; padding: 10px 12px; display: inline-block; margin-bottom: 14px; }
.elc-footer-logo img { height: 38px; width: auto; display: block; }
.elc-tbd { color: #8494AD; font-style: italic; }
.elc-legal { border-top: 1px solid #24344F; margin-top: 32px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13.5px; color: #8494AD; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .elc-header-row { grid-template-columns: auto auto; }
  .elc-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .elc-hero { grid-template-columns: 1fr; }
  .elc-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .elc-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .elc-footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 782px) { .admin-bar .elc-header { top: 46px; } }
@media (max-width: 640px) {
  .elc-wrap { padding-inline: 16px; }
  .elc-hero-copy { padding: 28px 22px; }
  .elc-logo img { height: 38px; }
  .elc-hbtn span { display: none; }
  .elc-steps { grid-template-columns: 1fr; gap: 16px; }
  .elc-ruled { padding: 36px 18px 28px 64px; }
  .elc-ruled::before { left: 46px; }
  .elc-steps li::before { left: -52px; }
  body .woocommerce ul.products, body.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  ul.products li.product .woocommerce-loop-product__title { font-size: 15.5px !important; }
  .elc-footer-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
