/* ============================================================
   FRT CARS — Responsive Styles
   Breakpoints: 1200px, 1024px, 768px, 480px
   ============================================================ */

/* ==========================================================
   MAX-WIDTH: 1200px — Large Tablets / Small Desktops
   ========================================================== */
@media (max-width: 1200px) {

  :root {
    --container-padding: 2rem;
  }

  .vehicles-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .vehicle-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .vehicle-detail-stack {
    gap: var(--space-xl);
  }

  .contact-grid {
    gap: var(--space-xl);
  }

  .hero-stats {
    gap: var(--space-xl);
  }

  .footer-grid {
    gap: var(--space-xl);
  }
}

/* ==========================================================
   MAX-WIDTH: 1024px — Tablets
   ========================================================== */
@media (max-width: 1024px) {

  /* Hide desktop nav, show mobile toggle */
  .header-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-phone {
    display: none;
  }

  .header-actions {
    gap: 0.5rem;
    margin-left: auto;
  }

  .header-whatsapp-btn {
    order: 1;
  }

  .mobile-menu-toggle {
    order: 2;
    margin-left: 0.25rem;
  }

  .header-whatsapp-btn .header-whatsapp-label {
    display: none;
  }

  .header-whatsapp-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
  }

  .header-whatsapp-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Reduce section padding */
  .section {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  /* Hero adjustments */
  .hero-stats {
    gap: var(--space-lg);
  }

  .hero-stat-number {
    font-size: var(--fs-h3);
  }

  /* Vehicle detail — same vertical stack on tablet */
  .vehicle-detail-stack {
    max-width: 100%;
  }

  .vehicle-gallery--hero .vehicle-gallery-main {
    width: 100%;
    max-height: none;
  }

  /* Contact grid goes single column */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* CTA section spacing */
  .cta-section {
    padding: var(--space-3xl) var(--space-xl);
  }

  /* About values grid */
  .about-values-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* ==========================================================
   MAX-WIDTH: 768px — Small Tablets / Large Phones
   ========================================================== */
@media (max-width: 768px) {

  /* Show mobile contact bar */
  .mobile-contact-bar {
    display: flex;
  }

  .desktop-fab-stack--left,
  .desktop-fab-stack--right .desktop-fab-whatsapp {
    display: none !important;
  }

  .desktop-fab-stack--right {
    display: flex !important;
    bottom: calc(1.35rem + env(safe-area-inset-bottom, 0px));
    left: 1.25rem;
    right: auto;
    transform: none;
    align-items: flex-end;
    gap: 0;
  }

  .desktop-fab-top,
  .back-to-top.desktop-fab-top {
    width: 56px;
    height: 56px;
    margin-bottom: 0;
    transform: translateY(16px) scale(0.85);
  }

  .desktop-fab-top.visible,
  .back-to-top.desktop-fab-top.visible {
    transform: translateY(0) scale(1);
  }

  .mobile-fab-call {
    animation: mobileCallBob 2.8s ease-in-out infinite;
  }

  .mobile-fab-pulse,
  .mobile-fab-ring {
    display: block;
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
  }

  .mobile-fab-pulse {
    inset: 0;
    z-index: 0;
    animation: mobileCallRipple 2.4s ease-out infinite;
  }

  .mobile-fab-ring {
    inset: -5px;
    z-index: 0;
    border: 2px solid rgba(226, 27, 45, 0.35);
    animation: mobileCallRingPulse 2.4s ease-out infinite;
  }

  .mobile-fab-call .mobile-fab-icon {
    position: relative;
    z-index: 1;
    animation: mobileCallIconNudge 4.5s ease-in-out infinite;
  }

  .mobile-fab-call:active {
    animation-play-state: paused;
  }

  @keyframes mobileCallBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }

  @keyframes mobileCallRipple {
    0% {
      box-shadow: 0 0 0 0 rgba(226, 27, 45, 0.55);
    }
    70% {
      box-shadow: 0 0 0 16px rgba(226, 27, 45, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(226, 27, 45, 0);
    }
  }

  @keyframes mobileCallRingPulse {
    0% {
      transform: scale(1);
      opacity: 0.7;
    }
    70% {
      transform: scale(1.18);
      opacity: 0;
    }
    100% {
      transform: scale(1.18);
      opacity: 0;
    }
  }

  @keyframes mobileCallIconNudge {
    0%, 88%, 100% { transform: rotate(0); }
    90% { transform: rotate(-8deg); }
    93% { transform: rotate(8deg); }
    96% { transform: rotate(-4deg); }
  }

  body.has-mobile-bar {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
  :root {
    --container-padding: 1.25rem;
  }

  /* Section spacing */
  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .section-header {
    margin-bottom: var(--space-xl);
  }

  /* Hero section — tam ekran banner */
  .hero {
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    padding-top: var(--header-height);
    padding-bottom: calc(0.875rem + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
    box-sizing: border-box;
  }

  .hero > .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
  }

  .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 100%;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0.5rem;
  }

  .hero-tag {
    display: inline-flex;
    align-self: center;
    width: auto;
    max-width: max-content;
    font-size: 0.68rem;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1.5rem;
  }

  .hero-title,
  .hero-title-rotator .hero-title {
    font-size: inherit;
  }

  .hero-title-rotator {
    font-size: clamp(2.05rem, 8.5vw, 2.95rem);
    width: 100%;
    min-height: 2.45em;
    margin-bottom: 1.75rem;
    text-align: center;
  }

  .hero-title-line {
    text-align: center;
  }

  .hero-description {
    font-size: clamp(0.875rem, 3.5vw, 1rem);
    max-width: 21rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    line-height: 1.55;
    text-align: center;
  }

  .hero-actions {
    width: 100%;
    max-width: 22rem;
    margin-inline: auto;
    margin-bottom: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.625rem;
    justify-content: center;
  }

  .hero-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    width: auto;
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: var(--fw-semibold);
    justify-content: center;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  }

  .hero-actions .btn-primary {
    background: linear-gradient(135deg, #e82435 0%, #b91524 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-actions .btn-whatsapp {
    background: linear-gradient(135deg, rgba(12, 14, 18, 0.88) 0%, rgba(21, 26, 34, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
  }

  .hero-actions .btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .hero-actions .btn:hover svg {
    transform: none;
  }

  .hero-actions .btn-primary:hover,
  .hero-actions .btn-whatsapp:hover {
    transform: translateY(-1px);
  }

  .hero-trust {
    align-self: stretch;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.75rem;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0.25rem;
    text-align: left;
  }

  .hero-trust-item {
    align-items: flex-start;
    padding: 0.7rem 0.75rem;
    font-size: 0.8125rem;
  }

  .hero-trust-item svg {
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
  }

  .hero-scroll-indicator {
    display: none;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .hero-stat {
    min-width: calc(50% - var(--space-lg));
  }

  .quick-search-section {
    margin-top: 0;
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-3xl);
  }

  .quick-search-card {
    margin-top: var(--space-md);
  }

  .vehicle-card-badges .badge {
    font-size: 0.5rem;
    padding: 0.15rem 0.4rem;
  }

  .vehicle-card-title {
    font-size: 1rem;
  }

  .vehicle-card-price {
    font-size: 1.25rem;
  }

  .vehicle-detail-badges .badge {
    font-size: 0.625rem;
    padding: 0.2rem 0.5rem;
  }

  .vehicle-detail-title {
    font-size: 1.35rem;
  }

  .vehicle-detail-actions {
    grid-template-columns: 1fr;
  }

  .vehicle-gallery--hero .vehicle-gallery-main {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Sales Rep Card */
  .sales-rep-card {
    flex-direction: column;
    text-align: center;
  }

  .sales-rep-actions {
    justify-content: center;
  }

  /* CTA section */
  .cta-section {
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .cta-section-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-section-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Vehicles grid */
  .vehicles-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
  }

  .vehicles-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Vehicle detail */
  .vehicle-detail-specs {
    grid-template-columns: 1fr 1fr;
  }

  .vehicle-features-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Contact map */
  .map-embed {
    min-height: 220px;
    max-height: 320px;
  }

  /* Back to top handled by mobile dock */

  /* About hero */
  .about-hero {
    min-height: 40vh;
  }

  .about-content {
    padding: var(--space-xl) var(--container-padding);
  }

  .about-content p {
    font-size: var(--fs-body);
  }

  /* Toast */
  .toast-container {
    left: 1rem;
    right: 1rem;
    top: 1rem;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }

  /* Empty state */
  .empty-state {
    padding: var(--space-2xl) var(--space-md);
  }

  /* Stat cards */
  .stat-card {
    padding: 1.5rem 1rem;
  }

  .stat-card-number {
    font-size: var(--fs-h2);
  }

  /* Advantage cards */
  .advantage-card {
    padding: 1.5rem;
  }

  /* Error page */
  .error-code {
    font-size: 5rem;
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: var(--fs-xs);
  }
}

/* ==========================================================
   MAX-WIDTH: 480px — Mobile Phones
   ========================================================== */
@media (max-width: 480px) {

  :root {
    --container-padding: 1rem;
  }

  /* Section spacing tighter */
  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }

  /* Hero — küçük ekran ince ayar (tam ekran korunur) */
  .hero {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-tag {
    font-size: 0.65rem;
    padding: 0.375rem 0.8rem;
    margin-bottom: 1.35rem;
  }

  .hero-title,
  .hero-title-rotator .hero-title {
    font-size: inherit;
  }

  .hero-title-rotator {
    font-size: clamp(1.9rem, 9vw, 2.4rem);
    min-height: 2.5em;
    margin-bottom: 1.5rem;
  }

  .hero-description {
    font-size: 0.8125rem;
    max-width: 19rem;
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    max-width: 100%;
    gap: 0.5rem;
    margin-bottom: 0;
  }

  .hero-actions .btn {
    min-height: 44px;
    padding: 0.7rem 0.625rem;
    font-size: 0.75rem;
  }

  .hero-trust {
    margin-top: 1.5rem;
    gap: 0.625rem;
  }

  .hero-trust-item {
    padding: 0.625rem 0.6rem;
    font-size: 0.75rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .hero-stat {
    min-width: auto;
  }

  .hero-stat-number {
    font-size: var(--fs-h3);
  }

  /* Vehicle grid single column */
  .vehicles-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Vehicle card */
  .vehicle-card-body {
    padding: 1rem;
  }

  .vehicle-card-footer {
    padding-top: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .vehicle-card-price {
    font-size: 1.2rem;
  }

  /* Vehicle detail specs */
  .vehicle-detail-specs {
    grid-template-columns: 1fr;
  }

  .vehicle-detail-card {
    padding: 1.5rem;
  }

  .vehicle-detail-price {
    font-size: var(--fs-h2);
  }

  .vehicle-features-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-gallery-thumbs {
    padding: 0.5rem;
    gap: 0.375rem;
  }

  .vehicle-gallery-thumb {
    width: 64px;
    height: 44px;
  }

  /* Footer single column */
  .footer {
    padding-top: var(--space-2xl);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom {
    margin-top: var(--space-xl);
    padding: 1rem 0;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--fs-small);
  }

  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--fs-body);
  }

  /* Mobile contact bar — safe area for notched phones */
  .mobile-contact-bar {
    bottom: calc(1.35rem + env(safe-area-inset-bottom, 0px));
    padding: 0 1rem;
  }

  .mobile-contact-bar .btn {
    padding: 0.675rem 0.75rem;
    font-size: var(--fs-xs);
  }

  /* CTA section */
  .cta-section {
    padding: var(--space-xl) var(--space-md);
    border-radius: var(--radius-md);
  }

  .cta-section-title {
    font-size: var(--fs-h3);
  }

  .cta-section-text {
    font-size: var(--fs-small);
  }

  /* Sales rep */
  .sales-rep-card {
    padding: 1.25rem;
    gap: 1rem;
  }

  .sales-rep-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
  }

  .sales-rep-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Advantage cards */
  .advantage-card {
    padding: 1.25rem;
  }

  .advantage-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
  }

  /* Stat card */
  .stat-card {
    padding: 1rem;
  }

  .stat-card-number {
    font-size: var(--fs-h3);
  }

  .stat-card-label {
    font-size: var(--fs-xs);
  }

  /* Contact form */
  .contact-form {
    padding: 1.25rem;
  }

  .contact-info-card {
    padding: 1.25rem;
    gap: 1rem;
  }

  .map-embed {
    min-height: 200px;
    max-height: 280px;
  }

  /* About */
  .about-hero {
    min-height: 30vh;
  }

  .about-values-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    padding: var(--space-lg) var(--container-padding);
  }

  /* Error page */
  .error-code {
    font-size: 4rem;
  }

  .error-title {
    font-size: var(--fs-h3);
  }

  .error-text {
    font-size: var(--fs-body);
  }

  .error-actions {
    flex-direction: column;
    width: 100%;
  }

  .error-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Filters */
  .vehicles-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: var(--fs-xs);
  }

  /* Empty state */
  .empty-state-icon {
    width: 64px;
    height: 64px;
  }

  .empty-state-title {
    font-size: var(--fs-h4);
  }

  /* Skeleton */
  .skeleton-card {
    height: 320px;
  }

  /* Mobile menu */
  .mobile-menu-nav {
    padding: 1.5rem;
  }

  .mobile-menu-nav a {
    font-size: 1.1rem;
    padding: 0.875rem 0.75rem;
  }

  .mobile-menu-actions {
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .mobile-menu-location,
  .mobile-menu-email {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .mobile-menu-location {
    padding-top: 1.5rem;
  }

  .mobile-menu-email {
    padding-bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  }

  /* Breadcrumb */
  .breadcrumb {
    gap: 0.375rem;
    padding: var(--space-sm) 0;
  }
}

/* ==========================================================
   HEIGHT-BASED ADJUSTMENTS
   Short screens (landscape phones)
   ========================================================== */
@media (max-height: 640px) and (orientation: landscape) {

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-lg));
    padding-bottom: var(--space-lg);
  }

  .hero-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--space-sm);
  }

  .hero-description {
    margin-bottom: var(--space-md);
  }

  .hero-actions {
    margin-bottom: var(--space-md);
  }

  .hero-scroll-indicator {
    display: none;
  }
}

/* ==========================================================
   HOVER-CAPABLE DEVICES
   Prevent hover effects on touch devices
   ========================================================== */
@media (hover: none) {

  .vehicle-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-border);
  }

  .vehicle-card:hover .vehicle-card-image img {
    transform: none;
  }

  .advantage-card:hover {
    transform: none;
  }

  .btn-primary:hover {
    transform: none;
  }

  .btn-secondary:hover {
    transform: none;
  }

  .btn-whatsapp:hover {
    transform: none;
  }

  .hover-lift:hover {
    transform: none;
  }

  .desktop-fab:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  :root {
    --privacy-consent-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  .privacy-consent {
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
  }

  .privacy-consent-inner {
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
  }

  .privacy-consent-actions .btn {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.8125rem;
  }
}

/* ==========================================================
   PRINT STYLES
   ========================================================== */
@media print {

  .header,
  .footer,
  .mobile-contact-bar,
  .desktop-fab-stack,
  .back-to-top,
  .mobile-menu,
  .mobile-menu-overlay,
  .toast-container,
  .privacy-consent {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
    padding: 0;
  }

  .section {
    padding: 1rem 0;
  }

  .vehicle-card {
    break-inside: avoid;
    border: 1px solid #cccccc;
    box-shadow: none;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }
}
