/* HTW shared base — scoped under .htw so the native Flatsome shell is untouched. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.htw {
  --htw-ink: #000;
  --htw-muted: #757575;
  --htw-line: #d9d9d9;
  --htw-soft: #f4f4f4;
  --htw-cream: #f5eee3;
  --htw-brown: #622714;
  --htw-pad: 20px;
  --htw-gap: 10px;
  position: relative;
  background: #fff;
  color: var(--htw-ink);
  font-family: "IBM Plex Sans", Lato, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.357;
  letter-spacing: -0.02em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.htw *,
.htw *::before,
.htw *::after {
  box-sizing: border-box;
}

.htw p,
.htw h1,
.htw h2,
.htw h3,
.htw h4,
.htw figure,
.htw ul,
.htw ol,
.htw li {
  margin: 0;
  padding: 0;
}

.htw ul,
.htw ol {
  list-style: none;
}

/* Flatsome indents `ul li` globally; module carousels must start flush left. */
.htw.htw ul li,
.htw.htw ol li,
.htw.htw .htw-carousel__track > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.htw a {
  color: inherit;
  text-decoration: none;
}

.htw img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

.htw button {
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  min-height: 0;
  -webkit-appearance: none;
  appearance: none;
}

.htw :focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.htw .htw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 53px;
  padding: 16px 32px;
  border: 1px solid var(--htw-brown);
  background: #fff;
  color: var(--htw-brown);
  font-size: 14px;
  line-height: 19px;
  letter-spacing: -0.02em;
  transition: background-color 0.3s ease-out, color 0.3s ease-out, border-color 0.3s ease-out;
}

.htw .htw-btn:hover {
  background: var(--htw-brown);
  color: #fff;
}

/* ---------- product cards (real Woo data only) ---------- */
.htw .htw-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.htw .htw-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--htw-soft);
  aspect-ratio: 3 / 4;
}

.htw .htw-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.htw .htw-card:hover .htw-card__media img {
  transform: scale(1.025);
}

.htw .htw-card__badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 5px 8px 4px;
  background: #c8102e;
  color: #fff;
  border-radius: 2px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.htw .htw-card__quick {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #fff;
  color: #000;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.htw .htw-card__quick:hover {
  background: #000;
  color: #fff;
}

.htw .htw-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
}

.htw .htw-card__title {
  font-family: inherit;
  font-size: 14px;
  line-height: 19px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--htw-ink);
}

.htw .htw-card__title a {
  display: block;
}

.htw .htw-card__price {
  font-size: 14px;
  line-height: 1.45;
  color: var(--htw-ink);
  white-space: normal;
  overflow: visible;
  max-width: none;
  word-break: normal;
}

.htw .htw-card__price del {
  color: #6b6b6b;
  text-decoration: line-through;
  margin-right: 6px;
  font-size: 13px;
  font-weight: 400;
}

.htw .htw-card__price ins {
  text-decoration: none;
  font-weight: 700;
  color: #c8102e;
  font-size: 14px;
}

.htw .htw-card__price .woocommerce-Price-amount {
  white-space: nowrap;
  font-size: inherit;
}

.htw .htw-card__price .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 849px) {
  .htw .htw-card__quick { display: none !important; }
}

.htw .htw-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--htw-muted);
  font-size: 12px;
  line-height: 12px;
}

.htw .htw-card__stars {
  display: inline-flex;
  gap: 1px;
  color: #000;
}

.htw .htw-card__stars svg {
  display: block;
}

/* ---------- generic carousel ---------- */
.htw .htw-carousel {
  position: relative;
  min-width: 0;
}

.htw .htw-carousel__track {
  display: flex;
  gap: var(--htw-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
}

.htw .htw-carousel__track::-webkit-scrollbar {
  display: none;
}

.htw .htw-carousel__track > li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.htw .htw-carousel__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.htw .htw-carousel__track.is-dragging a {
  pointer-events: none;
}

.htw .htw-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--htw-ink);
  transition: opacity 0.2s ease;
}

.htw .htw-nav-btn[disabled] {
  opacity: 0.25;
  cursor: default;
}

.htw .htw-arrow-icon {
  display: block;
}

/* ---------- utility ---------- */
.htw .htw-empty {
  padding: 28px var(--htw-pad);
  color: var(--htw-muted);
  font-size: 14px;
}

.htw .htw-note {
  padding: 10px var(--htw-pad) 0;
  color: var(--htw-muted);
  font-size: 12px;
}

.htw .htw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 849px) {
  .htw {
    --htw-pad: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .htw .htw-carousel__track {
    scroll-behavior: auto;
  }
  .htw .htw-card__media img,
  .htw .htw-btn {
    transition: none;
  }
}
