/* Public /categories — same visual language as the admin grid editor.
   Standard = 1 col, XL = 2 cols x 2 rows with its real child categories.
   No hover menus, no truncated titles, no product thumbnails. */
/* The directory grid follows the same quasi-full-width footprint as the
   storefront Masonry wall. */
.cat-main:has(> .rcg) { max-width: none; padding-left: 0; padding-right: 0; }

.rcg { --rcg-line: #e7e0d3; --rcg-panel: #fffdf9; --rcg-ink: #17120f;
       --rcg-muted: #8d877d; --rcg-gold: #b1863b;
       width: 96vw; max-width: none; margin: 0 auto;
       padding: 26px clamp(12px, 2vw, 32px) 96px; }

.rcg-crumbs { display: flex; gap: 8px; align-items: center; font-size: 12px;
              letter-spacing: .06em; text-transform: uppercase; color: var(--rcg-muted); }
.rcg-crumbs a { color: var(--rcg-muted); text-decoration: none; }
.rcg-crumbs a:hover { color: var(--rcg-ink); }

.rcg-hero { margin: 34px 0 30px; max-width: 720px; }
.rcg-hero__title { font-family: var(--rc-serif, Georgia, serif); font-weight: 400;
                   font-size: clamp(34px, 5vw, 54px); line-height: 1.04; margin: 0 0 12px;
                   color: var(--rcg-ink); }
.rcg-hero__lede { color: var(--rcg-muted); font-size: 15px; line-height: 1.6; margin: 0; }

.rcg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
            grid-auto-rows: 208px; grid-auto-flow: dense; gap: 16px; }

.rcg-card { position: relative; display: block; overflow: hidden;
            border: 1px solid var(--rcg-line); border-radius: 0; background: #2b2723;
            box-shadow: 0 3px 12px rgba(45,35,20,.04);
            transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease; }
.rcg-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(55,42,24,.16);
                  border-color: #d7cbb8; }
.rcg-card--standard { grid-column: span 1; grid-row: span 1; }
.rcg-card--xl { grid-column: span 2; grid-row: span 2; }

.rcg-card__visual-link { position: absolute; inset: 0; display: block; z-index: 0; }
.rcg-card__visual { display: block; width: 100%; height: 100%;
                    background: #4a443d center/cover no-repeat; position: relative;
                    transition: transform .45s ease; }
.rcg-card:hover .rcg-card__visual { transform: scale(1.025); }
/* Slightly darker image veil for dependable contrast without flattening the
   illustration. A subtle lower gradient supports the CTA while preserving
   image detail through the centre. */
.rcg-card__visual::after { content: ""; position: absolute; inset: 0;
                           background:
                             linear-gradient(180deg, rgba(18,15,13,.20) 0%, rgba(18,15,13,.10) 46%, rgba(18,15,13,.32) 100%),
                             rgba(18,15,13,.08); }
.rcg-card__visual--empty { background: linear-gradient(140deg, #70685e, #3f3933); }

.rcg-card__col { position: relative; z-index: 1; height: 100%; min-width: 0;
                 display: flex; flex-direction: column; pointer-events: none; }
.rcg-card__main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
                  padding: 20px 20px 16px; text-decoration: none; color: #fff;
                  pointer-events: auto; }
.rcg-card__title { font-family: var(--design-font-display, var(--rc-serif, Georgia, serif));
                   font-size: calc(18px * var(--design-font-scale, 1)); line-height: 1.18;
                   color: #fff; font-weight: var(--design-weight-display, 600); overflow-wrap: break-word;
                   text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 2px 8px rgba(0,0,0,.78), 0 0 18px rgba(0,0,0,.48); }
.rcg-card--xl .rcg-card__title { font-size: calc(27px * var(--design-font-scale, 1)); max-width: 72%; }
.rcg-card__count { margin-top: 6px; font-family: var(--design-font-body, sans-serif);
                   font-size: calc(12px * var(--design-font-scale, 1));
                   font-weight: var(--design-weight-body, 400); color: #fff; letter-spacing: .04em;
                   text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 2px 7px rgba(0,0,0,.78), 0 0 14px rgba(0,0,0,.44); }
.rcg-card__go { margin-top: auto; font-family: var(--design-font-body, sans-serif);
                font-size: calc(12px * var(--design-font-scale, 1));
                font-weight: var(--design-weight-body, 400); letter-spacing: .08em;
                text-transform: uppercase; color: #fff; opacity: .98;
                text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 2px 7px rgba(0,0,0,.78), 0 0 14px rgba(0,0,0,.44);
                transition: opacity .2s ease, transform .2s ease; }
.rcg-card:hover .rcg-card__go { opacity: 1; transform: translateX(3px); }

.rcg-subs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
            padding: 0 16px 16px; pointer-events: auto; }
.rcg-sub { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px;
           border: 1px solid rgba(255,255,255,.20); background: rgba(18,15,13,.18);
           backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0;
           text-decoration: none; color: #fff;
           transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.rcg-sub:hover { background: rgba(18,15,13,.32); border-color: rgba(255,255,255,.38);
                 transform: translateY(-1px); }
.rcg-sub__thumb { width: 38px; height: 38px; border-radius: 0; flex: 0 0 auto;
                  background: #ece5d8 center/cover no-repeat; }
.rcg-sub__thumb--empty { background: rgba(255,255,255,.16); }
.rcg-sub__name { font-family: var(--design-font-body, sans-serif);
                 font-size: calc(12px * var(--design-font-scale, 1));
                 font-weight: var(--design-weight-body, 400); line-height: 1.2; min-width: 0;
                 color: #fff; overflow-wrap: break-word;
                 text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 2px 7px rgba(0,0,0,.78), 0 0 14px rgba(0,0,0,.44); }

.rcg-empty { border: 1px dashed var(--rcg-line); border-radius: 0; padding: 42px;
             text-align: center; color: var(--rcg-muted); }

@media (max-width: 1100px) {
  .rcg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rcg { width: 98vw; padding-inline: 12px; }
}
@media (max-width: 680px) {
  .rcg-grid { grid-template-columns: 1fr; grid-auto-rows: 196px; }
  .rcg-card--xl { grid-column: span 1; grid-row: span 2; }
}
