/* Layout A wrappers - basic structure to differentiate DOM and classes */

.la-store-page,
.la-deals-page,
.la-coupons-page,
.la-home {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

/* Two-column layout for main + sidebar */
.la-store-page,
.la-deals-page,
.la-coupons-page {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

/* Do not fix width on .la-store-main when it uses Bootstrap span9 (store page). */
.la-deals-main,
.la-coupons-main {
  width: 70%;
}

.la-sidebar {
  width: 30%;
  margin-left: 20px;
}

@media (max-width: 900px) {
  .la-store-page,
  .la-deals-page,
  .la-coupons-page,
  .la-home {
    flex-direction: column;
  }

  .la-sidebar {
    width: 100%;
    margin-left: 0;
    margin-top: 20px;
  }
}

/* Layout A store shell (layout_a/store.tpl + store_content.tpl) */
.la-store-page .la-store-page-row {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.la-store-page .la-store-content {
  display: block;
  max-width: 100%;
}

.la-store-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.la-store-merchant {
  display: block;
  margin: 0;
}

.la-store-merchant .la-merchant-header,
.la-store-merchant .merchant-header-row {
  margin-bottom: 0;
}

.la-store-offers {
  display: block;
  margin: 0;
}

.la-store-offers-body {
  display: block;
}

.la-store-pagination {
  display: block;
  margin: 0;
  padding-top: 4px;
  text-align: right;
}

.la-store-pagination .pagination {
  margin-top: 0;
  margin-bottom: 0;
}

.la-store-overview {
  display: block;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e4e8;
}

/*
 * Store merchant card: star rating (row_store_buttons.logic.tpl).
 * layout_variant layout_a still uses templates/bootstrap/store.tpl → bootstrap/store_content.tpl
 * (Smarty resolves store_content.tpl from theme dir first). That markup wraps the list in
 * .store-layout — not .la-store-page (layout_a/store.tpl is not included on the live path).
 * Scope fixes to .store-layout so they match the rendered DOM.
 */
.store-layout .merchant-header-row .merchant-meta + div {
  margin: 0;
  padding: 0;
  height: 0;
  line-height: 0;
  overflow: hidden;
}

/*
 * Store header star row (row_store_buttons.logic.tpl): main-script defines this in
 * templates/bootstrap/css/style.css; lang-script bootstrap/style.css has no
 * .merchant-rating rules. layout_a previously forced float:none on .merchant-rating,
 * which broke the float-right label technique. Scoped to bootstrap Layout A store only.
 */
.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating {
  float: left;
  font-size: 10px;
  clear: both;
  margin: 8px 0 0;
  box-sizing: border-box;
}

.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating:not(:checked) > input {
  position: absolute;
  top: -9999px;
  clip: rect(0, 0, 0, 0);
}

.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating:not(:checked) > label {
  float: right;
  width: 1em;
  padding: 0 0.1em;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  font-size: 200%;
  line-height: 1.2;
  color: #ddd;
}

.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating > input:checked ~ label:before {
  color: #fb8b24;
  content: "\2605";
}

.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating:not(:checked) > label:hover:before,
.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating:not(:checked) > label:hover ~ label:before {
  color: #fb8b24;
  content: "\2605";
}

.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating > input:checked + label:hover:before,
.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating > input:checked + label:hover ~ label:before,
.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating > input:checked ~ label:hover:before,
.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating > input:checked ~ label:hover ~ label:before,
.store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating > label:hover ~ input:checked ~ label:before {
  color: #fb8b24;
  content: "\2605";
}

.store-layout .merchant-header-row .merchant-body::after {
  content: "";
  display: table;
  clear: both;
}

/* Store tab panes: neutralize legacy span11 offsets inside tab-content */
.store-layout .tab-content > .tab-pane.span11 {
  width: 100%;
  max-width: 100%;
  float: none;
  margin-left: 0;
  box-sizing: border-box;
}

/* Bootstrap .pagination { margin: 20px 0 }; .no-top-margin only clears margin-top.
 * Tighten vertical gap above the list on bootstrap store only (not Layout B: .lb-store-layout). */
.store-layout:not(.lb-store-layout) .store-pagination.pagination {
  margin-bottom: 0;
}

/* Deal card layout and spacing */
.la-offer-card,
.la-offer-card-deal {
  display: block;
  border-bottom: 1px solid #e5e5e5;
  padding: 15px 0;
  margin-bottom: 15px;
}

.la-offer-grid-item,
.la-offer-grid-item-deal {
  margin-bottom: 15px;
}

/*
 * Layout A list rows: match main-script offer_render (media + body are direct
 * children of .row-fluid.offer-row). Bootstrap 2 spans + style.css handle desktop;
 * below 768px stack image full-width on top (main mobile card pattern).
 */
.la-offer-grid-inner {
  display: block;
}

.la-offer-card.row-fluid:before,
.la-offer-card-deal.row-fluid:before,
.la-offer-card.row-fluid:after,
.la-offer-card-deal.row-fluid:after {
  display: table;
  line-height: 0;
  content: "";
}

.la-offer-card.row-fluid:after,
.la-offer-card-deal.row-fluid:after {
  clear: both;
}

@media (max-width: 767px) {
  .la-offer-card.row-fluid > .offer-media,
  .la-offer-card-deal.row-fluid > .offer-media {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    box-sizing: border-box;
  }

  .la-offer-card.row-fluid > .offer-media .thumbnail,
  .la-offer-card-deal.row-fluid > .offer-media .thumbnail {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .la-offer-card.row-fluid > .offer-media .thumbnail img,
  .la-offer-card-deal.row-fluid > .offer-media .thumbnail img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    display: block;
  }

  .la-offer-card.row-fluid > .offer-body,
  .la-offer-card-deal.row-fluid > .offer-body {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    box-sizing: border-box;
    min-width: 0;
  }

  .la-offer-card.row-fluid .offer-actions,
  .la-offer-card-deal.row-fluid .offer-actions {
    clear: both;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/*
 * Layout A bootstrap store: do not re-introduce a 520px–767px two-column float layout
 * inside .store-layout #recent-deals. Store lists mix coded coupons (.la-offer-card) and
 * plain deals (.la-offer-card-deal); a deals-only mid-band override made rows inconsistent
 * versus global deals/coupons pages (which are not under .store-layout).
 */

/*
 * Layout A list rows (.la-offer-card / .la-offer-card-deal): CTA visibility.
 * bootstrap style.css applies legacy mobile/tablet rules to .offer-box globally
 * (max-width:480px and 768px–979px): height:22px !important; overflow:hidden;
 * width:45% — intended for old coupon-row voting rows. List rows use the same
 * .offer-box class, so the CTA is clipped or appears missing. Scope overrides
 * to Layout A card wrappers only (does not affect Layout B/C markup).
 */
.la-offer-card.row-fluid .offer-actions .offer-box.pull-right,
.la-offer-card-deal.row-fluid .offer-actions .offer-box.pull-right {
  height: auto !important;
  min-height: 40px;
  line-height: 1.25;
  overflow: visible !important;
  width: auto !important;
  min-width: 150px;
  max-width: 100%;
  box-sizing: border-box;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  display: inline-block;
  vertical-align: middle;
}

.la-offer-card.row-fluid .offer-actions .vote-area,
.la-offer-card-deal.row-fluid .offer-actions .vote-area {
  width: auto !important;
  max-width: 100%;
}

.la-offer-card.row-fluid .offer-actions,
.la-offer-card-deal.row-fluid .offer-actions {
  overflow: visible;
}

/* Generic wrappers */
.la-merchant-row,
.la-merchant-header,
.la-merchant-teaser,
.la-offer-mini {
  display: block;
}

/* Layout wrappers for future use (do not modify Bootstrap core classes) */
.la-layout {
  display: flex;
  align-items: flex-start;
}

.la-main {
  flex: 1;
}

.la-sidebar {
  width: 320px;
  margin-left: 30px;
}

/* Page header row: layout-specific header and search alignment (Layout A only) */
.page-header-row .search-form,
.page-header-row .page-search,
.span3 .search-form,
.span4 .page-search {
  text-align: right;
}

.page-header-row input,
.search-query {
  width: 320px;
  max-width: 100%;
}

.page-header-row .page-title {
  font-size: 28px;
  line-height: 34px;
  margin-bottom: 10px;
  word-break: break-word;
}

@media (max-width: 768px) {
  .page-header-row .page-title {
    font-size: 24px;
    line-height: 30px;
  }
}

/* Layout A: merchant header typography */
.merchant-header-row .merchant-body .merchant-title {
  display: none; /* keep schema but hide duplicate title visually */
}

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

/* Layout A: merchant description emphasis */
.merchant-header-row .merchant-description {
  font-weight: 600;
  line-height: 1.5;
  color: #222;
}

.merchant-header-row .merchant-description strong {
  font-weight: 700;
}

/* Layout A: merchant actions styling (top merchant card only) */
.merchant-header-row .merchant-actions {
  text-align: left;
  padding-top: 6px;
}

.merchant-header-row .merchant-actions .merchant-button {
  display: block;
  width: calc(100% + 16px);
  margin-right: -16px;
  box-sizing: border-box;
  margin-bottom: 6px;
  padding: 8px 20px 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;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

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

.merchant-header-row .merchant-actions .merchant-button:hover,
.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;
}

/*
 * Bootstrap store (Layout A path only): merchant actions sit in Bootstrap span2
 * (~170px) while base rules use nowrap + calc(100% + 16px), which overflows for
 * German labels. Desktop: flex row card, ~220px action column, buttons ~full
 * column width; icon column via padding + absolutely positioned <i> so text
 * wraps as a block (no overflow-wrap:anywhere / no fragile multi-flex-item text).
 * Scoped: .store-layout:not(.lb-store-layout) — Layout B/C unchanged.
 */
@media (min-width: 769px) {
  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .clearfix {
    display: none;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .merchant-media,
  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .merchant-body,
  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .merchant-actions {
    float: none !important;
    margin-left: 0 !important;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .merchant-media {
    flex: 0 0 auto;
    width: 140px;
    max-width: 140px;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .merchant-body {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none;
    padding-left: 16px;
    box-sizing: border-box;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-card > .merchant-actions {
    flex: 0 0 220px;
    width: 220px !important;
    max-width: 220px;
    min-width: 200px;
    box-sizing: border-box;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-actions .merchant-button {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    margin-right: 0;
    margin-bottom: 8px;
    padding: 9px 12px 9px 34px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
    text-align: left;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-actions .merchant-button i {
    position: absolute;
    left: 12px;
    top: 0.65em;
    margin-right: 0;
    line-height: 1;
  }
}

@media (max-width: 768px) {
  /* Coupons/Deals controls: stack sort and pages cleanly on phones */
  .la-coupons-page .coupons-sort,
  .la-coupons-page .coupons-pages,
  .la-deals-page .deals-sort,
  .la-deals-page .deals-pages {
    float: none;
    width: 100%;
    margin: 0 0 8px;
    text-align: left;
  }

  .la-coupons-page .coupons-sort ul,
  .la-coupons-page .coupons-pages ul,
  .la-deals-page .deals-sort ul,
  .la-deals-page .deals-pages ul {
    margin: 0;
  }

  .merchant-header-row .merchant-actions .merchant-button {
    font-size: 12px;
  }

  /*
   * Mobile store card: stack like layout_b — flex column + full-width body so stars
   * sit above actions; overflow:hidden on body contains floated star labels.
   * Scoped to .store-layout (bootstrap store_content.tpl for layout_a default path).
   */
  .store-layout .merchant-header-row .merchant-card {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

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

  .store-layout .merchant-header-row .merchant-card > .merchant-media,
  .store-layout .merchant-header-row .merchant-card > .merchant-body,
  .store-layout .merchant-header-row .merchant-card > .merchant-actions {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
  }

  .store-layout .merchant-header-row .merchant-card > .merchant-media {
    flex: 0 0 auto;
  }

  .store-layout .merchant-header-row .merchant-card > .merchant-body {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    padding-left: 0;
    box-sizing: border-box;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-body .merchant-rating {
    margin-top: 10px;
  }

  .store-layout .merchant-header-row .merchant-body::after {
    content: "";
    display: table;
    clear: both;
  }

  .store-layout .merchant-header-row .merchant-card > .merchant-actions {
    flex: 0 0 auto;
    margin-top: 8px;
    padding-top: 0;
  }

  .store-layout .merchant-header-row .merchant-actions .merchant-button {
    width: 100%;
    max-width: none;
    margin-right: 0;
    white-space: normal;
  }

  /* Layout A bootstrap store only: same icon + label column as desktop */
  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-actions .merchant-button {
    position: relative;
    padding: 9px 12px 9px 34px;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
    text-align: left;
  }

  .store-layout:not(.lb-store-layout) .merchant-header-row .merchant-actions .merchant-button i {
    position: absolute;
    left: 12px;
    top: 0.65em;
    margin-right: 0;
    line-height: 1;
  }
}

/* Layout A: sidebar item spacing (featured stores, related coupons/deals) */
.la-sidebar .merchant-teaser-row,
.la-sidebar .offer-mini-card {
  margin-bottom: 18px;
}

.la-sidebar .merchant-teaser-row .merchant-title,
.la-sidebar .offer-mini-card .offer-mini-body a {
  margin-bottom: 4px;
  line-height: 1.35;
}

.la-sidebar .merchant-teaser-row .merchant-body a {
  line-height: 1.35;
}

.la-sidebar .merchant-teaser-row .merchant-meta small,
.la-sidebar .offer-mini-card .offer-mini-description small {
  display: block;
  margin-top: 4px;
  line-height: 1.2;
}

.la-sidebar .merchant-teaser-row img,
.la-sidebar .offer-mini-card img {
  margin-bottom: 0;
}

/* Layout A: sidebar merchant teaser typography and spacing */
.sidebar-column .merchant-teaser-row,
#sidebar .merchant-teaser-row {
  margin-bottom: 18px;
}

.sidebar-column .merchant-body,
#sidebar .merchant-body {
  line-height: 1.3;
}

.sidebar-column .merchant-header,
#sidebar .merchant-header {
  margin-bottom: 4px;
}

.sidebar-column .merchant-title,
#sidebar .merchant-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  line-height: 1.3;
}

.sidebar-column .merchant-title a,
#sidebar .merchant-title a {
  line-height: 1.3;
  display: inline;
}

.sidebar-column .merchant-meta,
#sidebar .merchant-meta {
  margin-top: 0;
}

.sidebar-column .merchant-meta p,
#sidebar .merchant-meta p {
  margin: 0;
  line-height: 1.25;
}

.sidebar-column .merchant-media img,
#sidebar .merchant-media img {
  margin-bottom: 0;
}

/* Layout A: footer styling */
.site-footer {
  background: #f3f4f6;
  padding: 30px 0;
  margin-top: 40px;
  border-top: 1px solid #e1e4e8;
}

/* Layout A: footer layout and typography */
.site-footer .span3 {
  margin-bottom: 15px;
}

.site-footer h3 {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 600;
}

.site-footer ul {
  margin: 0;
  padding-left: 16px;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer a {
  color: #1f3b5c;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer p {
  margin-bottom: 6px;
  line-height: 1.4;
}

.site-footer a[href*="view"] {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
}

.site-footer .copyright,
.site-footer .footer-bottom,
.site-footer .footer-meta {
  margin-top: 20px;
  font-size: 13px;
  color: #666;
}





