/*
 * Layout C — “Atlas” portal skin (scoped; does not affect A/B or bare bootstrap)
 * Hooks: .lc-portal, .lc-stage-surface, .lc-card-family, .lc-offer-surface--design
 */

/* ---- Design tokens (Layout C pages only) ---- */
.lc-portal {
  --lc-accent: #3d5a80;
  --lc-accent-soft: rgba(61, 90, 128, 0.12);
  --lc-rail-tint: #e4e9f2;
  --lc-sidebar-bg: #f0f3fa;
  --lc-sidebar-border: rgba(61, 90, 128, 0.14);
  --lc-sidebar-radius: 10px;
  --lc-sidebar-pad-x: 16px;
  --lc-sidebar-pad-y: 13px;
  --lc-sidebar-row-gap: 6px;
  --lc-sidebar-section-gap: 0.85rem;
  --lc-stage-bg: #f7f8fb;
  --lc-stage-border: rgba(61, 90, 128, 0.14);
  --lc-card-radius: 12px;
  --lc-meta-bg: linear-gradient(180deg, #dfe5f0 0%, #d0d8e8 100%);
  --lc-shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
  --lc-shadow-card-hover: 0 6px 20px rgba(15, 23, 42, 0.1);
  --lc-sidebar-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.lc-store-page,
.lc-home-page,
.lc-deals-page,
.lc-detail-page {
  display: block;
  margin-bottom: 22px;
}

.lc-portal-row {
  display: block;
  align-items: stretch;
}

/*
 * Footer: list → meta (Layout C only — this stylesheet is not loaded for A/B).
 * DOM: footer comes from templates/bootstrap/footer.tpl after </main>; it is NOT
 * inside .lc-portal (see templates/bootstrap/home.tpl: layout_c/home.tpl closes
 * </section> before footer.tpl). Do not prefix with .lc-portal .site-footer — it matches nothing.
 * body … raises specificity over templates/bootstrap/css/style.css li:last-child / .footer-view-all rules.
 */
body .site-footer .footer-column ul:not(.social-footer) > li.footer-view-all {
  margin-bottom: 16px !important;
}

body .site-footer .footer-column {
  margin-bottom: 10px !important;
}

body .site-footer .footer-grid .row-fluid > .footer-meta,
body .site-footer .footer-meta {
  clear: both;
  margin-top: 12px !important;
}

/* ---- Sidebar: one calm surface (Layout C only; minimal chrome) ---- */
.lc-portal .sidebar-column {
  background: var(--lc-sidebar-bg);
  border-radius: var(--lc-sidebar-radius);
  border: 1px solid var(--lc-sidebar-border);
  padding: var(--lc-sidebar-pad-y) var(--lc-sidebar-pad-x)
    calc(var(--lc-sidebar-pad-y) + 2px);
  box-sizing: border-box;
  box-shadow: var(--lc-sidebar-shadow);
}

/* Section titles */
.lc-portal .sidebar-column > h3,
.lc-portal .sidebar-column .sidebar-social > h3,
.lc-portal .sidebar-column .sidebar-sponsored > h3,
.lc-portal .sidebar-column .sidebar-likebox > h3,
.lc-portal .sidebar-column .sidebar-top-users > h3 {
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lc-accent);
  font-weight: 700;
  margin: 0 0 6px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--lc-accent-soft);
}

.lc-portal .sidebar-column > h3.no-top-padding,
.lc-portal .sidebar-column .sidebar-social > h3,
.lc-portal .sidebar-column .sidebar-sponsored > h3,
.lc-portal .sidebar-column .sidebar-likebox > h3,
.lc-portal .sidebar-column .sidebar-top-users > h3 {
  padding-top: 0;
}

/* Vertical rhythm between sections */
.lc-portal .sidebar-column > h3:not(:first-child) {
  margin-top: calc(var(--lc-sidebar-section-gap) + 2px);
  padding-top: var(--lc-sidebar-section-gap);
  border-top: 1px solid rgba(61, 90, 128, 0.1);
}

.lc-portal .sidebar-column .sidebar-collection-list,
.lc-portal .sidebar-column .sidebar-social,
.lc-portal .sidebar-column .sidebar-sponsored,
.lc-portal .sidebar-column .sidebar-likebox,
.lc-portal .sidebar-column .sidebar-top-users {
  margin-bottom: var(--lc-sidebar-section-gap);
}

/* Flat panels: no nested “card” — content sits on sidebar surface */
/* Panel rhythm matches layout_b.css #sidebar .sidebar-panel (14px) */
.lc-portal .sidebar-column .sidebar-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 8px;
  box-shadow: none;
  box-sizing: border-box;
}

.lc-portal .sidebar-column .sidebar-sponsored .sidebar-panel,
.lc-portal .sidebar-column .sidebar-likebox .sidebar-panel,
.lc-portal .sidebar-column .sidebar-top-users .sidebar-panel {
  margin-bottom: 0;
}

.lc-portal .sidebar-column .sidebar-sponsored,
.lc-portal .sidebar-column .sidebar-likebox,
.lc-portal .sidebar-column .sidebar-social,
.lc-portal .sidebar-column .sidebar-top-users {
  padding-bottom: 0;
  border-bottom: none;
}

/* Blog, account menu, simple nav lists — airy flat list */
.lc-portal .sidebar-column .sidebar-panel .nav-list {
  margin: 0;
}

.lc-portal .sidebar-column .sidebar-panel .nav-list > li {
  margin-bottom: var(--lc-sidebar-row-gap);
}

.lc-portal .sidebar-column .sidebar-panel .nav-list > li:last-child {
  margin-bottom: 0;
}

.lc-portal .sidebar-column .sidebar-panel .nav-list > li > a {
  display: block;
  padding: 4px 0;
  line-height: 1.4;
}

/* Collections: flat, aligned with lists */
.lc-portal .sidebar-column .sidebar-collection-list {
  list-style: none;
  margin: 0 0 var(--lc-sidebar-section-gap);
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.lc-portal .sidebar-column .sidebar-collection-list .site-menu-item {
  margin-bottom: var(--lc-sidebar-row-gap);
}

.lc-portal .sidebar-column .sidebar-collection-list .site-menu-item:last-child {
  margin-bottom: 0;
}

.lc-portal .sidebar-column .sidebar-collection-list a {
  display: inline-block;
  padding: 3px 0;
  line-height: 1.4;
}

/* Trim stray gap after collections list (<br /> in sidebar.tpl) */
.lc-portal .sidebar-column ul.sidebar-collection-list + br {
  display: none;
}

/*
 * Sidebar store teasers — Featured Stores + Related stores (row_featured_store.logic.tpl).
 * Use main.page-main #sidebar AND .lc-portal .sidebar-column so the same compact rhythm
 * applies on portal pages AND on classic row pages (no .lc-portal wrapper).
 */
.lc-portal .sidebar-column .merchant-teaser-row.row-fluid,
main.page-main #sidebar .merchant-teaser-row.row-fluid {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(61, 90, 128, 0.08);
  overflow: hidden;
}

.lc-portal .sidebar-column .merchant-teaser-row.row-fluid:last-child,
main.page-main #sidebar .merchant-teaser-row.row-fluid:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Stable small logo; override global .thumbnail min-heights where they stretch the row */
.lc-portal .sidebar-column .merchant-teaser-row .merchant-logo.thumbnail,
main.page-main #sidebar .merchant-teaser-row .merchant-logo.thumbnail {
  margin: 0 10px 0 0 !important;
  margin-bottom: 0 !important;
  padding: 2px;
  border-radius: 4px;
  min-height: 0 !important;
  height: auto !important;
  display: inline-block;
  box-sizing: border-box;
  vertical-align: top;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-logo.thumbnail img,
main.page-main #sidebar .merchant-teaser-row .merchant-logo.thumbnail img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: cover;
  display: block;
  vertical-align: top;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-media,
main.page-main #sidebar .merchant-teaser-row .merchant-media {
  margin-top: 0;
  padding-top: 0;
  line-height: 0;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-body,
main.page-main #sidebar .merchant-teaser-row .merchant-body {
  padding-top: 0;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-header,
.lc-portal .sidebar-column .merchant-teaser-row .merchant-title,
.lc-portal .sidebar-column .merchant-teaser-row .merchant-meta,
.lc-portal .sidebar-column .merchant-teaser-row .merchant-meta p,
main.page-main #sidebar .merchant-teaser-row .merchant-header,
main.page-main #sidebar .merchant-teaser-row .merchant-title,
main.page-main #sidebar .merchant-teaser-row .merchant-meta,
main.page-main #sidebar .merchant-teaser-row .merchant-meta p {
  margin: 0;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-header,
main.page-main #sidebar .merchant-teaser-row .merchant-header {
  margin-bottom: 2px;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-title,
main.page-main #sidebar .merchant-teaser-row .merchant-title {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-title a,
main.page-main #sidebar .merchant-teaser-row .merchant-title a {
  line-height: 1.25;
}

/* Global .very-small is 14px — too large for sidebar meta; keep count line compact */
.lc-portal .sidebar-column .merchant-teaser-row .merchant-meta,
main.page-main #sidebar .merchant-teaser-row .merchant-meta {
  margin-top: 2px;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-meta p,
main.page-main #sidebar .merchant-teaser-row .merchant-meta p {
  line-height: 1.2;
}

.lc-portal .sidebar-column .merchant-teaser-row .merchant-meta .very-small,
main.page-main #sidebar .merchant-teaser-row .merchant-meta .very-small {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.lc-portal .sidebar-column .offer-mini-card.row-fluid {
  margin-bottom: 8px;
}

.lc-portal .sidebar-column .offer-mini-card.row-fluid:last-child {
  margin-bottom: 0;
}

.lc-portal .sidebar-column .offer-mini-body > a {
  margin: 0;
  font-size: 15px;
  line-height: 1.28;
}

.lc-portal .sidebar-column .offer-mini-content,
.lc-portal .sidebar-column .offer-mini-description,
.lc-portal .sidebar-column .offer-mini-description p {
  margin: 0;
}

/* Tags (related categories) */
.lc-portal .sidebar-column .sidebar-panel .sidebar-tag {
  display: inline-block;
  margin: 0 6px 8px 0;
  line-height: 1.45;
}

/* Social sidebar list */
.lc-portal .sidebar-column .social-sidebar {
  margin: 0;
}

.lc-portal .sidebar-column .social-sidebar li {
  margin-bottom: var(--lc-sidebar-row-gap);
}

.lc-portal .sidebar-column .social-sidebar img {
  margin-right: 6px;
}

.lc-portal .sidebar-column .sidebar-social .social-sidebar li {
  margin-bottom: 6px;
  line-height: 1.35;
}

.lc-portal .sidebar-column .featured-store-row.row-fluid {
  margin-bottom: 8px;
}

.lc-portal .sidebar-column .featured-store-row.row-fluid:last-child {
  margin-bottom: 0;
}

.lc-portal .sidebar-column .featured-store-row p {
  margin: 2px 0 0;
}

.lc-portal .sidebar-column .user-menu li a {
  padding: 6px 0;
  line-height: 1.45;
}

/*
 * Layout C: page title + header row (this sheet loads only for layout_variant layout_c).
 * Do NOT require .lc-portal here — many menus (coupons, category, search, stores, etc.)
 * still use the classic bootstrap row without .lc-portal; h1 lives in main either way.
 */
main.page-main .page-header-row {
  margin: 8px 0 10px;
}

main.page-main .page-header .breadcrumb-trail {
  margin-bottom: 5px;
}

main.page-main h1.page-title {
  font-size: 28px;
  line-height: 1.21;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

main.page-main .page-header {
  margin-bottom: 6px;
}

/* Top ad under header: slightly tighter on Layout C */
main.page-main .page-header .top-banner {
  margin-top: 6px;
  margin-bottom: 4px;
}

/* Main stage “sheet” */
.lc-store-stage .lc-store-workspace,
.lc-home-stage,
.lc-deals-stage,
.lc-detail-stage {
  padding-left: 0;
  border-left: none;
  min-height: 140px;
}

/* ---- Home / Deals main column: intro → tabs/pagination → list rhythm ---- */
.lc-portal--deals .deals-intro,
.lc-portal--home .home-intro {
  margin: 0 0 10px;
}

.lc-portal--deals .deals-intro p,
.lc-portal--home .home-intro p {
  margin: 0 0 6px;
}

.lc-portal--deals .deals-intro p:last-child,
.lc-portal--home .home-intro p:last-child {
  margin-bottom: 0;
}

.lc-portal--deals .deals-sort,
.lc-portal--deals .deals-pages {
  margin-top: 0;
  margin-bottom: 8px;
}

.lc-portal--deals .deals-grid-wrapper {
  margin-top: 2px;
}

/* ===== Best Panel / Top Merchants Block (Layout C) — compact CTR rows; sheet = Layout C only ===== */
.top-merchants-block {
  margin-top: 16px;
  margin-bottom: 12px;
}

.top-merchants-block h2 {
  margin: 0 0 10px;
  line-height: 1.3;
  font-size: 28px;
  font-weight: 700;
  color: var(--lc-accent);
}

.top-merchants-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-merchants-block ul li {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.top-merchants-block ul li:last-child {
  margin-bottom: 0;
}

.top-merchants-block ul li a {
  display: block;
  position: relative;
  padding: 8px 28px 8px 10px;
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.4;
  color: #2c3e50;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.top-merchants-block ul li a:hover {
  background: #eef2f7;
  border-color: #d8dee8;
  color: #000;
}

.top-merchants-block ul li a:focus-visible {
  outline: 2px solid rgba(61, 90, 128, 0.35);
  outline-offset: 2px;
}

.top-merchants-block ul li a::after {
  content: "›";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa4b2;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.top-merchants-block ul li:first-child a {
  font-weight: 600;
}

.lc-portal--home .home-switcher-nav {
  margin: 8px 0 10px;
}

.lc-portal--home .home-switcher-nav .nav-pills {
  margin-bottom: 0;
}

.lc-portal--home .tab-content.deals-tabs {
  margin-top: 4px;
}

/* ===== Best Panel (Layout C) — custom bullets, compact list, aligned with portal rhythm ===== */
.la-best-panel {
  padding: 12px 14px;
  box-sizing: border-box;
}

.la-best-panel h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--lc-accent);
}

.la-best-panel ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.la-best-panel ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.la-best-panel ul li:last-child {
  margin-bottom: 0;
}

.la-best-panel ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(61, 90, 128, 0.5);
  font-size: 12px;
  line-height: 1.4;
}

/* Detail: keep hero offer title readable but not larger than page H1 scale */
.lc-portal--detail .lc-stage-surface--detail h2.offer-title,
.lc-portal--detail .lc-stage-surface--detail .offer-title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lc-stage-surface {
  background: var(--lc-stage-bg);
  border: 1px solid var(--lc-stage-border);
  border-radius: var(--lc-card-radius);
  padding: 16px 18px 18px;
  box-shadow: var(--lc-shadow-card);
  box-sizing: border-box;
}

.lc-stage-surface--home,
.lc-stage-surface--deals,
.lc-stage-surface--detail {
  padding: 14px 16px 16px;
}

/* Store main column: vertical rhythm (merchant → pagination → list, same as layout_b) */
.lc-portal--store .lc-store-workspace.lc-stage-surface {
  padding: 14px 16px 16px;
}

/* ---- Store stack ---- */
.lc-store-panel.lc-store-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.lc-store-panel.lc-store-stack .lc-store-merchant,
.lc-store-panel.lc-store-stack .lc-store-offers,
.lc-store-panel.lc-store-stack .lc-store-pagination {
  margin: 0;
}

/*
 * Store stack is flex column; .pull-right floats the nav and can zero out the flex
 * item’s in-flow height so pagination looks missing or overlaps the list.
 * Match in-flow behavior to bootstrap/layout_b while keeping .lc-store-pagination hooks.
 */
.lc-store-panel.lc-store-stack > .lc-store-pagination.pagination.pull-right {
  float: none;
  width: 100%;
  max-width: 100%;
  clear: both;
  box-sizing: border-box;
  align-self: stretch;
  display: block;
}

.lc-store-panel.lc-store-stack .lc-store-offers.span11 {
  width: 100%;
  max-width: 100%;
  float: none;
  margin-left: 0;
  box-sizing: border-box;
}

.lc-store-merchant {
  margin: 0;
}

/*
 * Main store header — mirror layout_b.css .lb-store-page merchant header
 * (flex row: logo | body | actions; compact card; B action buttons).
 */
.lc-portal--store .merchant-header-row {
  margin-bottom: 12px;
}

.lc-portal--store .merchant-header-row .merchant-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px 16px;
  padding: 12px 14px;
  margin: 0 0 10px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  background: #fff;
}

.lc-portal--store .merchant-header-row .merchant-card > .clearfix {
  display: none;
}

.lc-portal--store .merchant-header-row .merchant-card > .merchant-media,
.lc-portal--store .merchant-header-row .merchant-card > .merchant-body,
.lc-portal--store .merchant-header-row .merchant-card > .merchant-actions {
  float: none !important;
  margin-left: 0 !important;
}

.lc-portal--store .merchant-header-row .merchant-card > .merchant-media {
  width: auto !important;
  flex: 0 0 auto;
  margin-right: 0;
}

.lc-portal--store .merchant-header-row .merchant-card > .merchant-body {
  width: auto !important;
  overflow: visible;
  flex: 1 1 0;
  min-width: 0;
}

.lc-portal--store .merchant-header-row .merchant-card > .merchant-actions {
  width: auto !important;
  flex: 0 0 200px;
  max-width: 100%;
  margin-top: 0 !important;
  margin-left: auto;
  text-align: right;
  padding-top: 0;
  align-self: flex-start;
}

.lc-portal--store .merchant-header-row .merchant-body .merchant-title {
  display: none;
}

.lc-portal--store .merchant-header-row .merchant-body {
  font-size: 14px;
  line-height: 1.45;
}

.lc-portal--store .merchant-header-row .merchant-header {
  margin: 0;
}

.lc-portal--store .merchant-header-row .merchant-description {
  margin: 0 0 6px;
  font-weight: 600;
  line-height: 1.45;
  color: #222;
}

.lc-portal--store .merchant-header-row .merchant-description small,
.lc-portal--store .merchant-header-row .merchant-description .very-small {
  line-height: 1.45;
}

.lc-portal--store .merchant-header-row .merchant-meta {
  margin: 0;
}

.lc-portal--store .merchant-header-row .merchant-meta p {
  margin: 0;
  line-height: 1.25;
}

.lc-portal--store .merchant-header-row .merchant-meta small,
.lc-portal--store .merchant-header-row .merchant-meta .very-small {
  line-height: 1.25;
}

/* Collapse legacy spacer after meta in row_store_buttons.logic.tpl */
.lc-portal--store .merchant-header-row .merchant-meta + div {
  margin: 0;
  padding: 0;
  height: 0;
  line-height: 0;
  overflow: hidden;
}

.lc-portal--store .merchant-header-row .merchant-logo {
  margin-bottom: 0;
}

.lc-portal--store .merchant-header-row .merchant-actions .merchant-button {
  display: block;
  width: 100%;
  max-width: 220px;
  margin-left: auto;
  margin-right: 0;
  box-sizing: border-box;
  margin-bottom: 6px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  color: inherit;
}

.lc-portal--store .merchant-header-row .merchant-actions .merchant-button i {
  margin-right: 6px;
}

.lc-portal--store .merchant-header-row .merchant-actions .merchant-button:hover,
.lc-portal--store .merchant-header-row .merchant-actions .merchant-button:focus {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.lc-store-offers {
  margin: 0;
}

.lc-portal--store .lc-store-offers-body > .lc-offer-card:first-child,
.lc-portal--store .lc-store-offers-body > .row-fluid:first-child .lc-offer-card:first-child {
  margin-top: 0;
}

.lc-portal--store .lc-store-offers-body > .lc-store-deal-simple:first-child .offer-row {
  margin-top: 0;
}

.lc-portal--store .lc-card-family.lc-offer-card {
  margin-bottom: 14px;
}

.lc-portal--store .lc-card-family.lc-offer-card:last-child {
  margin-bottom: 0;
}

/*
 * Store “Deals” tab list: horizontal offer-row from row_deal.logic.tpl
 * (image left, title + meta + description + footer — no 3-column LC card).
 */
.lc-portal--store .lc-store-deal-simple .offer-row {
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(61, 90, 128, 0.12);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.lc-portal--store .lc-store-deal-simple .offer-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-media,
.lc-portal--store .lc-store-deal-simple .offer-row .offer-body {
  float: left;
  margin-left: 2.12766%;
  box-sizing: border-box;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-media {
  width: 14.89361702%;
  margin-left: 0;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-body {
  width: 82.97872339%;
  overflow: hidden;
}

.lc-portal--store .lc-store-deal-simple .offer-row .thumbnail {
  margin-top: 2px;
  margin-bottom: 0;
}

.lc-portal--store .lc-store-deal-simple .offer-row .thumbnail img {
  max-width: 100%;
  height: auto;
  max-height: 88px;
  display: block;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-header,
.lc-portal--store .lc-store-deal-simple .offer-row .offer-title {
  margin: 0 0 4px;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-title {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-meta {
  margin: 0 0 8px;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-meta p {
  margin: 0;
  line-height: 1.35;
  font-size: 12px;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-content {
  margin: 0 0 10px;
  clear: none;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-description-box {
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(61, 90, 128, 0.1);
  background: rgba(61, 90, 128, 0.04);
  box-shadow: none;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-share {
  margin: 0 0 8px;
  float: none;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-actions {
  margin-top: 6px;
  overflow: hidden;
}

.lc-portal--store .lc-store-deal-simple .offer-row .offer-actions::after {
  content: "";
  display: table;
  clear: both;
}

.lc-store-pagination {
  padding-top: 4px;
  text-align: right;
}

.lc-store-pagination .pagination {
  margin: 0;
}

.lc-store-panel.lc-store-stack .lc-store-overview {
  margin-top: 0;
}

.lc-store-overview {
  margin-top: 0.5rem;
  padding: 1.25rem 16px 4px;
  border-top: 2px solid var(--lc-accent-soft);
  border-radius: 0 0 var(--lc-card-radius) var(--lc-card-radius);
  background: rgba(255, 255, 255, 0.5);
}

.lc-store-overview p {
  margin-bottom: 0.65rem;
}

/* ---- Offer cards: distinct “family” ---- */
.lc-card-family.lc-offer-card {
  margin: 0 0 14px;
  border: none;
  border-radius: var(--lc-card-radius);
  background: #fff;
  box-shadow: var(--lc-shadow-card);
  overflow: hidden;
  border-left: 4px solid var(--lc-accent);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.lc-card-family.lc-offer-card:hover {
  box-shadow: var(--lc-shadow-card-hover);
  transform: translateY(-1px);
}

.lc-offer-card--featured {
  border-left-color: #2a9d8f;
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.35), var(--lc-shadow-card);
}

/* Layout C coupon list (LB-style row): one bottom row — social | voting | Get This Deal */
.lc-coupon-list-render--lb .lc-coupon-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  clear: both;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions__social.pull-left {
  float: none;
  margin-bottom: 0;
  margin-right: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-self: center;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions__right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px 16px;
  flex: 0 1 auto;
}

/* Override global .vote-area % widths/floats so voting stays one flex row with CTA */
.lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area {
  float: none !important;
  width: auto !important;
  max-width: none;
  margin-bottom: 0;
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area .vote-box {
  float: none !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 3.25rem;
  padding: 2px 6px !important;
  line-height: 1.2 !important;
  font-size: 1.1rem !important;
  font-weight: 700;
  text-align: center;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area .vote-box br {
  display: none;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area .vote-box small {
  display: block;
  font-weight: 400;
  line-height: 1.25;
  margin-top: 1px;
  white-space: nowrap;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area .vote-button {
  float: none !important;
  width: 2.25rem !important;
  min-width: 2.25rem;
  height: 2rem !important;
  margin-left: 0 !important;
  padding: 2px !important;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area .vote-margin {
  margin-right: 0 !important;
}

.lc-coupon-list-render--lb .lc-coupon-bottom-actions .offer-box {
  float: none !important;
  margin-left: 0;
  width: 150px !important;
  height: auto !important;
  min-height: 2rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.lc-coupon-list-render--lb .lc-coupon-list-render__header .lb-offer-header-main {
  width: 100%;
}

.lc-offer-surface--design.lc-offer-surface {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: wrap;
}

.lc-offer-meta-rail {
  flex: 0 0 140px;
  max-width: 168px;
  padding: 14px 12px;
  background: var(--lc-meta-bg);
  border-right: 1px solid rgba(61, 90, 128, 0.12);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #334155;
}

.lc-offer-meta-rail .offer-meta,
.lc-offer-meta-rail .offer-meta p {
  margin: 0;
}

.lc-offer-core {
  flex: 1 1 240px;
  min-width: 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
}

.lc-offer-titleline .offer-title,
.lc-offer-titleline .offer-header {
  margin: 0 0 8px;
}

.lc-offer-titleline .offer-title a,
.lc-offer-titleline h2.offer-title a {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.lc-offer-summary .offer-content,
.lc-offer-summary .offer-description-box {
  margin: 0;
  border-radius: 8px;
}

.lc-offer-summary .well,
.lc-offer-summary .offer-description-box {
  background: rgba(61, 90, 128, 0.04) !important;
  border: 1px solid rgba(61, 90, 128, 0.08) !important;
  box-shadow: none !important;
}

.lc-offer-footer-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(61, 90, 128, 0.15);
}

.lc-offer-footer-strip .offer-actions,
.lc-offer-footer-strip .offer-share {
  margin: 0;
}

.lc-offer-thumb-rail {
  flex: 0 0 124px;
  padding: 14px;
  border-left: 1px solid rgba(61, 90, 128, 0.1);
  background: #f1f4fa;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
}

.lc-offer-thumb-rail .thumbnail,
.lc-offer-thumb-rail .offer-thumbnail {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.lc-offer-thumb-rail .offer-media,
.lc-offer-thumb-rail .offer-thumbnail {
  margin: 0;
}

.lc-offer-thumb-rail img {
  max-width: 104px;
  height: auto;
  display: block;
}

/* ---- Deal list rows (Layout B markup): compact card rhythm from layout_b.css ---- */
.lb-offer-card.lb-offer-card-deal-list {
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 4px;
  padding: 12px 14px;
  margin: 0 0 12px;
  background: #fff;
}

.lc-portal--deals .lb-offer-card.lb-offer-card-deal-list {
  margin-bottom: 10px;
}

.lc-portal--deals .lb-offer-card.lb-offer-card-deal-list:last-child {
  margin-bottom: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-shell > .hide {
  margin: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-card-header {
  margin-bottom: 6px;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-card-header .offer-header,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-card-header .offer-title {
  margin: 0 0 4px;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-card-header .offer-meta,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-card-header .offer-meta p {
  margin: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-primary-cta,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-cta-block {
  margin: 8px 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-primary-cta .offer-actions,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-cta-block .offer-actions {
  margin: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-primary-cta .offer-box,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-cta-block .offer-box {
  display: inline-block;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-body-block,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-deal-body {
  margin: 8px 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-body-block .offer-content,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-deal-body .offer-content,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-body-block .offer-description-box,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-deal-body .offer-description-box {
  margin: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-utility-block,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-deal-utility {
  margin: 8px 0 4px;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-utility-block .offer-share,
.lb-offer-card.lb-offer-card-deal-list .lb-offer-deal-utility .offer-share {
  margin: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-supporting-media {
  margin-top: 8px;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-supporting-media .offer-media {
  margin: 0;
}

.lb-offer-card.lb-offer-card-deal-list .lb-offer-supporting-media .offer-thumbnail {
  margin: 0;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  /* Main column first in DOM → stack main above sidebar */
  .lc-portal-row--store,
  .lc-portal-row--home,
  .lc-portal-row--deals,
  .lc-portal-row--detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .lc-portal-row--store > .sidebar-column,
  .lc-portal-row--store > .span9,
  .lc-portal-row--home > .sidebar-column,
  .lc-portal-row--home > .span9,
  .lc-portal-row--deals > .sidebar-column,
  .lc-portal-row--deals > .span9,
  .lc-portal-row--detail > .sidebar-column,
  .lc-portal-row--detail > .span9 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    box-sizing: border-box;
  }

  .lc-stage-surface {
    padding: 14px 14px 16px;
  }

  .lc-portal .sidebar-column {
    padding: 12px 12px 14px;
  }

  .top-merchants-block {
    margin-top: 14px;
  }

  .top-merchants-block h2 {
    margin-bottom: 8px;
    font-size: 24px;
    line-height: 1.3;
  }

  .top-merchants-block ul li {
    margin-bottom: 6px;
  }

  .top-merchants-block ul li a {
    padding: 8px 26px 8px 10px;
    font-size: 14px;
  }

  .top-merchants-block ul li a::after {
    right: 8px;
  }

  main.page-main h1.page-title {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 8px;
  }

  main.page-main .page-header-row {
    margin: 8px 0 10px;
  }

  .lc-store-stage .lc-store-workspace,
  .lc-home-stage,
  .lc-deals-stage,
  .lc-detail-stage {
    margin-bottom: 0;
  }

  /* Store main header — layout_b.css mobile: stack actions below content */
  .lc-portal--store .merchant-header-row .merchant-card {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 12px;
  }

  /* Full-width columns; desktop flex: 1 1 0 + float stars can collapse body height */
  .lc-portal--store .merchant-header-row .merchant-card > .merchant-media {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100%;
  }

  .lc-portal--store .merchant-header-row .merchant-card > .merchant-body {
    flex: 0 1 auto;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  /*
   * Stars: style.css uses float:left on .merchant-rating and float:right on labels.
   * Without containment, .merchant-body height ignores floats and .merchant-actions
   * (next flex item) draws on top of the star row.
   */
  .lc-portal--store .merchant-header-row .merchant-body .merchant-rating {
    float: none;
    width: 100%;
    max-width: 100%;
    clear: both;
    margin: 10px 0 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .lc-portal--store .merchant-header-row .merchant-card > .merchant-actions {
    flex: 1 1 auto;
    width: 100% !important;
    max-width: none;
    margin-left: 0;
    margin-top: 8px;
    text-align: left;
  }

  .lc-portal--store .merchant-header-row .merchant-actions .merchant-button {
    max-width: none;
    width: 100%;
    margin-left: 0;
    font-size: 12px;
    white-space: normal;
  }

  .lc-card-family.lc-offer-card:hover {
    transform: none;
  }

  .lc-offer-surface--design.lc-offer-surface {
    flex-direction: column;
  }

  .lc-offer-meta-rail,
  .lc-offer-thumb-rail {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(61, 90, 128, 0.1);
  }

  .lc-offer-thumb-rail {
    border-bottom: 0;
    justify-content: flex-start;
  }

  .lb-offer-card.lb-offer-card-deal-list {
    padding: 10px 12px;
  }

  .lc-portal--store .lc-store-deal-simple .offer-row .offer-media,
  .lc-portal--store .lc-store-deal-simple .offer-row .offer-body {
    float: none !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .lc-portal--store .lc-store-deal-simple .offer-row .thumbnail img {
    max-height: none;
  }

  .lc-coupon-list-render--lb .lc-coupon-bottom-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lc-coupon-list-render--lb .lc-coupon-bottom-actions__right {
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .lc-coupon-list-render--lb .lc-coupon-bottom-actions .vote-area {
    width: auto !important;
  }

  .lc-coupon-list-render--lb .lc-coupon-bottom-actions .offer-box {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
  }

  /*
   * Coupon list (mobile): keep .well.offer-description-box as-is; its inner text
   * is inset by Bootstrap .well padding (~19px). Nudge header/meta/footer to match.
   */
  .lc-coupon-list-render--lb .lb-offer-body .lb-offer-header,
  .lc-coupon-list-render--lb .lb-offer-body .lb-offer-meta,
  .lc-coupon-list-render--lb .lb-offer-body .lb-offer-actions {
    padding-left: 19px;
    box-sizing: border-box;
  }
}
