/* ==========================================================================
   GLOBAL SCRAP BUYER - RESPONSIVE STYLESHEET
   Full Width Section Guarantees | Calibrated Banner Heights | Screen-Matched Gradients
   ========================================================================== */

/* ==========================================================================
   1. EXTRA LARGE SCREENS (>= 1400px)
   ========================================================================== */
@media (min-width: 1400px) {
  .hero-slide-content {
    padding-left: clamp(4rem, 8vw, 9rem);
    max-width: 960px;
  }
  .hero-slide-title {
    font-size: 3.75rem;
  }
  .product-showcase-img {
    height: 205px;
  }
}

/* ==========================================================================
   2. LARGE DESKTOP SCREENS (<= 1199.98px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .hero-slide-content {
    padding-left: 4.5rem;
  }
  .hero-slide-title {
    font-size: 3rem;
  }
  .product-showcase-img {
    height: 185px;
  }
  .testimonial-card-solar {
    width: 340px;
  }
}

/* ==========================================================================
   3. TABLETS & SMALL LAPTOPS (<= 991.98px)
   - Ensure full width across viewports
   - Calibrate banner section height (reduced from excessive 75vh to 440px)
   - Responsive gradient matching for product cards
   ========================================================================== */
@media (max-width: 991.98px) {
  /* Full Width Section Guarantee */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: clamp(1rem, 3.5vw, 1.75rem) !important;
    padding-right: clamp(1rem, 3.5vw, 1.75rem) !important;
  }

  section,
  .section-padding {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2.75rem 0;
    overflow-x: hidden;
  }

  .section-title {
    font-size: 2.15rem;
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  /* Upper Nav */
  .upper-nav {
    text-align: center;
  }
  .upper-info-item {
    margin-right: 0.85rem;
    font-size: 0.78rem;
  }

  /* Navbar Mobile handled by Offcanvas in style.css */

  .nav-link::after {
    display: none;
  }

  .nav-link {
    padding: 0.75rem 0.5rem !important;
    border-bottom: 1px solid rgba(88, 110, 117, 0.2);
  }

  /* CALIBRATED HERO BANNER HEIGHT (Tablet) */
  .hero-slider-section {
    height: 440px !important;
    min-height: 420px !important;
    max-height: 460px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-banner-subpage {
    height: 420px !important;
    min-height: 380px !important;
    max-height: 450px !important;
  }

  .hero-banner-subpage .hero-slide-title {
    font-size: 2rem !important;
  }

  .hero-banner-subpage .hero-slide-lead {
    font-size: 1rem !important;
  }

  .hero-slider-section .carousel,
  .hero-slider-section .hero-carousel,
  .hero-slider-section #heroCarousel,
  .hero-slider-section .carousel-inner,
  .hero-slider-section .carousel-item,
  .hero-slide-item,
  .hero-slide-img,
  .hero-slide-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .hero-content-overlay {
    height: 100% !important;
    align-items: center;
  }

  .hero-content-overlay .hero-slide-content {
    padding-left: 2.5rem !important;
    padding-right: 2rem !important;
    max-width: 700px;
    width: 100%;
  }

  .hero-slide-title {
    font-size: 2.2rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.85rem !important;
  }

  .hero-slide-lead {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.35rem !important;
    max-width: 580px;
  }

  .hero-slide-actions {
    gap: 0.85rem !important;
    margin-bottom: 0 !important;
  }

  /* PRODUCT CARDS - TABLET GRADIENT MATCHING */
  .product-showcase-img {
    height: 160px;
  }

  .product-showcase-card {
    border-radius: 12px;
  }

  /* Subtle ambient gradient outline on tablet screens */
  .product-showcase-card::before {
    opacity: 0.35;
  }

  .product-showcase-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(160deg, #0c4352 0%, #073642 55%, #00242e 100%);
    box-shadow: 
      0 14px 30px -6px rgba(0, 15, 20, 0.8),
      0 0 20px rgba(34, 211, 238, 0.22);
  }

  .product-showcase-card:hover::before {
    opacity: 1;
    filter: drop-shadow(0 0 7px rgba(34, 211, 238, 0.55));
  }

  .product-showcase-info {
    padding: 0.95rem 0.65rem;
  }

  .product-showcase-title {
    font-size: 0.92rem;
  }

  /* Metrics Section */
  .metric-card {
    border-right: none;
    border-bottom: 1px solid rgba(88, 110, 117, 0.2);
    padding: 1.25rem 0;
  }

  .process-step-card {
    margin-bottom: 2rem;
  }

  /* Footer */
  .main-footer {
    padding: 3.5rem 0 1.5rem;
  }
  .footer-col-title {
    margin-top: 1.5rem;
  }
}

/* ==========================================================================
   4. MOBILE DEVICES (<= 767.98px)
   - Guaranteed full-width sections without horizontal overflow
   - Reduced banner height (380px) calibrated to mobile viewports
   - Glowing gradient cards tailored for mobile touch & view
   ========================================================================== */
@media (max-width: 767.98px) {
  /* Mobile Full-Width System */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  section,
  .section-padding {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2.25rem 0;
    overflow-x: hidden;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .section-lead {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  /* CALIBRATED HERO BANNER HEIGHT (Mobile) */
  .hero-slider-section {
    height: 380px !important;
    min-height: 360px !important;
    max-height: 400px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-banner-subpage {
    height: 360px !important;
    min-height: 320px !important;
    max-height: 390px !important;
  }

  .hero-banner-subpage .hero-slide-title {
    font-size: 1.55rem !important;
  }

  .hero-banner-subpage .hero-slide-lead {
    font-size: 0.85rem !important;
  }

  .hero-slider-section .carousel,
  .hero-slider-section .hero-carousel,
  .hero-slider-section #heroCarousel,
  .hero-slider-section .carousel-inner,
  .hero-slider-section .carousel-item,
  .hero-slide-item,
  .hero-slide-img,
  .hero-slide-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .hero-content-overlay {
    height: 100% !important;
    align-items: center;
    justify-content: flex-start;
  }

  .hero-content-overlay .hero-slide-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem 1.15rem !important;
    box-sizing: border-box !important;
  }

  .hero-slide-title {
    font-size: 1.65rem !important;
    line-height: 1.22 !important;
    margin-bottom: 0.65rem !important;
  }

  .hero-slide-lead {
    font-size: 0.88rem !important;
    line-height: 1.42 !important;
    margin-bottom: 1rem !important;
    max-width: 100%;
  }

  .hero-slide-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.65rem !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .hero-slide-actions .btn {
    flex: 1 1 140px !important;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.825rem !important;
    white-space: nowrap !important;
    margin-bottom: 0 !important;
    border-radius: var(--radius-sm);
  }

  /* PRODUCTS GRID - MOBILE FULL WIDTH COLUMN SCROLL */
  #productsGridContainer.row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 1.25rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #productsGridContainer > div {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* PRODUCT CARDS - MOBILE GRADIENT MATCHING */
  .product-showcase-card {
    width: 100% !important;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 15, 20, 0.6);
  }

  .product-showcase-img {
    height: 195px !important;
    width: 100% !important;
  }

  /* On mobile touch devices, show ambient gradient border immediately */
  .product-showcase-card::before {
    opacity: 0.55;
    padding: 1.5px;
  }

  .product-showcase-card:hover,
  .product-showcase-card:active {
    transform: translateY(-3px);
    background: linear-gradient(165deg, #0c4352 0%, #073642 50%, #00242e 100%);
    box-shadow: 
      0 10px 24px -4px rgba(0, 15, 20, 0.8),
      0 0 16px rgba(34, 211, 238, 0.28);
  }

  .product-showcase-card:hover::before,
  .product-showcase-card:active::before {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.65));
  }

  .product-showcase-card:hover::after,
  .product-showcase-card:active::after {
    opacity: 0.8;
    transform: scale(1) rotate(10deg);
  }

  .product-showcase-info {
    padding: 1.1rem 0.85rem;
  }

  .product-showcase-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  /* Rates Ticker */
  .rates-ticker-bar {
    font-size: 0.75rem;
  }
  .ticker-item {
    margin-right: 1.5rem;
  }

  /* Working Process on Mobile */
  .working-process-card {
    margin-bottom: 0.5rem;
  }

  /* Testimonials */
  .testimonial-card-solar {
    width: 285px;
    padding: 1.15rem;
  }

  .testimonial-quote-text {
    font-size: 0.88rem;
  }

  /* Floating WhatsApp */
  .floating-whatsapp-btn {
    bottom: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   5. SMALL PHONES (<= 480px)
   - Compact banner height (340px)
   - Edge-to-edge 2-column product card layout
   - Radiant gradient highlights
   ========================================================================== */
@media (max-width: 480px) {
  .container {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  #productsGridContainer.row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }

  /* CALIBRATED HERO BANNER HEIGHT (Small Mobile) */
  .hero-slider-section {
    height: 340px !important;
    min-height: 320px !important;
    max-height: 360px !important;
  }

  .hero-banner-subpage {
    height: 320px !important;
    min-height: 280px !important;
    max-height: 350px !important;
  }

  .hero-banner-subpage .hero-slide-title {
    font-size: 1.35rem !important;
  }

  .hero-banner-subpage .hero-slide-lead {
    font-size: 0.8rem !important;
  }

  .hero-slider-section .carousel,
  .hero-slider-section .hero-carousel,
  .hero-slider-section #heroCarousel,
  .hero-slider-section .carousel-inner,
  .hero-slider-section .carousel-item,
  .hero-slide-item,
  .hero-slide-img,
  .hero-slide-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .hero-content-overlay .hero-slide-content {
    padding: 0.85rem 0.75rem !important;
  }

  .hero-slide-title {
    font-size: 1.45rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.45rem !important;
  }

  .hero-slide-lead {
    font-size: 0.82rem !important;
    line-height: 1.38 !important;
    margin-bottom: 0.75rem !important;
  }

  .hero-slide-actions {
    flex-direction: column !important;
    gap: 0.45rem !important;
  }

  .hero-slide-actions .btn {
    width: 100% !important;
    flex: none !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  /* PRODUCT CARDS - SMALL MOBILE FULL WIDTH COLUMN SCROLL */
  .product-showcase-card {
    width: 100% !important;
  }

  .product-showcase-img {
    height: 185px !important;
    width: 100% !important;
  }

  .product-showcase-card::before {
    opacity: 0.65;
    padding: 1.5px;
  }

  .product-showcase-info {
    padding: 1rem 0.75rem;
  }

  .product-showcase-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .brand-text .title {
    font-size: 1.05rem;
  }

  .brand-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  .about-image-wrapper {
    min-height: 240px;
  }
}
