/* MotoDrive – Custom CSS */
/* Brand: #FF0000 | Black: #000000 | White: #FFFFFF | Font: Rethink Sans */

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

* {
    touch-action: manipulation;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff0000;
}

/* Text selection */
::selection {
    background: rgba(255, 0, 0, 0.25);
    color: #fff;
}

/* Focus ring */
:focus-visible {
    outline: 2px solid #ff0000;
    outline-offset: 2px;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Marquee (brand slider) */
.marquee-track {
    animation: marquee 35s linear infinite;
    width: max-content;
}
.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Fade-in keyframe */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #111 25%, #1a1a1a 50%, #111 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* Utility */
.w-4\.5 { width: 1.125rem; }
.h-4\.5 { height: 1.125rem; }

/* Sharp corners variant for brand elements */
.rounded-brand { border-radius: 2px; }

/* Autofill override – prevents browser from applying light background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #000 inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    transition: background-color 9999s ease-in-out 0s;
}

/* Alpine.js: skryť obsah s x-cloak, kým sa Alpine nenačíta (akordeóny FAQ) */
[x-cloak] { display: none !important; }

/* iOS Safari pri ťuknutí do poľa s písmom < 16 px priblíži celú stránku
   (nepríjemné hlavne v objednávke). Na mobile preto min. 16 px. */
@media (max-width: 767px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ── Hero (úvodná stránka) – fotka predajne na pozadí ───────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    min-height: clamp(560px, 78vh, 780px);
}
.hero-bg, .hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-bg img {
    object-fit: cover;
    object-position: 65% 20%;
}
.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.78) 32%, rgba(0,0,0,.35) 58%, rgba(0,0,0,.05) 80%),
        linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 30%);
}
.hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 32px;
}
.hero-content { max-width: 620px; }
.hero-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #e5e5e5;
}
.hero-label-sep { color: #ff0000; }
.hero-title {
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
    color: #fff;
    line-height: .95;
    letter-spacing: -.01em;
    margin-bottom: 14px;
}
.hero-title-light { font-weight: 400; font-size: clamp(40px, 6.2vw, 84px); }
.hero-title-bold  { font-weight: 800; font-size: clamp(46px, 7.4vw, 100px); }
.hero-desc {
    font-size: clamp(18px, 2.6vw, 34px);
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #f5f5f5;
}
.hero-line {
    display: block;
    width: 200px;
    height: 3px;
    background: #ff0000;
    margin: 26px 0 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-cta, .hero-cta2 {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: background-color .25s, box-shadow .25s, border-color .25s;
}
.hero-cta { background: #ff0000; color: #fff; }
.hero-cta:hover { background: #cc0000; box-shadow: 0 12px 30px rgba(255,0,0,.3); }
.hero-cta2 { border: 1px solid rgba(255,255,255,.3); color: #fff; }
.hero-cta2:hover { border-color: rgba(255,255,255,.7); }
.hero-benefits {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    list-style: none;
    margin: 0;
    padding: 0;
}
.hero-benefits li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 30px;
    border-left: 1px solid rgba(255,255,255,.25);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #e5e5e5;
}
.hero-benefits li:first-child { border-left: 0; padding-left: 0; }
.hero-benefits svg { width: 34px; height: 34px; flex-shrink: 0; color: #fff; }

@media (max-width: 1023px) {
    .hero-benefits { grid-template-columns: repeat(2, auto); row-gap: 18px; }
    .hero-benefits li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 768px) {
    .hero { min-height: 0; }
    .hero-bg img { object-position: 72% 30%; }
    .hero-shade {
        background:
            linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.4) 100%),
            linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,0) 45%);
    }
    .hero-inner { padding-top: 48px; padding-bottom: 28px; gap: 40px; }
    .hero-label { font-size: 11px; gap: 7px; margin-bottom: 20px; }
    .hero-line { width: 120px; margin: 20px 0 24px; }
    .hero-cta { padding: 16px 24px; font-size: 14px; }
    .hero-benefits { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
    .hero-benefits li { padding: 0; border-left: 0; font-size: 11px; gap: 10px; min-width: 0; }
    .hero-benefits li span { min-width: 0; overflow-wrap: anywhere; }
    .hero-benefits svg { width: 26px; height: 26px; }
}

/* ── Priesvitná navigácia nad hero (len úvodná stránka) ───────────────────── */
/* --nav-a (0–1) nastavuje Alpine podľa scrollu → navigácia tmavne postupne, nie skokom */
header.nav-over-hero {
    --nav-h: 64px;
    background: rgba(0, 0, 0, calc(.85 * var(--nav-a, 0)));
    border-bottom-color: rgba(255, 255, 255, calc(.05 * var(--nav-a, 0)));
    -webkit-backdrop-filter: blur(calc(12px * var(--nav-a, 0)));
    backdrop-filter: blur(calc(12px * var(--nav-a, 0)));
    margin-bottom: calc(-1 * var(--nav-h));   /* hero fotka pokračuje pod navigáciou */
}
header.nav-over-hero ~ main .hero-inner { padding-top: calc(48px + 64px); }
@media (min-width: 1024px) {
    header.nav-over-hero { --nav-h: 80px; }
    header.nav-over-hero ~ main .hero-inner { padding-top: calc(72px + 80px); }
}
/* tmavší pruh hore, nech je menu čitateľné aj nad oblohou */
header.nav-over-hero ~ main .hero-shade {
    background:
        linear-gradient(180deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 90px, rgba(0,0,0,0) 240px),
        linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.78) 32%, rgba(0,0,0,.35) 58%, rgba(0,0,0,.05) 80%),
        linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 30%);
}
@media (max-width: 768px) {
    header.nav-over-hero ~ main .hero-shade {
        background:
            linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 70px, rgba(0,0,0,0) 180px),
            linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.4) 100%),
            linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,0) 45%);
    }
}

/* Výhody v hero – odkazy s hover efektom */
.hero-benefits a {
    display: flex;
    align-items: center;
    gap: inherit;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    outline-offset: 6px;
}
.hero-benefit-icon {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    isolation: isolate;
    color: #fff;
    transition: color .3s, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.hero-benefit-icon::after {               /* červená žiara za ikonou */
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,0,0,.35) 0%, rgba(255,0,0,0) 70%);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .3s, transform .3s;
    z-index: -1;
}
.hero-benefit-text {
    position: relative;
    padding-bottom: 4px;
    transition: color .3s;
}
.hero-benefit-text::after {               /* červená čiara, ktorá sa vysunie zľava */
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #ff0000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}
.hero-benefits a:hover .hero-benefit-icon,
.hero-benefits a:focus-visible .hero-benefit-icon { color: #ff0000; transform: translateY(-3px) scale(1.08); }
.hero-benefits a:hover .hero-benefit-icon::after,
.hero-benefits a:focus-visible .hero-benefit-icon::after { opacity: 1; transform: scale(1); }
.hero-benefits a:hover .hero-benefit-text,
.hero-benefits a:focus-visible .hero-benefit-text { color: #fff; }
.hero-benefits a:hover .hero-benefit-text::after,
.hero-benefits a:focus-visible .hero-benefit-text::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
    .hero-benefit-icon, .hero-benefit-icon::after, .hero-benefit-text::after { transition: none; }
}

/* ── Navigácia v jednom riadku ────────────────────────────────────────────── */
@media (min-width: 1024px) {
    .md-logo { height: 28px; }
    .md-desktop-nav > div > a { padding-left: 12px; padding-right: 12px; white-space: nowrap; }
}
/* 1024–1279 px: plné menu sa nezmestí → ako na tablete (tlačidlo ☰) */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    header .md-desktop-nav { display: none; }
    header .md-burger { display: inline-block; }
    header .md-mobile-panel { display: block; }   /* zatvorené drží inline display:none z Alpine */
}
/* vyhľadávanie nad fotkou – pole „pláva“, navigácia kvôli nemu nestmavne */
header.nav-over-hero form input[name="q"] { box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
header.nav-over-hero .md-search-panel {     /* nemení výšku navigácie → fotka sa neposunie */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}
/* rozbaľovacie menu kategórií vždy nad vyhľadávaním */
.md-desktop-nav > div > div { z-index: 40; }

/* Veľké monitory: fotka je širšia ako vyššia → zarovnať hore (nápis na budove celý) a dovoliť vyšší hero */
@media (min-width: 1280px) {
    .hero-bg img { object-position: 65% 0%; }
}
@media (min-width: 1600px) {
    .hero { min-height: clamp(640px, 76vh, 940px); }
}
/* Široké monitory: fotku neroztiahnuť na celú šírku (bola by príliš priblížená a mäkká) –
   zarovnať vpravo v prirodzenej veľkosti a ľavý okraj plynulo stratiť do čiernej */
@media (min-width: 2000px) {
    .hero-bg img {
        left: auto;
        right: 0;
        width: auto;
        min-width: 62%;
        height: 100%;
        object-position: right top;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
        mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
    }
}
/* Mobil/tablet: text cez fotku ako na počítači – vľavo tma, vpravo predajňa s nápisom a vlajkou.
   Fotka nie je roztiahnutá na celú výšku (bola by príliš priblížená), je širšia ako displej a zarovnaná vpravo. */
@media (max-width: 768px) {
    .hero-bg img {
        top: 52px;                      /* nápis na budove pod navigáciou */
        left: auto;
        right: 0;
        width: 160%;
        height: auto;
        object-fit: fill;
        -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
    }
    header.nav-over-hero ~ main .hero-shade,
    .hero-shade {
        background:
            linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 110px),
            linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 40%, rgba(0,0,0,.1) 75%, rgba(0,0,0,0) 100%);
    }
}

/* Kontakt – hover na ikonách (celý riadok je oblasť pre hover) */
.ci-icon {
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), background-color .25s, border-color .25s, box-shadow .25s;
}
.ci-icon svg { transition: color .25s; }
.ci-row:hover .ci-icon {
    transform: translateY(-2px) scale(1.08) rotate(-4deg);
    background-color: #ff0000;
    border-color: #ff0000;
    box-shadow: 0 10px 28px rgba(255, 0, 0, .4);
}
.ci-row:hover .ci-icon svg { color: #fff; }
@media (prefers-reduced-motion: reduce) {
    .ci-row:hover .ci-icon { transform: none; }
}
