/* ==========================================================================
   Cabecera nueva (header.php)
   Ruta: wp-content/themes/concesionarios/css/header-v2.css
   Tiro al Marketing · 26/11/2026
   Todo con prefijo "ahd-" para no pisar Bootstrap ni main.css.
   ========================================================================== */

:root {
  --ahd-dorado: #dcad3d;
  --ahd-dorado-h: #c99a2c;
  --ahd-dark: #16181b;
  --ahd-panel: #212529;
  --ahd-line: rgba(255, 255, 255, .10);
  --ahd-wa: #25d366;
  --ahd-h: 74px;
}

/* --- Franja superior --- */
.ahd-top { background: #0d0e10; color: #d9d9d9; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.ahd-top-in { position: relative; height: 36px; overflow: hidden; }
.ahd-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; white-space: nowrap; }
.ahd-msg.on { opacity: 1; transform: none; }
.ahd-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ahd-dorado); display: inline-block; flex: none; }

/* --- Barra principal --- */
.ahd { position: sticky; top: 0; z-index: 1040; background: rgba(22, 24, 27, .94); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--ahd-line); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; transition: box-shadow .2s; }
.ahd.ahd-scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
body.admin-bar .ahd { top: 32px; }
.ahd-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--ahd-h); padding: 0 28px; max-width: 1440px; margin: 0 auto; }
.ahd-logo { flex: none; line-height: 0; }
.ahd-logo img, .ahd-logo .custom-logo { height: 40px; width: auto; max-width: none; }

/* Menú escritorio */
.ahd-nav { flex: 1; display: flex; justify-content: center; }
.ahd-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.ahd-menu > li { position: relative; }
.ahd-menu > li > a { display: block; padding: 10px 14px; color: #ececec; text-decoration: none; font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; position: relative; white-space: nowrap; }
.ahd-menu > li > a:after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--ahd-dorado); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.ahd-menu > li > a:hover, .ahd-menu > li > a:focus-visible { color: #fff; }
.ahd-menu > li > a:hover:after, .ahd-menu > li.current-menu-item > a:after, .ahd-menu > li.current-menu-ancestor > a:after { transform: scaleX(1); }
.ahd-menu > li.current-menu-item > a, .ahd-menu > li.current-menu-ancestor > a { color: var(--ahd-dorado); }
.ahd-menu > li.menu-item-has-children > a { padding-right: 26px; }
.ahd-menu > li.menu-item-has-children > a:before { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); }
/* Submenú escritorio */
.ahd-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--ahd-panel); border: 1px solid var(--ahd-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; }
.ahd-menu > li:hover > .sub-menu, .ahd-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ahd-menu .sub-menu a { display: block; padding: 9px 12px; color: #e6e6e6; text-decoration: none; font-size: 14.5px; border-radius: 8px; }
.ahd-menu .sub-menu a:hover { background: rgba(255, 255, 255, .06); color: var(--ahd-dorado); }

/* Acciones derecha */
.ahd-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.ahd-tel { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 15px; white-space: nowrap; }
.ahd-tel i, .ahd-tel svg { color: var(--ahd-dorado); }
.ahd-tel:hover { color: var(--ahd-dorado); }
.ahd-cta { display: inline-flex; align-items: center; background: var(--ahd-dorado); color: #212529 !important; text-decoration: none; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 18px; border-radius: 10px; white-space: nowrap; transition: background .15s; }
.ahd-cta:hover { background: var(--ahd-dorado-h); }

/* Hamburguesa */
.ahd-burger { display: none; width: 46px; height: 46px; border: 1px solid var(--ahd-line); border-radius: 10px; background: transparent; cursor: pointer; padding: 0; position: relative; }
.ahd-burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; }
.ahd-burger span:nth-child(1) { top: 15px; }
.ahd-burger span:nth-child(2) { top: 22px; }
.ahd-burger span:nth-child(3) { top: 29px; right: 18px; }

/* --- Panel móvil --- */
.ahd-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .3s; }
.ahd-is-open .ahd-overlay { opacity: 1; }
.ahd-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100001; width: min(88vw, 380px); background: var(--ahd-panel); color: #fff; display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; box-shadow: -20px 0 60px rgba(0, 0, 0, .4); }
.ahd-is-open .ahd-panel { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
html.ahd-lock, html.ahd-lock body { overflow: hidden; }

.ahd-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ahd-line); min-height: var(--ahd-h); }
.ahd-panel-head .ahd-logo img { height: 34px; }
.ahd-close { width: 44px; height: 44px; border: 0; border-radius: 8px; background: var(--ahd-dorado); cursor: pointer; position: relative; flex: none; }
.ahd-close span { position: absolute; left: 11px; right: 11px; top: 21px; height: 2px; background: #212529; border-radius: 2px; }
.ahd-close span:nth-child(1) { transform: rotate(45deg); }
.ahd-close span:nth-child(2) { transform: rotate(-45deg); }

.ahd-panel-nav { flex: 1; overflow-y: auto; padding: 6px 24px; -webkit-overflow-scrolling: touch; }
.ahd-mmenu, .ahd-mmenu .sub-menu { list-style: none; margin: 0; padding: 0; }
.ahd-mmenu > li { position: relative; border-bottom: 1px solid var(--ahd-line); }
.ahd-mmenu > li > a { display: block; padding: 17px 50px 17px 0; color: #f2f2f2; text-decoration: none; font-size: 18px; font-weight: 600; }
.ahd-mmenu > li.current-menu-item > a, .ahd-mmenu > li.current-menu-ancestor > a { color: var(--ahd-dorado); }
.ahd-mmenu a:active { color: var(--ahd-dorado); }
.ahd-sub-toggle { position: absolute; right: -8px; top: 8px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.ahd-sub-toggle span { position: absolute; left: 14px; right: 14px; top: 21px; height: 2px; background: #bdbdbd; transition: transform .2s; }
.ahd-sub-toggle span:nth-child(2) { transform: rotate(90deg); }
.ahd-sub-open > .ahd-sub-toggle span:nth-child(2) { transform: rotate(0); }
.ahd-mmenu .sub-menu { display: none; padding: 0 0 12px 14px; border-left: 2px solid var(--ahd-dorado); margin-bottom: 14px; }
.ahd-sub-open > .sub-menu { display: block; }
.ahd-mmenu .sub-menu a { display: block; padding: 9px 0; color: #cfcfcf; text-decoration: none; font-size: 16px; }

.ahd-panel-foot { padding: 18px 24px 24px; border-top: 1px solid var(--ahd-line); display: grid; gap: 10px; }
.ahd-pbtn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 10px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; color: #fff !important; border: 1px solid rgba(255, 255, 255, .22); }
.ahd-pbtn-gold { background: var(--ahd-dorado); color: #212529 !important; border-color: var(--ahd-dorado); }
.ahd-pbtn-wa { background: var(--ahd-wa); border-color: var(--ahd-wa); }
.ahd-pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ahd-addr { margin: 6px 0 0; font-size: 13px; color: #a9a9a9; line-height: 1.5; }
.ahd-social { display: flex; gap: 10px; }
.ahd-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ahd-line); display: grid; place-items: center; color: #e6e6e6; text-decoration: none; font-size: 16px; }
.ahd-social a:hover { color: var(--ahd-dorado); border-color: var(--ahd-dorado); }

/* --- Anula la regla antigua ".menu-item" de main.css (inline-flex + margen) en los menús nuevos --- */
.ahd-menu > li, .ahd-mmenu > li, .ahd-menu .sub-menu > li, .ahd-mmenu .sub-menu > li { display: block; margin: 0; }

/* --- Responsive --- */
@media (max-width: 1280px) {
  .ahd-menu > li > a { padding: 10px 10px; font-size: 13px; }
  .ahd-menu > li > a:after { left: 10px; right: 10px; }
}
@media (max-width: 1099px) {
  .ahd-nav { display: none; }
  .ahd-burger { display: block; }
  .ahd-bar { padding: 0 18px; gap: 12px; }
}
@media (max-width: 782px) {
  body.admin-bar .ahd { top: 0; }
}
@media (max-width: 640px) {
  :root { --ahd-h: 64px; }
  .ahd-logo img, .ahd-logo .custom-logo { height: 32px; }
  .ahd-tel span, .ahd-cta { display: none; }
  .ahd-tel { width: 46px; height: 46px; justify-content: center; border: 1px solid var(--ahd-line); border-radius: 10px; font-size: 17px; }
  .ahd-actions { gap: 8px; }
  .ahd-top { font-size: 11px; letter-spacing: .06em; }
  .ahd-top-in { height: 32px; }
}