/* ==========================================
   AASHVI NURSERY & GARDENING - PLANT CATEGORIES
   Desktop: 4 + 4 Grid
   Mobile: Horizontal Scroll Slider
   ========================================== */

:root {
  --green: #5f8e25;
  --green-dark: #2f5224;
  --green-light: #8caf55;
  --brown: #3b271a;
  --cream: #fbfaf4;
  --card: #fffef9;
  --text: #323232;
  --muted: #606060;
  --border: rgba(74, 106, 39, 0.14);
  --shadow: 0 13px 32px rgba(48, 67, 28, 0.11);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  color: var(--text);
  background: #ffffff;
  font-family: "DM Sans", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.plant-categories-section {
  min-height: 100vh;
  padding: 28px 0 78px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.95), transparent 32%),
    linear-gradient(180deg, #fffefa 0%, #faf9f1 100%);
}

.plant-container {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--green);
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 700;
}

.section-tag span {
  width: 29px;
  height: 2px;
  background: var(--green);
}

.section-tag i {
  transform: rotate(-15deg);
}

.section-heading h2 {
  margin-top: 9px;
  color: var(--brown);
  font-family: "Playfair Display", serif;
  font-size: clamp(36px, 3vw, 64px);
  line-height: 1.08;
  letter-spacing: -2.6px;
  font-weight: 600;
}

.section-heading h2 strong {
  color: var(--green);
}

.heading-divider {
  margin: 12px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--green);
}

.heading-divider span {
  width: 68px;
  height: 1px;
  background: var(--green);
}

.heading-divider i {
  transform: rotate(-18deg);
}

.section-description {
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 26px;
}

.category-card {
  min-width: 0;
  display: block;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.category-card:hover {
  transform: translateY(-10px);
  border-color: rgba(95, 142, 37, 0.42);
  box-shadow: 0 22px 45px rgba(48, 67, 28, 0.18);
}

.card-image {
  height: 164px;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.5s ease;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(19, 43, 10, 0.12));
  transition: background 0.35s ease;
}

.category-card:hover .card-image img {
  transform: scale(1.1);
  filter: saturate(1.08);
}

.category-card:hover .image-overlay {
  background: linear-gradient(180deg, transparent 35%, rgba(37, 79, 13, 0.22));
}

.card-content {
  min-height: 165px;
  padding: 30px 24px 18px;
  position: relative;
  text-align: center;
}

.category-icon {
  width: 70px;
  height: 70px;
  position: absolute;
  top: -37px;
  left: 50%;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border: 7px solid rgba(251, 250, 244, 0.95);
  border-radius: 50%;
  color: var(--green);
  background: #fffef8;
  box-shadow: 0 7px 20px rgba(47, 82, 36, 0.09);
  font-size: 26px;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    transform 0.3s ease;
}

.category-card:hover .category-icon {
  color: #ffffff;
  background: var(--green);
  transform: translateX(-50%) rotate(-8deg) scale(1.06);
}

.card-content h3 {
  margin-top: 2px;
  color: #1e3c25;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
}

.card-content p {
  min-height: 45px;
  max-width: 250px;
  margin: 8px auto 12px;
  color: #474747;
  font-size: 14px;
  line-height: 1.5;
}

.card-arrow {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #72a232, #497d19);
  font-size: 13px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover .card-arrow {
  transform: translateX(5px) rotate(-4deg);
  box-shadow: 0 8px 16px rgba(67, 114, 26, 0.25);
}

.section-button-wrap {
  margin-top: 24px;
  text-align: center;
}

.view-all-button {
  min-width: 244px;
  min-height: 50px;
  padding: 12px 28px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1.5px solid var(--green);
  border-radius: 12px;
  color: var(--green);
  background: rgba(255,255,255,0.52);
  font-size: 18px;
  font-weight: 700;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.view-all-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  transform: skewX(-18deg);
  background: rgba(255,255,255,0.28);
  transition: left 0.6s ease;
}

.view-all-button:hover {
  color: #ffffff;
  background: var(--green);
  transform: translateY(-4px);
}

.view-all-button:hover::before {
  left: 145%;
}

/* MOBILE SLIDER CONTROLS */

.mobile-slider-controls {
  display: none;
}

.slider-dots {
  display: none;
}

/* DECORATION */

.corner-leaf,
.blur-plant {
  position: absolute;
  z-index: 1;
  color: #6e963b;
  pointer-events: none;
}

.corner-leaf-left {
  top: -18px;
  left: -8px;
  font-size: 120px;
  opacity: 0.84;
  transform: rotate(-30deg);
}

.corner-leaf-right {
  right: -18px;
  bottom: -15px;
  font-size: 125px;
  opacity: 0.78;
  transform: rotate(145deg);
}

.blur-plant-left {
  left: -35px;
  bottom: 185px;
  font-size: 115px;
  opacity: 0.15;
  filter: blur(2px);
  transform: rotate(-25deg);
}

.blur-plant-right {
  top: 110px;
  right: -28px;
  font-size: 155px;
  opacity: 0.11;
  filter: blur(7px);
  transform: rotate(20deg);
}

.bottom-wave {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 85px;
  pointer-events: none;
}

.bottom-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bottom-wave path {
  fill: #eaf1d7;
}

/* REVEAL EFFECTS */

.reveal-item,
.reveal-card {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-item.is-visible,
.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item {
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-card {
  transition:
    opacity 0.65s ease,
    transform 0.65s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

/* LARGE TABLETS */

@media (max-width: 1100px) {
  .plant-container {
    width: min(960px, calc(100% - 42px));
  }

  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-image {
    height: 210px;
  }
}

/* MOBILE HORIZONTAL SLIDER */

@media (max-width: 700px) {
  .plant-categories-section {
    min-height: auto;
    padding: 48px 0 82px;
  }

  .plant-container {
    width: 100%;
  }

  .section-heading {
    padding: 0 20px;
    margin-bottom: 22px;
  }

  .section-tag {
    font-size: 16px;
  }

  .section-heading h2 {
    font-size: clamp(42px, 12vw, 58px);
    letter-spacing: -1.7px;
  }

  .section-description br {
    display: none;
  }

  .mobile-slider-controls {
    width: calc(100% - 36px);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-slider-controls p {
    color: #688047;
    font-size: 13px;
    font-weight: 600;
  }

  .slider-arrow {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(95, 142, 37, 0.25);
    border-radius: 50%;
    color: #ffffff;
    background: var(--green);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(53, 91, 27, 0.18);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .slider-arrow:hover {
    transform: translateY(-3px);
  }

  .slider-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
  }

  .categories-grid {
    width: 100%;
    padding: 5px 20px 20px;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

  .categories-grid::-webkit-scrollbar {
    display: none;
  }

  .category-card {
    flex: 0 0 min(82vw, 335px);
    scroll-snap-align: center;
  }

  .card-image {
    height: 190px;
  }

  .card-content {
    min-height: 180px;
    padding-top: 34px;
  }

  .card-content h3 {
    font-size: 20px;
  }

  .card-content p {
    font-size: 15px;
  }

  .slider-dots {
    min-height: 16px;
    margin-top: 2px;
    display: flex;
    justify-content: center;
    gap: 7px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #c8d4ae;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
  }

  .slider-dot.active {
    width: 25px;
    background: var(--green);
  }

  .section-button-wrap {
    padding: 0 20px;
  }

  .view-all-button {
    width: min(100%, 310px);
  }

  .corner-leaf-left {
    font-size: 80px;
  }

  .corner-leaf-right {
    font-size: 78px;
  }
}

@media (max-width: 420px) {
  .section-heading h2 {
    font-size: 41px;
  }

  .category-card {
    flex-basis: 86vw;
  }

  .card-image {
    height: 178px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
