/* ── OVERFLOW FIX ─────────────────────────────────────── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  * { box-sizing: border-box; }
  .container { max-width: 100% !important; }
  .hero-content { max-width: 100% !important; box-sizing: border-box; }
}

/* ═══════════════════════════════════════════════════════════
   DRIVEX-KS — MOBILE EXPERIENCE v2
   Max 768px
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Base ─────────────────────────────────────────────── */
  body {
    padding-bottom: 72px;
    -webkit-tap-highlight-color: transparent;
    font-size: 15px;
  }
  .container { padding: 0 1rem; }

  /* ── Header ───────────────────────────────────────────── */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(14,14,15,.92) !important;
    border-bottom: 1px solid var(--border);
  }
  .header-inner {
    height: 56px;
    padding: 0 1rem;
    gap: .625rem;
  }
  .site-logo { font-size: 1.2rem; letter-spacing: -.04em; flex-shrink: 0; }
  .header-nav { display: none !important; }
  .header-search {
    flex: 1;
    min-width: 0;
  }
  .header-search input {
    font-size: .875rem;
    padding: .5rem .875rem .5rem 2.25rem;
    border-radius: 50px;
    background: var(--bg-2);
    height: 38px;
  }
  .header-actions { gap: .25rem; flex-shrink: 0; }
  .header-actions a,
  .header-actions button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--border);
  }

  /* ── Hero ─────────────────────────────────────────────── */
  .hero-section-wrap { padding: .75rem; }
  .hero {
    height: 240px !important;
    border-radius: 20px !important;
    min-height: unset !important;
  }
  .hero-slide::before {
    background: linear-gradient(
      to top,
      rgba(6,6,10,.95) 0%,
      rgba(6,6,10,.6) 40%,
      rgba(6,6,10,.05) 100%
    ) !important;
  }
  .hero-content {
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 1rem 1.25rem 1.5rem !important;
    justify-content: flex-end !important;
    max-width: 100% !important;
  }
  .hero-eyebrow { display: none !important; }
  .hero-title {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    margin-bottom: .375rem !important;
    font-weight: 900 !important;
  }
  .hero-subtitle {
    font-size: .75rem !important;
    margin-bottom: .75rem !important;
    opacity: .8;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .hero-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: .5rem !important;
    margin-top: 0 !important;
  }
  .hero-actions .btn {
    padding: .5rem 1.25rem !important;
    font-size: .78rem !important;
    border-radius: 50px !important;
    flex: 0 0 auto !important;
  }
  .hero-actions .btn:last-child { display: none !important; }
  .hero-dot { width: 5px !important; height: 5px !important; }
  .hero-dot.active { width: 16px !important; }

  /* Slider arrows — hide on mobile */
  #hero-section > button[onclick] { display: none !important; }

  /* ── Quick Filter ─────────────────────────────────────── */
  .quick-filters {
    padding: .625rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .quick-filters::-webkit-scrollbar { display: none; }
  .filters-inner {
    display: flex;
    flex-direction: row;
    gap: .5rem;
    width: max-content;
    align-items: center;
  }
  .filter-label { display: none; }
  .filter-select {
    width: auto;
    min-width: 140px;
    font-size: .8rem;
    padding: .5rem 1rem;
    border-radius: 50px;
    height: 38px;
  }
  .filter-btn {
    white-space: nowrap;
    border-radius: 50px;
    padding: .5rem 1.125rem;
    font-size: .8rem;
    height: 38px;
    font-weight: 700;
  }

  /* ── Section titles ───────────────────────────────────── */
  .section { padding: 1.5rem 0 !important; }
  .section-sm { padding: 1rem 0 !important; }
  .section-title { font-size: 1.2rem !important; font-weight: 800 !important; }
  .section-eyebrow { font-size: .62rem; }
  .section-title-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: .875rem !important;
    gap: .5rem;
  }
  .section-title-row .btn {
    font-size: .72rem;
    padding: .3rem .875rem;
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 700;
  }

  /* ── Categories ───────────────────────────────────────── */
  .category-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: .625rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .category-grid::-webkit-scrollbar { display: none; }
  .category-card {
    flex: 0 0 120px !important;
    height: 95px !important;
    border-radius: 16px !important;
    scroll-snap-align: start;
  }
  .category-card-name {
    font-size: .72rem !important;
    font-weight: 700 !important;
    padding: .375rem .5rem !important;
  }

  /* ── Product Grid ─────────────────────────────────────── */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .625rem !important;
  }
  .product-card { border-radius: 16px; }
  .product-card-img { height: 150px; }
  .product-card-body { padding: .625rem .75rem .75rem; }
  .card-brand { font-size: .6rem; margin-bottom: .2rem; opacity: .7; }
  .card-title {
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .375rem;
  }
  .card-price { font-size: .95rem; font-weight: 900; }
  .card-price-old { font-size: .68rem; }
  .card-actions { margin-top: .5rem; gap: .375rem; }
  .btn-add-cart {
    flex: 1;
    padding: .5rem .375rem;
    font-size: .7rem;
    border-radius: 10px;
    justify-content: center;
    font-weight: 700;
  }
  .btn-wishlist {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    padding: 0;
    flex-shrink: 0;
  }

  /* ── Brands ───────────────────────────────────────────── */
  .brand-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: .5rem !important;
  }
  .brand-card {
    padding: .875rem .5rem !important;
    border-radius: 14px !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .375rem !important;
    min-height: 64px !important;
  }
  .brand-card img { height: 24px !important; object-fit: contain !important; }
  .brand-card-name { font-size: .65rem !important; font-weight: 700 !important; text-align: center !important; }

  /* ── Trust Grid ───────────────────────────────────────── */
  .trust-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .5rem !important;
  }
  .trust-item {
    padding: 1rem .875rem !important;
    border-radius: 16px !important;
  }
  .trust-icon { font-size: 1.5rem; margin-bottom: .375rem; }
  .trust-title { font-size: .78rem; font-weight: 800; }
  .trust-desc { font-size: .68rem; opacity: .7; line-height: 1.4; margin-top: .2rem; }

  /* ── Promo Banner ─────────────────────────────────────── */
  .promo-banner {
    padding: 1.75rem 1.25rem !important;
    border-radius: 20px !important;
  }
  .promo-title { font-size: 1.2rem !important; font-weight: 900 !important; margin-bottom: .5rem !important; }
  .promo-desc { font-size: .8rem !important; margin-bottom: 1rem !important; opacity: .85; }
  .promo-banner .btn {
    padding: .6rem 1.5rem !important;
    font-size: .82rem !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
  }

  /* ── Product Detail ───────────────────────────────────── */
  .product-detail { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .gallery-thumbs { gap: .375rem; margin-top: .5rem; }
  .gallery-thumb { width: 56px; height: 56px; border-radius: 10px; }
  .product-info-price { font-size: 1.75rem !important; font-weight: 900 !important; }
  .btn-add-to-cart { border-radius: 50px !important; width: 100%; justify-content: center; }
  .trust-boxes { grid-template-columns: repeat(2,1fr); gap: .5rem; }

  /* ── Cart Drawer ──────────────────────────────────────── */
  .cart-drawer { width: 100% !important; }

  /* ── Checkout ─────────────────────────────────────────── */
  .checkout-layout { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .checkout-form { padding: 1.25rem !important; border-radius: 16px !important; }
  .checkout-summary { border-radius: 16px !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .form-group { margin-bottom: .875rem; }
  .form-control { font-size: 16px !important; padding: .75rem 1rem !important; border-radius: 10px !important; }
  .form-label { font-size: .8rem; font-weight: 600; }
  .btn-place-order { width: 100% !important; padding: 1rem !important; font-size: 1rem !important; border-radius: 50px !important; font-weight: 800 !important; }

  /* ── Shop Layout ──────────────────────────────────────── */
  .shop-layout { display: block !important; }
  .shop-sidebar { display: none !important; }

  /* ── Footer ───────────────────────────────────────────── */
  .site-footer { padding: 1rem 0 .75rem; margin-top: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: .75rem !important; }
  .footer-brand { grid-column: span 2; margin-bottom: .25rem; }
  .footer-brand .site-logo { font-size: 1rem; margin-bottom: .375rem; }
  .footer-desc { font-size: .72rem; margin-bottom: .375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .footer-col h4 { font-size: .68rem; margin-bottom: .375rem; font-weight: 800; }
  .footer-col ul { gap: .2rem; }
  .footer-col a { font-size: .7rem; }
  .footer-bottom { flex-direction: row; justify-content: center; text-align: center; gap: .5rem; font-size: .65rem; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .75rem; flex-wrap: wrap; }

  /* ── Breadcrumb ───────────────────────────────────────── */
  .breadcrumb { font-size: .72rem; padding: .5rem 0; }

  /* ── Pagination ───────────────────────────────────────── */
  .pagination { flex-wrap: wrap; justify-content: center; gap: .375rem; }
  .pagination a, .pagination span { width: 34px; height: 34px; font-size: .8rem; border-radius: 8px; }

  /* ── Auth pages ───────────────────────────────────────── */
  .auth-card {
    margin: 1rem;
    padding: 1.5rem !important;
    border-radius: 20px !important;
  }

  /* ── Bottom Navigation ────────────────────────────────── */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(14,14,15,.96);
    border-top: 1px solid var(--border);
    z-index: 1000;
    padding: 0 .375rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center;
    gap: .125rem;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  .mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    color: var(--text-3);
    font-size: .56rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: .375rem .25rem;
    transition: color .15s, transform .15s;
    position: relative;
    border-radius: 12px;
  }
  .mob-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
  }
  .mob-nav-item.active {
    color: var(--accent);
  }
  .mob-nav-item.active svg {
    stroke-width: 2.25;
  }
  .mob-nav-item:active { transform: scale(.92); }

  /* Cart center button */
  .mob-nav-cart {
    background: var(--accent) !important;
    color: #fff !important;
    border-radius: 18px !important;
    flex: 0 0 64px !important;
    height: 46px;
    margin: 0 .25rem;
    box-shadow: 0 4px 16px rgba(220,38,38,.35);
    transition: transform .15s, box-shadow .15s !important;
  }
  .mob-nav-cart svg { stroke: #fff !important; stroke-width: 2 !important; }
  .mob-nav-cart:active {
    transform: scale(.9) !important;
    box-shadow: 0 2px 8px rgba(220,38,38,.25) !important;
  }

  /* Cart badge */
  .mob-cart-badge {
    position: absolute;
    top: -4px;
    right: 6px;
    background: #fff;
    color: var(--accent);
    font-size: .5rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 1px solid var(--accent);
  }

  /* Active dot */
  .mob-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
  }
  .mob-nav-cart::after { display: none !important; }
}

/* ── 480px ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 0 .875rem; }
  .hero { height: 210px !important; }
  .hero-title { font-size: 1.15rem !important; }
  .product-grid { grid-template-columns: repeat(2,1fr) !important; }
  .category-card { flex: 0 0 105px !important; height: 85px !important; }
  .brand-grid { grid-template-columns: repeat(3,1fr) !important; }
  .trust-grid { grid-template-columns: repeat(2,1fr) !important; }
}

/* ── Mobile Hamburger Menu ────────────────────────────── */
@media (max-width: 768px) {
  .mob-menu-cat { border-bottom: 1px solid var(--border); }
  .mob-menu-parent {
    display: flex; align-items: center; gap: .875rem;
    padding: .875rem 1.25rem; color: var(--text);
    font-weight: 700; font-size: .9rem; text-decoration: none;
    transition: background .15s;
  }
  .mob-menu-parent:active { background: var(--bg-3); }
  .mob-menu-parent img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
  .mob-menu-arrow { margin-left: auto; color: var(--text-3); flex-shrink: 0; }
  .mob-menu-subs { background: var(--bg-3); padding: .375rem 0; }
  .mob-menu-sub {
    display: flex; align-items: center; justify-content: space-between;
    padding: .625rem 1.25rem .625rem 3.25rem;
    color: var(--text-2); font-size: .82rem; font-weight: 600;
    text-decoration: none; transition: all .15s;
  }
  .mob-menu-sub:active { color: var(--accent); background: rgba(220,38,38,.05); }
  .mob-sub-count { font-size: .65rem; color: var(--accent); font-weight: 800; background: rgba(220,38,38,.1); padding: .15rem .4rem; border-radius: 50px; }
}

@media (max-width: 768px) {
  /* Banner foto - shfaq e plote pa crop */
  .dx-banner-wrap img {
    object-fit: contain !important;
    height: auto !important;
  }
  .dx-banner-wrap {
    height: auto !important;
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .mini-promo-row {
    grid-template-columns: 1fr 1fr !important;
    gap: .5rem !important;
  }
  .mini-promo-card {
    padding: 1.25rem 1rem !important;
    border-radius: 14px !important;
    min-height: 90px;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: space-between;
  }
  .mini-promo-icon { font-size: 1.75rem !important; }
  .mini-promo-title { font-size: .85rem !important; font-weight: 800 !important; }
  .mini-promo-sub { font-size: .7rem !important; }
  .mini-promo-card svg { display: none; }
}

@media (max-width: 768px) {
  .card-image {
    aspect-ratio: auto !important;
    height: auto !important;
  }
  .card-image img {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    aspect-ratio: 1/1;
  }
}
