/* =====================================================
   ODUMAN mobile.css - ASCII only, iOS Safari safe
   Breakpoints: 768px tablet, 480px phone
   ===================================================== */

/* =====================================================
   TABLET (max-width: 768px)
   ===================================================== */
@media (max-width: 768px) {

  /* -- Variables -- */
  :root {
    --nav-height: 74px;
    --topbar-height: 0px;
    --cat-bar-height: 44px;
  }

  /* -- TOPBAR: hidden on mobile -- */
  .topbar { display: none; }

  /* -- MAIN NAV -- */
  .main-nav {
    padding: 0 16px;
    height: var(--nav-height);
    gap: 12px;
  }

  /* Logo smaller */
  .logo img { height: 57.04px; }
  .logo-fallback { font-size: 26.08px; }

  /* Hide desktop elements */
  .nav-search  { display: none; }
  .nav-links   { display: none; }
  .login-link  { display: none; }
  .dealer-btn  { display: none; }
  .cart-nav-link { display: none; }
  .dealer-account-actions { display: none; }

  /* -- MOBILE CONTROLS -- */
  .mob-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .mob-search-btn {
    width: 36px; height: 36px;
    background: none; border: none;
    font-size: 21.73px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); border-radius: 50%;
    transition: background 0.2s;
  }
  .mob-search-btn:hover { background: var(--cream); }

  .mob-menu-btn {
    width: 36px; height: 36px;
    background: none; border: none;
    cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 5px; border-radius: 4px;
    transition: background 0.2s;
  }
  .mob-menu-btn:hover { background: var(--cream); }
  .mob-menu-btn span {
    display: block; width: 22px; height: 2px;
    background: var(--dark); border-radius: 2px;
    transition: all 0.25s;
  }
  .mob-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mob-menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .mob-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* -- MOBILE SEARCH OVERLAY -- */
  .mob-search-overlay {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: white;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    z-index: 300;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
  .mob-search-overlay.open { display: block; }
  .mob-search-overlay .search-bar-inner {
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--cream);
  }
  .mob-search-overlay .sbar-input { background: transparent; }

  /* -- MOBILE DRAWER -- */
  .mob-drawer {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: min(320px, 90vw);
    height: calc(100vh - var(--nav-height));
    background: white;
    z-index: 400;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 32px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
  }
  .mob-drawer.open { right: 0; }

  .mob-backdrop {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 399;
  }
  .mob-backdrop.open { display: block; }

  .mob-drawer-section { padding: 20px 20px 0; }
  .mob-drawer-section:last-child { padding-bottom: 24px; }
  .mob-drawer-divider { height: 1px; background: var(--border); margin: 16px 0; }

  .mob-nav-link {
    display: flex; align-items: center;
    padding: 13px 0;
    font-size: 18.11px; font-weight: 500; color: var(--dark);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
  }
  .mob-nav-link:last-child { border-bottom: none; }
  .mob-nav-link:hover { color: var(--copper); }

  .mob-cat-link {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 0;
    font-size: 15.7px; color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
  }
  .mob-cat-link:last-child { border-bottom: none; }
  .mob-cat-link:hover { color: var(--copper); }
  .mob-cat-icon { font-size: 20.53px; width: 24px; text-align: center; }

  .mob-drawer-label {
    font-size: 12.08px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 4px;
  }

  .mob-drawer-apply {
    display: block; width: 100%;
    background: var(--copper); color: white;
    font-size: 14.49px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 14px; border: none; border-radius: 2px; cursor: pointer;
    text-align: center; margin-bottom: 10px;
    transition: background 0.2s;
  }
  .mob-drawer-apply:hover { background: var(--dark); }

  .mob-drawer-login {
    display: block; width: 100%;
    background: none; color: var(--muted);
    font-size: 14.49px; letter-spacing: 0.06em;
    padding: 10px; border: 1px solid var(--border); border-radius: 2px;
    cursor: pointer; text-align: center; text-decoration: none;
    transition: all 0.2s;
  }
  .mob-drawer-login:hover { border-color: var(--dark); color: var(--dark); }

  .mob-lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
  }
  .mob-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    font-size: 14.49px; text-align: center;
    border: 1px solid var(--border); border-radius: 3px;
    background: none; cursor: pointer; color: var(--muted);
    transition: all 0.15s;
  }
  .mob-lang-btn:hover { border-color: var(--copper); color: var(--copper); }
  .mob-lang-btn.active { background: var(--dark); color: white; border-color: var(--dark); }

  /* -- CATEGORIES: replace cat-bar with toggle button -- */
  .cat-bar { display: none; }

  .mob-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--dark);
    color: rgba(255,255,255,0.75);
    border: none;
    padding: 13px 16px;
    font-size: 15.7px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    position: sticky;
    top: var(--nav-height);
    z-index: 250;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .mob-cat-toggle-arrow {
    font-size: 12.08px;
    opacity: 0.65;
    transition: transform 0.25s;
    display: inline-block;
  }
  .mob-cat-chevron { color: rgba(255,255,255,0.55); }
  .mob-cat-toggle.open .mob-cat-toggle-arrow { transform: rotate(180deg); }

  .mob-cat-panel {
    display: grid;
    grid-template-rows: 0fr;
    background: transparent;
    border-bottom: 0;
    position: sticky;
    top: calc(var(--nav-height) + 44px);
    z-index: 249;
    padding: 0;
    overflow: hidden;
    transition: grid-template-rows 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .mob-cat-panel.open {
    grid-template-rows: 1fr;
    background: var(--copper);
    border-bottom: 1px solid rgba(0,0,0,0.16);
  }

  .mob-cat-grid {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0 10px;
    background: transparent;
  }
  .mob-cat-panel.open .mob-cat-grid {
    padding-bottom: 10px;
  }

  .mob-cat-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px 10px;
    font-size: 14.49px;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.15s, background 0.2s, color 0.2s;
    line-height: 1.3;
    font-weight: 700;
  }
  .mob-cat-card:hover,
  .mob-cat-card.mob-cat-active {
    color: white;
    background: transparent;
    box-shadow: none;
  }
  .mob-cat-card:active {
    transform: translateY(1px) scale(0.98);
  }
  .mob-cat-card-label {
    font-size: 14.49px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: inherit;
    text-wrap: balance;
  }

  /* -- FOOTER -- */
  .why-strip { grid-template-columns: 1fr; gap: 20px; padding: 28px 20px; }
  .why-item { border-right: none; border-bottom: none; }
  .why-item:last-child { border-bottom: none; }
  .why-img { aspect-ratio: 16/9; }
  .why-text { padding: 12px 0 0; }
  .why-title { font-size: 16.9px; }
  .why-desc { font-size: 14.49px; }
  .dealer-banner {
    padding: 32px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .dealer-banner h2 { font-size: 26.57px; }
  .dealer-right { margin-top: 0; width: 100%; align-items: stretch; }
  .btn-large { width: 100%; box-sizing: border-box; white-space: normal; text-align: center; }
  footer { padding: 32px 20px 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 22px 18px; }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
    display: block;
    padding-bottom: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .footer-about {
    max-width: 100%;
    font-size: 12.08px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .footer-col { padding: 0; min-width: 0; border-right: none; }
  .footer-col:first-of-type { padding-left: 0; }
  .footer-col:last-of-type { padding-right: 0; }
  .footer-col:last-child { grid-column: 1 / -1; }
    .footer-heading, .footer-col h4 { font-size: 10.87px; margin-bottom: 10px; }
  .footer-col ul li { font-size: 12.08px; margin-bottom: 6px; overflow-wrap: anywhere; }
  .footer-addr-link { max-width: 100%; overflow-wrap: anywhere; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .whatsapp-float { bottom: 18px; right: 18px; width: 58px; height: 58px; font-size: 31.4px; }

  /* -- HOME PAGE -- */
  .hero-slider { height: calc(100vh - 170px); min-height: 420px; max-height: 620px; }
  .slide {
    padding: 0; flex-direction: row; align-items: stretch; justify-content: stretch;
    position: relative;
  }
  /* Hide glow on mobile — causes bright spots */
  .slide-glow { display: none; }
  /* Text overlay: bottom-left with gradient scrim */
  .slide-content {
    position: absolute; bottom: 0; left: 0;
    width: 100%; max-width: none;
    z-index: 3; padding: 34px 24px 24px 24px;
    background: none;
  }
  .slide-tag { margin-bottom: 6px; font-size: 10.87px; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
  .slide h1, .slide h2 { font-size: 33.81px; margin-bottom: 8px; text-shadow: 0 2px 16px rgba(0,0,0,0.7); }
  .slide p { display: none; }
  .slide.slide-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.44) 64%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 2;
  }
  .slide-btn { padding: 12px 23px; font-size: 13.28px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  /* Image: centered, large */
  .slide-preview {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    transform: none;
    pointer-events: none;
    z-index: 1;
  }
  .slide-preview .sp-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    filter: none;
    margin-top: 0;
  }
  .slide-preview .sp-emoji { font-size: 96.6px; }
  .slide-preview .sp-label { display: none; }
  .slider-arrow { width: 32px; height: 32px; font-size: 19.32px; z-index: 4; }
  .slider-arrow.prev { left: 8px; }
  .slider-arrow.next { right: 8px; }
  .slider-dots { bottom: 10px; z-index: 4; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.06); }
  .stat-num { font-size: 43.47px; }
  .stat-hint { font-size: 33.81px; line-height: 1; }
  .stat-drawer { padding: 0; }
  .stat-drawer.open .stat-drawer-inner { padding: 18px 20px; }
  .stat-drawer-inner { gap: 16px; padding: 0 20px; }
  .stat-drawer-num { font-size: 33.81px; }
  .stat-drawer-text { font-size: 14.49px; line-height: 1.65; max-width: none; }
  .blog-section { padding: 32px 20px; }
  .blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 12px;
    padding-bottom: 0;
    scrollbar-width: none;
  }
  .blog-grid::-webkit-scrollbar { display: none; }
  .blog-grid .blog-card,
  .blog-grid > div {
    min-width: 0;
    width: 100%;
    scroll-snap-align: none;
  }
  .about-section { padding: 32px 20px; grid-template-columns: 1fr; gap: 28px; }
  .about-text h2 { font-size: 28.98px; }
  .about-milestones { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .milestone { padding: 16px; }
  .milestone-num { font-size: 26.57px; }

  /* -- CATEGORY PAGES -- */
  .page-header { padding: 20px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header h1 { font-size: 28.98px; }
  .page-header-right { display: none; }
  .toolbar { padding: 10px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .sub-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .sub-tabs::-webkit-scrollbar { display: none; }
  .sub-tab { flex-shrink: 0; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .sort-select { flex: 1; max-width: 200px; }
  .products-wrap { padding: 16px 16px 40px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-img { font-size: 43.47px; }
  .product-info { padding: 9px 10px; }
  .product-name { font-size: 12.08px; }
  .search-page-header { padding: 20px 16px; }
  .search-page-title { font-size: 26.57px; }
  .search-bar-row { padding: 12px 16px; }

  /* -- PRODUCT DETAIL -- */
  .product-page-wrap { padding: 20px 16px 60px; }
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-visual { position: static; top: auto; }
  .product-img-box { font-size: 86.94px; width: calc(100% + 32px); margin-left: -16px; margin-right: -16px; }
  .variant-thumbs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
  .variant-thumbs::-webkit-scrollbar { display: none; }
  .variant-thumb { flex-shrink: 0; }
  .product-name-h1 { font-size: 26.57px; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .barcode-row { flex-wrap: wrap; gap: 4px; }
  .barcode-key { min-width: unset; width: 100%; }
  .barcode-val { font-size: 14.49px; }
  .product-cta { gap: 8px; }
  .product-addcart-row { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }
  .product-package-select { width: 100%; min-height: 42px; font-size: 16.9px; }
  .product-qty-wrap { flex-shrink: 0; }
  .product-qty-btn { width: 42px; min-height: 42px; font-size: 24.15px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .product-qty-input { min-height: 42px; font-size: 19.32px; width: 48px; text-align: center; }
  .btn-addcart { flex: 1; min-height: 44px; font-size: 16.9px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  /* Category card cart buttons */
  .card-qty-btn { width: 34px; height: 34px; font-size: 21.73px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .card-qty-input { width: 38px; height: 34px; font-size: 16.9px; }
  .card-cart-btn { padding: 9px 0; font-size: 14.49px; min-height: 38px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .btn-primary, .btn-secondary { font-size: 14.49px; padding: 11px 13px; }
  .variants-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .variant-card { padding: 14px 10px 10px; }
  .vc-icon { font-size: 38.64px; margin-bottom: 8px; }
  .vc-name { font-size: 12.08px; }

  /* -- CONTACT -- */
  .contact-wrap { padding: 28px 16px 0; }
  .contact-title { font-size: 31.4px; }
  .contact-sub { margin-bottom: 24px; }
  .contact-layout { grid-template-columns: 1fr; gap: 20px; }
  .map-container { min-height: 280px; }
  .map-container iframe { min-height: 280px; }
  .contact-coming { padding: 18px 20px; font-size: 14.49px; margin: 20px 0 32px; }

  /* -- DEALERSHIP -- */
  .dealer-page { padding: 28px 16px 48px; }
  .dealer-header { margin-bottom: 28px; }
  .dealer-header h1 { font-size: 31.4px; }
  .dealer-benefits { grid-template-columns: 1fr; gap: 10px; margin-bottom: 28px; }
  .benefit-card { padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; }
  .benefit-icon { font-size: 24.15px; margin-bottom: 0; flex-shrink: 0; }
  .dealer-form-wrap { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-row.triple { grid-template-columns: 1fr; }

  /* -- ABOUT / BLOG -- */
  .coming-wrap { padding: 40px 20px; }
  .coming-title { font-size: 33.81px; }
  .coming-facts { grid-template-columns: 1fr; gap: 12px; margin: 28px 0; }
  .coming-cta { width: 100%; text-align: center; box-sizing: border-box; }

  /* -- LOGIN -- */
  .auth-page { padding: 32px 16px; align-items: flex-start; }
  .auth-box { padding: 32px 24px; }
}

/* =====================================================
   PHONE (max-width: 480px)
   ===================================================== */
@media (max-width: 480px) {

  .main-nav { padding: 0 12px; }

  /* Home */
  .hero-slider { height: calc(100vh - 155px); min-height: 380px; max-height: 560px; }
  .slide-content { padding: 28px 18px 22px 18px; }
  .slide-tag { font-size: 9.66px; letter-spacing: 0.14em; margin-bottom: 5px; }
  .slide h1, .slide h2 { font-size: 28.98px; margin-bottom: 6px; }
  .slide-btn { padding: 11px 20px; font-size: 12.08px; }
  .slide-preview .sp-img { width: 100%; height: 100%; object-fit: cover; }
  .slide-preview .sp-emoji { font-size: 77.28px; }
  .slider-dots { bottom: 8px; }
  .stat-num { font-size: 35.42px; }
  .stat-label { font-size: 10.87px; }
  .stat-hint { font-size: 28.98px; line-height: 1; }
  .stat-item { padding: 14px 0; }
  footer { padding: 28px 16px 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .footer-grid > div:first-child,
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-about { font-size: 11.67px; line-height: 1.55; }
  .stat-drawer.open .stat-drawer-inner { padding: 18px 16px; }
  .stat-drawer-inner { flex-direction: column; gap: 10px; padding: 0 16px; }
  .stat-drawer-divider { display: none; }
  .stat-drawer-num { font-size: 28.98px; }
  .blog-section { padding: 24px 16px; }
  .blog-grid .blog-card,
  .blog-grid > div {
    min-width: 0;
  }
  .section-title-home { font-size: 22.94px; }
  .about-section { padding: 24px 16px; gap: 20px; }
  .about-text h2 { font-size: 25.36px; }
  .milestone-num { font-size: 24.15px; }
  .milestone-label { font-size: 12.08px; }

  /* Category pages */
  .page-header { padding: 16px 12px; }
  .page-header h1 { font-size: 24.15px; }
  .toolbar { padding: 8px 12px; gap: 8px; }
  .sub-tab { padding: 5px 11px; font-size: 12.08px; }
  .products-wrap { padding: 12px 12px 32px; }
  .product-grid { gap: 8px; }
  .product-img { font-size: 36.22px; }
  .product-name { font-size: 12.08px; }
  .product-series { font-size: 10.87px; }
  .product-dims { display: none; }

  /* Product detail */
  .product-page-wrap { padding: 14px 12px 48px; }
  .product-img-box { font-size: 67.62px; width: calc(100% + 24px); margin-left: -12px; margin-right: -12px; }
  .product-name-h1 { font-size: 24.15px; }
  .spec-value { font-size: 18.11px; }
  .spec-key { font-size: 9.66px; }
  .pallet-box { padding: 12px 14px; }
  .pallet-row { font-size: 13.28px; }
  .product-cta { flex-direction: column; }
  .product-addcart-row { flex-direction: row; width: 100%; }
  .product-package-select { width: 100%; }
  .product-qty-btn { width: 44px; min-height: 44px; }
  .product-qty-input { width: 50px; min-height: 44px; }
  .btn-addcart { min-height: 44px; }
  .btn-primary, .btn-secondary { width: 100%; font-size: 14.49px; }
  .variants-section { margin-top: 36px; padding-top: 24px; }
  .variants-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vc-icon { font-size: 33.81px; }

  /* Contact */
  .contact-wrap { padding: 20px 12px 0; }
  .contact-title { font-size: 26.57px; }
  .contact-card { padding: 14px 16px; gap: 12px; }
  .contact-card-icon { font-size: 24.15px; }
  .map-container { min-height: 220px; }
  .map-container iframe { min-height: 220px; }

  /* Dealership */
  .dealer-page { padding: 20px 12px 40px; }
  .dealer-header h1 { font-size: 26.57px; }
  .dealer-form-wrap { padding: 20px 16px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16.9px; padding: 12px; }

  /* About */
  .coming-wrap { padding: 28px 12px; }
  .coming-title { font-size: 28.98px; }
  .fact-card { padding: 16px; }
  .fact-year { font-size: 26.57px; }

  /* Login */
  .auth-page { padding: 20px 12px; }
  .auth-box { padding: 24px 16px; }
  .auth-title { font-size: 24.15px; }
}
