/* =========================================================================
   Coinsat · Repuestos Ferroli / Cointra — tema hijo de Hummingbird
   ========================================================================= */
:root {
  --ch-orange: #e8700f;
  --ch-orange-dark: #c45a05;
  --ch-orange-soft: #fff3e8;
  --ch-ink: #16191d;
  --ch-ink-2: #2b3036;
  --ch-muted: #5f6873;
  --ch-line: #e7e9ec;
  --ch-bg: #f6f7f9;
  --ch-radius: 14px;
  --ch-shadow: 0 1px 2px rgba(22,25,29,.06), 0 8px 24px rgba(22,25,29,.06);
  --bs-primary: #e8700f;
  --bs-primary-rgb: 232,112,15;
  --bs-primary-text-emphasis: #c45a05;
  --bs-link-color: #c45a05;
  --bs-link-color-rgb: 196,90,5;
  --bs-link-hover-color: #9c4704;
  --bs-link-hover-color-rgb: 156,71,4;
  --bs-body-color: #2b3036;
  --bs-focus-ring-color: rgba(232,112,15,.25);
}

/* Botones */
.btn-primary {
  --bs-btn-bg: var(--ch-orange); --bs-btn-border-color: var(--ch-orange);
  --bs-btn-hover-bg: var(--ch-orange-dark); --bs-btn-hover-border-color: var(--ch-orange-dark);
  --bs-btn-active-bg: #a84d04; --bs-btn-active-border-color: #a84d04;
  --bs-btn-disabled-bg: var(--ch-orange); --bs-btn-disabled-border-color: var(--ch-orange);
  --bs-btn-focus-shadow-rgb: 232,112,15;
  font-weight: 600;
}
.btn-outline-primary {
  --bs-btn-color: var(--ch-orange-dark); --bs-btn-border-color: var(--ch-orange);
  --bs-btn-hover-bg: var(--ch-orange); --bs-btn-hover-border-color: var(--ch-orange); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--ch-orange-dark); --bs-btn-active-border-color: var(--ch-orange-dark);
  --bs-btn-focus-shadow-rgb: 232,112,15;
}
.btn { border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #f3b07a; box-shadow: 0 0 0 .2rem rgba(232,112,15,.18); }
.form-check-input:checked { background-color: var(--ch-orange); border-color: var(--ch-orange); }
.product-flag.discount, .product-flag.on-sale { background-color: var(--ch-orange) !important; }
a { text-underline-offset: 3px; }

/* Cabecera */
.header-top { background: var(--ch-ink); color: #cfd4da; font-size: .85rem; }
.header-top a, .header-top .btn-link, .header-top .material-icons, .header-top button, .header-top .dropdown-toggle { color: #e9ecef !important; }
.header-top a:hover { color: #fff !important; }
.header-top select, .header-top .form-select {
  background-color: transparent; color: #e9ecef; border-color: rgba(255,255,255,.2); font-size: .85rem; padding-block: .2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23e9ecef%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e");
}
.header-top select option { color: var(--ch-ink); }
.header-bottom { background: #fff; border-bottom: 1px solid var(--ch-line); box-shadow: 0 2px 12px rgba(22,25,29,.04); }
.header-bottom .navbar-brand img.logo { max-width: 13rem; max-height: 50px; width: auto; height: auto; }
@media (max-width: 575.98px) { .header-bottom .navbar-brand img.logo { max-width: 42vw; } }
@media (min-width: 1200px) { .header-bottom .search-widget, .header-bottom .ps-searchbar { max-width: 15rem; } }
/* Menú en una sola línea aunque el logo sea más grande */
.ps-mainmenu__tree { flex-wrap: nowrap; }
.ps-mainmenu__tree-link { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1599.98px) { .ps-mainmenu__tree-link { padding-inline: .5rem; font-size: .92rem; } }
@media (min-width: 1200px) { .header-bottom .row, .header-bottom__row { flex-wrap: nowrap; } .header-bottom .search-widget, .header-bottom .ps-searchbar, .header-bottom form[role="search"] { max-width: 12.5rem; min-width: 0; } }
@media (min-width: 1200px) and (max-width: 1499.98px) { .header-bottom .search-widget, .header-bottom .ps-searchbar, .header-bottom form[role="search"] { max-width: 10rem; } .header-bottom .navbar-brand img.logo { max-width: 11rem; } }
.header-block__badge { background: var(--ch-orange) !important; color: #fff !important; }

/* Menú principal */
.ps-mainmenu__tree-link, .ps-mainmenu .menu__title {
  font-weight: 600; letter-spacing: .01em; color: var(--ch-ink) !important; text-transform: none;
}
.ps-mainmenu__tree-item-wrapper:hover > .ps-mainmenu__tree-link,
.ps-mainmenu__tree-link:hover { color: var(--ch-orange-dark) !important; }

/* Buscador de cabecera */
.header-bottom input[type="text"], .header-bottom input[type="search"] {
  border-radius: 999px; background: var(--ch-bg); border-color: var(--ch-line);
}

/* Fichas de producto en listados */
.product-miniature {
  background: #fff; border: 1px solid var(--ch-line); border-radius: var(--ch-radius); padding: .75rem;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.product-miniature:hover { box-shadow: var(--ch-shadow); transform: translateY(-2px); border-color: #f1d2b6; }
.product-miniature img { border-radius: 10px; background: #fff; }
.product-miniature__title, .product-miniature .product-title {
  font-size: .95rem; font-weight: 600; color: var(--ch-ink); line-height: 1.35;
}
.product-miniature__price, .product-miniature .price { font-size: 1.15rem; font-weight: 700; color: var(--ch-ink); }

/* Títulos de sección */
.section-title, .featured-products h2, .products-section-title {
  font-weight: 800; letter-spacing: -.01em; color: var(--ch-ink);
}

/* Ficha de producto */
.product__name, h1.product-title { font-weight: 800; letter-spacing: -.01em; color: var(--ch-ink); }
.product__current-price, .current-price-value { color: var(--ch-ink); font-weight: 800; }

/* Pie */
.footer__before { background: var(--ch-bg); border-top: 1px solid var(--ch-line); }
.footer__main { background: var(--ch-ink); color: #b9c0c8; }
.footer__main a, .footer__main p, .footer__main li, .footer__main address { color: #cfd4da; }
.footer__main a:hover { color: #fff; }
.footer__main .h3, .footer__main h3, .footer__main .h4, .footer__main h4, .footer__main .footer__title { color: #fff; font-weight: 700; }
.footer__main-bottom { border-top: 1px solid rgba(255,255,255,.08); color: #8b939c; }
.footer__main-bottom a { color: #b9c0c8; }

/* ===================== Portada (módulo coinsathome) ===================== */
.ch-home { --gap: clamp(1rem, 2.5vw, 2rem); display: flex; flex-direction: column; gap: clamp(2rem, 5vw, 3.5rem); margin-bottom: 2.5rem; }
.ch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.35rem;
  border-radius: 12px; font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.ch-btn:hover { transform: translateY(-1px); }
.ch-btn--primary { background: var(--ch-orange); color: #fff; }
.ch-btn--primary:hover { background: var(--ch-orange-dark); color: #fff; }
.ch-btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.ch-btn--ghost:hover { background: #fff; color: var(--ch-ink); }
.ch-btn--light { background: #fff; color: var(--ch-ink); }
.ch-btn--light:hover { background: var(--ch-orange-soft); color: var(--ch-ink); }

.ch-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(232,112,15,.45), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(232,112,15,.18), transparent 60%),
    linear-gradient(135deg, #16191d 0%, #23282e 60%, #1b1f24 100%);
}
.ch-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); mask-image: linear-gradient(to left, #000, transparent 70%);
}
.ch-hero__inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.85fr);
  gap: var(--gap); align-items: center; padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4rem, 9vw, 6.5rem);
}
.ch-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd3ad;
  background: rgba(232,112,15,.16); border: 1px solid rgba(232,112,15,.4); padding: .35rem .7rem; border-radius: 999px;
}
.ch-hero__title { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 1rem 0 .9rem; color: #fff; }
.ch-hero__title span { color: var(--ch-orange); }
.ch-hero__lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: #c9cfd6; max-width: 38rem; margin-bottom: 1.5rem; }
.ch-hero__search {
  display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 14px; padding: .4rem .4rem .4rem .9rem;
  max-width: 36rem; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.ch-hero__search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ch-muted); stroke-width: 2; stroke-linecap: round; }
.ch-hero__search input[type="search"] { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1rem; color: var(--ch-ink); background: transparent; padding: .55rem .25rem; }
.ch-hero__search button { border: 0; background: var(--ch-orange); color: #fff; font-weight: 700; padding: .7rem 1.2rem; border-radius: 10px; }
.ch-hero__search button:hover { background: var(--ch-orange-dark); }
.ch-hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.ch-hero__card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: clamp(1.25rem, 3vw, 2rem);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.ch-hero__badge { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.ch-hero__badge strong { font-size: 3rem; line-height: 1; font-weight: 800; color: var(--ch-orange); }
.ch-hero__badge span { color: #e9ecef; font-weight: 600; line-height: 1.3; }
.ch-hero__checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.ch-hero__checks li { position: relative; padding-left: 1.9rem; color: #dfe3e8; }
.ch-hero__checks li::before {
  content: "✓"; position: absolute; left: 0; top: .05rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--ch-orange); color: #fff; font-size: .8rem; font-weight: 800; line-height: 1.3rem; text-align: center;
}

.ch-services {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem;
  margin-top: calc(-1 * clamp(2rem, 5vw, 3.5rem) - 2.25rem); position: relative; z-index: 2;
}
.ch-service { display: flex; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--ch-line); border-radius: var(--ch-radius); padding: 1rem 1.1rem; box-shadow: var(--ch-shadow); }
.ch-service svg {
  width: 44px; height: 44px; flex: none; padding: 10px; border-radius: 12px; background: var(--ch-orange-soft);
  fill: none; stroke: var(--ch-orange-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.ch-service strong { display: block; color: var(--ch-ink); font-size: .95rem; }
.ch-service span { display: block; color: var(--ch-muted); font-size: .85rem; }

.ch-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.25rem; }
.ch-section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: var(--ch-ink); margin: 0; }
.ch-section-head p { color: var(--ch-muted); margin: 0; }
.ch-brands__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.ch-brand { background: #fff; border: 1px solid var(--ch-line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.ch-brand:hover { box-shadow: var(--ch-shadow); transform: translateY(-2px); }
.ch-brand__head {
  display: block; padding: 1.4rem 1.4rem 1.2rem; text-decoration: none; color: #fff; position: relative; min-height: 150px;
  background: linear-gradient(135deg, #23282e, #16191d);
}
.ch-brand__head::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.ch-brand--7 .ch-brand__head { background: linear-gradient(135deg, #e8700f, #b9520a); }
.ch-brand--3 .ch-brand__head { background: linear-gradient(135deg, #2b3036, #16191d); }
.ch-brand--265 .ch-brand__head { background: linear-gradient(135deg, #5f6873, #3a4048); }
.ch-brand__head h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .3rem; color: #fff; }
.ch-brand__head p { margin: 0 0 1rem; color: rgba(255,255,255,.85); font-size: .92rem; max-width: 22rem; }
.ch-brand__head:hover { color: #fff; }
.ch-brand__more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; color: #fff; }
.ch-brand__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ch-brand__head:hover .ch-brand__more svg { transform: translateX(4px); }
.ch-brand__list { list-style: none; margin: 0; padding: 1rem 1.1rem 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.ch-brand__list a {
  display: inline-block; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--ch-line); background: var(--ch-bg);
  color: var(--ch-ink-2); font-size: .88rem; font-weight: 600; text-decoration: none; transition: all .15s;
}
.ch-brand__list a:hover { border-color: var(--ch-orange); background: var(--ch-orange-soft); color: var(--ch-orange-dark); }

.ch-help__box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 20px; color: #fff;
  background: radial-gradient(600px 300px at 100% 0, rgba(255,255,255,.18), transparent 60%), linear-gradient(135deg, #e8700f, #b9520a);
}
.ch-help__box h2 { color: #fff; font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 0 0 .35rem; }
.ch-help__box p { margin: 0; color: rgba(255,255,255,.92); max-width: 40rem; }
.ch-help__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ch-help .ch-btn--primary { background: var(--ch-ink); }
.ch-help .ch-btn--primary:hover { background: #000; }

/* Aviso de cookies */
.ch-cookies[hidden] { display: none !important; }
.ch-cookies {
  position: fixed; z-index: 1080; left: 1rem; right: 1rem; bottom: 1rem; margin-inline: auto; max-width: 760px;
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 16px;
  background: var(--ch-ink); color: #dfe3e8; box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
.ch-cookies p { margin: 0; font-size: .9rem; flex: 1; }
.ch-cookies a { color: #ffb980; }
.ch-cookies .ch-btn { padding: .6rem 1.1rem; flex: none; }

@media (max-width: 991.98px) {
  .ch-hero__inner { grid-template-columns: 1fr; }
  .ch-hero__card { display: none; }
  .ch-services { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: -2.5rem; }
  .ch-brands__grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .ch-services { grid-template-columns: 1fr; }
  .ch-hero__search { flex-wrap: wrap; }
  .ch-hero__search button { width: 100%; }
  .ch-hero__ctas .ch-btn { flex: 1 1 100%; }
}
