/* ============================================================
   Target Products (1978) Ltd — Cassiopeia child (user.css)
   Black page frame, white content panels, red accent.
   Typography inherits Cassiopeia's Roboto (no font-family set).
   Consolidated + tidied. Saved UTF-8.
   ============================================================ */

:root {
  --tp-frame:        #000000;   /* page background */
  --tp-panel:        #ffffff;   /* content + sidebar panels */
  --tp-ink:          #222222;   /* body text */
  --tp-ink-soft:     #555555;
  --tp-rule:         #eeeeee;   /* hairlines */
  --tp-accent:       #ce4a45;   /* brand red (links, hovers, active nav) */
  --tp-accent-hover: #a3302c;   /* darker red for hover */
  --tp-outlet-region:#a3302c;   /* outlets table region column */

  --cassiopeia-color-primary: var(--tp-accent);
  --cassiopeia-color-link:    var(--tp-accent);
  --cassiopeia-color-hover:   var(--tp-accent-hover);
}
.page-header h2 a, .page-header h2 a {
    font-size: 1.5rem;
  text-decoration: unset;
}

/* ---- frame: black page, white content ---- */
body {
  background: var(--tp-frame);
  color: var(--tp-ink);
  line-height: 1.6;
}
.site-grid,
.container-main { background: transparent; }
.site-grid { gap: 0 1.5rem; }

/* white panels: main content + sidebar modules */
.container-component,
.container-sidebar-right .moduletable,
.container-sidebar-right .card {
  background: var(--tp-panel);
  padding: 20px 35px;
  margin-bottom: 25px;
}
.container-sidebar-right .moduletable,
.container-sidebar-right .card { padding: 20px; min-height: 200px; }

/* links — accent red so they read as clickable.
   (Was black; if you want text-coloured links, set this to var(--tp-ink).) */
a { color: var(--tp-accent); }
a:hover, a:focus { color: var(--tp-accent-hover); }

/* ============================================================
   HEADER + NAV (on the black frame)
   ============================================================ */
.container-header {
  background: var(--tp-frame);
  border-bottom: 0;
  padding-block: 0;
}
.brand-logo img,
.logo-image img { width: 225px; height: auto; }

.container-nav { background: var(--tp-frame); }

/* Cassiopeia menu is metismenu, not Bootstrap .navbar-nav —
   target both so links are white on the dark frame. */
.container-nav .mod-menu a,
.container-nav .metismenu > .metismenu-item > a,
.container-nav .metismenu > li > a,
.container-nav ul.nav > li > a,
.navbar-nav .nav-link {
  color: #ffffff;
  font-weight: 600;
  padding-inline: .9rem;
}
.container-nav .mod-menu a:hover,
.container-nav .mod-menu a:focus,
.container-nav .metismenu > li.active > a,
.container-nav .mod-menu .current > a,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active { color: var(--tp-accent); }

/* dropdown/collapsed panels need a solid bg (else black-on-black) */
.container-nav .metismenu .mm-collapse,
.container-nav .metismenu ul { background: var(--tp-panel); }
.container-nav .metismenu ul a { color: var(--tp-ink); }

/* mobile burger visible on dark */
.container-nav .navbar-toggler,
.container-nav button.toggler-burger {
  color: #fff;
  border-color: #777;
  background: #999;
}

/* ============================================================
   HOMEPAGE BRAND GRID
   ============================================================ */
.brand-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
  justify-content: center;
  align-items: center;
  background: var(--tp-panel);
  padding: 20px 35px;
}
.brand-grid a {
  display: block;
  transition: transform .15s ease, opacity .15s ease;
}
.brand-grid a:hover { transform: translateY(-2px); opacity: .85; }
.brand-grid img { display: block; height: auto; width: 330px; }

/* ============================================================
   CATEGORY BLOG
   ============================================================ */
.blog .com-content-category-blog__item { margin-bottom: 25px; min-height: 200px; }
.blog > img { height: auto; max-width: 100%; }
/* old site hid subcategory headings but kept the page header */
.blog .com-content-category-blog__children h3 { display: none; }
.blog-item { display: flex !important; }

.com-content-category-blog__child h3 { display: block !Important;  
    font-size: 1.5rem; }

.com-content-category-blog__child h3 a {
    text-decoration: unset;
}

/* ============================================================
   MULTI-COLUMN HELPER  (div.columns)
   Fixes old bugs: column--width typo, magenta debug rule.
   ============================================================ */
div.columns {
  columns: 2 16em;            /* up to 3 cols, min 16em each */
  column-gap: 40px;
  column-rule: 1px solid var(--tp-rule);
  margin-bottom: 20px;
}
div.columns > * { break-inside: avoid; }

/* ============================================================
   CARD GRID  (.card-cols / .card-col)
   ============================================================ */
.card-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 50px 0;
}
.card-cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-col h3 { margin-top: 0; }
.card-col ul { margin: .5rem 0; padding-left: 1.2rem; }
.card-col img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: .5rem;
}

/* ============================================================
   GENERAL CONTENT TABLES  (article tables with no class)
   ============================================================ */
.container-component table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}
.container-component table th,
.container-component table td {
  padding: .5rem .75rem;
  vertical-align: top;
  border-bottom: 1px solid var(--tp-rule);
  text-align: left;
}
.container-component table thead th,
.container-component table tr:first-child th {
  border-bottom: 2px solid var(--tp-ink-soft);
  font-weight: 600;
}
.container-component table tr:nth-child(even) td { background: #fafaf8; }
.container-component .table-wrap,
.container-component figure.wp-block-table { overflow-x: auto; }

/* ============================================================
   RETAIL OUTLETS TABLE  (specific column treatment)
   ============================================================ */
table.outlets { width: 100%; border: 0; border-collapse: collapse; }
table.outlets td { padding: .35rem .5rem; vertical-align: top; }
table.outlets td:first-child  { width: 10%; color: var(--tp-outlet-region); }
table.outlets td:nth-child(2) { width: 100px; text-transform: uppercase; font-size: 80%; }
table.outlets td:nth-child(3) { width: 30%; font-size: 80%; }
table.outlets td:nth-child(4) { width: 10%; min-width: 120px; }
/* no zebra here, so the region colour reads cleanly */
table.outlets tr:nth-child(even) td { background: transparent; }

/* ============================================================
   FOOTER (on the frame)
   ============================================================ */
.container-footer {
  background: var(--tp-frame);
  color: #aaaaaa;
  font-size: .9rem;
  border-top: 0;
}
.container-footer a { color: #cccccc; }
.container-footer a:hover { color: var(--tp-accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 782px) {
  .card-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-cols,
  .card-cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .card-cols { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .container-component { padding: 16px 18px; }

  .brand-grid { gap: 1.25rem; padding: 16px 18px; }
  .brand-grid img { width: 160px; }       /* explicit width so it actually shrinks */

  .brand-logo img,
  .logo-image img { width: 170px; }

  .blog > img { width: 100%; }

  /* Retail Outlets table -> stacked cards on phones */
  table.outlets,
  table.outlets tbody,
  table.outlets tr,
  table.outlets td { display: block; width: 100%; }

  table.outlets tr {
    padding: .75rem 0;
    border-bottom: 1px solid var(--tp-rule);
  }
  table.outlets td,
  table.outlets td:first-child,
  table.outlets td:nth-child(2),
  table.outlets td:nth-child(3),
  table.outlets td:nth-child(4) {
    width: auto;
    min-width: 0;
    border: 0;
    padding: .1rem 0;
    font-size: 95%;
  }
  table.outlets td:first-child {
    font-size: 1.05rem;
    font-weight: 600;
    padding-bottom: .3rem;
  }
  table.outlets td:nth-child(2) {
    font-weight: 600;
    letter-spacing: .02em;
  }
  table.outlets td:empty { display: none; }
}

/* ============================================================
   branded buttons
   ============================================================ */

a.btn-tp {
  display: inline-block;
  padding: .55rem 1.25rem;
  border: 2px solid var(--tp-accent);
  border-radius: 4px;
  background: var(--tp-accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}
a.btn-tp:hover,
a.btn-tp:focus {
  background: var(--tp-accent-hover);
  border-color: var(--tp-accent-hover);
  color: #fff;
}

a.btn-tp-outline {
  display: inline-block;
  padding: .55rem 1.25rem;
  border: 2px solid var(--tp-accent);
  border-radius: 4px;
  background: transparent;
  color: var(--tp-accent);
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}
a.btn-tp-outline:hover,
a.btn-tp-outline:focus {
  background: var(--tp-accent);
  color: #fff;
}

/* ============================================================
   Promatic (and any blog page) subcategories -> 3-col cards
   ============================================================ */
.com-content-category-blog__children {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin: 30px 0;
}
/* the "Subcategories" heading shouldn't be a grid cell -> span full width */
.com-content-category-blog__children > h3 {
  grid-column: 1 / -1;
  margin: 0;
}
/* each subcategory becomes a card */
.com-content-category-blog__child {
  background: var(--tp-panel);
  border: 1px solid var(--tp-rule);
  border-radius: 6px;
  padding: 1.25rem;
}
.com-content-category-blog__child .item-title { margin-top: 0; }

/* images inside the cards: stop the float, make them fit the card */
.com-content-category-blog__child img {
  float: none !important;
  margin: 0 0 .75rem !important;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

@media (max-width: 782px){
  .com-content-category-blog__children { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .com-content-category-blog__children { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER + DESIGNER CREDIT  — Target Products (cassiopeia_extended)
   Replace ALL previous footer rules in user.css with this block.
   The footer is a CSS grid in Cassiopeia; we force it to a simple
   centred block so the credit fills the width instead of sitting
   in grid column 1 with empty tracks beside it.
   ============================================================ */

/* footer container: plain centred block (overrides Cassiopeia's grid) */
.container-footer {
  display: block;
  background: var(--tp-frame);
  color: #aaaaaa;
  font-size: .9rem;
  border-top: 0;
  text-align: center;
}
.container-footer .grid-child { display: block; }
.container-footer a { color: #cccccc; }
.container-footer a:hover { color: var(--tp-accent); }

/* designer credit strip */
.footer-credit {
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}
.footer-credit .footer-copyright { margin: 0 0 1rem; }
.footer-credit .footer-logo { margin: .5rem 0; }
.footer-credit .footer-logo img {
  display: inline-block;
  height: auto;
}
.footer-credit .footer-tagline {
  color: #999999;
  font-size: 10px;
  letter-spacing: .08em;
  margin-top: .35rem;
}

form#com-users-login__form {
    max-width: 320px;
}

@media (max-width: 600px) {
  .container-component .brochure-box,   /* or whatever the box class/element is */
  .container-component table[align],
  .container-component [style*="float"] {
    float: none !important;
    width: auto !important;
    margin: 1rem 0 !important;
  }
}

@media (max-width: 991.98px) {
  .container-header {
    position: relative;
  }

  .container-header .container-nav {
    position: absolute;
    top: 57px;
    right: 34px;
    width: auto;
    z-index: 9999;
  }

  .container-header .navbar-toggler {
    position: absolute;
    top: -48px;
    right: 0;
    margin: 0;
    z-index: 10001;
  }

  .container-header .navbar-collapse {
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 185px;
    background: #000;
    padding: 10px 22px;
    z-index: 10000;
  }
}

.container-header .navbar-collapse {
    right: 0;
    left: auto;
}