/*
 * Sayyarati V84.8 — responsive desktop restoration.
 * Loaded only from 761px and above. Mobile styles (480px and below) are untouched.
 */
@media (min-width: 761px) {
  :root {
    --container: 1320px;
  }

  html {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: #f4f7fb !important;
  }

  body {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    box-shadow: none !important;
  }

  /* The desktop layout uses normal responsive pages, never the old 480px phone shell. */
  body > main,
  main,
  .container,
  .page-container,
  .site-container {
    min-width: 0 !important;
  }

  .home-bottom-nav,
  .bottom-nav-png-v82.home-bottom-nav {
    display: none !important;
  }

  .global-back-row {
    width: min(1320px, calc(100% - 36px)) !important;
  }

  /* Overlay containers cover the browser; their inner cards keep their own responsive max-width. */
  .fullscreen-search-modal,
  .auth-choice-modal,
  .balance-topup-modal,
  .publish-preview-modal,
  .upload-lock-overlay,
  .fuel-route-modal,
  .admin-fuel-edit-modal,
  .admin-app-overlay,
  .project-modal-v763,
  .showroom-edit-v77 {
    width: 100vw !important;
    max-width: none !important;
    right: 0 !important;
    left: 0 !important;
    transform: none !important;
  }

  .fullscreen-search-panel,
  .auth-choice-box,
  .balance-topup-box,
  .publish-preview-box {
    max-width: min(760px, calc(100vw - 48px)) !important;
    margin-inline: auto !important;
  }

  .table-wrap,
  .admin-table-wrap,
  .inventory-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  img,
  video,
  canvas,
  svg {
    max-width: 100%;
  }
}

/* Laptop and tablet landscape: full-width content without forcing phone dimensions. */
@media (min-width: 761px) and (max-width: 980px) {
  main,
  .page,
  .sayyarati-home,
  .vehicles-page,
  .enhanced-vehicles-page,
  .site-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
  }

  .cards-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Wide desktop: keep forms readable while the rest of the site uses the available space. */
@media (min-width: 1180px) {
  .standalone-publish-page,
  .profile-edit-page,
  .register-wizard-page,
  .register-success-page {
    min-width: 0 !important;
  }

  .standalone-publish-card,
  .publish-composer-v70,
  .profile-edit-card {
    min-width: 0 !important;
  }

  .publish-preview-box,
  .auth-choice-box,
  .balance-topup-box {
    max-height: calc(100vh - 48px) !important;
  }
}
