html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

@media (max-width: 1100px) {
  .navbar-header {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 18px;
  }

  .navbar-left {
    min-width: 0;
    gap: 10px;
  }

  .navbar-brand {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .location-picker-btn {
    min-width: 0;
    max-width: 170px;
    padding: 7px 10px;
  }

  .hamburger-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .navbar-menu {
    position: static;
    left: auto;
    transform: none;
    order: 5;
    width: 100%;
    display: none;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-menu.navbar-menu-open {
    display: flex;
  }

  .navbar-menu a,
  .navbar-notif-btn {
    min-width: 44px;
    min-height: 40px;
    justify-content: center;
  }

  .navbar-icons {
    gap: 8px;
    margin-left: 0;
    flex-shrink: 0;
  }

  .navbar-icons .navbar-sell-cta {
    height: 34px;
    padding: 0 12px;
  }

  .navbar-user-button {
    padding: 6px;
  }

  .notif-dropdown,
  .navbar-dropdown-menu,
  .navbar-orders-dropdown {
    position: fixed;
    top: 62px;
    right: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
  }

  .navbar-orders-dropdown {
    display: none;
    padding-top: 0;
  }

  .navbar-orders-wrapper:hover .navbar-orders-dropdown {
    display: block;
  }

  .location-dropdown {
    left: 0;
    width: min(320px, calc(100vw - 32px));
  }

  .browse-rail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px 28px;
  }

  .filters-sidebar {
    border-right: 0;
    border-bottom: 1px solid #ececec;
    padding: 0 0 18px;
  }

  .filters-topbar,
  .discovery-hero {
    grid-template-columns: 1fr;
  }

  .search-input-wrapper {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .sort-group {
    justify-content: flex-start;
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 28px 20px;
  }

  .product-detail-wrapper {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px;
  }

  .product-detail-image {
    position: relative;
    top: auto;
  }

  .hero-content {
    padding: 54px 28px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-right {
    left: 28px;
    right: 28px;
    width: auto;
  }

  .category-showcase,
  .how-it-works,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 760px) {
  .container {
    width: 100%;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .navbar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    padding: 10px 14px;
    position: sticky;
  }

  .navbar-left {
    grid-column: 1;
    flex: 0 1 auto;
  }

  .hamburger-btn {
    grid-column: 2;
    justify-self: end;
    margin-left: 0;
    display: none !important;
  }

  .hamburger-btn svg {
    display: block;
  }

  .navbar-icons {
    grid-column: 2;
    justify-self: end;
    padding-right: 46px;
  }

  .navbar-menu {
    grid-column: 1 / -1;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 28px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
    padding-top: 8px;
    min-height: 52px;
  }

  .navbar-menu a[data-label]:after {
    display: none !important;
  }

  .navbar-brand {
    font-size: 18px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .location-picker-btn {
    max-width: 132px;
    border-width: 1px;
  }

  .location-picker-text {
    max-width: 72px;
  }

  .navbar-user-name {
    display: none;
  }

  .navbar-login-btn {
    width: 40px;
    height: 40px;
    padding: 6px !important;
    font-size: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-login-btn svg {
    width: 22px;
    height: 22px;
  }

  .navbar-icons > a:not(.navbar-sell-cta) {
    display: none !important;
  }

  .navbar-dropdown-menu {
    top: 58px;
  }

  .home-hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    min-height: 620px;
    padding: 42px 18px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .hero-left {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-content p {
    display: block;
    width: 100%;
    max-width: min(100%, 320px);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-content h1 {
    font-size: 32px;
    line-height: 1.18;
    margin-bottom: 16px;
  }

  .hero-content p {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .hero-cta {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  .hero-right {
    position: static;
    width: 100%;
    margin-top: auto;
  }

  .hero-cta-guest {
    padding: 20px;
    border-radius: 10px;
  }

  .trusted-section {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px 16px;
  }

  .trusted-label {
    white-space: normal;
  }

  .trusted-logos {
    justify-content: flex-start;
    gap: 14px 18px;
  }

  .browse-rail-layout {
    margin-top: 0;
    padding: 0 16px 24px;
  }

  .discovery-hero {
    padding: 20px;
  }

  .discovery-hero h2 {
    font-size: 23px;
  }

  .discovery-stats {
    grid-template-columns: 1fr;
  }

  .filters-topbar {
    gap: 12px;
  }

  .sort-group {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-select,
  .form-field input,
  .form-field textarea,
  .form-field select,
  .browse-rail-layout select,
  .browse-rail-layout input:not([type=checkbox]) {
    min-height: 44px;
    font-size: 16px;
  }

  .products-grid,
  .category-cards,
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 16px;
  }

  .product-image-container,
  .product-image-main {
    aspect-ratio: 4 / 3;
  }

  .product-title {
    min-height: 0;
    font-size: 16px;
  }

  .product-detail-wrapper {
    padding: 24px 16px;
  }

  .product-detail-content h1 {
    font-size: 26px;
  }

  .product-title-row {
    align-items: center;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .message-form-section,
  .review-form {
    padding: 20px;
  }

  .auth-page {
    padding: 24px 16px;
  }

  .auth-container,
  .auth-container-modal {
    width: 100%;
    max-width: none;
    padding: 28px 20px;
  }

  .otp-email-row,
  .referral-link-row,
  .profile-avatar-section,
  .seller-profile-header {
    flex-direction: column;
    align-items: stretch;
  }

  .otp-send-btn {
    width: 100%;
    min-height: 48px;
  }

  .seller-profile-avatar,
  .profile-avatar-large {
    align-self: center;
  }

  .seller-profile-info,
  .seller-bio {
    text-align: center;
  }

  .seller-stats,
  .seller-profile-meta {
    justify-content: center;
  }

  .transaction-card,
  .admin-pending-card {
    align-items: stretch;
    flex-direction: column;
  }

  .tx-status-actions,
  .admin-pending-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .tx-status-actions button,
  .admin-pending-actions button {
    flex: 1 1 120px;
    min-height: 40px;
  }

  .messages-page {
    height: auto;
    min-height: calc(100vh - 58px);
  }

  .messages-sidebar {
    max-height: 42vh;
  }

  .msg-conversation-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .msg-bubble {
    max-width: 92%;
  }

  .stats-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .navbar-brand {
    max-width: 112px;
  }

  .location-picker-btn {
    max-width: 112px;
  }

  .navbar-icons .navbar-sell-cta {
    padding: 0 10px;
  }

  .notif-dropdown,
  .navbar-dropdown-menu,
  .navbar-orders-dropdown {
    right: 8px;
    left: 8px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .products-grid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}
