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

.la-store-page,
.la-deals-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 {
  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 {
  width: 70%;
}

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

@media (max-width: 900px) {
  .la-store-page,
  .la-deals-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-layout .merchant-header-row .merchant-body .merchant-rating {
  float: none;
  width: 100%;
  max-width: 100%;
  clear: both;
  margin: 8px 0 0;
  box-sizing: border-box;
  overflow: hidden;
}

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

/* 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;
}

/* Align inner content similar to original row layout */
.la-offer-shell {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.la-offer-grid-inner {
  display: block;
}

/* Image column sizing */
.la-offer-shell img {
  max-width: 120px;
  height: auto;
}

/* Make inner columns flex so content fills remaining width */
.la-offer-shell > div {
  flex: 1;
}

/* 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%;
}

/* H1 → body: trim Bootstrap .page-header + style.css .page-header-row (this file loads for layout A only). */
.page-main > header.page-header {
  padding-bottom: 5px; /* bootstrap.css .page-header: 9px */
  margin-bottom: 16px; /* bootstrap.css .page-header: 30px (bottom of shorthand margin) */
}

.page-main > header.page-header .page-header-row {
  margin-top: 25px; /* preserve style.css top */
  margin-bottom: 12px; /* style.css .page-header-row: 25px */
}

.page-header-row .page-title {
  font-size: 28px;
  line-height: 34px;
  margin-bottom: 6px; /* was 10px — space under H1 inside header row */
  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;
}

@media (max-width: 768px) {
  .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;
  }

  .store-layout .merchant-header-row .merchant-body .merchant-rating {
    float: none !important;
    width: 100%;
    max-width: 100%;
    clear: both;
    margin: 10px 0 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .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: 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;
}





