/* ===== CATALOG DARK MODE OVERRIDES ===== */
body.dark-mode .cat-header {
  background-color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .product-card {
  background: #1a1d27;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

body.dark-mode .product-card:hover {
  box-shadow: 0 6px 22px rgba(10, 102, 194, 0.22);
}

body.dark-mode .product-card-img-wrap {
  background-color: #13151f;
  border-bottom-color: #2e3140;
}

body.dark-mode .product-card-name {
  color: #e8eaf0;
}

body.dark-mode .product-card-arrow {
  background-color: #252838;
  color: #5ba3e8;
}

body.dark-mode .product-card:hover .product-card-arrow {
  background-color: var(--blue);
  color: #ffffff;
}

body.dark-mode .cat-title-sub {
  color: #9ba3af;
}

body.dark-mode .cat-cta-text {
  color: #9ba3af;
}

/* ===================== CATALOG HEADER ===================== */
.cat-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--blue);
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cat-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 15px;
  flex-shrink: 0;
  transition: background-color 0.15s;
  text-decoration: none;
}
.cat-back-btn:hover  { background: rgba(255, 255, 255, 0.35); }
.cat-back-btn:active { opacity: 0.6; }

.cat-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-header-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.cat-header-text {
  display: flex;
  flex-direction: column;
}

.cat-header-name {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.cat-header-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

/* ===================== TITLE CARD ===================== */


.cat-title-sub {
  font-size: clamp(12px, 3vw, 14px);
  color: var(--gray);
  margin-top: 2px;
  font-weight: 400;
}

/* ===================== PRODUCT GRID ===================== */
.cat-grid-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 16px;
  margin-bottom: 4px;
}

/* ===================== PRODUCT CARD ===================== */
.product-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.product-card:hover {
  box-shadow: 0 6px 22px rgba(10, 102, 194, 0.15);
  transform: translateY(-2px);
}

.product-card:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* Image area — fixed aspect ratio so all images are the same size */
.product-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f0f4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid #eef1f5;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

/* Card bottom row */
.product-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 12px 14px;
  flex: 1;
}

.product-card-name {
  font-family: var(--font);
  font-size: clamp(11px, 2.8vw, 14px);
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  flex: 1;
}

.product-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #eef4fd;
  color: var(--blue);
  font-size: 12px;
  flex-shrink: 0;
  transition: background-color 0.15s, color 0.15s;
}

.product-card:hover .product-card-arrow {
  background-color: var(--blue);
  color: var(--white);
}

/* ===================== CTA CARD ===================== */
.cat-cta-card {
  margin-top: 14px !important;
  text-align: center;
}

.cat-cta-text {
  font-size: clamp(13px, 3.5vw, 15px);
  color: var(--gray);
  margin-bottom: 14px;
}

.cat-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ===================== RESPONSIVE ===================== */
@media (min-width: 600px) {
  .cat-grid-wrap {
    padding: 0 32px;
    gap: 18px;
  }
  .cat-header {
    padding: 14px 32px;
  }
  .product-card-name {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .cat-header {
    padding: 14px 0;
    /* inherits max-width from body in style.css */
  }
  .cat-grid-wrap {
    grid-template-columns: repeat(3, 1fr);
    padding: 0;
    gap: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
  .cat-cta-card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
}
