/* ============================================================
   FLEX COLUMN LAYOUT (3 Parts)
   ============================================================ */

.first-layered-section-bg{
  background-color: #F8F1CE;
  flex-grow: 1;
  padding: 20px 0 0px; 
  position: relative;
}

/* ============================================================
   CATEGORY SECTION STYLES
   ============================================================ */

.cat-shape-top {
  width: 100%;
  background-color: #F8F1CE;
  display: block;
  object-fit: cover;
}

.cat-shape-bottom {
  width: 100%;
  background-color: #ffffff;
  display: block;
  object-fit: cover;
}

/* ── UI Match: Wide Cards with Overlapping Images ── */
.cat-card {
  position: relative;
  height: 150px;
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  margin-right: 15px; /* Overlap ka space chhoda hai */
  margin-bottom: 10px;
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.cat-card-title {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  width: 50%; /* Text left me rahega, image peeche nhi dabegi */
}

.cat-card-img {
  position: absolute;
  right: -25px;   /* Extends outside right */
  bottom: -20px;  /* Extends outside bottom */
  height: 140px;  
  max-width: 65%;
  object-fit: contain;
  z-index: 3;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.15));
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cat-card:hover .cat-card-img {
  transform: scale(1.08) rotate(-2deg);
}

/* ── Mascot Image Size Control ── */
.cat-mascot-img {
  width: 100%;
  max-width: 220px; /* Default chota size */
  object-fit: contain;
  margin-bottom: -1rem;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Desktop & Large Tablets */
@media (min-width: 992px) {
  .cat-card { height: 160px; }
  .cat-card-title { font-size: 1.6rem; }
  .cat-card-img { height: 155px; }
  .cat-card-img.best_of_bobas { right: -2rem; bottom: -2.5rem; }
  .cat-card-img.coffee_corner { right: -2rem; bottom: -3.75rem; }
  .cat-card-img.ice_creams1 { right: -2rem; bottom: -3.5rem; }
  .cat-card-img.house_of_waffles { right: -2rem; bottom: -2.5rem; }
}

/* Tablet / Smaller screens */
@media (max-width: 991.98px) {
  .cat-card { height: 140px; margin-right: 10px; }
  .cat-card-img { height: 130px; right: -15px; bottom: -15px; }
}

/* Mobile */
@media (max-width: 767.98px) {
  .cat-card { height: 135px; padding: 20px; }
  .cat-card-title { font-size: 1.3rem; }
  .cat-card-img { height: 120px; right: -15px; bottom: -22%; }
  
  /* --- Reordering logic for Mobile Only --- */
  .first-layered-section-bg .row.align-items-center {
      display: flex;
      flex-direction: column;
  }
  
  /* 1. Heading sbse upar */
  .first-layered-section-bg .row.align-items-center > .col-lg-12.py-5:first-child {
      order: 1; 
  }
  
  /* 2. Category Cards */
  .first-layered-section-bg .row.align-items-center > .col-lg-8 {
      order: 2; 
  }
  
  /* 3. Button Wrapper (Upar laya gaya) */
  .first-layered-section-bg .row.align-items-center > .col-lg-12.py-5.text-center {
      order: 3;
      padding-top: 1.5rem !important;
      padding-bottom: 2rem !important;
  }
  
  /* 4. Boy Mascot (Sabse neeche) */
  .first-layered-section-bg .row.align-items-center > .col-lg-4 {
      order: 4;
      margin-top: 0 !important;
  }
}