:root {
  color-scheme: light;
  --ink: #171a1c;
  --paper: #f5f3ee;
  --orange: #ffb63e;
  --rust: #984500;
  --line: #d9d6ce;
  font-family: "Segoe UI", system-ui, sans-serif;
  scroll-padding-top: 1rem;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #1b78ca; outline-offset: 4px; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 3; padding: .5rem 1rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.header { color: white; background: var(--ink); border-bottom: 1px solid #ffffff25; }
.bar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; line-height: 1.1; }
.brand strong, footer strong { display: block; font-size: 1.65rem; font-weight: 900; letter-spacing: .065em; }
.brand small { display: block; font-size: .82rem; color: #d2d2ce; margin-top: .23rem; }
.badge { display: grid; place-items: center; width: 42px; height: 42px; background: #bd202a; color: white; font-weight: 900; font-size: 2rem; border-radius: 6px; }
nav { display: flex; align-items: center; gap: clamp(.75rem, 3vw, 2.25rem); }
nav a { text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--orange); }
.nav-cta { border: 1px solid #ffffff55; padding: .55rem .9rem; border-radius: 5px; }
.hero { background: var(--ink); color: white; overflow: hidden; display: grid; }
.hero-grid { display: grid; grid-template-columns: .96fr 1fr; min-height: 540px; align-items: stretch; }
.hero-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.hero-slide.is-current { opacity: 1; visibility: visible; }
.hero-controls { display: flex; gap: .25rem; padding-block: .25rem .45rem; }
.hero-controls[hidden] { display: none; }
.hero-controls button { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; color: var(--orange); border: 0; background: transparent; cursor: pointer; }
.hero-controls button::before { content: ""; width: 10px; height: 10px; border: 1px solid currentColor; border-radius: 50%; }
.hero-controls button[aria-current]::before { background: currentColor; }
.hero-controls button:focus-visible { outline: 2px solid var(--orange); outline-offset: -3px; }
.hero-copy { align-self: center; position: relative; z-index: 1; padding: 4rem 0; }
.eyebrow { margin: 0 0 .85rem; color: var(--rust); font-size: .875rem; letter-spacing: .13em; font-weight: 800; text-transform: uppercase; }
.hero .eyebrow, .parts .eyebrow, h1 span { color: var(--orange); }
h1, h2, h3 { line-height: 1.07; margin: 0; }
h1, h2 { font-weight: 850; letter-spacing: -.055em; }
h1 { font-size: clamp(3.4rem, 7.4vw, 7rem); }
.hero-title { font-size: clamp(3.2rem, 6.5vw, 6.15rem); }
.hero-location { display: block; color: var(--orange); font-size: .59em; letter-spacing: -.035em; margin-top: .2em; }
h2 { font-size: clamp(2.1rem, 4vw, 3.75rem); }
h3 { font-size: 1.25rem; }
.intro { max-width: 29ch; font-size: clamp(1.1rem, 1.9vw, 1.38rem); color: #deded9; margin: 1.25rem 0 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: .62rem 1.1rem; border: 1px solid transparent; border-radius: 5px; text-decoration: none; font-weight: 750; }
.primary { background: var(--orange); color: var(--ink); }
.primary:hover { background: #ffd182; }
.outline { border-color: #ffffff66; }
.outline:hover { border-color: var(--orange); color: var(--orange); }
.hero-photo, .rotor-stage { position: relative; overflow: hidden; container-type: size; }
.hero-photo { margin: 0; min-width: 0; }
.hero-workshop { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 59% center; }
.alternator-shot { position: absolute; width: max(100cqw + 4px, 150.06cqh + 4px); aspect-ratio: 1280 / 853; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: motor-idle .32s ease-in-out infinite; }
.alternator-shot img { display: block; width: 100%; height: auto; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink), transparent 23%), linear-gradient(0deg, #171a1cbd, transparent 23%); }
.specialties { background: var(--orange); font-weight: 800; }
.specialties .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: .85rem; }
.specialties span::before { content: "•"; padding-right: .55rem; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-head { display: grid; grid-template-columns: 1.45fr .65fr; align-items: end; gap: 1rem 3rem; margin-bottom: 2rem; }
.section-head p:last-child { margin: 0; color: #4f514c; }
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: .85rem; }
.service-arranque { --photo: url("./arranque.jpg"); }
.service-alternador { --photo: url("./alternador.jpg"); }
.service-componentes { --photo: url("./componentes.jpg"); --position: left center; }
.service-instalacion { --photo: url("./instalacion.jpg"); }
.service-escaneo { --photo: url("./escaneo.jpg"); }
.service, .category-header {
  color: white;
  background: #242829;
  background-image: linear-gradient(0deg, #111416 5%, #111416dc 35%, #11141610 95%), var(--photo);
  background-position: center, var(--position, center);
  background-size: cover;
  border-radius: 8px;
}
.service { grid-column: span 2; display: flex; flex-direction: column; justify-content: end; min-height: 300px; padding: 1.35rem; }
.service:nth-last-child(-n+2) { grid-column: span 3; }
.service h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
.service p { margin: .55rem 0 .85rem; color: #f0eeeb; }
.service-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.service-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--orange); font-weight: 700; text-underline-offset: .25em; }
.parts { background: #242829; color: white; padding-block: clamp(3rem, 7vw, 5rem); }
.part-grid, .contact { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 1.5rem 4rem; }
.part-grid p:not(.eyebrow) { color: #deded9; max-width: 48ch; }
.part-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #ffffff3b; }
.part-list li { padding: .9rem .3rem; border-bottom: 1px solid #ffffff3b; font-size: 1.12rem; font-weight: 650; }
.part-list li::before { content: "•"; color: var(--orange); margin-right: .7rem; }
.contact p { max-width: 51ch; }
.contact-status { padding: 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--orange); background: #fffdf8; }
footer { background: var(--ink); color: #deded9; padding-block: 1.45rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
footer strong { color: white; }
.footer-inner > a { font-size: .875rem; text-underline-offset: .2em; }
.footer-inner address { font-style: normal; }
.shop-intro { padding-block: clamp(2.5rem, 6vw, 5rem); background: var(--ink); color: white; }
.shop-intro h1 { font-size: clamp(2.55rem, 6.7vw, 5.6rem); }
.shop-intro .eyebrow { color: var(--orange); }
.shop-intro p:last-child { max-width: 58ch; color: #deded9; margin-bottom: 0; }
.service-detail { display: grid; grid-template-columns: 1fr .8fr; align-items: start; gap: 2rem; }
.service-detail img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.shop-content { max-width: 1080px; padding-block: 1.5rem 5rem; }
.category-nav { display: flex; flex-wrap: wrap; justify-content: start; gap: .55rem; margin-bottom: 1.65rem; }
.category-nav a { padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 5px; background: #fffdf8; }
.category-nav a:hover { border-color: var(--rust); color: var(--rust); }
.shop-category { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); align-items: start; gap: 1rem; }
.shop-category + .shop-category { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.category-header { aspect-ratio: 4 / 3; display: flex; align-items: end; padding: 1.2rem; }
.category-header h2 { font-size: clamp(1.65rem, 2.4vw, 2.35rem); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .8rem; }
.product { display: flex; align-items: start; flex-direction: column; gap: 1rem; padding: 1.2rem; background: #fffdf8; border: 1px solid var(--line); border-radius: 8px; }
.product .button { margin-top: auto; }
.shop-featured { margin-bottom: 2.3rem; }
.shop-featured h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.shop-featured .product-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.product-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 5px; background: #eee; }
.admin h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.admin-form { max-width: 36rem; display: grid; gap: 1rem; margin-top: 1.4rem; }
.admin-form label { display: grid; gap: .35rem; font-weight: 700; }
.admin-form :is(input, select, textarea) { width: 100%; padding: .6rem; border: 1px solid #aaa; border-radius: 5px; font: inherit; background: white; }
.admin-form textarea { min-height: 7rem; resize: vertical; }
.admin-form .button { justify-self: start; cursor: pointer; }
.admin-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .75rem; padding: 0; list-style: none; }
.admin-products li { display: grid; gap: .3rem; background: #fffdf8; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.product p { color: #51534f; margin: .45rem 0 1rem; }
.product-price { display: grid; margin-top: auto; margin-bottom: .8rem; }
.product-price strong { font-size: 1.4rem; line-height: 1.2; }
.product-price a { color: var(--rust); font-size: .875rem; text-underline-offset: .2em; }
.motion-section { color: white; background: #101315; padding: 2.7rem 0 1.25rem; overflow: hidden; }
.motion-head { display: grid; grid-template-columns: .85fr 1fr; align-items: center; gap: 2rem; padding-bottom: 1.85rem; }
.motion-head .eyebrow { color: var(--orange); }
.motion-head p:not(.eyebrow) { color: #deded9; margin: .65rem 0; }
.rotor-stage { min-height: 230px; border-radius: 8px; background: var(--ink); }
.rotor-stage .alternator-shot { width: max(150cqw, 225.09cqh); top: 29%; left: 44%; }
.brand-window { max-width: 1440px; margin-inline: auto; overflow: hidden; border-block: 1px solid #ffffff29; }
.brand-track { display: flex; width: max-content; animation: brand-scroll 35s linear infinite; }
.brand-run { display: flex; margin: 0; padding: 0; list-style: none; }
.brand-run li { display: grid; place-items: center; width: 142px; height: 90px; padding: .75rem; border-inline-end: 1px solid #ffffff29; }
.brand-run img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: .6rem .75rem; background: #f5f3ee; border-radius: 6px; }
@keyframes motor-idle {
  30% { transform: translate(calc(-50% + .7px), calc(-50% - .4px)); }
  68% { transform: translate(calc(-50% - .5px), calc(-50% + .5px)); }
}
@keyframes brand-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .brand-track, .alternator-shot { animation: none; }
  .brand-run[aria-hidden] { display: none; }
  .brand-track { width: auto; }
  .brand-run { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service, .service:nth-last-child(-n+2) { grid-column: auto; }
  .hero-grid { min-height: 440px; }
}
@media (max-width: 680px) {
  .service-detail { grid-template-columns: 1fr; }
  .shop-category { grid-template-columns: 1fr; }
  .category-header { aspect-ratio: 2 / 1; }
  .wrap { width: calc(100% - 2rem); }
  .bar { min-height: auto; padding-block: .85rem .5rem; flex-wrap: wrap; gap: .5rem; }
  nav { width: 100%; justify-content: space-between; }
  nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .94rem; }
  .hero-grid, .section-head, .part-grid, .contact { grid-template-columns: 1fr; }
  .hero-copy { padding: 2.5rem 0 1.4rem; }
  h1, .hero-title { font-size: clamp(2.55rem, 9.8vw, 4.6rem); }
  .hero-photo { min-height: clamp(250px, 65vw, 385px); }
  .hero-workshop { object-position: 56% 60%; }
  .hero-photo::after { background: linear-gradient(180deg, var(--ink), transparent 20%), linear-gradient(0deg, #171a1cbd, transparent 24%); }
  .specialties .wrap { font-size: .875rem; }
}
@media (max-width: 530px) {
  .cards, .product-grid { grid-template-columns: 1fr; }
  .service { min-height: 255px; }
  .motion-head { grid-template-columns: 1fr; gap: .8rem; }
  .rotor-stage { min-height: 185px; }
}
