/* Front Page sidebar only. Widget content and column counts remain admin-controlled. */
#secondary.wpc-home-sidebar {
  --sidebar-accent: #066b6c;
  --sidebar-text: #17223b;
  --sidebar-body: #40515d;
  --sidebar-border: #dce6e6;
  margin-top: 0;
  color: var(--sidebar-body);
  text-align: start;
}

#secondary.wpc-home-sidebar *,
#secondary.wpc-home-sidebar *::before,
#secondary.wpc-home-sidebar *::after {
  box-sizing: border-box;
}

#secondary.wpc-home-sidebar > .widget {
  min-width: 0;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 34, 59, .035);
  overflow-wrap: anywhere;
}

#secondary.wpc-home-sidebar > .widget > .widget-title {
  margin: 0 0 15px;
  padding: 0 0 12px;
  border-bottom: 2px solid #e8f4f2;
  color: var(--sidebar-text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: start;
  text-transform: none;
}

/* The outer widget is the card; avoid a second panel inside it. */
#secondary.wpc-home-sidebar > .widget > .widget-content,
#secondary.wpc-home-sidebar > .widget > .list-categories {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Keep Semantic UI's column widths: they come from each widget's admin setting. */
#secondary.wpc-home-sidebar .widget_popular_stores .ui.grid {
  margin: -5px;
}

#secondary.wpc-home-sidebar .widget_popular_stores .ui.grid > .column:not(.row) {
  min-width: 0;
  padding: 5px;
}

#secondary.wpc-home-sidebar .widget_popular_stores .store-thumb {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

#secondary.wpc-home-sidebar .widget_popular_stores .store-thumb > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 88px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: 10px;
  background: #fff;
  color: var(--sidebar-accent);
  text-align: center;
  text-decoration: none;
  line-height: 1.35;
}

#secondary.wpc-home-sidebar .widget_popular_stores .store-thumb > a::after {
  content: none;
}

#secondary.wpc-home-sidebar .widget_popular_stores .store-thumb > a:hover {
  border-color: var(--sidebar-accent);
  background: #f2f8f7;
}

#secondary.wpc-home-sidebar .widget_popular_stores .store-thumb > a > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 150px;
  max-height: 66px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

/* Rich text stays fully visible, with readable spacing on narrow sidebars. */
#secondary.wpc-home-sidebar .textwidget {
  color: var(--sidebar-body);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  text-align: start;
}

#secondary.wpc-home-sidebar .textwidget p {
  margin: 0 0 14px;
}

#secondary.wpc-home-sidebar .textwidget h4 {
  margin: 24px 0 10px;
  color: var(--sidebar-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  text-align: start;
}

#secondary.wpc-home-sidebar .textwidget ul,
#secondary.wpc-home-sidebar .textwidget ol {
  margin: 0 0 16px;
  padding-inline-start: 20px;
}

#secondary.wpc-home-sidebar .textwidget li {
  margin-bottom: 7px;
  padding-inline-start: 2px;
}

#secondary.wpc-home-sidebar .textwidget a {
  color: var(--sidebar-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#secondary.wpc-home-sidebar .textwidget a:hover {
  color: #044b4c;
}

#secondary.wpc-home-sidebar .textwidget > :last-child {
  margin-bottom: 0;
}

#secondary.wpc-home-sidebar .store-affiliate-note {
  padding: 12px;
  border-inline-start: 3px solid var(--sidebar-accent);
  border-radius: 8px;
  background: #eef7f6;
  color: var(--sidebar-body);
  line-height: 1.65;
  text-align: start;
}

#secondary.wpc-home-sidebar a:focus-visible,
#secondary.wpc-home-sidebar button:focus-visible,
#secondary.wpc-home-sidebar input:focus-visible,
#secondary.wpc-home-sidebar select:focus-visible,
#secondary.wpc-home-sidebar textarea:focus-visible {
  outline: 3px solid var(--sidebar-accent);
  outline-offset: 3px;
}

@media (max-width: 789px) {
  #secondary.wpc-home-sidebar > .widget {
    margin-bottom: 18px;
    padding: 18px;
  }

  #secondary.wpc-home-sidebar .widget_popular_stores .store-thumb > a {
    height: 96px;
  }

  #secondary.wpc-home-sidebar .widget_popular_stores .store-thumb > a > img {
    max-height: 74px;
  }
}
