/* ============================================================
   Dar Al Worood — Home V2
   Isolated homepage layout overrides.
   Loaded last so it safely resolves older accumulated rules.
   ============================================================ */

.home-showcase,
.services-section-pro,
.product-home-section{
  --home-gap: clamp(14px, 1.6vw, 22px);
}

/* Keep the whole homepage visually on one shared axis */
.home-showcase .shell,
.services-section-pro,
.product-home-section{
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

/* Hero + banner */
.home-showcase{
  padding: 26px 0 18px;
}
.home-showcase-grid{
  gap: var(--home-gap);
}
.home-hero-panel,
.home-banner-card,
.home-banner-empty{
  border-radius: 26px;
}
.home-hero-panel{
  min-height: 390px;
  padding: clamp(28px, 3.2vw, 42px);
}
.home-hero-content h1{
  font-size: clamp(2.2rem, 4.2vw, 4.25rem);
}
.home-banner-column{
  min-height: 390px;
}

/* Section rhythm — removes the "two separate pages" feeling */
.services-section-pro{
  padding: 42px 0 30px !important;
}
.product-home-section{
  padding: 30px 0 72px !important;
  border-top: 1px solid rgba(30,35,55,.07);
}
.pro-section-head{
  margin-bottom: 20px;
}

/* Services: 3 services = 3 columns, 4 = 4 columns, then wraps naturally */
.category-grid-pro.category-grid-many{
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  max-width: none !important;
  gap: var(--home-gap) !important;
}
.category-grid-many .category-card-pro{
  min-height: 245px;
  padding: 24px 18px 22px;
}
.category-grid-many .category-media-pro{
  width: 82px;
  height: 82px;
}
.category-grid-pro .category-card-pro{
  height: 100%;
}

/* Product categories use the same visual grid and width as services */
.product-category-grid{
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: var(--home-gap) !important;
}
.product-category-card{
  height: 100%;
  border-radius: 22px;
  padding: 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-category-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(20,12,28,.08);
  border-color: rgba(111,23,95,.16);
}
.product-category-media{
  height: 190px;
  border-radius: 17px;
}
.product-all-link{
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(111,23,95,.13);
  border-radius: 12px;
  background: #fff;
}

/* Tablet */
@media (max-width: 980px){
  .home-showcase .shell,
  .services-section-pro,
  .product-home-section{
    width: min(100% - 28px, 820px);
  }
  .home-showcase-grid{
    grid-template-columns: 1fr;
  }
  .home-hero-panel{
    min-height: 350px;
  }
  .home-banner-column{
    min-height: 0;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .category-grid-pro.category-grid-many{
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  .product-category-grid{
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

/* Mobile: compact, genuinely responsive, no horizontal overflow */
@media (max-width: 720px){
  .home-showcase .shell,
  .services-section-pro,
  .product-home-section{
    width: calc(100% - 24px);
  }

  .home-showcase{
    padding: 14px 0 10px;
  }
  .home-hero-panel{
    min-height: auto;
    padding: 24px 20px;
    border-radius: 22px;
  }
  .home-hero-content h1{
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 1.12;
  }
  .home-hero-content p{
    line-height: 1.75;
  }
  .hero-steps-pro{
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 5px;
  }
  .hero-step-pro{
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }
  .hero-step-pro>span{
    width: 34px;
    height: 34px;
  }
  .hero-step-pro small{
    display: none;
  }

  .home-banner-column{
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-banner-card,
  .home-banner-card.home-banner-main:nth-last-child(n+2){
    min-height: 210px;
    grid-column: auto;
    border-radius: 20px;
  }

  .services-section-pro{
    padding: 30px 0 22px !important;
  }
  .product-home-section{
    padding: 22px 0 88px !important;
  }
  .pro-section-head{
    gap: 12px;
    margin-bottom: 16px;
  }
  .pro-section-head h2{
    font-size: 1.65rem;
  }
  .pro-section-head p{
    font-size: .82rem;
    line-height: 1.6;
  }

  /* Two service cards per row on normal phones */
  .category-grid-pro.category-grid-many{
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 10px !important;
  }
  .category-grid-many .category-card-pro{
    min-height: 210px;
    padding: 18px 10px 16px;
    border-radius: 18px;
    gap: 9px;
  }
  .category-grid-many .category-media-pro{
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }
  .category-grid-many .category-title-row h3{
    font-size: .98rem;
    line-height: 1.45;
  }
  .category-grid-many .category-body-pro p{
    font-size: .74rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
  }
  .category-grid-many .category-meta-pro{
    margin-top: 7px;
  }
  .category-grid-many .category-meta-pro span{
    font-size: .68rem;
  }
  .category-grid-pro .category-arrow{
    width: 29px;
    height: 29px;
    left: 9px;
    top: 9px;
  }

  .product-category-grid{
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 10px !important;
  }
  .product-category-card{
    padding: 10px;
    gap: 9px;
    border-radius: 18px;
  }
  .product-category-media{
    height: 135px;
    border-radius: 14px;
  }
  .product-category-card h3{
    margin: 0 0 4px;
    font-size: .98rem;
  }
  .product-category-card p{
    margin: 0;
    font-size: .74rem;
    line-height: 1.55;
  }
  .product-category-card>b{
    font-size: .72rem;
  }
  .product-all-link{
    min-height: 36px;
    padding: 7px 10px;
    font-size: .75rem;
  }
}

/* Very narrow phones: preserve readability */
@media (max-width: 390px){
  .category-grid-pro.category-grid-many,
  .product-category-grid{
    grid-template-columns: 1fr !important;
  }
  .category-grid-many .category-card-pro{
    min-height: 200px;
  }
  .product-category-media{
    height: 180px;
  }
}
