/* =========================================================
   LHS Lace Commerce Tools — Phase 1 production pilot
   Quick View, Compare, Related Systems, Recently Viewed
   ========================================================= */

.lhs-lace-option-card.lhs-commerce-enabled{
  overflow:hidden;
}

.lhs-lace-card-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:0 20px 20px;
}

.lhs-lace-tool-btn{
  min-height:44px;
  padding:10px 12px;
  border:1px solid rgba(39,28,18,.16);
  border-radius:8px;
  background:#fff;
  color:#211810;
  font:700 10px/1.2 Arial,sans-serif;
  letter-spacing:.11em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .25s ease,color .25s ease,border-color .25s ease,transform .25s ease,box-shadow .25s ease;
}

.lhs-lace-tool-btn:hover{
  transform:translateY(-2px);
  border-color:#b18042;
  box-shadow:0 9px 20px rgba(55,36,18,.10);
}

.lhs-lace-tool-btn-primary{
  border-color:#211810;
  background:#211810;
  color:#f1d29a;
}

.lhs-lace-tool-btn-primary:hover{
  background:#0f0c09;
  color:#ffe0a7;
}

.lhs-lace-tool-btn.is-selected{
  border-color:#b18042;
  background:#ead2aa;
  color:#20150c;
}

.lhs-commerce-section{
  padding:78px max(28px,calc((100% - 1380px)/2));
  background:#f5eee5;
  border-top:1px solid rgba(47,33,20,.08);
}

.lhs-commerce-section:nth-of-type(even){background:#fff}

.lhs-commerce-section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:28px;
}

.lhs-commerce-section-head p{
  margin:0 0 9px;
  color:#a37232;
  font-size:10px;
  font-weight:700;
  letter-spacing:.23em;
}

.lhs-commerce-section-head h2{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(34px,3.7vw,56px);
  line-height:1.02;
  font-weight:400;
  letter-spacing:-.035em;
}

.lhs-commerce-section-head > span{
  max-width:430px;
  color:#76695d;
  font-size:13px;
  line-height:1.65;
  text-align:right;
}

.lhs-commerce-card-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.lhs-commerce-mini-card{
  position:relative;
  display:flex;
  min-width:0;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(47,33,20,.10);
  border-radius:15px;
  background:#fff;
  color:#17120e;
  text-decoration:none;
  box-shadow:0 12px 34px rgba(48,31,17,.06);
  transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease;
}

.lhs-commerce-mini-card:hover{
  transform:translateY(-5px);
  border-color:rgba(177,128,66,.42);
  box-shadow:0 22px 48px rgba(48,31,17,.13);
}

.lhs-commerce-mini-card img{
  width:100%;
  aspect-ratio:1.35/1;
  object-fit:cover;
  transition:transform .55s cubic-bezier(.2,.7,.2,1);
}

.lhs-commerce-mini-card:hover img{transform:scale(1.035)}

.lhs-commerce-mini-card-copy{
  display:flex;
  flex:1;
  flex-direction:column;
  padding:18px 18px 20px;
}

.lhs-commerce-mini-card small{
  color:#9d6f35;
  font-size:9px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.lhs-commerce-mini-card strong{
  display:block;
  margin-top:7px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:21px;
  line-height:1.08;
  font-weight:400;
}

.lhs-commerce-mini-card span{
  display:block;
  margin-top:auto;
  padding-top:17px;
  color:#8a6332;
  font-size:9px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.lhs-commerce-empty{
  grid-column:1/-1;
  padding:40px;
  border:1px dashed rgba(62,43,24,.20);
  border-radius:15px;
  background:rgba(255,255,255,.62);
  color:#77695b;
  text-align:center;
  font-size:14px;
  line-height:1.7;
}

/* Compare tray */
.lhs-lace-compare-tray[hidden],
.lhs-lace-commerce-modal[hidden]{display:none!important}

.lhs-lace-compare-tray{
  position:fixed;
  z-index:9800;
  left:50%;
  bottom:20px;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:min(1080px,calc(100% - 34px));
  padding:16px 18px;
  border:1px solid rgba(234,198,137,.26);
  border-radius:16px;
  background:rgba(22,17,12,.96);
  color:#fff;
  box-shadow:0 25px 80px rgba(0,0,0,.34);
  backdrop-filter:blur(18px);
}

.lhs-lace-compare-summary{min-width:0}
.lhs-lace-compare-summary > strong{display:block;font-size:12px;letter-spacing:.04em}
.lhs-lace-compare-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.lhs-lace-compare-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  max-width:240px;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.78);
  font-size:9px;
}
.lhs-lace-compare-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lhs-lace-compare-chip button{padding:0;border:0;background:none;color:#e7bd7b;font-size:15px;line-height:1;cursor:pointer}
.lhs-lace-compare-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.lhs-lace-compare-clear{border:0;background:none;color:#d5ad6f;font-size:10px;font-weight:700;letter-spacing:.10em;cursor:pointer}
.lhs-lace-compare-open{
  min-height:44px;
  padding:0 21px;
  border:1px solid #e2bb7b;
  border-radius:7px;
  background:#e2bb7b;
  color:#1e150d;
  font-size:10px;
  font-weight:800;
  letter-spacing:.11em;
  cursor:pointer;
}


.lhs-lace-compare-open:disabled{
  opacity:.45;
  cursor:not-allowed;
}

body.lhs-lace-compare-active .lhs-quick-actions,
body.lhs-lace-compare-active .lhs-floating-cart,
body.lhs-lace-compare-active .lhs-back-to-top{
  opacity:0!important;
  pointer-events:none!important;
  transform:translateY(16px)!important;
}

/* Modal */
.lhs-lace-commerce-modal{
  position:fixed;
  z-index:12000;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
}

.lhs-lace-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(8,6,4,.72);
  backdrop-filter:blur(10px);
}

.lhs-lace-modal-panel{
  position:relative;
  z-index:1;
  width:min(1160px,100%);
  max-height:calc(100dvh - 48px);
  overflow:auto;
  border:1px solid rgba(255,255,255,.15);
  border-radius:22px;
  background:#fbf8f3;
  box-shadow:0 34px 110px rgba(0,0,0,.38);
}

.lhs-lace-modal-close{
  position:sticky;
  z-index:4;
  top:14px;
  float:right;
  width:44px;
  height:44px;
  margin:14px 14px -58px 0;
  border:1px solid rgba(42,29,18,.13);
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:#17120e;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}

.lhs-lace-quick-panel{
  display:grid;
  grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr);
}

.lhs-lace-quick-media{min-height:640px;background:#e6dacb}
.lhs-lace-quick-media img{width:100%;height:100%;object-fit:cover}
.lhs-lace-quick-copy{padding:60px 50px 42px}
.lhs-lace-quick-eyebrow{margin:0 0 11px;color:#9d6e34;font-size:10px;font-weight:700;letter-spacing:.20em;text-transform:uppercase}
.lhs-lace-quick-copy h2{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:clamp(38px,4.2vw,60px);line-height:1;font-weight:400;letter-spacing:-.04em}
.lhs-lace-quick-description{margin:18px 0 0;color:#706459;font-size:14px;line-height:1.72}
.lhs-lace-quick-price{display:block;margin-top:18px;color:#1e1711;font-size:18px;font-weight:700}
.lhs-lace-quick-specs{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;margin:25px 0;background:rgba(46,32,19,.11)}
.lhs-lace-quick-specs div{padding:15px;background:#f4ecdf}
.lhs-lace-quick-specs dt{color:#9b6e34;font-size:9px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.lhs-lace-quick-specs dd{margin:5px 0 0;color:#2a2018;font-size:13px;font-weight:600}
.lhs-lace-modal-actions{display:flex;flex-wrap:wrap;gap:9px}
.lhs-lace-modal-actions a,.lhs-lace-modal-actions button{
  display:inline-flex;
  min-height:47px;
  align-items:center;
  justify-content:center;
  padding:0 19px;
  border:1px solid #20170f;
  border-radius:7px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.10em;
  text-decoration:none;
  cursor:pointer;
}
.lhs-lace-modal-actions a{background:#20170f;color:#f0cf96}
.lhs-lace-modal-actions button{background:#fff;color:#20170f}
.lhs-lace-modal-actions button.is-selected{border-color:#b18042;background:#ead2aa}

.lhs-lace-modal-related{margin-top:34px;padding-top:25px;border-top:1px solid rgba(47,33,20,.10)}
.lhs-lace-modal-related h3{margin:0 0 13px;font-family:Georgia,"Times New Roman",serif;font-size:24px;font-weight:400}
.lhs-lace-modal-related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}
.lhs-lace-modal-related-card{
  display:grid;
  grid-template-columns:70px 1fr;
  align-items:center;
  gap:11px;
  padding:7px;
  border:1px solid rgba(47,33,20,.10);
  border-radius:10px;
  background:#fff;
  color:#1d160f;
  text-align:left;
  cursor:pointer;
}
.lhs-lace-modal-related-card img{width:70px;height:70px;border-radius:7px;object-fit:cover}
.lhs-lace-modal-related-card small{color:#9b6d33;font-size:8px;letter-spacing:.08em;text-transform:uppercase}
.lhs-lace-modal-related-card strong{display:block;margin-top:5px;font-family:Georgia,"Times New Roman",serif;font-size:15px;line-height:1.08;font-weight:400}

.lhs-lace-compare-panel{width:min(1380px,100%);padding:54px 40px 40px}
.lhs-lace-compare-heading{max-width:760px;margin:0 auto 28px;text-align:center}
.lhs-lace-compare-heading p{margin:0 0 10px;color:#9b6d33;font-size:10px;font-weight:700;letter-spacing:.19em}
.lhs-lace-compare-heading h2{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:clamp(36px,4.4vw,58px);line-height:1;font-weight:400;letter-spacing:-.04em}
.lhs-lace-compare-heading span{display:block;margin-top:13px;color:#74685d;font-size:13px;line-height:1.6}
.lhs-lace-compare-table-wrap{overflow:auto;border:1px solid rgba(47,33,20,.11);border-radius:14px;background:#fff}
.lhs-lace-compare-table{width:100%;min-width:850px;border-collapse:collapse}
.lhs-lace-compare-table th,.lhs-lace-compare-table td{padding:15px;border-right:1px solid #eee4d7;border-bottom:1px solid #eee4d7;vertical-align:top;text-align:left}
.lhs-lace-compare-table th:first-child,.lhs-lace-compare-table td:first-child{width:165px;background:#f5eee4;color:#8b632f;font-size:9px;font-weight:700;letter-spacing:.10em;text-transform:uppercase}
.lhs-lace-compare-product-head img{width:100%;aspect-ratio:1.5/1;object-fit:cover;border-radius:9px}
.lhs-lace-compare-product-head strong{display:block;margin-top:11px;font-family:Georgia,"Times New Roman",serif;font-size:19px;line-height:1.08;font-weight:400}
.lhs-lace-rating{white-space:nowrap;color:#ad7c3d;font-size:12px;letter-spacing:2px}
.lhs-lace-compare-detail-link{display:inline-flex;min-height:40px;align-items:center;justify-content:center;padding:0 14px;border-radius:6px;background:#20170f;color:#edc98e;text-decoration:none;font-size:9px;font-weight:800;letter-spacing:.09em}

.lhs-lace-commerce-toast{
  position:fixed;
  z-index:13000;
  left:50%;
  bottom:24px;
  transform:translate(-50%,20px);
  max-width:min(440px,calc(100% - 28px));
  padding:12px 18px;
  border-radius:999px;
  background:#17120e;
  color:#f4d39c;
  box-shadow:0 16px 42px rgba(0,0,0,.28);
  opacity:0;
  pointer-events:none;
  font-size:11px;
  text-align:center;
  transition:opacity .25s ease,transform .25s ease;
}
.lhs-lace-commerce-toast.is-visible{opacity:1;transform:translate(-50%,0)}

html[dir="rtl"] .lhs-commerce-section-head > span{text-align:left}
html[dir="rtl"] .lhs-lace-modal-related-card,
html[dir="rtl"] .lhs-lace-compare-table th,
html[dir="rtl"] .lhs-lace-compare-table td{text-align:right}
html[dir="rtl"] .lhs-lace-modal-close{float:left;margin:14px 0 -58px 14px}

@media(max-width:1050px){
  .lhs-commerce-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lhs-lace-quick-media{min-height:560px}
}

@media(max-width:760px){
  .lhs-lace-card-actions{margin:0 16px 16px}
  .lhs-commerce-section{padding:58px 15px}
  .lhs-commerce-section-head{align-items:start;flex-direction:column;gap:12px}
  .lhs-commerce-section-head > span{text-align:left}
  html[dir="rtl"] .lhs-commerce-section-head > span{text-align:right}
  .lhs-commerce-card-grid{grid-template-columns:1fr}
  .lhs-lace-compare-tray{align-items:stretch;flex-direction:column;gap:11px;bottom:9px;padding:13px}
  .lhs-lace-compare-actions{justify-content:space-between}
  .lhs-lace-commerce-modal{padding:7px}
  .lhs-lace-modal-panel{max-height:calc(100dvh - 14px);border-radius:15px}
  .lhs-lace-quick-panel{grid-template-columns:1fr}
  .lhs-lace-quick-media{min-height:auto}
  .lhs-lace-quick-media img{display:block;aspect-ratio:1/1;object-fit:cover}
  .lhs-lace-quick-copy{padding:29px 19px}
  .lhs-lace-quick-specs{grid-template-columns:1fr 1fr}
  .lhs-lace-modal-related-grid{grid-template-columns:1fr}
  .lhs-lace-compare-panel{padding:52px 12px 18px}
}

@media(max-width:440px){
  .lhs-lace-card-actions{grid-template-columns:1fr}
  .lhs-lace-quick-specs{grid-template-columns:1fr}
  .lhs-lace-modal-actions{flex-direction:column}
  .lhs-lace-modal-actions a,.lhs-lace-modal-actions button{width:100%}
}

@media(hover:none),(pointer:coarse){
  .lhs-lace-tool-btn:hover,
  .lhs-commerce-mini-card:hover{transform:none}
  .lhs-commerce-mini-card:hover img{transform:none}
}

@media(prefers-reduced-motion:reduce){
  .lhs-lace-tool-btn,.lhs-commerce-mini-card,.lhs-commerce-mini-card img,.lhs-lace-commerce-toast{transition:none!important}
}
