/* Small bridge styles to make lx-redesign work standalone in Laravel.
   Keep minimal to avoid conflicts.
*/

/* Basic typography/links (lx-redesign assumes legacy base CSS exists) */
html, body{ margin:0; padding:0; }
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

/* Sticky footer: keep footer at the bottom when content is short */
html{ height: 100%; }
body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main[role="main"]{
  flex: 1 0 auto;
}

.lx-footer{
  flex: 0 0 auto;
}

/* Minimal "general-search" markup used in header */
.general-search.custom-search{ position: relative; }
.general-search.custom-search form{ display:block; margin:0; }
.general-search.custom-search input.form-control{ width: 100%; box-sizing: border-box; outline: none; }
.general-search.custom-search .search-button{ position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }

/* When used outside header, keep button visible and aligned */
.lx-heroSearch .general-search.custom-search,
.lx-section .general-search.custom-search{
  width: 100%;
}

/* Responsive helpers (legacy Cotonti semantics)
   - .m-hidden: hidden on mobile, otherwise unaffected
   - .m-visible: visible only on mobile

   IMPORTANT: Do not override the element's intended display (inline-flex, flex, grid).
   These helpers must not stomp component layout in desktop view.
*/
@media (max-width: 991.98px){
  .m-hidden{ display: none !important; }
}

.m-visible{ display: none !important; }
@media (max-width: 991.98px){
  .m-visible{ display: revert !important; }
}

/* Inline-flex elements in header should align nicely with neighbors */
.lx-catToggle,
.lx-header .lx-pill{
  vertical-align: middle;
}

/* Safety: ensure legacy dropdowns open on hover (desktop),
   even if some legacy JS doesn't run on a given page. */
@media (hover: hover) and (pointer: fine){
  .lx-header .logoutheader .usernamebox:hover > .dropdownbox-profile{
    display: block !important;
  }
  .lx-header .logoutheader .pricebox:hover > .dropdownbox-balance{
    display: block !important;
  }
  .lx-header .cart-popup:hover .block-popup{
    display: block !important;
  }
  .lx-header .js-notice-other:hover .block-popup{
    display: block !important;
  }
}

/* Header: modern notice popup (center arrow + clean card) */
.lx-header .js-notice-other{
  position: relative;
}

.lx-header .js-notice-other .block-popup{
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;

  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.lx-header .js-notice-other .block-popup::before,
.lx-header .js-notice-other .block-popup::after{
  left: 50% !important;
  right: auto !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
}

.lx-header .js-notice-other .block-popup::before{
  content: "";
  position: absolute;
  top: -11px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 11px 10px;
  border-color: transparent transparent rgba(15, 23, 42, 0.12) transparent;
}

.lx-header .js-notice-other .block-popup::after{
  content: "";
  position: absolute;
  top: -10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 11px 10px;
  border-color: transparent transparent #fff transparent;
}

.lx-header .js-notice-other .block-popup .nowrap{
  white-space: normal;
}

.lx-header .js-notice-other .block-popup .notifications-content-block{
  padding: 0;
}

.lx-header .js-notice-other .block-popup span{
  font-size: 14px;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.92);
}

/* Header: counters can be toggled by legacy JS via inline styles; keep them visible when they have content */
.lx-header .js-notice-inbox .massage_counter:empty,
.lx-header .js-notice-other .massage_counter:empty{
  display: none !important;
}

.lx-header .js-notice-inbox .massage_counter:not(:empty),
.lx-header .js-notice-other .massage_counter:not(:empty){
  display: block !important;
}

/* Minimal legacy layout helpers used by lx-redesign templates */
.clearfix::after{ content:""; display:block; clear:both; }

/* Legacy theme already defines .centerwrap/.lg-centerwrap in minified.css.
   Do not override widths here (it breaks 1:1 layout). Only provide safe additions. */
.centerwrap,
.lg-centerwrap{
  box-sizing: border-box;
}

@media (max-width: 1000px){
  .centerwrap,
  .lg-centerwrap{
    padding: 0 10px;
  }
}

.pb20{ padding-bottom: 20px; }
.pt20{ padding-top: 20px; }
.mt20{ margin-top: 20px; }
.mb0{ margin-bottom: 0; }

.p15-20{ padding: 15px 20px; }

.bgWhite{ background: #fff; }
.white-bg-border{
  border-radius: 18px;
  border: 1px solid rgba(75, 88, 124, 0.12);
  box-shadow: 0 14px 34px rgba(31, 42, 68, 0.08);
}

.contentArea,
.sidebarArea{
  box-sizing: border-box;
}

/* Fallback if .lx-prd grid styles are missing */
.lx-prd{
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
}

@media (max-width: 980px){
  .lx-prd{ grid-template-columns: 1fr; }
}

.ta-justify{ text-align: justify; }
.breakwords{ overflow-wrap: anywhere; word-break: break-word; }

/* Fix: chip hover gets clipped at the top when chip list is collapsed
   (lx-chip hover uses translateY(-1px) + shadow, while the list has overflow:hidden). */
.lx-marketPage .lx-chipListWrap.is-collapsed .lx-chipList{
  padding-top: 2px;
  margin-top: -2px;
}

/* Fix: price range inputs can overflow their grid cell in some browsers
   because width:100% doesn't include padding/border without border-box. */
.lx-marketPage .lx-filters__range,
.lx-marketPage .lx-filters__input{
  min-width: 0;
}

.lx-marketPage .lx-filters__input{
  box-sizing: border-box;
}

/* Blog: prevent huge vertical cover images */
.lx-blogPost .lx-article__cover{
  height: clamp(140px, 22vw, 280px);
}

.lx-blogPost .lx-article__cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Blog: image caption (a paragraph that contains only italic text) */
.lx-blogPost .lx-article__content p > em:only-child{
  display: block;
  text-align: center;
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(100, 116, 139, 0.95);
}

/* Paid promo: listing highlight (position=5) */
.lx-card.is-highlighted,
.lx-prdCard.is-highlighted{
  position: relative;
  overflow: hidden;

  /* Premium gradient border */
  border: 2px solid transparent !important;
  background:
    /* inner fill */
    radial-gradient(1200px 260px at 18% 0%, rgba(255, 214, 10, 0.38), transparent 58%) padding-box,
    radial-gradient(900px 220px at 88% 10%, rgba(255, 59, 120, 0.34), transparent 60%) padding-box,
    linear-gradient(135deg, rgba(255, 214, 10, 0.12), rgba(255, 59, 120, 0.10)) padding-box,
    /* border */
    linear-gradient(90deg, #ffd60a 0%, #ff3b78 55%, #6c5ce7 100%) border-box;
  box-shadow:
    0 20px 58px rgba(255, 59, 120, 0.18),
    0 10px 24px rgba(255, 214, 10, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.62) inset;
}

/* Make inner body feel "filled", not just a border */
.lx-card.is-highlighted .lx-card__body{
  background:
    /* readable white veil */
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
    /* premium tint */
    radial-gradient(520px 180px at 16% 15%, rgba(255, 214, 10, 0.26), transparent 62%),
    radial-gradient(520px 180px at 92% 20%, rgba(255, 59, 120, 0.20), transparent 62%);
  border-top: 1px solid rgba(255, 59, 120, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  backdrop-filter: blur(6px);
}

.lx-card.is-highlighted .lx-card__title{
  color: #0f172a;
}

.lx-card.is-highlighted .lx-card__price{
  color: #0f172a;
  font-weight: 800;
}

/* Glossy highlight overlay */
.lx-card.is-highlighted::before,
.lx-prdCard.is-highlighted::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 240px at 30% -10%, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(600px 220px at 90% 0%, rgba(255, 255, 255, 0.26), transparent 60%);
  opacity: 0.85;
}

/* Note: intentionally no extra inner frame (keeps premium look without double borders) */

/* Badge (card) */
.lx-card__media{ position: relative; }
.lx-card__highlightBadge{
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #0b1220;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.10)),
    linear-gradient(90deg, #ffd60a, #ff3b78);
  box-shadow:
    0 12px 26px rgba(255, 59, 120, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  max-width: calc(100% - 10px - 10px - 70px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lx-card__highlightBadge::before{
  content: "★";
  font-size: 12px;
  line-height: 1;
}

/* Prevent city + highlight badge from overlapping */

/* Badge (product page) */
.lx-prdHighlightBadge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  color: #0b1220;
  background: linear-gradient(90deg, #ffd60a, #ff3b78);
  box-shadow: 0 12px 26px rgba(255, 59, 120, 0.18);
}

.lx-prdHighlightBadge::before{ content: "★"; }

/* Inactive listing (paid publication required) */
.lx-prdInactiveNotice{
  margin: 12px 15px 0;
  padding: 12px 14px;
  border-radius: 12px;
  color: #7c2d12;
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.95), rgba(255, 247, 237, 0.92));
  border: 1px solid rgba(251, 146, 60, 0.35);
  box-shadow: 0 10px 24px rgba(124, 45, 18, 0.08);
}

.lx-prdInactiveBadge{
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  color: #7c2d12;
  background: linear-gradient(90deg, #fde68a, #fdba74);
  box-shadow: 0 10px 20px rgba(124, 45, 18, 0.10);
}

.lx-prdInactiveBadge::before{ content: "⏳"; margin-right: 8px; }

.lx-prdInactiveCta{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px dashed rgba(15, 23, 42, 0.18);
}

.lx-prdInactiveCta__title{
  font-weight: 800;
  color: #0f172a;
}

.lx-prdInactiveCta__text{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.75);
}

/* Mobile: keep badges comfortably separated */
@media (max-width: 420px){
  .lx-card__highlightBadge{
    top: 8px;
    left: 8px;
    padding: 6px 8px;
    font-size: 11px;
    max-width: calc(100% - 8px - 8px - 64px);
  }

  .lx-card__count{
    top: 8px;
    right: 8px;
    height: 26px;
    padding: 0 8px;
    line-height: 26px;
    font-size: 11px;
  }
}

/* Mobile: keep badges on one row by making highlight badge compact */
@media (max-width: 640px){
  .lx-card__highlightBadge{
    padding: 6px 8px;
    gap: 0;
  }

  .lx-card__highlightBadgeText{ display: none; }

  .lx-card.is-highlighted .lx-card__count.lx-card__count--city{
    /* reserve small space for the ★ badge on the left */
    max-width: calc(100% - 8px - 8px - 44px) !important;
  }
}

/* Improve hover for highlighted cards */
@media (hover: hover) and (pointer: fine){
  .lx-card.is-highlighted:hover{
    transform: translateY(-2px);
    box-shadow:
      0 26px 72px rgba(255, 59, 120, 0.22),
      0 12px 26px rgba(255, 214, 10, 0.18),
      0 0 0 1px rgba(255, 255, 255, 0.66) inset;
  }
}

/* Paid promo highlight for sidebar ad mini-card (position 4 container) */
.lx-prdOrderCard__head :is(.lx-adsMiniBody, .lx-adsInline) .lx-adsMiniItem__badges{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.lx-prdOrderCard__head :is(.lx-adsMiniBody, .lx-adsInline) .lx-adsMiniItem.is-highlighted{
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.88)) padding-box,
    linear-gradient(90deg, #ffd60a 0%, #ff3b78 55%, #6c5ce7 100%) border-box;
  box-shadow:
    0 16px 30px rgba(255, 59, 120, 0.14),
    0 10px 20px rgba(31, 42, 68, 0.08);
}

.lx-prdOrderCard__head :is(.lx-adsMiniBody, .lx-adsInline) .lx-adsMiniItem.is-highlighted::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 160px at 22% -10%, rgba(255, 214, 10, 0.22), transparent 62%),
    radial-gradient(520px 160px at 92% 0%, rgba(255, 59, 120, 0.18), transparent 62%);
  opacity: 0.95;
}

.lx-prdOrderCard__head :is(.lx-adsMiniBody, .lx-adsInline) .lx-adsMiniItem.is-highlighted > *{
  position: relative;
  z-index: 1;
}

.lx-prdOrderCard__head :is(.lx-adsMiniBody, .lx-adsInline) .lx-adsMiniItem.is-highlighted .lx-adsMiniItem__badge--highlight{
  border-color: rgba(255, 59, 120, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.08)),
    linear-gradient(90deg, #ffd60a, #ff3b78);
  color: #0b1220;
}
