/* ==========================================================================
   NOVELTY GROUP — Media Queries Only
   --------------------------------------------------------------------------
   The project is written mobile-first in css/global.css.
   This file contains every responsive override, ordered by breakpoint:
     ≥ 600px  — large phones / small tablets
     ≥ 768px  — tablets
     ≥ 1024px — laptops / desktops (full navigation appears here)
     ≥ 1280px — large desktops (matches the 1440px Figma frame)
   ========================================================================== */

/* --------------------------------------------------------------------------
   ≥ 600px — large phones / small tablets
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
  .specialities__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Cards grow back to their tablet/desktop proportions */
  .new-cars__grid {
    gap: 16px;
    margin-top: 32px;
  }

  .car-card__name {
    font-size: 16px;
  }

  .car-card__btn {
    width: 28px;
    height: 28px;
  }

  .car-card__btn svg {
    width: 14px;
    height: 14px;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 32px;
  }

  .hero-swiper .swiper-slide {
    height: 440px;
  }

  .cta__banner {
    padding: 48px 32px;
  }
}

/* --------------------------------------------------------------------------
   ≥ 768px — tablets
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .section {
    padding-block: 80px;
  }

  .service__layout,
  .listing__layout,
  .why-novality {
    padding-bottom: 80px;
  }

  /* Figma PDP: the colours card sits flush above the reviews section —
     the 80px gap is the reviews section's own top padding */
  .model__layout {
    padding-bottom: 0;
  }

  .model__main > :last-child {
    margin-bottom: 0;
  }

  /* Matches the 90px banner-to-section gap in the Figma about page */
  .why-novality {
    padding-top: 88px;
  }

  .container {
    padding-inline: 24px;
  }

  .section__title {
    font-size: 40px;
  }

  .reviews .section__title {
    font-size: 40px;
    line-height: 56px;
    margin-bottom: 40px;
  }
  .reviews__intro-text{
    margin-bottom: 24px;
  }

  .specialities__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .new-cars__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .speciality-card {
    padding: 25px;
  }

  .speciality-card__icon {
    margin-bottom: 20px;
  }

  .car-card__name {
    font-size: 16px;
  }

  .bento,
  .bento__col {
    gap: 16px;
  }

  .bento-card {
    height: 268px;
    border-radius: 30px;
    padding: 24px 32px;
  }

  .bento-card--support,
  .bento-card--dealers {
    padding-inline: 16px;
  }

  .bento-card--dealers {
    padding-top: 15px;
  }

  .bento-card__title {
    font-size: 20px;
    line-height: 1.6;
  }

  .bento-card__text {
    font-size: 14px;
    line-height: 1.57;
  }

  .bento-card--support img {
    width: 147px;
    max-width: 80%;
    height: 106px;
    object-fit: cover;
    /* Figma: 12px radius on the photo tile */
    border-radius: 12px;
  }

  .bento-card--dealers .bento-card__text {
    font-size: 14px;
  }

  .bento-card--dealers img {
    width: 91%;
    height: 111px;
    object-fit: cover;
  }

  .bento-card--price img {
    width: 51.5%;
    height: auto;
  }

  /* Key + document visual anchors to the card's bottom-right corner */
  .bento-card--booking img {
    position: absolute;
    right: 2px;
    bottom: 4px;
    width: 71%;
    height: auto;
    max-width: none;
    margin: 0;
  }

  .why-us__title {
    font-size: 40px;
    /* Desktop: 40/48 (mobile keeps 30/36 from global.css) */
    line-height: 48px;
    margin-bottom: 40px;
  }

  .hero__image {
    object-position: center;
  }

  /* CTA banner switches to a horizontal layout */
  .cta__banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    height: 172px;
    padding: 16px 60px;
    border-radius: 24px;
  }

  .cta__banner .btn {
    width: auto;
    border-radius: 999px;
    padding-block: 14px;
    font-size: 14px;
  }


  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  /* ---- Model overview ---- */
  /* Desktop Figma section rhythm: 50px padding, 40px above the divider */
  .model-section {
    padding-top: 50px;
  }

  .model-section + .model-section {
    margin-top: 40px;
  }

  /* Overview sits right under the tabs: 40px top space */
  #overview.model-section {
    padding-top: 40px;
  }

  /* Figma 11705:14048 / 11705:14199: 30px between the title and the list */
  #overview .model-section__title,
  #features .model-section__title {
    margin-bottom: 30px;
  }

  /* Figma: last accordion text 40px above the divider, Colours title 42px below */
  #features + #colours {
    margin-top: 20px;
  }

  #colours.model-section {
    padding-top: 42px;
  }

  .gallery-swiper {
    aspect-ratio: auto;
  }

  .gallery-swiper .swiper-slide {
    height: 380px;
  }

  /* Fill column-first so the spec order matches the Figma columns
     (items 1-7 in the left column, 8-14 in the right) */
  .overview-list {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Variant rows switch from stacked cards to a 3-column table row */
  .price-table__head {
    display: grid;
  }

  .variant-row {
    display: grid;
    /* Figma 11705:14165: 300px name column, price fills, actions auto, 20px gaps */
    grid-template-columns: 300px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    /* 16.5px + 51px content + 16.5px + 2px borders = Figma's 86px row */
    padding: 16.5px 20px;
  }

  .variant-row__desc,
  .variant-row__price {
    margin-bottom: 0;
  }

  .btn--outline {
    flex: 0 0 auto;
  }

  /* ---- About us: promo banners side by side ---- */
  .promo-grid {
    grid-template-columns: 1.02fr 1fr;
    gap: 32px;
  }

  /* ---- Contact us ---- */
  .contact-form .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form button[type="submit"] {
    /* Figma: compact 148x48 button — size to the label, don't stretch
       to the grid column */
    width: auto;
    justify-self: start;
  }

  /* ---- Used cars: 2-column card grid ---- */
  .used-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-head__title {
    font-size: 40px;
    line-height: 48px;
  }

  /* ---- Outlets page — START ---- */
  .outlet-row {
    flex-direction: row;
    /* Figma: columns bottom-aligned */
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 30px;
    margin-bottom: 20px;
  }

  .outlet-row__actions {
    width: 217px;
  }

  .outlet-row__name {
    /* Figma 12089:9596: 20px/26 */
    font-size: 20px;
    line-height: 26px;
  }
  /* ---- Outlets page — END ---- */

  /* ---- Careers page — START ---- */
  .careers__hero-title,
  .careers__title {
    font-size: 40px;
  }

  .careers-collage {
    display: grid;
    grid-template-columns: 685fr 495fr;
    gap: 20px;
    height: 577px;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .careers-collage__side {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
  }

  .careers-collage img {
    width: 100%;
    height: 100%;
  }

  .careers-openings {
    margin-top: 90px;
  }

  /* Row layout: content left, Apply bottom-right (Figma 931x162 card) */
  .job-card {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 30px;
  }

  .job-card__desc {
    margin-bottom: 14px;
  }

  .job-card__meta {
    gap: 8px 40px;
  }

  .job-card__meta svg {
    width: 20px;
    height: 20px;
  }

  .job-card__cta {
    align-self: flex-end;
    width: auto;
  }

  .career-modal {
    padding: 16px;
  }

  .career-modal__card {
    width: 480px;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 2rem);
    /* Figma: 24px radius, 40/32/32 padding */
    border-radius: 24px;
    padding: 40px 32px 32px;
  }
  /* ---- Careers page — END ---- */
}

/* --------------------------------------------------------------------------
   ≥ 1024px — laptops / desktops
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  /* ---- Desktop background blobs ---- */
  body {
    background-image: url("../images/home-bg.svg");
  }

  /* ---- Top bar becomes visible ---- */
  .topbar {
    display: block;
  }

  /* Stick 40px (the topbar's height) above the viewport: the topbar
     scrolls away naturally and the header's flow height never changes,
     so the sticky state can't feedback-loop into a flicker */
  .site-header {
    top: -40px;
  }

  /* ---- Full horizontal navigation ---- */
  .navbar {
    border-radius: 16px;
    width: min(1280px, 100% - 48px);
    margin-inline: auto;
    box-shadow: 0 30px 30px rgba(0, 0, 0, 0.08);
  }

  .navbar__toggle {
    display: none;
  }

  .navbar__inner {
    justify-content: space-between;
    min-height: 64px;
    /* .container already adds 24px; logo lands at x=120 like the Figma render */
    padding-inline: 16px;
    gap: 40px;
  }

  .navbar__logo {
    width: auto;
    height: 48px;
  }

  .navbar__brand {
    order: 0;
  }

  .navbar__menu {
    order: 1;
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    /* Figma: 30px between links */
    gap: 30px;
    background: none;
    box-shadow: none;
    padding: 0;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .navbar__link {
    font-size: 15px;
    font-weight: 600;
    padding: 12px 0;
  }

  .navbar__cta {
    order: 2;
    margin-left: 0;
    height: 48px;
    line-height: 1.2;
    /* Figma: 12px radius, 16px bold */
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
  }

  /* Dropdown opens on hover as a floating panel */
  .navbar__item--dropdown {
    position: relative;
  }

  .dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 0;
    min-width: 220px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
    padding: 8px;
  }

  .navbar__item--dropdown:hover .dropdown,
  .navbar__item--dropdown:focus-within .dropdown,
  .navbar__item--dropdown.is-open .dropdown {
    display: flex;
  }

  .dropdown__link {
    padding: 12px 16px;
  }

  .navbar__item--dropdown:hover .navbar__caret {
    transform: rotate(180deg);
  }

  /* ---- Sticky header state (matches the Figma "Header Sticky" frame):
     full-width flat bar, links pushed right, pill CTA, smaller logo ---- */
  .site-header.is-scrolled .navbar {
    width: 100%;
    border-radius: 0;
  }

  .site-header.is-scrolled .navbar__inner {
    min-height: 64px;
  }

  /* Keep the logo (and the whole row) exactly where the non-sticky
     pill puts it: cap the container to the pill's content box —
     only the bar itself spans full width. */
  .site-header.is-scrolled .navbar > .container {
    max-width: min(1280px, 100% - 48px);
  }

  .site-header.is-scrolled .navbar__menu {
    margin-left: auto;
  }

  /* ---- Hero ---- */
  .hero {
    padding-block: 24px 0;
  }

  /* Navbar keeps the full 1280px pill geometry */
  .navbar > .container {
    max-width: none;
  }

  /* Banner spans the full 1280px pill width (Figma), not the padded container */
  .hero .container {
    max-width: none;
    width: min(1280px, 100% - 48px);
    padding-inline: 0;
  }

  .hero-swiper .swiper-slide {
    height: 500px;
  }

  .hero__nav {
    display: inline-flex;
  }

  /* ---- About (Figma: text column + fixed 488px collage, 50px apart) ---- */
  .about__grid {
    grid-template-columns: minmax(0, 1fr) 488px;
    gap: 50px;
    align-items: center;
  }

  .about .section__title {
    margin-bottom: 40px;
  }

  .about__lead,
  .about__text {
    font-size: 18px;
    line-height: 1.6;
  }

  .about__quote {
    font-size: 18px;
    line-height: 1.4;
  }

  /* Figma collage: 232x192 tile, 16px radius, luminosity blend */
  .about__storefront {
    display: block;
    width: 47.49%;
    aspect-ratio: 232 / 192;
    object-fit: cover;
    border-radius: 16px;
    mix-blend-mode: luminosity;
  }

  /* Collage: caption sits beside the storefront, interior overlaps below */
  .about__caption {
    position: absolute;
    top: 0;
    right: 0;
    width: 44%;
    max-width: none;
    font-size: 14px;
    text-align: left;
    margin-bottom: 0;
  }

  /* Figma collage: 418x380 tile, 16px radius, overlapping 113px over
     the storefront (the tile starts 79px from the collage top) */
  .about__interior {
    aspect-ratio: 418 / 380;
    object-fit: cover;
    border-radius: 16px;
    width: 85.62%;
    margin: -23.16% 0 0 auto;
    position: relative;
  }

  .about-promos {
    margin-top: 90px;
  }

  /* Figma: 591px + 577px cards with a 32px gap on the 1200px column */
  .about-promo--service {
    flex: 591 1 0;
  }

  .about-promo--preowned {
    flex: 577 1 0;
  }

  .about-why {
    flex-direction: row;
    align-items: center;
    gap: 50px;
    margin-block: 90px;
  }

  .about-why__media {
    flex: 0 0 387px;
  }

  .about-why__intro {
    font-size: 18px;
  }

  /* ---- New cars (Figma: 285px glass cards, 20px gap) ---- */
  .new-cars__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
  }

  /* Figma: glass card — 30px radius, white hairline, translucent gradient */
  .car-card {
    border-radius: 30px;
    border: 1px solid var(--white);
    background: linear-gradient(134deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.67) 99.11%);
  }

  /* Figma: 194px cropped image band on the 285px card */
  .car-card__media {
    height: 194px;
    margin-bottom: 16px;
  }

  .car-card__name {
    font-size: 24px;
    line-height: 26.4px;
    padding: 0 20px 0 24px;
    margin-bottom: 2px;
  }

  .car-card__footer {
    padding: 0 20px 20px 24px;
    gap: 10px;
  }

  .car-card__price {
    font-size: 16px;
    line-height: 25.6px;
  }

  .car-card__btn {
    width: 28px;
    height: 28px;
  }

  .car-card__btn svg {
    width: 14px;
    height: 14px;
  }

  /* ---- Why choose us (Figma: 614px bento + 536px copy, 50px apart) ---- */
  .why-us__grid {
    grid-template-columns: 614fr 536fr;
    gap: 50px;
  }

  .why-us__content .why-us__text,
  .why-us__content .why-us__list li {
    font-size: 18px;
    line-height: 1.6;
  }

  /* Figma: 24px between the copy blocks */
  .why-us__content .why-us__text {
    margin-bottom: 24px;
  }

  /* Figma: 16px between checklist rows, icon centered on its line */
  .why-us__list {
    gap: 16px;
  }

  .why-us__list li {
    align-items: center;
  }

  .why-us__list svg {
    margin-top: 0;
  }

  .bento {
    gap: 24px;
  }

  .bento__col {
    gap: 24px;
  }

  /* Staggered right column, as in the Figma design (50px drop) */
  .bento__col--offset {
    margin-top: 50px;
  }

  /* ---- Reviews ---- */
  .reviews__grid {
    /* Figma: 458px intro column, 692px slider, 50px apart */
    grid-template-columns: 458fr 692fr;
    gap: 50px;
  }

  /* Slider bleeds to the right edge of the viewport.
     The 1200px content column sits centered, so the gap to the右 edge is
     (100vw - 1200px) / 2 on wide screens and the container's own 24px
     padding below the 1248px max-width — min() picks the right one */
  .reviews__slider-wrap {
    margin-right: min(-24px, calc((1200px - 100vw) / 2));
  }

  .reviews__slider-wrap {
    margin-left: 0;
    padding-left: 0;
    overflow: visible;
  }

  .reviews-swiper {
    overflow: hidden;
    padding-right: 24px;
  }

  /* Figma: fixed 470px review cards (slidesPerView: "auto") */
  .reviews-swiper .swiper-slide {
    width: 470px;
  }

  .reviews__nav {
    display: flex;
    justify-content: flex-start;
  }


  .reviews__intro-text,
  .review-card__text,
  .about__lead,
  .about__text,
  .about__quote {
    font-size: 18px;
  }

  .about__lead,
  .about__text {
    line-height: 1.6;
  }

  .about__quote {
    line-height: 1.4;
  }

  /* Figma: 470 x 280 review card */
  .review-card {
    min-height: 280px;
  }

  /* Pagination dots are white 50% at all sizes (global.css) */

  .review-card {
    padding: 25px;
  }

  /* ---- CTA (Figma: 32px) ---- */
  .cta__text {
    font-size: 32px;
  }

  /* ---- Footer ---- */
  .footer__grid {
    grid-template-columns: repeat(3, 1fr) 180px;
  }

  /* Quick Links always sits in the last track, even when fewer
     outlet columns render (empty columns are skipped in the view) */
  .footer__links {
    grid-column: 4;
    grid-row: 1;
  }

  .site-footer {
    padding-top: 64px;
  }

  /* ---- Model overview: 2-column layout, sidebar on the right ----
     Figma 11705:14023: 763px content + 50px gap + 387px sidebar */
  .model__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 387px;
    gap: 50px;
    align-items: start;
  }

  .model__main,
  .model__aside {
    display: block;
    min-width: 0;
  }

  .model__aside {
    position: sticky;
    top: 100px;
  }

  .model__layout .model-title-card {
    margin-inline: 0;
    padding: 24px;
    border-radius: 30px;
    border-top: 1px solid var(--white);
  }

  .model__layout .reco-card {
    margin-top: 0;
  }

  .model__layout .model-gallery {
    margin-inline: 0;
    border-radius: 24px;
    margin-bottom: 40px;
  }

  .page-tabs {
    margin-inline: 0;
    padding-inline: 0;
  }

  .gallery-swiper .swiper-slide {
    height: 425px;
  }
  .model-gallery__nav {
    width: 40px;
    height: 40px;
  }
  .model-gallery__image {
  border-radius: none;
}


  .model-gallery__nav--prev {
    left: 20px;
  }

  .model-gallery__nav--next {
    right: 20px;
  }

  .model-gallery__actions {
    left: 10px;
    bottom: 10px;
  }

  .model-title-card,
  .reco-card {
    padding: 24px;
  }

  /* Figma 11705:14458: 40px between the title card and the reco card */
  .model__layout .model-title-card {
    margin-bottom: 40px;
  }

  .reco-card {
    border-radius: 30px;
  }

  .reco-card__title {
    font-size: 30px;
  }

  .model-title-card__name {
    /* Figma 11705:14461: 30px bold; price stays at the 24px base size */
    font-size: 30px;
    /* Figma 11705:14459: 20px between the card blocks (name / price+note /
       offers / chips); price→note is a tight 4px pair inside its block */
    margin-bottom: 20px;
  }

  .model-title-card__price {
    margin-bottom: 4px;
  }

  /* Figma 11705:14459: 20px card-block rhythm on desktop */
  .model-title-card__note,
  .model-title-card__emi {
    margin-bottom: 20px;
  }


  .model-section__title {
    font-size: 30px;
  }

  .colours-card {
    padding: 32px;
  }

  .colours-card__stage {
    padding: 8px 24px;
  }

  /* Figma 11707:16070: 48px white button, no border, soft shadow,
     24px chevron at 50% ink */
  .colours-card__nav {
    width: 48px;
    height: 48px;
    border: none;
    box-shadow: 0 4.8px 7.2px rgba(0, 0, 0, 0.1);
    color: var(--text-light);
  }

  .colours-card__image {
    width: 88%;
    max-height: 420px;
    border-radius: 0;
  }

  .swatches {
    justify-content: center;
  }

  /* ---- Contact us: side-by-side form + reach-out with divider ---- */
  .map-section {
    height: 427px;
  }

  /* Card sits left-of-centre over the red marker, as in the Figma */
  .map-card {
    left: 35.5%;
    transform: none;
    width: 304px;
  }

  .map-controls {
    right: 24px;
    bottom: 48px;
  }

  .assist {
    padding-top: 16px;
  }

  .reach-out__title {
    font-size: 30px;
  }

  .assist__grid {
    /* Figma: 730px form column (680 content + 50 padding + border-right),
       50px gap, 420px aside. minmax(0,…) keeps the exact ratio even if a
       child's min-content is wider */
    grid-template-columns: minmax(0, 730fr) minmax(0, 420fr);
    gap: 50px;
  }

  .assist__form {
    padding-right: 50px;
    border-right: 1px solid rgba(9, 8, 8, 0.1);
  }

  /* ---- Book service: form + sticky illustration panel ---- */
  .service__layout {
    grid-template-columns: minmax(0, 1fr) 470px;
    gap: 64px;
    align-items: start;
  }

  .service-aside {
    display: block;
    position: sticky;
    top: 100px;
  }

  /* ---- About us: illustration beside the Why-Novality copy ---- */
  .why-novality {
    grid-template-columns: 387px minmax(0, 1fr);
    gap: 64px;
  }

  /* ---- Used cars: sidebar filters + 3-column grid; the mobile
     listing header, Filters button and drawer disappear ---- */
  .listing__layout {
    /* Figma 11745:5726: 284px sidebar + 21px gap */
    grid-template-columns: 284px minmax(0, 1fr);
    gap: 21px;
  }

  .filter-sidebar {
    display: block;
  }

  /* Desktop: the "We found N cars" title goes, the applied-filter chips
     (+ Clear All) stay above the listing */
  .listing-head__title,
  .filters-fab,
  .filter-drawer {
    display: none;
  }

  .used-grid {
    /* Figma: 285px cards with 20px gaps (3-up in the 896px column) */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  /* ---- Outlets page — START ---- */
  .outlets-layout {
    grid-template-columns: 284px minmax(0, 1fr);
    gap: 21px;
  }

  .outlets-sidebar {
    display: block;
  }
  /* ---- Outlets page — END ---- */

  /* ---- Careers page — START ---- */
  .careers {
    padding-top: 60px;
  }
  /* ---- Careers page — END ---- */
}

/* --------------------------------------------------------------------------
   ≥ 1280px — large desktops
   (the reviews slider bleed is handled for all widths by the min()
   rule in the ≥1024 block)
   -------------------------------------------------------------------------- */
