/* ============================================
   TechProHelp - Mobile CSS v3.0
   Complete Mobile-First Premium Design
   ============================================ */

/* ============ MOBILE BOTTOM NAVIGATION ============ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: linear-gradient(180deg, rgba(12,18,34,0.98) 0%, rgba(10,15,30,0.99) 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 990;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.mobile-bottom-nav-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 8px;
}

.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #4a5568;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  border-radius: 0;
  padding: 6px 4px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn i {
  font-size: 19px;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

.mobile-nav-btn.active,
.mobile-nav-btn:hover {
  color: var(--accent);
}

.mobile-nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--gradient);
  border-radius: 0 0 3px 3px;
}

.mobile-nav-btn.active i {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 6px rgba(233,30,140,0.4));
}

/* Cart button special styling */
.mobile-nav-btn.cart-nav {
  position: relative;
}

.mobile-nav-cart-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(12px);
  min-width: 16px;
  height: 16px;
  background: #ef4444;
  color: white;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid rgba(12,18,34,0.98);
  z-index: 1;
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: translateX(12px) scale(1); }
  50% { transform: translateX(12px) scale(1.1); }
}

/* Center button (shop) - elevated floating */
.mobile-nav-btn.shop-nav {
  position: relative;
  top: 0;
}

.mobile-nav-btn.shop-nav .nav-pill {
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  box-shadow: 0 4px 18px rgba(192,38,163,0.4), 0 0 0 3px rgba(192,38,163,0.15);
  position: relative;
  top: -12px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.mobile-nav-btn.shop-nav .nav-pill i {
  color: white;
  font-size: 20px;
}

.mobile-nav-btn.shop-nav span.nav-label {
  position: relative;
  top: -10px;
  color: var(--accent);
  font-weight: 800;
}

.mobile-nav-btn.shop-nav:hover .nav-pill,
.mobile-nav-btn.shop-nav.active .nav-pill {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,38,163,0.5), 0 0 0 4px rgba(192,38,163,0.2);
}

/* Show on mobile */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: block; }
  body { padding-bottom: 62px; }
  .hide-on-mobile { display: none !important; }
  .shop-layout { display: flex !important; flex-direction: column !important; gap: 16px !important; }
  .shop-sidebar { display: none !important; }
  .admin-dynamic-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; margin-bottom: 12px !important; border: 1px solid rgba(255,255,255,0.1); padding: 10px; border-radius: 8px; }
  .admin-dynamic-grid span { display: none; }
  .admin-dynamic-grid input, .admin-dynamic-grid select { width: 100% !important; margin-bottom: 4px; }
}

/* ============ MOBILE HEADER SEARCH ============ */
.mobile-search-bar {
  display: none;
  padding: 8px 14px 10px;
  background: linear-gradient(180deg, rgba(10,15,30,0.95), rgba(10,15,30,0.9));
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mobile-search-bar input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235a6580' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.mobile-search-bar input::placeholder {
  color: #4a5568;
}
.mobile-search-bar input:focus {
  border-color: var(--accent);
  background-color: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.08);
}
.mobile-search-results {
  left: 14px !important;
  right: 14px !important;
  top: calc(100% - 4px) !important;
  max-height: 60vh;
}

@media (max-width: 768px) {
  .mobile-search-bar { display: block; }
}

/* ============ SCROLL-AWARE HEADER ============ */
.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* ============ MOBILE HEADER REFINEMENT ============ */
/* Browse Tools category button is hidden on every non-desktop width.
   Scoped above the 768px block so tablets (769-1024) also pick it up. */
@media (max-width: 1024px) {
  .browse-dropdown-wrap,
  .browse-dropdown-wrap.hide-on-mobile,
  .browse-btn { display: none !important; }
}

@media (max-width: 768px) {
  .site-header {
    background: rgba(10,15,30,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  .header-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .site-logo img {
    height: 34px;
    border-radius: 10px;
  }
  /* Show only hamburger, logo, cart, account */
  .call-btn { display: none; }
  .social-icons { display: none; }
  .header-search { display: none; }

  /* Browse tools button hidden on mobile (defense-in-depth) */
  .browse-dropdown-wrap,
  .browse-btn,
  .browse-dropdown { display: none !important; }

  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    border-radius: 11px;
  }
  .hamburger-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    border-radius: 10px;
    gap: 4px;
  }
  .hamburger-btn span {
    width: 16px;
    height: 1.5px;
    background: #8b95b0;
  }

  /* === TICKER BAR MOBILE === */
  .ticker-bar {
    padding: 6px 0;
    font-size: 12px;
  }

  /* === PAGE HERO COMPACT ON MOBILE === */
  .page-hero {
    padding: 24px 16px !important;
  }
  .page-hero h1 {
    font-size: 22px !important;
    margin-bottom: 8px;
  }
  .page-hero p {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .breadcrumb {
    font-size: 12px;
  }

  /* === HERO SECTION MOBILE === */
  .hero-section {
    min-height: 420px;
    padding: 35px 16px;
  }
  .hero-badge {
    font-size: 10px;
    padding: 5px 12px;
    margin-bottom: 14px;
  }
  .hero-title {
    font-size: 26px !important;
    line-height: 1.15;
    margin-bottom: 14px;
  }
  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
  }
  .hero-actions {
    gap: 10px;
    margin-bottom: 28px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 14px;
  }
  .hero-stats {
    gap: 16px;
    margin-top: 10px;
  }
  .hero-stat .stat-num {
    font-size: 22px;
  }
  .hero-stat .stat-label {
    font-size: 11px;
  }

  /* === SECTION SPACING MOBILE === */
  .section {
    padding: 36px 14px;
  }
  .section-sm {
    padding: 24px 14px;
  }
  .section-header {
    margin-bottom: 28px;
  }
  .section-title {
    font-size: 22px !important;
    margin-bottom: 8px;
  }
  .section-badge {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 10px;
  }
  .section-sub {
    font-size: 13px;
  }

  /* === CATEGORIES MOBILE SCROLL === */
  .categories-grid {
    display: flex !important;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .categories-grid::-webkit-scrollbar { display: none; }
  .category-card {
    min-width: 120px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 16px 12px;
  }
  .category-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  .category-name {
    font-size: 12px;
  }
  .category-count {
    font-size: 10px;
  }

  /* === FEATURES GRID MOBILE === */
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .feature-card {
    padding: 18px 12px;
    border-radius: 14px;
  }
  .feature-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  .feature-title {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .feature-desc {
    font-size: 11px;
    line-height: 1.5;
  }

  /* === REVIEWS MOBILE === */
  .reviews-grid {
    display: flex !important;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .reviews-grid::-webkit-scrollbar { display: none; }
  .review-card {
    min-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 18px;
    border-radius: 14px;
  }
  .review-text {
    font-size: 13px;
    line-height: 1.6;
  }

  /* === PRODUCT PAGE MOBILE === */
  .product-layout {
    gap: 20px !important;
  }
  .product-main-img {
    border-radius: 16px;
  }
  .product-info h1 {
    font-size: 22px !important;
    line-height: 1.25;
    margin-bottom: 10px;
  }
  .product-tags {
    gap: 6px;
    margin-bottom: 12px;
  }
  .product-tag {
    font-size: 10px;
    padding: 3px 10px;
  }
  .plans-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .plan-option {
    padding: 12px 10px;
    border-radius: 10px;
  }
  .plan-option .plan-duration {
    font-size: 12px;
  }
  .plan-option .plan-price {
    font-size: 16px;
  }

  /* Product Buy Buttons Sticky on mobile */
  .product-info form .btn-lg,
  .product-info form + .btn {
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 12px;
  }

  /* === CART MOBILE === */
  .cart-layout {
    gap: 20px !important;
  }
  .cart-item {
    padding: 14px;
    border-radius: 14px;
    gap: 12px;
  }
  .cart-item-img {
    width: 65px;
    height: 65px;
    border-radius: 10px;
  }
  .cart-item-name {
    font-size: 14px;
  }
  .cart-item-plan {
    font-size: 11px;
  }
  .cart-item-price {
    font-size: 16px;
  }
  .cart-summary {
    border-radius: 16px;
    padding: 20px;
  }
  .cart-summary h3 {
    font-size: 16px;
  }

  /* === ACCOUNT MOBILE === */
  .account-layout {
    gap: 16px !important;
  }
  .account-sidebar {
    border-radius: 14px;
    padding: 16px;
  }
  .account-sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .account-sidebar nav::-webkit-scrollbar { display: none; }
  .account-nav-link {
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .account-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    text-align: left;
  }
  .account-avatar > div:first-child {
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
    margin: 0 !important;
  }

  /* Orders table mobile card view */
  .account-layout table {
    font-size: 12px;
  }
  .account-layout th,
  .account-layout td {
    padding: 8px 6px !important;
  }

  /* === FOOTER MOBILE === */
  .newsletter-section {
    padding: 36px 16px;
  }
  .newsletter-section h2 {
    font-size: 22px !important;
  }
  .newsletter-section p {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .newsletter-form {
    border-radius: 14px;
    padding: 4px;
  }
  .newsletter-form input {
    font-size: 14px;
    padding: 10px 16px;
  }
  .newsletter-form .btn-subscribe {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 12px;
  }
  .site-footer {
    padding: 40px 16px 20px;
  }
  .footer-grid {
    gap: 24px;
  }
  .footer-col h4 {
    font-size: 14px;
    margin-bottom: 14px;
  }
  .footer-link {
    font-size: 13px;
    padding: 3px 0;
  }
  .footer-bottom {
    padding-top: 20px;
  }
  .trust-badges {
    gap: 12px;
  }
  .trust-badge {
    font-size: 11px;
  }
  .footer-copy {
    font-size: 11px;
  }

  /* === AUTH PAGE MOBILE === */
  .auth-layout {
    padding: 20px 14px;
  }
  .auth-card {
    padding: 24px 18px;
    border-radius: 18px;
  }
  .auth-title {
    font-size: 20px;
  }

  /* === CTA SECTION MOBILE === */
  .section .btn-lg {
    padding: 13px 20px;
    font-size: 14px;
  }

  /* === CHECKOUT MOBILE === */
  .checkout-layout {
    gap: 16px !important;
  }
  .checkout-card {
    padding: 18px;
    border-radius: 14px;
  }
  .checkout-card h3 {
    font-size: 16px;
  }

  /* Profile form mobile */
  .form-group {
    margin-bottom: 14px;
  }
  .form-control {
    padding: 11px 14px;
    font-size: 14px;
    border-radius: 10px;
  }
  .form-label {
    font-size: 13px;
  }

  /* Mobile form grid fix */
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* === POPUP MOBILE === */
  .popup-modal {
    border-radius: 18px;
    max-width: calc(100vw - 28px);
  }
  .popup-header {
    padding: 22px 18px;
  }
  .popup-header h2 {
    font-size: 20px;
  }
  .popup-body {
    padding: 20px;
  }

  /* === CHATBOT MOBILE === */
  #chatbot-fab {
    width: 48px;
    height: 48px;
    bottom: 74px;
    right: 14px;
    font-size: 20px;
  }
  #chatbot-widget-box {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
    bottom: 74px !important;
    height: 400px !important;
    border-radius: 16px;
  }

  /* === TOAST MOBILE === */
  .toast-container {
    bottom: 74px !important;
    left: 12px;
    right: 12px;
    max-width: none;
  }
  .toast {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
  }

  /* === STATUS BADGES === */
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
  }
  .status-pending { background: rgba(245,158,11,0.1); color: #f59e0b; }
  .status-completed { background: rgba(34,197,94,0.1); color: #22c55e; }
  .status-cancelled, .status-refunded { background: rgba(239,68,68,0.1); color: #ef4444; }

  /* === GENERIC MOBILE IMPROVEMENTS === */

  /* Better touch targets */
  button, a, .btn, .mobile-nav-btn, [data-filter-cat] {
    min-height: 36px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Smooth scrolling fix */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Remove hover effects on touch devices */
  @media (hover: none) {
    .product-card:hover {
      transform: none;
      box-shadow: none;
    }
    .category-card:hover {
      transform: none;
    }
    .feature-card:hover {
      transform: none;
    }
  }

  /* Blog grid mobile */
  .blog-grid {
    gap: 14px;
  }
  .blog-card-body {
    padding: 14px;
  }
  .blog-title {
    font-size: 15px;
  }
  .blog-excerpt {
    font-size: 12px;
  }

  /* FAQ Accordion Mobile */
  .faq-question {
    padding: 14px 16px;
    font-size: 14px;
  }
  .faq-item.open .faq-answer {
    padding: 14px 16px;
  }
}

/* ============ EXTRA SMALL SCREENS (≤480px) ============ */
@media (max-width: 480px) {
  .header-inner {
    padding: 7px 10px;
    gap: 6px;
  }
  .site-logo img {
    height: 30px;
    border-radius: 8px;
  }
  .browse-dropdown-wrap { display: none !important; }
  .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .hamburger-btn {
    width: 32px;
    height: 32px;
  }

  .hero-title {
    font-size: 22px !important;
  }
  .hero-subtitle {
    font-size: 13px;
  }
  .hero-stat .stat-num {
    font-size: 18px;
  }
  .hero-stat .stat-label {
    font-size: 10px;
  }

  /* Categories even smaller */
  .category-card {
    min-width: 105px;
    padding: 14px 10px;
  }
  .category-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .category-name {
    font-size: 11px;
  }

  /* Features */
  .features-grid {
    gap: 8px;
  }
  .feature-card {
    padding: 14px 10px;
  }
  .feature-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .feature-title {
    font-size: 12px;
  }
  .feature-desc {
    font-size: 10px;
  }

  /* Review cards smaller */
  .review-card {
    min-width: 260px;
    padding: 14px;
  }
}

/* ============ FLOATING WHATSAPP ============ */
.float-whatsapp {
  display: none;
  position: fixed;
  bottom: 74px;
  left: 14px;
  width: 46px;
  height: 46px;
  background: #25D366;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  z-index: 985;
  box-shadow: 0 4px 18px rgba(37,211,102,0.35);
  transition: all 0.3s ease;
  text-decoration: none;
}
.float-whatsapp:hover { transform: scale(1.08); color: white; }

@media (max-width: 768px) {
  .float-whatsapp { display: flex; }
}

/* ============ MOBILE ANIMATIONS ============ */
@media (max-width: 768px) {
  @keyframes mobileSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .animate-on-scroll {
    animation: mobileSlideUp 0.4s ease forwards;
  }

  /* Smooth page transitions */
  #main-content {
    animation: mobileSlideUp 0.3s ease;
  }

  /* === ALL INLINE GRID FIXES FOR MOBILE === */
  
  /* Contact page quick cards - 3 col → still 3 but compact on mobile */
  .contact-quick-cards {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  /* About stats grid */
  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Browse dropdown on mobile - full width */
  .browse-dropdown {
    position: fixed !important;
    top: auto !important;
    bottom: 70px !important;
    left: 12px !important;
    right: 12px !important;
    min-width: auto !important;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 16px !important;
  }

  /* Ticker faster on mobile */
  .ticker-inner {
    animation-duration: 18s !important;
  }

  /* CTA sections compact */
  [style*="padding:48px"],
  [style*="padding: 48px"] {
    padding: 28px 18px !important;
  }

  /* Table mobile - smaller text */
  table th { font-size: 12px !important; padding: 10px 8px !important; }
  table td { font-size: 12px !important; padding: 10px 8px !important; }

  /* FAQ mobile improvements */
  .faq-item {
    border-radius: 12px !important;
    margin-bottom: 8px;
  }
  .faq-question {
    padding: 14px 16px !important;
    font-size: 14px !important;
    gap: 12px;
  }
  .faq-answer {
    font-size: 13px !important;
    line-height: 1.7 !important;
  }

  /* Empty state mobile */
  .empty-state {
    padding: 40px 16px !important;
  }
  .empty-icon {
    font-size: 40px !important;
  }

  /* Alert mobile */
  .alert {
    padding: 12px 14px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }
}
