/* ================================================================
   Thrifty UK Deals — Single Product Page Widget CSS
   single-product.css  (v4.0.0)
   ================================================================ */

/* ---- CSS Variables ---- */
.sp-wrap {
  --sp-or:  #F97316;
  --sp-am:  #FBBF24;
  --sp-dk:  #1C1001;
  --sp-bg:  #FFF7ED;
  --sp-sur: #ffffff;
  --sp-bdr: #F0E4D0;
  --sp-txt: #1C1001;
  --sp-muted: #8A6A50;
  --sp-light: #FFF0E0;
  --sp-green: #15803D;
  --sp-red:   #DC2626;

  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--sp-txt);
  background: var(--sp-bg);
  padding: 0 0 80px;
}

/* ================================================================
   BREADCRUMB
   ================================================================ */
.sp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0 20px;
  font-size: 13px;
}
.sp-breadcrumb a {
  color: var(--sp-muted);
  text-decoration: none;
  transition: color .15s;
}
.sp-breadcrumb a:hover { color: var(--sp-or); }
.sp-bc-sep  { color: #C0A070; font-size: 12px; }
.sp-bc-current { color: var(--sp-dk); font-weight: 500; }

/* ================================================================
   MAIN LAYOUT  (2-col: image | info)
   ================================================================ */
.sp-layout {
  display: grid;
  grid-template-columns: minmax(300px, 480px) 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

/* ================================================================
   IMAGE COLUMN
   ================================================================ */
.sp-img-card {
  background: var(--sp-sur);
  border: 1px solid var(--sp-bdr);
  border-radius: 20px;
  overflow: hidden;
  position: sticky;
  top: 24px;
}

.sp-img-main {
  position: relative;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 340px;
  overflow: hidden;
}

.sp-product-img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform .4s ease;
  cursor: zoom-in;
}
.sp-product-img:hover { transform: scale(1.05); }

.sp-discount-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--sp-or);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  letter-spacing: -.3px;
  box-shadow: 0 4px 12px rgba(249,115,22,.35);
  z-index: 2;
}

.sp-zoom-btn {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--sp-bdr);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  z-index: 2;
}
.sp-zoom-btn:hover {
  background: var(--sp-or);
  border-color: var(--sp-or);
}

.sp-img-placeholder {
  font-size: 64px;
  opacity: .4;
}

/* Trust badges under image */
.sp-trust-row {
  display: flex;
  flex-wrap: wrap;
  padding: 14px 16px;
  gap: 8px;
  border-top: 1px solid var(--sp-bdr);
  background: var(--sp-light);
}
.sp-trust-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-muted);
  background: var(--sp-sur);
  border: 1px solid var(--sp-bdr);
  border-radius: 8px;
  padding: 5px 10px;
  flex: 1;
  min-width: 100px;
  justify-content: center;
  text-align: center;
}

/* ================================================================
   INFO COLUMN
   ================================================================ */
.sp-col-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Category pill */
.sp-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--sp-light);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-or);
  text-decoration: none;
  transition: all .15s;
  width: fit-content;
}
.sp-cat-pill:hover {
  background: var(--sp-or);
  color: #fff;
}

/* Title */
.sp-title {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--sp-dk);
  line-height: 1.25;
  letter-spacing: -.4px;
  margin: 0;
}

/* Star rating */
.sp-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-stars { display: flex; gap: 2px; }
.sp-star { font-size: 18px; line-height: 1; }
.sp-star-full  { color: var(--sp-am); }
.sp-star-half  { color: var(--sp-am); opacity: .7; }
.sp-star-empty { color: #D1B896; }
.sp-rating-num { font-size: 15px; font-weight: 700; color: var(--sp-dk); }
.sp-review-cnt { font-size: 13px; color: var(--sp-muted); }

/* Price block */
.sp-price-block {
  background: var(--sp-light);
  border: 2px solid rgba(249,115,22,.2);
  border-radius: 16px;
  padding: 20px 22px;
}

.sp-price-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.sp-price-now {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-size: 38px;
  font-weight: 900;
  color: var(--sp-dk);
  letter-spacing: -1px;
  line-height: 1;
}
.sp-price-now .woocommerce-Price-currencySymbol { font-size: 24px; }

.sp-price-was {
  font-size: 20px;
  color: #B09070;
  text-decoration: line-through;
}

.sp-saving-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #065F46;
}
.sp-saving-pct {
  font-size: 13px;
  font-weight: 600;
  opacity: .8;
}

/* Countdown Timer */
.sp-timer {
  background: var(--sp-dk);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sp-timer-label {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  font-weight: 500;
  white-space: nowrap;
}

.sp-timer-units {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 58px;
}

.sp-timer-num {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--sp-am);
  line-height: 1;
  letter-spacing: -.5px;
}

.sp-timer-sub {
  font-size: 10px;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}

.sp-timer-colon {
  font-size: 22px;
  font-weight: 800;
  color: var(--sp-or);
  margin-bottom: 14px;
}

/* Key Features */
.sp-features { }

.sp-section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sp-muted);
  margin: 0 0 12px;
}

.sp-feature-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--sp-sur);
  border: 1px solid var(--sp-bdr);
  border-radius: 10px;
  font-size: 14px;
  color: var(--sp-dk);
  transition: border-color .15s, background .15s;
}
.sp-feature-list li:hover {
  border-color: rgba(249,115,22,.3);
  background: var(--sp-light);
}
.sp-feat-ico { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* CTA Block */
.sp-cta-block {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sp-cta-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--sp-or), #EA6B00);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 6px 20px rgba(249,115,22,.35);
  min-width: 200px;
}
.sp-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(249,115,22,.45);
  color: #fff;
}

.sp-cta-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  background: var(--sp-sur);
  color: var(--sp-muted);
  border: 1.5px solid var(--sp-bdr);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.sp-cta-secondary:hover {
  border-color: var(--sp-or);
  color: var(--sp-or);
  background: var(--sp-light);
}

.sp-cta-note {
  font-size: 12px;
  color: var(--sp-muted);
  margin: 0;
  line-height: 1.5;
  padding: 0 4px;
}

/* Share bar */
.sp-share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--sp-sur);
  border: 1px solid var(--sp-bdr);
  border-radius: 12px;
  position: relative;
}
.sp-share-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
  white-space: nowrap;
}
.sp-share-btns {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.sp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid var(--sp-bdr);
  background: var(--sp-sur);
  color: var(--sp-muted);
  transition: all .15s;
}
.sp-share-btn svg { flex-shrink: 0; }
.sp-share-btn:hover { transform: translateY(-1px); }
.sp-share-copy:hover { border-color: var(--sp-or); color: var(--sp-or); background: var(--sp-light); }
.sp-share-fb:hover   { background: #1877F2; border-color: #1877F2; color: #fff; }
.sp-share-wa:hover   { background: #25D366; border-color: #25D366; color: #fff; }
.sp-share-tw:hover   { background: #000; border-color: #000; color: #fff; }

.sp-copy-toast {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--sp-dk);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 10;
}
.sp-copy-toast.sp-toast-show { opacity: 1; }

/* ================================================================
   BELOW-FOLD: TABS + DESCRIPTION + DETAILS
   ================================================================ */
.sp-below {
  background: var(--sp-sur);
  border: 1px solid var(--sp-bdr);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
}

.sp-tabs {
  display: flex;
  border-bottom: 2px solid var(--sp-bdr);
  background: var(--sp-light);
  padding: 0 4px;
  gap: 0;
}

.sp-tab {
  padding: 16px 24px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
}
.sp-tab:hover { color: var(--sp-or); }
.sp-tab.sp-tab-active {
  color: var(--sp-or);
  border-bottom-color: var(--sp-or);
  background: var(--sp-sur);
}

.sp-tab-panel { padding: 28px 32px; }

.sp-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--sp-txt);
  max-width: 800px;
}
.sp-description p  { margin: 0 0 14px; }
.sp-description p:last-child { margin-bottom: 0; }
.sp-description ul { padding-left: 20px; margin: 0 0 14px; }
.sp-description li { margin-bottom: 6px; }

/* Details table */
.sp-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.sp-details-table tr {
  border-bottom: 1px solid var(--sp-bdr);
}
.sp-details-table tr:last-child { border-bottom: none; }
.sp-details-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--sp-muted);
  background: var(--sp-light);
  width: 38%;
  vertical-align: top;
}
.sp-details-table td {
  padding: 12px 16px;
  color: var(--sp-dk);
  vertical-align: top;
}
.sp-details-table tr:hover th,
.sp-details-table tr:hover td { background: #FFF3E5; }

/* ================================================================
   RELATED DEALS
   ================================================================ */
.sp-related {
  margin-bottom: 40px;
}

.sp-related-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sp-related-heading {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--sp-dk);
  margin: 0;
  letter-spacing: -.3px;
}

.sp-related-all {
  font-size: 13px;
  color: var(--sp-or);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.sp-related-all:hover { text-decoration: underline; }

.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.sp-rel-card {
  background: var(--sp-sur);
  border: 1px solid var(--sp-bdr);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.sp-rel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(249,115,22,.13);
}

.sp-rel-img-link {
  display: block;
  position: relative;
  background: var(--sp-bg);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}
.sp-rel-img-link img {
  max-width: 100%;
  max-height: 116px;
  object-fit: contain;
  transition: transform .3s;
}
.sp-rel-card:hover .sp-rel-img-link img { transform: scale(1.05); }

.sp-rel-img-placeholder { font-size: 38px; opacity: .5; }

.sp-rel-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--sp-or);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
}
.sp-rel-hot {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 16px;
}

.sp-rel-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.sp-rel-cat  { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--sp-or); font-weight: 700; }
.sp-rel-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--sp-dk);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.sp-rel-name:hover { color: var(--sp-or); }
.sp-rel-prices { display: flex; align-items: baseline; gap: 6px; }
.sp-rel-now    { font-family: 'Syne','DM Sans',sans-serif; font-size: 18px; font-weight: 800; color: var(--sp-dk); }
.sp-rel-was    { font-size: 12px; color: #B09070; text-decoration: line-through; }
.sp-rel-save   { font-size: 11px; color: var(--sp-green); font-weight: 700; }
.sp-rel-cta {
  display: block;
  margin-top: 8px;
  padding: 8px;
  background: var(--sp-am);
  color: var(--sp-dk);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background .15s;
}
.sp-rel-cta:hover { background: #F59E0B; }

.sp-no-related {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--sp-muted);
  font-size: 14px;
}
.sp-no-related a { color: var(--sp-or); }

/* ================================================================
   LIGHTBOX
   ================================================================ */
.sp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  animation: sp-fadein .2s ease;
}
@keyframes sp-fadein { from { opacity: 0; } to { opacity: 1; } }

.sp-lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.sp-lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.sp-lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ================================================================
   STICKY MOBILE CTA
   ================================================================ */
.sp-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--sp-dk);
  border-top: 2px solid var(--sp-or);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}

.sp-sticky-price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-sticky-now {
  font-family: 'Syne','DM Sans',sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.sp-sticky-badge {
  background: var(--sp-or);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.sp-sticky-btn {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--sp-or), #EA6B00);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(249,115,22,.35);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media ( max-width: 900px ) {
  .sp-layout { grid-template-columns: 1fr; gap: 24px; }
  .sp-img-card { position: static; }
  .sp-sticky-cta { display: flex; }
  .sp-wrap { padding-bottom: 90px; }
}

@media ( max-width: 640px ) {
  .sp-price-now { font-size: 30px; }
  .sp-title { font-size: 20px; }
  .sp-cta-block { flex-direction: column; }
  .sp-cta-primary, .sp-cta-secondary { width: 100%; }
  .sp-tab { padding: 13px 16px; font-size: 13px; }
  .sp-tab-panel { padding: 20px 18px; }
  .sp-timer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sp-related-grid { grid-template-columns: repeat(2, 1fr); }
  .sp-trust-row { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; -ms-overflow-style: none; scrollbar-width: none; }
  .sp-trust-row::-webkit-scrollbar { display: none; }
}

@media ( max-width: 400px ) {
  .sp-related-grid { grid-template-columns: 1fr; }
  .sp-timer-unit { padding: 6px 10px; min-width: 48px; }
  .sp-timer-num  { font-size: 20px; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .sp-sticky-cta, .sp-zoom-btn, .sp-share-bar, .sp-timer { display: none !important; }
  .sp-layout { grid-template-columns: 1fr 1fr; }
}
