/* ===============================
   TwoWheeler.lk – Responsive Styles
   File: assets/css/responsive.css
   Works with Bootstrap 5 + your style.css
=============================== */

/* ---------- Base small fixes ---------- */
@media (max-width: 1199.98px){
  .display-5{ font-size: calc(1.65rem + 1.2vw); }
}

/* =========================================================
   LG (<= 992px)
========================================================= */
@media (max-width: 991.98px){

  /* HERO spacing */
  .tw-hero .container{ padding-top: 28px !important; padding-bottom: 28px !important; }
  .tw-hero h1{ line-height: 1.12; }
  .tw-hero .lead{ font-size: 1.02rem; }

  /* Panels get slightly tighter */
  .tw-panel{ border-radius: 20px; }

  /* Hero search panel */
  #homeSearchForm{ border-radius: 18px !important; }
  #homeSearchForm .input-group-text{ padding: .7rem .85rem; }
  #homeSearchForm .form-control{ padding: .7rem .9rem; }

  /* Cards */
  .tw-brand-card{ padding: 16px; border-radius: 18px; }
  .tw-cat-card{ padding: 12px; border-radius: 18px; }
  .tw-feature-card{ padding: 12px; border-radius: 18px; }

  /* Banner cards */
  .tw-banner{ border-radius: 22px; }
  .tw-banner-icon{ width: 76px; min-width: 76px; }
}

/* =========================================================
   MD (<= 768px)
========================================================= */
@media (max-width: 767.98px){

  /* HERO typography */
  .display-5{ font-size: 2.05rem; }
  .tw-hero .lead{ font-size: .98rem; }

  /* CTA buttons stack cleaner */
  .tw-hero .btn{ width: 100%; }
  .tw-hero .d-flex.flex-wrap.gap-2{ gap: 10px !important; }

  /* Trust bullets layout */
  .tw-hero .row.g-2.mt-4 > div{ flex: 0 0 50%; max-width: 50%; }
  .tw-hero .row.g-2.mt-4 > div:last-child{ flex: 0 0 100%; max-width: 100%; }

  /* Banners become vertical inside each card */
  .tw-banner{ flex-direction: column; }
  .tw-banner-icon{
    width: 100%;
    min-width: 100%;
    height: 84px;
  }

  /* Categories cards tighter for mobile */
  .tw-cat-card i{
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.15rem;
  }

  /* Brand logos smaller */
  .tw-brand-card img{
    height: 40px;
    margin-bottom: 8px;
  }

  /* Newsletter */
  .tw-newsletter{ padding: 16px; }
  .tw-newsletter-form{ flex-direction: column; }
  .tw-newsletter-form input,
  .tw-newsletter-form button{
    width: 100%;
  }

  /* Reviews */
  .tw-review{ padding: 16px; border-radius: 20px; }

  /* About image */
  .tw-about-image{ min-height: 300px; }
}

/* =========================================================
   SM (<= 576px)
========================================================= */
@media (max-width: 575.98px){

  /* Global section spacing tighter */
  section.py-5{ padding-top: 3rem !important; padding-bottom: 3rem !important; }

  /* HERO */
  .tw-hero .container{ padding-top: 22px !important; padding-bottom: 22px !important; }
  .display-5{ font-size: 1.85rem; }
  .tw-hero .lead{ font-size: .95rem; }

  /* Search form */
  #homeSearchForm{ padding: 10px !important; }
  #homeSearchForm .row.g-2{ row-gap: 10px !important; }

  /* Small badges in hero */
  .tw-badge-pill{ font-size: .78rem; }

  /* Category cards */
  .tw-cat-card{
    padding: 12px;
    gap: 10px;
    border-radius: 18px;
  }
  .tw-cat-card .fw-bold{ font-size: .98rem; }
  .tw-cat-card .small{ font-size: .82rem; }

  /* Feature cards */
  .tw-feature-card{
    padding: 12px;
    border-radius: 18px;
  }
  .tw-feature-card i{
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-size: 1.2rem;
  }

  /* Banners */
  .tw-banner{ padding: 16px; border-radius: 20px; }
  .tw-banner h3{ font-size: 1.2rem; }
  .tw-banner p{ font-size: .92rem; }
  .tw-banner-icon{ height: 78px; }
  .tw-banner-sm .tw-banner-icon{ height: 74px; }

  /* Brands grid feels better */
  .tw-brand-card{ padding: 14px; }
  .tw-brand-card span{ font-size: .95rem; }

  /* About */
  .tw-about-card{ padding: 16px; border-radius: 20px; }
  .tw-about-visual{ padding: 18px; }

  /* Contact */
  .tw-contact-item{ padding: 10px; border-radius: 18px; }
  .tw-contact-item i{ width: 42px; height: 42px; }

  /* Footer spacing */
  .tw-footer .tw-social{ width: 38px; height: 38px; border-radius: 12px; }
}

/* =========================================================
   EXTRA: Very small devices (<= 360px)
========================================================= */
@media (max-width: 360px){
  .display-5{ font-size: 1.65rem; }
  .tw-badge-pill{ font-size: .74rem; }
  .tw-banner h3{ font-size: 1.12rem; }
}

/* =========================================================
   NAVBAR MOBILE POLISH
========================================================= */
@media (max-width: 991.98px){

  .tw-navbar .container{
    padding-top: .65rem !important;
    padding-bottom: .65rem !important;
  }

  .tw-mobile-nav-actions{
    margin-left: auto;
  }

  .tw-navbar .navbar-collapse{
    margin-top: 12px;
  }

  .tw-mobile-menu-shell{
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.08);
    background:
      linear-gradient(180deg, rgba(17,26,46,.96), rgba(11,18,32,.96));
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .tw-navbar-links{
    gap: 6px;
  }

  .tw-navbar .nav-link{
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .8rem .9rem !important;
    border-radius: 14px;
  }

  .tw-navbar-search-wrap{
    margin-top: 10px;
    margin-bottom: 10px !important;
  }

  .tw-search{
    width: 100%;
  }

  .tw-search-input{
    min-height: 44px;
    font-size: .95rem;
  }

  .tw-search-btn{
    min-width: 84px;
    font-size: .92rem;
  }

  .tw-mobile-auth-links{
    padding-top: 4px;
  }

  .tw-mobile-auth-links .btn{
    min-height: 44px;
    font-size: .95rem;
  }
}

/* =========================================================
   NAVBAR SMALL DEVICES
========================================================= */
@media (max-width: 575.98px){

  .tw-navbar .navbar-brand{
    gap: 8px !important;
  }

  .tw-navbar .navbar-brand span{
    display: none !important;
  }

  .tw-logo{
    height: 32px !important;
  }

  .tw-mobile-cart-btn{
    min-width: 42px;
    min-height: 42px;
    padding: .45rem .65rem;
  }

  .tw-navbar-toggler{
    min-width: 42px;
    min-height: 42px;
    padding: .42rem .62rem;
  }

  .tw-mobile-menu-shell{
    padding: 12px;
    border-radius: 18px;
  }

  .tw-navbar .nav-link{
    font-size: .94rem;
    min-height: 42px;
    padding: .72rem .82rem !important;
  }

  .tw-search-input{
    font-size: .92rem;
  }

  .tw-search-btn{
    min-width: 78px;
    padding-inline: .85rem;
  }

  .tw-mobile-auth-links .btn{
    font-size: .94rem;
  }

  .tw-cart-badge{
    min-width: 18px;
    height: 18px;
    font-size: .66rem;
  }
}

/* =========================================================
   EXTRA SMALL DEVICES
========================================================= */
@media (max-width: 360px){

  .tw-mobile-menu-shell{
    padding: 10px;
  }

  .tw-search-btn{
    min-width: 72px;
    font-size: .88rem;
  }

  .tw-navbar .nav-link{
    font-size: .9rem;
  }
}

/* =========================================================
   HOMEPAGE MOBILE HERO POLISH
========================================================= */
@media (max-width: 991.98px){
  .tw-hero-with-image{
    border-radius: 18px;
  }

  .tw-hero .container{
    padding-top: 18px !important;
    padding-bottom: 22px !important;
  }

  .tw-hero h1{
    margin-top: 8px;
    margin-bottom: 12px !important;
  }

  .tw-hero .lead{
    margin-bottom: 14px !important;
  }

  #homeSearchForm{
    margin-top: 10px;
    padding: 10px !important;
  }

  #homeSearchForm .form-control,
  #homeSearchForm .input-group-text{
    min-height: 44px;
  }

  #homeSearchForm .btn{
    min-height: 44px;
  }

  .tw-hero .d-flex.flex-wrap.gap-2.mt-4{
    margin-top: 14px !important;
    gap: 10px !important;
  }

  .tw-hero .row.g-2.mt-4{
    margin-top: 14px !important;
  }
}

@media (max-width: 575.98px){
  .tw-hero .container{
    padding-top: 14px !important;
    padding-bottom: 18px !important;
  }

  .tw-badge-pill{
    margin-bottom: 10px !important;
    font-size: .74rem !important;
    padding: .45rem .7rem !important;
  }

  .display-5{
    font-size: 1.72rem !important;
    line-height: 1.12 !important;
  }

  .tw-hero .lead{
    font-size: .92rem !important;
    line-height: 1.6;
  }

  #homeSearchForm{
    border-radius: 16px !important;
    padding: 9px !important;
  }

  #homeSearchForm .row.g-2{
    row-gap: 8px !important;
  }

  #homeSearchForm .form-control{
    font-size: .92rem;
  }

  #homeSearchForm .btn{
    font-size: .94rem;
    font-weight: 800;
  }

  .tw-hero .btn{
    min-height: 46px;
    border-radius: 14px;
  }

  .tw-hero .row.g-2.mt-4 > div{
    flex: 0 0 100%;
    max-width: 100%;
  }

  .tw-hero .tw-panel.p-3{
    padding: 12px !important;
    border-radius: 16px !important;
  }

  .tw-hero .tw-panel.p-3 .fw-bold{
    font-size: .98rem;
  }

  .tw-hero .tw-panel.p-3 .small{
    font-size: .84rem;
  }
}

@media (max-width: 360px){
  .display-5{
    font-size: 1.58rem !important;
  }

  .tw-hero .lead{
    font-size: .88rem !important;
  }

  #homeSearchForm .btn{
    font-size: .9rem;
  }
}
/* =========================================================
   PRODUCT PAGE MOBILE POLISH
========================================================= */
@media (max-width: 991.98px){
  .tw-pd-image{
    min-height: 280px;
    padding: 14px;
    border-radius: 18px;
  }

  .tw-pd-image img{
    max-height: 240px;
  }

  .tw-pd-thumbs{
    gap: 8px;
    flex-wrap: wrap;
  }

  .tw-thumb{
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }
}

@media (max-width: 575.98px){

  .tw-pd-image{
    min-height: 240px;
    padding: 12px;
    border-radius: 16px;
  }

  .tw-pd-image img{
    max-height: 200px;
  }

  .tw-thumb{
    width: 62px;
    height: 62px;
    border-radius: 12px;
    padding: 5px;
  }

  .tw-sku,
  .tw-rating{
    font-size: .78rem;
    padding: 5px 9px;
  }

  .tw-feature{
    padding: 10px;
    border-radius: 16px;
    gap: 8px;
  }

  .tw-feature i{
    font-size: 1rem;
  }

  /* Breadcrumb + heading */
  .tw-product-breadcrumb,
  .breadcrumb{
    font-size: .82rem;
    line-height: 1.5;
    flex-wrap: wrap;
    gap: 4px;
  }

  .tw-product-title,
  .product-title,
  h1{
    word-break: break-word;
  }

  /* Back button */
  .tw-back-btn,
  .btn-back-shop{
    min-height: 42px;
    font-size: .94rem;
    border-radius: 12px;
  }
}
/* =========================================================
   HOME HERO FINAL MOBILE TIGHTEN
========================================================= */
@media (max-width: 575.98px){

  .tw-hero .d-flex.flex-wrap.gap-2.mt-4 .btn{
    min-height: 44px;
    font-size: .95rem;
  }

  .tw-hero .tw-panel.p-3{
    margin-bottom: 2px;
  }

  #homeSearchForm{
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #homeSearchForm .input-group{
    overflow: hidden;
    border-radius: 14px;
  }

  #homeSearchForm .tw-input{
    min-height: 44px;
  }
}