/* HCTC v1.3.3 */

.hctc-grid{display:grid;gap:22px;margin:10px 0 30px}
.hctc-grid.hctc-cols-1{grid-template-columns:1fr}
.hctc-grid.hctc-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.hctc-grid.hctc-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.hctc-grid.hctc-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:980px){.hctc-grid.hctc-cols-3,.hctc-grid.hctc-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.hctc-grid{grid-template-columns:1fr!important}}

.hctc-card{background:#fff;border:1px solid rgba(30,30,30,.1);border-radius:18px;overflow:hidden;box-shadow:0 12px 28px rgba(0,0,0,.08);transition:transform .18s ease,box-shadow .18s ease;display:flex;flex-direction:column;min-height:100%}
.hctc-card:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(0,0,0,.12)}

.hctc-media{display:block;position:relative;aspect-ratio:16/9;background:#f0ede9;overflow:hidden}
.hctc-media .hctc-img{width:100%;height:100%;object-fit:cover;display:block}
.hctc-placeholder-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:rgba(0,0,0,.55);font-weight:800}

.hctc-badge{position:absolute;left:14px;bottom:14px;display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:900;letter-spacing:.02em;text-transform:uppercase;box-shadow:0 10px 20px rgba(0,0,0,.22)}
.hctc-badge--offer{background:var(--hctc-accent,#DB5C29);color:#fff}
.hctc-badge--popular{background:#1f1f1f;color:#fff}

.hctc-body{padding:16px 18px 18px;display:flex;flex-direction:column;flex:1}
.hctc-title{margin:2px 0 8px;font-size:18px;line-height:1.22;font-weight:950}
.hctc-title a{color:inherit;text-decoration:none}
.hctc-title a:hover{color:var(--hctc-accent2,#20639B)}

.hctc-meta{display:flex;flex-wrap:wrap;gap:8px 12px;margin-bottom:10px;font-size:13px;color:rgba(0,0,0,.65)}
.hctc-meta-item{display:inline-flex;align-items:center;gap:6px;background:rgba(0,0,0,.04);border:1px solid rgba(0,0,0,.07);padding:6px 10px;border-radius:999px}
.hctc-desc{font-size:13px;color:rgba(0,0,0,.68);margin-bottom:12px}

.hctc-footer{margin-top:auto;padding-top:12px;border-top:1px solid rgba(0,0,0,.1);display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.hctc-price{display:flex;flex-direction:column;gap:2px}
.hctc-price-label{font-size:11.5px;font-weight:800;color:rgba(0,0,0,.55);text-transform:uppercase;letter-spacing:.02em}
.hctc-price-line{display:flex;align-items:baseline;gap:10px}
.hctc-price-now{font-weight:950;font-size:18px;color:#111}

.hctc-cta{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.hctc-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 14px;border-radius:14px;background:var(--hctc-accent,#DB5C29);color:#fff!important;text-decoration:none!important;font-weight:950;font-size:14px;white-space:nowrap;transition:filter .15s ease;box-shadow:0 10px 20px rgba(219,92,41,.22);border:none;cursor:pointer}
.hctc-btn:hover{filter:brightness(.95)}
.hctc-btn--details{background:rgba(0,0,0,.08);color:#111!important;box-shadow:none}
.hctc-btn--details:hover{filter:none;background:rgba(0,0,0,.12)}

/* Modal */
.hctc-modal{position:fixed;inset:0;display:none;z-index:99999}
.hctc-modal[aria-hidden="false"]{display:block}
.hctc-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.hctc-modal__dialog{position:relative;max-width:860px;width:calc(100% - 28px);margin:6vh auto;background:#fff;border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.3);padding:18px}
.hctc-modal__close{position:absolute;right:14px;top:10px;width:40px;height:40px;border-radius:12px;border:1px solid rgba(0,0,0,.1);background:rgba(0,0,0,.04);font-size:26px;line-height:1;cursor:pointer}
.hctc-modal__title{font-size:18px;font-weight:950;padding-right:54px;margin-bottom:10px}
.hctc-modal__content{max-height:70vh;overflow:auto;padding-top:6px}


/* Special Offer ribbon (top-left) */
.hctc-ribbon{
  position:absolute;
  top:16px;
  left:-10px;
  height:44px;
  display:flex;
  align-items:center;
  color:#fff;
  font-weight:950;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:0 18px 0 22px;
  border-radius:8px 10px 10px 8px;
  box-shadow:0 14px 28px rgba(0,0,0,.22);
  background: linear-gradient(90deg, #c80000 0%, #ff1a1a 55%, #d80000 100%);
}
.hctc-ribbon__text{ font-size:13px; line-height:1; white-space:nowrap; }

/* angled end */
.hctc-ribbon:after{
  content:"";
  position:absolute;
  right:-16px;
  top:0;
  width:0;height:0;
  border-top:22px solid transparent;
  border-bottom:22px solid transparent;
  border-left:16px solid #e00000;
}

/* folded back piece on left */
.hctc-ribbon:before{
  content:"";
  position:absolute;
  left:0;
  top:44px;
  width:0;height:0;
  border-top:10px solid rgba(0,0,0,.28);
  border-left:10px solid transparent;
}


/* Old price (strikethrough) */
.hctc-price-old{
  margin-left:10px;
  font-weight:900;
  font-size:14px;
  color: rgba(0,0,0,.45);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(0,0,0,.35);
}


/* Trust line */
.hctc-trust{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 4px 0 10px;
}
.hctc-trust__item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12.5px;
  font-weight:800;
  color: rgba(0,0,0,.68);
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.07);
}
.hctc-trust__item--danger{
  background: rgba(224,0,0,.08);
  border-color: rgba(224,0,0,.22);
  color: rgba(140,0,0,.92);
}

/* Sizes from settings (fallbacks keep current design) */
.hctc-title{ font-size: var(--hctc-fs-title, 24px); }
.hctc-meta{ font-size: var(--hctc-fs-meta, 13px); }
.hctc-desc{ font-size: var(--hctc-fs-desc, 14px); }
.hctc-price-now{ font-size: var(--hctc-fs-price, 22px); }
.hctc-btn{ font-size: var(--hctc-fs-btn, 16px); }
.hctc-trust__item{ font-size: var(--hctc-fs-trust, 12.5px); }

/* View Details button colors from settings */
.hctc-btn--details{
  background: var(--hctc-details-bg, #E9EEF2);
  color: var(--hctc-details-text, #111);
  border: 1px solid var(--hctc-details-border, rgba(0,0,0,.08));
}
.hctc-btn--details:hover{ filter: brightness(.98); }
