/* Catalog request grid: /request-catalog, category + product pages, My Account → Catalogs. */
.catg {
  --catg-brand: #184c5b;
  --catg-brand-2: #1a6478;
  --catg-ink: #0f2a33;
  --catg-muted: #5f6f76;
  --catg-border: #dde5e8;
  --catg-soft: #f4f8f9;
  font-family: Lato, Arial, Helvetica, sans-serif;
  color: var(--catg-ink);
}

.catg-group + .catg-group {
  margin-top: 2.5rem;
}

.catg-group__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--catg-brand);
}

.catg-group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--catg-border);
}

.catg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .catg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (min-width: 1024px) {
  .catg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1440px) {
  .catg-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.catg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0.9rem 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--catg-border);
  border-radius: 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.catg-card:hover {
  border-color: #c3d3d8;
  box-shadow: 0 10px 28px rgba(24, 76, 91, 0.1);
  transform: translateY(-2px);
}

.catg-card.is-open {
  border-color: var(--catg-brand);
  box-shadow: 0 0 0 2px rgba(24, 76, 91, 0.15);
}

.catg-thumb {
  position: relative;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 200 / 280;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--catg-soft), #e6eef1);
  box-shadow: 0 6px 16px rgba(15, 42, 51, 0.12);
}

.catg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catg-thumb__icon {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--catg-brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.catg-card__title {
  margin: 0.85rem 0 0;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--catg-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catg-card__desc {
  margin: 0.35rem 0 0;
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
  color: var(--catg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catg-card__actions {
  margin-top: auto;
  padding-top: 0.85rem;
  width: 100%;
}

.catg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--catg-brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.catg-btn:hover { background: var(--catg-brand-2); }
.catg-btn:disabled { cursor: default; opacity: 0.65; }

.catg-btn--ghost {
  background: #fff;
  color: var(--catg-brand);
  box-shadow: inset 0 0 0 1.5px var(--catg-brand);
}
.catg-btn--ghost:hover { background: var(--catg-soft); }

.catg-btn--done {
  background: #e8f4ee;
  color: #1f6b45;
}
.catg-btn--done:hover { background: #e8f4ee; }

.catg-formrow {
  grid-column: 1 / -1;
  animation: catg-open 0.2s ease;
}

@keyframes catg-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.catg-form {
  position: relative;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--catg-border);
  border-top: 3px solid var(--catg-brand);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(24, 76, 91, 0.1);
}

.catg-form__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.catg-form__title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.catg-form__sub { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--catg-muted); }

.catg-form__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--catg-soft);
  color: var(--catg-ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.catg-form__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 768px) {
  .catg-form__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.catg-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--catg-ink);
}

.catg-field input {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--catg-border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
}

.catg-field input:focus {
  outline: none;
  border-color: var(--catg-brand);
  box-shadow: 0 0 0 3px rgba(24, 76, 91, 0.12);
}

.catg-field__hint { margin: 0.3rem 0 0; font-size: 0.72rem; color: var(--catg-muted); }

.catg-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.catg-form__foot .catg-btn { width: auto; min-width: 200px; }

.catg-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.catg-msg--ok { background: #e8f4ee; color: #1f6b45; }
.catg-msg--info { background: #eaf3f6; color: var(--catg-brand); }
.catg-msg--err { background: #fdecec; color: #a12b2b; }
.catg-msg .catg-link { margin-left: 0.4rem; font-weight: 700; text-decoration: underline; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }

.catg-section { margin: 3rem 0 0; }
.catg-section__title { margin: 0 0 0.35rem; font-size: 1.35rem; font-weight: 700; color: var(--catg-brand); }
.catg-section__sub { margin: 0 0 1.25rem; font-size: 0.9rem; color: var(--catg-muted); }

.catg-page { max-width: 1440px; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
@media (min-width: 640px) { .catg-page { padding: 3rem 1.5rem 5rem; } }
.catg-hero { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.catg-hero__eyebrow { display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px; background: #e8f4f7; color: var(--catg-brand); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.catg-hero__title { margin: 0.9rem 0 0.6rem; font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.2; color: var(--catg-ink); }
.catg-hero__text { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--catg-muted); }
.catg-empty { padding: 3rem 1rem; text-align: center; color: var(--catg-muted); border: 1px dashed var(--catg-border); border-radius: 14px; }

/* Several catalogs in one request */
.catg-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.catg-choices legend {
  width: 100%;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #184c5b;
}
.catg-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1f2a30;
  text-decoration: none;
  cursor: pointer;
}
.catg-choice input {
  width: 16px;
  height: 16px;
  accent-color: #184c5b;
}

/* Product page popup */
.catg-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 30, 36, 0.55);
}
.catg-modal__box {
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.catg-modal__box .catg-form {
  margin: 0;
  border: 0;
  border-top: 3px solid var(--catg-brand);
  box-shadow: none;
}
@media (max-width: 767.98px) {
  .catg-modal {
    align-items: flex-end;
    padding: 0;
  }
  .catg-modal__box {
    max-width: none;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
}
