/* ======================================================
   Location: /assets/css/home-tabs.css
   Purpose:
   - Homepage Product Tabs section styling.
   - Desktop spotlight big card uses wider premium product-card layout.
   - WooCommerce product loop grid stays untouched on the right side.

   Notes:
   - Spotlight/big-card visual treatment is shared across desktop, tablet, and mobile.
   - Mobile/tablet product list may swipe, but the big card must not receive a separate visual style.
====================================================== */

.stm-home-tabs{
  margin: 0 0 25px;
  padding-left: 20px;
  padding-right: 20px;
}

.stm-home-tabs > .container{
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.stm-tabs-head{
  display:flex;
  align-items:center;
  gap: 16px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #16a34a;
}

.stm-tabs-h{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

/* ======================================================
   Tabs bar
====================================================== */

.tabbar{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  width:100%;
  margin-left:0;
  margin-right:0;
}

.tabbar button{
  appearance:none;
  border:1px solid #e5e7eb;
  background:#f3f4f6;
  color:#111827;
  font-weight:600;
  font-size:13px;
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  white-space:nowrap;
  min-width:0;
}

.tabbar button:hover{
  background:#e5e7eb;
  border-color:#d1d5db;
  color:#111827;
}

.tabbar button:focus-visible{
  outline:2px solid #ff7a00;
  outline-offset:2px;
}

.tabbar button.active{
  background:#ff7a00;
  border-color:#ff7a00;
  color:#fff;
}

.tabbar button.active:hover{
  background:#e86d00;
  border-color:#e86d00;
  color:#fff;
}

/* ======================================================
   Layout
====================================================== */

.pane-wrap{
  display:grid;
  grid-template-columns: minmax(0, 388px) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
  padding-top: 12px;
}

/* ======================================================
   Left Big Card — compact premium layout
====================================================== */

.stm-tabs-bigcard{
  border: 1.5px solid #16a34a;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.stm-tabs-badge-top,
.stm-tabs-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 22px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  color:#fff !important;
  background:#e11d2e;
}

.stm-tabs-badge-top{
  width: fit-content;
  max-width: calc(100% - 74px);
  margin: 0 0 10px 0;
}

.stm-tabs-chip{
  position:absolute;
  top:14px;
  right:14px;
  min-width: 44px;
}

#pane-featured .stm-tabs-bigcard{ border-color:#ff7a00; }
#pane-featured .stm-tabs-badge-top{ background:#ff7a00; }
#pane-featured .stm-tabs-chip{ background:#111827; }
#pane-onsale2 .stm-tabs-bigcard{ border-color:#16a34a; }
#pane-onsale2 .stm-tabs-badge-top,
#pane-onsale2 .stm-tabs-chip{ background:#e11d2e; }
#pane-recent .stm-tabs-bigcard{ border-color:#16a34a; }
#pane-recent .stm-tabs-badge-top,
#pane-recent .stm-tabs-chip{ background:#16a34a; }

.stm-tabs-art{
  display:block;
  width:100%;
  aspect-ratio: 1 / 1;
  max-height: 355px;
  background:#ffffff;
  border: 0;
  border-radius: 0;
  overflow:hidden;
  margin: 0 0 12px;
}

.stm-tabs-art img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position: center;
  display:block;
  transform:none;
}

.stm-tabs-bigtitle{
  display:block;
  margin: 0 0 8px;
  color:#165DFF;
  font-size: 24px;
  font-weight:550;
  line-height:1.16;
  text-align:left;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.stm-tabs-bigtitle a{
  color:inherit;
  text-decoration:none;
  font-weight:inherit;
}

.stm-tabs-bigtitle a:hover,
.stm-tabs-bigtitle a:focus-visible{
  color:#063a8a;
  text-decoration: underline;
}

.stm-tabs-bigprice{
  margin: 8px 0 0;
  text-align:center;
  color:#111827;
  font-weight:650;
  font-size:29px;
  line-height:1.2;
}

.stm-tabs-bigprice del{
  color:#6b7280;
  font-size:13px;
  font-weight:400;
  opacity:.85;
}

.stm-tabs-bigprice ins{
  color:#111827;
  text-decoration:none;
  font-weight:650;
}

.stm-tabs-pills{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin: 14px 0 0;
}

.stm-tabs-pills span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #86efac;
  background:#ecfdf5;
  color:#16a34a;
  font-size: 10px;
  line-height:1;
  font-weight: 500;
  white-space: nowrap;
}

.stm-tabs-pills span.is-out{
  border-color:#fed7aa;
  background:#fff7ed;
  color:#c2410c;
}

.stm-tabs-perks{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.stm-tabs-perk{
  min-height: 38px;
  border-radius: 9px;
  background:#7c3aed;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 5px 4px;
  overflow:hidden;
}

.stm-tabs-perk strong{
  display:block;
  max-width:100%;
  color:inherit;
  font-size:8.5px;
  line-height:1.05;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stm-tabs-perk small{
  display:block;
  max-width:100%;
  margin-top:2px;
  color:rgba(255,255,255,.9);
  font-size:7.5px;
  line-height:1;
  font-weight:400;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stm-tabs-actionrow{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top:auto;
  padding-top: 14px;
}

.stm-home-tabs .stm-tabs-cta{
  display:inline-flex;
  flex: 1 1 auto;
  min-width:0;
  justify-content:center;
  align-items:center;
  height:40px;
  border-radius:10px;
  background:#ff7a00 !important;
  color:#fff !important;
  text-decoration:none;
  font-weight:600;
  font-size:12px;
  line-height:1;
}

.stm-home-tabs .stm-tabs-cta:hover{
  color:#fff !important;
  background:#e86d00 !important;
  filter:none;
}

.stm-tabs-cta:focus-visible{
  outline:2px solid #111827;
  outline-offset:2px;
}

.stm-tabs-wish{
  flex: 0 0 38px;
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.stm-tabs-wish .stm-pl__wish,
.stm-tabs-wish .stm-pl__wish--link,
.stm-tabs-wish button,
.stm-tabs-wish a,
.stm-tabs-wish-fallback{
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  border-radius:10px !important;
  border:1px solid #dbe3ea !important;
  background:#fff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
  box-shadow:none !important;
}

.stm-tabs-wish .stm-pl__icon,
.stm-tabs-wish-fallback span{
  width:18px !important;
  height:18px !important;
  display:block !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  background-size:contain !important;
  -webkit-mask:none !important;
  mask:none !important;
  background-color:transparent !important;
}

.stm-tabs-bigmeta,
.stm-tabs-stock,
.stm-tabs-sold{
  display:none;
}

.stm-tabs-empty{
  color:#374151;
  font-weight:600;
}

/* ======================================================
   Desktop refinements
====================================================== */

@media (min-width: 1025px){
  .stm-home-tabs > .container{
    padding: 20px;
  }

  .pane-wrap{
    grid-template-columns: minmax(0, 388px) minmax(0, 1fr);
    padding: 12px 20px 0;
  }

  .stm-tabs-art{
    max-height: 355px;
  }
}

/* ======================================================
   Tabs Woo loop layout (desktop)
====================================================== */

.stm-home-tabs.woocommerce ul.products{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 24px 26px;
}

.stm-home-tabs.woocommerce ul.products > li.product{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* ======================================================
   Mobile + Tablet tabs inline + product swipe
====================================================== */

@media (max-width: 1024px){
  .tabbar{
    flex-wrap:nowrap !important;
    justify-content:center;
    gap: 6px;
  }

  .tabbar button{
    font-size:12px;
    padding:8px 10px;
    height:32px;
    line-height:1;
  }

  .pane-wrap{
    grid-template-columns: 1fr;
    gap:16px;
  }

  .stm-tabs-bigcard{
    width:min(100%, 388px);
    max-width:388px;
    margin-left:auto;
    margin-right:auto;
  }

  .stm-home-tabs .pane-wrap .woocommerce ul.products,
  .stm-home-tabs .pane-wrap ul.products{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: none !important;
    padding: 8px 2px 12px !important;
    margin: 0 !important;
  }

  .stm-home-tabs .pane-wrap .woocommerce ul.products::-webkit-scrollbar,
  .stm-home-tabs .pane-wrap ul.products::-webkit-scrollbar{
    display:none;
  }

  .stm-home-tabs .pane-wrap .woocommerce ul.products,
  .stm-home-tabs .pane-wrap ul.products{
    scrollbar-width:none;
  }

  .stm-home-tabs .pane-wrap .woocommerce ul.products > li.product,
  .stm-home-tabs .pane-wrap ul.products > li.product{
    flex: 0 0 40% !important;
    scroll-snap-align: start;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
  }
}

@media (max-width: 640px){
  .stm-home-tabs{
    padding-left:12px;
    padding-right:12px;
  }

  .tabbar{
    gap: 6px;
  }

  .tabbar button{
    font-size:11px;
    padding:7px 9px;
    height:30px;
    line-height:1;
  }

  .stm-home-tabs .pane-wrap .woocommerce ul.products > li.product,
  .stm-home-tabs .pane-wrap ul.products > li.product{
    flex-basis: 66.666% !important;
  }

  .stm-home-tabs .pane-wrap .woocommerce ul.products,
  .stm-home-tabs .pane-wrap ul.products{
    gap: 12px !important;
  }
}

@media (max-width: 360px){
  .tabbar{
    gap: 5px;
  }

  .tabbar button{
    font-size:10.5px;
    padding:6px 8px;
    height:28px;
  }

  /* Big-card inner layout intentionally stays identical to larger devices. */
}

/* ======================================================
   Big Card Device-Parity Guard
   Keep the spotlight card same visual system on all devices.
====================================================== */
.stm-home-tabs .stm-tabs-bigcard{
  border-radius:18px;
  padding:14px;
  display:flex;
  flex-direction:column;
}

.stm-home-tabs .stm-tabs-art{
  aspect-ratio:1 / 1;
  max-height:355px;
  border:0;
  border-radius:0;
  overflow:hidden;
}

.stm-home-tabs .stm-tabs-art img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  transform:none;
}

.stm-home-tabs .stm-tabs-bigtitle{
  font-size:24px;
  font-weight:550;
  line-height:1.16;
  text-align:left;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.stm-home-tabs .stm-tabs-bigprice{
  color:#111827;
  font-size:29px;
  font-weight:650;
}

.stm-home-tabs .stm-tabs-perks{
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}

.stm-home-tabs .stm-tabs-perk{
  background:#7c3aed;
}

.stm-home-tabs .stm-tabs-cta{
  background:#ff7a00 !important;
  color:#fff !important;
}

.stm-home-tabs .stm-tabs-cta:hover{
  background:#e86d00 !important;
  color:#fff !important;
}

@media (max-width:1024px){
  .stm-home-tabs .stm-tabs-bigcard{
    width:min(100%, 388px);
    max-width:388px;
  }
}


/* ======================================================
   Product Tabs Big Card — v1.0.11 mobile/tablet parity fix
   Purpose: keep the spotlight card professional on desktop, tablet, and mobile without inventing a separate mobile design.
====================================================== */
.stm-home-tabs .pane-wrap{
  grid-template-columns:minmax(0, 388px) minmax(0, 1fr);
}

.stm-home-tabs .stm-tabs-bigcard{
  width:min(100%, 388px);
  max-width:388px;
}

.stm-home-tabs .stm-tabs-badge-top,
.stm-home-tabs .stm-tabs-chip{
  color:#fff !important;
  border:0 !important;
  opacity:1 !important;
}

.stm-home-tabs #pane-featured .stm-tabs-badge-top,
#pane-featured .stm-tabs-badge-top{
  background:#ff7a00 !important;
}

.stm-home-tabs #pane-featured .stm-tabs-chip,
#pane-featured .stm-tabs-chip{
  background:#111827 !important;
}

.stm-home-tabs #pane-onsale2 .stm-tabs-badge-top,
.stm-home-tabs #pane-onsale2 .stm-tabs-chip,
#pane-onsale2 .stm-tabs-badge-top,
#pane-onsale2 .stm-tabs-chip{
  background:#e11d2e !important;
}

.stm-home-tabs #pane-recent .stm-tabs-badge-top,
.stm-home-tabs #pane-recent .stm-tabs-chip,
#pane-recent .stm-tabs-badge-top,
#pane-recent .stm-tabs-chip{
  background:#16a34a !important;
}

.stm-home-tabs .stm-tabs-art{
  max-height:355px !important;
  border:0 !important;
  border-radius:0 !important;
}

.stm-home-tabs .stm-tabs-art img{
  object-fit:contain !important;
  transform:none !important;
}

.stm-home-tabs .stm-tabs-bigtitle{
  font-size:24px !important;
  font-weight:550 !important;
  line-height:1.16 !important;
  text-align:left !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
}

.stm-home-tabs .stm-tabs-bigprice{
  color:#111827 !important;
  font-size:29px !important;
  font-weight:650 !important;
  line-height:1.15 !important;
}

.stm-home-tabs .stm-tabs-pills{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
}

.stm-home-tabs .stm-tabs-pills span{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:24px !important;
  padding:0 10px !important;
  border-radius:999px !important;
  border:1px solid #86efac !important;
  background:#ecfdf5 !important;
  color:#16a34a !important;
  font-size:10px !important;
  line-height:1 !important;
  font-weight:500 !important;
  white-space:nowrap !important;
}

.stm-home-tabs .stm-tabs-perks{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:8px !important;
}

.stm-home-tabs .stm-tabs-perk{
  min-width:0 !important;
  background:#7c3aed !important;
  color:#fff !important;
  border-radius:9px !important;
  padding:5px 4px !important;
  overflow:hidden !important;
}

.stm-home-tabs .stm-tabs-perk strong{
  color:inherit !important;
  font-size:9px !important;
  line-height:1.05 !important;
  font-weight:600 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.stm-home-tabs .stm-tabs-perk small{
  color:rgba(255,255,255,.9) !important;
  font-size:8px !important;
  line-height:1 !important;
  font-weight:400 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.stm-home-tabs .stm-tabs-actionrow{
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) 38px !important;
  align-items:center !important;
  gap:10px !important;
}

.stm-home-tabs .stm-tabs-cta{
  width:100% !important;
  background:#ff7a00 !important;
  color:#fff !important;
}

.stm-home-tabs .stm-tabs-cta:hover,
.stm-home-tabs .stm-tabs-cta:focus-visible{
  background:#e86d00 !important;
  color:#fff !important;
}

@media (min-width:1025px){
  .stm-home-tabs .pane-wrap{
    grid-template-columns:minmax(0, 388px) minmax(0, 1fr) !important;
  }
  .stm-home-tabs .stm-tabs-bigcard{
    width:100% !important;
    max-width:388px !important;
  }
}

@media (max-width:1024px){
  .stm-home-tabs .pane-wrap{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .stm-home-tabs .stm-tabs-bigcard{
    width:min(100%, 388px) !important;
    max-width:388px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}

@media (max-width:640px){
  .stm-home-tabs{
    padding-left:10px !important;
    padding-right:10px !important;
  }
  .stm-home-tabs > .container{
    padding:12px !important;
  }
  .stm-home-tabs .stm-tabs-bigcard{
    padding:12px !important;
  }
  .stm-home-tabs .stm-tabs-art{
    max-height:355px !important;
  }
  .stm-home-tabs .stm-tabs-bigtitle{
    font-size:24px !important;
  }
  .stm-home-tabs .stm-tabs-bigprice{
    font-size:29px !important;
  }
  .stm-home-tabs .stm-tabs-perks{
    gap:6px !important;
  }
  .stm-home-tabs .stm-tabs-perk strong{
    font-size:8.5px !important;
  }
  .stm-home-tabs .stm-tabs-perk small{
    font-size:7.5px !important;
  }
}
