/* ============================================================
   Sub-Category Page — NRE Design System (Figma Implementation)
   ============================================================ */

/* ── Typography base ─────────────────────────────────────── */
.sc-page :is(h1, h2, h3, h4) {
  font-family: "Abhaya Libre", Georgia, serif !important;
}

.sc-page {
  font-family: Montserrat, sans-serif;
  background-color: #fff;
}

/* ── Container ───────────────────────────────────────────── */
.sc-container {
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 clamp(15px, 2vw, 30px);
  width: 100%;
}

/* ── Hero Section ────────────────────────────────────────── */
.sc-hero {
  background: linear-gradient(135deg, #0f1c2e 0%, #08111c 50%, #030a11 100%);
  min-height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 0;
  overflow: hidden;
}

/* Optional subtle background image/texture could go here */
.sc-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(30, 90, 160, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.sc-hero__title {
  color: #fff;
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 500;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
  letter-spacing: 1px;
}

.sc-hero__title span {
  opacity: 0.7;
}

.sc-btn-quote {
  background-color: #1a8a3a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 30px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s;
  position: relative;
  z-index: 2;
}

.sc-btn-quote:hover {
  background-color: #14702f;
  color: #fff;
}

/* Categories Dropdown in Hero */
.sc-hero__bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0 clamp(15px, 2vw, 30px);
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  padding-bottom: 20px;
  max-width: 1400px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.sc-dropdown-btn {
  background-color: #1a8a3a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.sc-dropdown-btn:hover {
  background-color: #14702f;
}

/* ── Highlighted Sub-Categories Grid ─────────────────────── */
.sc-highlights {
  padding: 60px 0;
  text-align: center;
}

.sc-highlights h2 {
  font-size: 32px;
  color: #1e1e1e;
  margin-bottom: 40px;
  font-weight: 700;
}

.sc-highlights__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;

  margin: 0 auto;
}

.sc-highlight-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  display: block;
  text-decoration: none;
  background: #000;
}

.sc-highlight-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.8;
}

.sc-highlight-card:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

.sc-highlight-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.sc-highlight-card h3 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: #fff;
  font-size: 20px;
  font-family: Montserrat, sans-serif !important;
  font-weight: 600;
  margin: 0;
  z-index: 2;
  text-align: left;
  line-height: 1.3;
}

.sc-highlight-card h3 span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.8;
  margin-bottom: 4px;
}

/* ── Products Section ────────────────────────────────────── */
.sc-products {
  background-color: #f8f9fa;
  padding: 60px 0;
}

.sc-products__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.sc-products__header h2 {
  font-size: 32px;
  color: #1e1e1e;
  margin: 0;
  font-weight: 700;
}

.sc-products__controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sc-control-btn {
  border-radius: 5px;
  border: 1px solid #D9D9D9;
  background: #FFF;
  border-radius: 4px;
  padding: 8px 15px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.sc-control-btn::after {
  content: none;
}

/* Sort Dropdown Styles */
.sc-sort-dropdown {
  position: relative;
  display: inline-block;
}

.sc-sort-menu {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
  min-width: 220px;
  margin-top: 8px !important;
}

.sc-sort-menu .dropdown-item {
  padding: 10px 20px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.sc-sort-menu .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #1e1e1e;
}

.sc-sort-menu .active .dropdown-item {
  background-color: transparent;
  color: #1e1e1e;
  font-weight: 500;
}

.radio-circle {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  position: relative;
  transition: all 0.2s;
}

.sc-sort-menu .active .radio-circle {
  border-color: #10b981;
  /* Brighter green from design */
  border-width: 3px;
}


.sc-control-icon {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sc-control-icon.active {
  border-color: #1a8a3a;
  color: #1a8a3a;
  box-shadow: 0 0 0 1px rgba(26, 138, 58, 0.08);
}

/* Product Grid */
.sc-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.sc-product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
}

.sc-product-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transform: translateY(-3px);
}

.sc-product-card__image {
  background: #f4f4f4;
  border-radius: 8px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.sc-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc-product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #1a8a3a;
}

.sc-product-card h3 {
  font-family: Montserrat, sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: #1e1e1e;
  margin: 0 0 8px;
  line-height: 1.4;
}

.sc-product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.sc-product-grid .moreBx,
.sc-product-grid [class^="appendHere"] {
  grid-column: 1 / -1;
}

.sc-product-card__desc {
  font-size: 13px;
  color: #1a8a3a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sc-product-card__sku {
  background: #5b6b88;
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.sc-product-card__price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
  margin-top: auto;
}

.sc-product-card__price-row span strong {
  color: #1e1e1e;
}

.sc-product-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sc-btn-outline {
  border: 1px solid #ddd;
  background: transparent;
  color: #333;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.sc-btn-outline--green {
  color: #1a8a3a;
  border-color: #1a8a3a;
}

.sc-btn-outline--green:hover {
  background: #1a8a3a;
  color: #fff;
}

.sc-btn-outline--blue {
  color: #2b70d3;
  border-color: #2b70d3;
}

.sc-btn-outline--blue:hover {
  background: #2b70d3;
  color: #fff;
}

/* ── Content Section (SEO Info) ──────────────────────────── */
.sc-content {
  padding: 60px 0;
  background: #fff;
}

.sc-content h2 {
  font-size: 26px;
  color: #1e1e1e;
  margin-bottom: 20px;
  font-weight: 700;
}

.sc-content h3 {
  font-family: Montserrat, sans-serif !important;
  font-size: 18px;
  color: #1e1e1e;
  margin: 30px 0 20px;
  font-weight: 600;
}

.sc-content p {
  color: #555;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.sc-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 30px;
  margin-bottom: 30px;
}

.sc-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: #444;
  line-height: 1.5;
}

.sc-list-item__icon {
  color: #1a8a3a;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1200px) {
  .sc-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .sc-highlights__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .sc-highlights__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .sc-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sc-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sc-hero {
    padding: 80px 0 100px;
  }

  .sc-highlights__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sc-products__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .sc-product-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .sc-highlights__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* ── List View Modifiers ─────────────────────────────────── */
.sc-product-grid.list-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
}

.sc-product-grid.list-view .sc-product-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  align-items: center;
  text-align: left;
  gap: 8px 18px;
  min-height: auto;
  padding: 16px;
}

.sc-product-grid.list-view .sc-product-card__image {
  grid-column: 1;
  grid-row: 1 / 4;
  margin-bottom: 0;
  width: 150px;
  max-width: 150px;
}

.sc-product-grid.list-view h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.sc-product-grid.list-view .sc-product-card__desc {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 0;
}

.sc-product-grid.list-view .sc-product-card__price-row {
  grid-column: 2;
  grid-row: 3;
  margin-bottom: 0;
  margin-top: 0;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
}

.sc-product-grid.list-view .sc-product-card__actions {
  grid-column: 1 / -1;
  grid-row: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-left: 0;
  margin-top: 8px;
  width: 100%;
  align-self: auto;
}

.sc-product-grid.list-view .sc-product-card__actions .sc-btn-outline {
  width: 100%;
}

@media (max-width: 768px) {
  .sc-product-grid.list-view {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .sc-product-grid.list-view .sc-product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
  }
  .sc-product-grid.list-view .sc-product-card__image {
    width: 100%;
    max-width: none;
  }
  .sc-product-grid.list-view .sc-product-card__desc {
    justify-content: center;
  }
  .sc-product-grid.list-view .sc-product-card__actions {
    flex-direction: row;
    margin-left: 0;
    width: 100%;
  }
}
