/* ========================================
   HOMEPAGE MOBILE OPTIMIZATIONS - ELEGANT & COMPACT
   ======================================== */

/* ========== HERO SLIDER MOBILE ========== */

/* Tablets and below (992px) */
@media (max-width: 992px) {
  .hero-slider-section {
    min-height: 350px;
    margin-top: 60px;
  }

  .hero-slide {
    min-height: 350px;
  }

  .hero-slide-content {
    padding: 1.25rem;
  }

  .hero-slide-content h1 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 0.625rem;
  }

  .hero-slide-content p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }

  .hero-slide-btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Slider arrows */
  .hero-slider-arrow {
    width: 34px;
    height: 34px;
    font-size: 1.125rem;
  }

  .hero-slider-arrow.prev {
    left: 0.625rem;
  }

  .hero-slider-arrow.next {
    right: 0.625rem;
  }

  /* Slider dots */
  .hero-slider-controls {
    bottom: 0.875rem;
    gap: 0.4rem;
  }

  .hero-slider-dot {
    width: 7px;
    height: 7px;
  }
}

/* Mobile phones (768px and below) */
@media (max-width: 768px) {
  .hero-slider-section {
    min-height: 260px !important;
    margin-top: 52px !important;
  }

  .hero-slide {
    min-height: 260px !important;
  }

  /* Center and contain images on mobile */
  .hero-slide img {
    object-fit: cover;
    object-position: center center;
    width: 100%;
    height: 100%;
  }

  /* Improve overlay for better text readability */
  .hero-slide-overlay {
    background: linear-gradient(
      to right,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 0.2) 100%
    ) !important;
  }

  .hero-slide-content {
    padding: 1rem !important;
    max-width: 100%;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .hero-slide-content h1 {
    font-size: 1.35rem !important;
    line-height: 1.25;
    margin-bottom: 0.625rem;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .hero-slide-content p {
    font-size: 0.875rem !important;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    max-width: 90%;
  }

  /* Larger, more tappable button */
  .hero-slide-btn {
    padding: 0.75rem 1.75rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 25px;
    min-width: 160px;
    min-height: 44px; /* iOS recommended touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .hero-slide-btn:active {
    transform: scale(0.96);
  }

  /* Slider arrows - larger for easier tapping */
  .hero-slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
    background: rgba(255, 255, 255, 0.9) !important;
    opacity: 1;
  }

  .hero-slider-arrow.prev {
    left: 0.5rem;
  }

  .hero-slider-arrow.next {
    right: 0.5rem;
  }

  .hero-slider-controls {
    bottom: 0.875rem;
    gap: 0.5rem;
  }

  .hero-slider-dot {
    width: 8px;
    height: 8px;
  }

  .hero-slider-dot.active {
    width: 24px;
    border-radius: 4px;
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .hero-slider-section {
    min-height: 240px;
    margin-top: 48px;
  }

  .hero-slide {
    min-height: 240px;
  }

  .hero-slide-content {
    padding: 0.75rem;
  }

  .hero-slide-content h1 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .hero-slide-content p {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  /* Keep button tappable on small phones */
  .hero-slide-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
    min-width: 140px;
    min-height: 42px;
  }

  .hero-slider-arrow {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .hero-slider-controls {
    bottom: 0.625rem;
    gap: 0.4rem;
  }

  .hero-slider-dot {
    width: 7px;
    height: 7px;
  }

  .hero-slider-dot.active {
    width: 20px;
  }
}

/* ========== CATEGORY BOXES MOBILE - COMPACT & ELEGANT ========== */

/* Tablets and below (992px) */
@media (max-width: 992px) {
  .category-boxes-section {
    padding: 1.5rem 0.875rem;
  }

  .category-boxes-container {
    gap: 1rem;
    padding: 0;
  }

  .category-box {
    min-height: 180px;
  }

  .category-box-content h3 {
    font-size: 1.125rem;
  }

  .category-box-content p {
    font-size: 0.875rem;
  }
}

/* Mobile phones (768px and below) */
@media (max-width: 768px) {
  .category-boxes-section {
    padding: 1.25rem 0.625rem !important;
  }

  .category-boxes-container {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .category-box {
    min-height: 140px !important;
    border-radius: 10px;
  }

  .category-box-content {
    padding: 1rem !important;
  }

  .category-box-content h3 {
    font-size: 1rem !important;
    margin-bottom: 0.3rem;
  }

  .category-box-content p {
    font-size: 0.8125rem !important;
  }

  /* Elegant touch feedback */
  .category-box:active {
    transform: scale(0.99);
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .category-boxes-section {
    padding: 1rem 0.5rem;
  }

  .category-box {
    min-height: 120px;
  }

  .category-box-content {
    padding: 0.875rem;
  }

  .category-box-content h3 {
    font-size: 0.9375rem;
  }

  .category-box-content p {
    font-size: 0.75rem;
  }
}

/* ========== SUPPLIERS SLIDER MOBILE ========== */

/* Tablets and below (992px) */
@media (max-width: 992px) {
  .suppliers-slider-section {
    padding: 1.5rem 0.875rem;
  }

  .section-header {
    margin-bottom: 1.25rem;
  }

  .section-title {
    font-size: 1.375rem;
  }

  .section-subtitle {
    font-size: 0.875rem;
  }

  .suppliers-slider {
    gap: 1.25rem;
    padding: 1.25rem 0.875rem;
  }

  .supplier-logo-wrapper {
    width: 110px;
    height: 65px;
  }
}

/* Mobile phones (768px and below) */
@media (max-width: 768px) {
  .suppliers-slider-section {
    padding: 1.25rem 0.625rem;
  }

  .section-header {
    margin-bottom: 1rem;
    padding: 0 0.375rem;
  }

  .section-title {
    font-size: 1.1875rem;
    margin-bottom: 0.3rem;
  }

  .section-subtitle {
    font-size: 0.8125rem;
  }

  /* Scrollable slider on mobile */
  .suppliers-slider {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 1rem 0.625rem;
    scrollbar-width: none;
  }

  .suppliers-slider::-webkit-scrollbar {
    display: none;
  }

  .supplier-logo-wrapper {
    flex-shrink: 0;
    scroll-snap-align: center;
    width: 95px;
    height: 55px;
  }

  .supplier-logo {
    max-width: 100%;
    max-height: 100%;
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .suppliers-slider-section {
    padding: 1rem 0.5rem;
  }

  .section-title {
    font-size: 1.0625rem;
  }

  .section-subtitle {
    font-size: 0.75rem;
  }

  .suppliers-slider {
    gap: 0.875rem;
    padding: 0.875rem 0.5rem;
  }

  .supplier-logo-wrapper {
    width: 85px;
    height: 50px;
  }
}

/* ========== ABOUT SECTION MOBILE ========== */

/* Tablets and below (992px) */
@media (max-width: 992px) {
  .about-section {
    padding: 1.5rem 0.875rem;
  }

  .about-container {
    gap: 1.25rem;
  }

  .about-content h2 {
    font-size: 1.375rem;
  }

  .about-content p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .about-features {
    gap: 0.875rem;
  }

  .about-feature {
    padding: 0.875rem;
  }

  .about-feature i {
    font-size: 1.5rem;
  }

  .about-feature h4 {
    font-size: 0.9375rem;
  }

  .about-feature p {
    font-size: 0.8125rem;
  }
}

/* Mobile phones (768px and below) */
@media (max-width: 768px) {
  .about-section {
    padding: 1.25rem 0.625rem;
  }

  .about-container {
    flex-direction: column;
    gap: 1rem;
  }

  .about-content {
    padding: 0 0.375rem;
  }

  .about-content h2 {
    font-size: 1.1875rem;
    margin-bottom: 0.625rem;
  }

  .about-content p {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 0.875rem;
  }

  /* Features in elegant grid - like desktop but compact */
  .about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .about-feature {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .about-feature i {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
  }

  .about-feature h4 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }

  .about-feature p {
    font-size: 0.75rem;
    line-height: 1.35;
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .about-section {
    padding: 1rem 0.5rem;
  }

  .about-content h2 {
    font-size: 1.0625rem;
  }

  .about-content p {
    font-size: 0.75rem;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .about-feature {
    padding: 0.625rem;
  }

  .about-feature i {
    font-size: 1.125rem;
  }

  .about-feature h4 {
    font-size: 0.8125rem;
  }

  .about-feature p {
    font-size: 0.6875rem;
  }
}

/* ========== TOUCH OPTIMIZATIONS ========== */

@media (hover: none) and (pointer: coarse) {
  .hero-slide-btn,
  .category-box,
  .about-feature {
    min-height: 40px;
  }

  /* Remove hover effects */
  .hero-slide-btn:hover,
  .category-box:hover {
    transform: none;
  }

  /* Active states - subtle */
  .hero-slide-btn:active {
    transform: scale(0.98);
  }

  .category-box:active {
    transform: scale(0.99);
  }

  .hero-slider-arrow:active {
    transform: scale(0.92);
  }
}

/* ========== LANDSCAPE ORIENTATION ========== */

@media (max-width: 768px) and (orientation: landscape) {
  .hero-slider-section {
    min-height: 220px;
  }

  .hero-slide {
    min-height: 220px;
  }

  .hero-slide-content h1 {
    font-size: 1.125rem;
  }

  .hero-slide-content p {
    font-size: 0.75rem;
  }

  .category-box {
    min-height: 120px;
  }
}

/* ========== PREVENT OVERSCROLL ========== */

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  html {
    -webkit-overflow-scrolling: touch;
  }
}

/* ========== ACCESSIBILITY ========== */

@media (max-width: 768px) {
  .hero-slide-btn:focus,
  .category-box:focus,
  .hero-slider-arrow:focus {
    outline: 2px solid rgba(224, 32, 32, 0.8);
    outline-offset: 2px;
  }

  /* Improve readability */
  .hero-slide-content,
  .category-box-content {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
}
