/* =============================================
   WASHTUBE — SITE FEATURES
   Toast · Back-to-Top · Skeleton · Newsletter · Zoom
   ============================================= */

/* ══════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════ */
#wtToastContainer {
  position: fixed;
  bottom: 90px; /* above mobile bottom nav */
  right: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
  width: calc(100vw - 40px);
}

.wt-toast {
  background: #fff;
  border: 1.5px solid var(--gray-border);
  border-left: 4px solid var(--green-cart, #2ea44f);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  pointer-events: all;
  animation: wtToastIn 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.wt-toast.is-leaving {
  animation: wtToastOut 0.25s ease forwards;
}

.wt-toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.wt-toast-msg { flex: 1; line-height: 1.4; }

.wt-toast-close {
  background: none; border: none; cursor: pointer;
  color: #bbb; font-size: 16px; line-height: 1;
  padding: 2px; flex-shrink: 0;
  transition: color .15s;
}
.wt-toast-close:hover { color: #555; }

.wt-toast--error   { border-left-color: #e03535; }
.wt-toast--info    { border-left-color: var(--blue-mid); }
.wt-toast--warning { border-left-color: var(--gold); }

@keyframes wtToastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes wtToastOut {
  from { opacity: 1; transform: translateX(0); max-height: 80px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(30px); max-height: 0; margin-bottom: -10px; }
}

@media (max-width: 768px) {
  #wtToastContainer {
    bottom: 82px;
    left: 14px; right: 14px;
    max-width: none; width: auto;
  }
}

/* ══════════════════════════════════════════
   BACK TO TOP BUTTON
══════════════════════════════════════════ */
#wtBackToTop {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 8000;
  width: 42px; height: 42px;
  background: var(--blue-dark);
  color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(4,77,115,.35);
  opacity: 0;
  transform: translateY(12px) scale(0.85);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
#wtBackToTop.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
#wtBackToTop:hover {
  background: var(--blue-mid);
  transform: translateY(-2px) scale(1.08);
}
#wtBackToTop svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
  #wtBackToTop { bottom: 82px; right: 14px; }
  /* If toast is showing, shift back-to-top up */
  #wtToastContainer ~ #wtBackToTop { display: none; }
}

/* ══════════════════════════════════════════
   LOADING SKELETON
══════════════════════════════════════════ */
@keyframes wtShimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.wt-skeleton-base {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: wtShimmer 1.4s infinite linear;
  border-radius: 6px;
}

/* Cart sidebar skeleton */
.wt-cs-skeleton {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wt-cs-skeleton-item {
  display: flex;
  gap: 12px;
  align-items: center;
}
.wt-cs-sk-img  { width: 60px; height: 60px; border-radius: 10px; flex-shrink: 0; }
.wt-cs-sk-body { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.wt-cs-sk-name { height: 14px; border-radius: 4px; }
.wt-cs-sk-sub  { height: 11px; width: 60%; border-radius: 4px; }
.wt-cs-sk-img,
.wt-cs-sk-name,
.wt-cs-sk-sub {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: wtShimmer 1.4s infinite linear;
}

/* Shop grid skeleton cards */
.wt-shop-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.wt-shop-skeleton-card {
  background: #fff;
  border: 1.5px solid var(--gray-border);
  border-radius: 12px;
  overflow: hidden;
}
.wt-shop-sk-img  { aspect-ratio: 1; }
.wt-shop-sk-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wt-shop-sk-title { height: 14px; border-radius: 4px; }
.wt-shop-sk-sub   { height: 11px; width: 55%; border-radius: 4px; }
.wt-shop-sk-price { height: 18px; width: 40%; border-radius: 4px; margin-top: 4px; }
.wt-shop-sk-img, .wt-shop-sk-title,
.wt-shop-sk-sub, .wt-shop-sk-price {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: wtShimmer 1.4s infinite linear;
}

@media (max-width: 768px) {
  .wt-shop-skeleton-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .wt-shop-skeleton-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   PRODUCT IMAGE ZOOM (single product)
══════════════════════════════════════════ */
.woocommerce-product-gallery__image {
  overflow: hidden !important;
  cursor: zoom-in;
}

.woocommerce-product-gallery__image img {
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  transform-origin: center center;
  will-change: transform;
}

.woocommerce-product-gallery__image:hover img {
  transform: scale(1.25) !important;
}

/* Zoom cursor when zoomed */
.woocommerce-product-gallery--columns-1 .woocommerce-product-gallery__image {
  cursor: crosshair;
}

/* ══════════════════════════════════════════
   NEWSLETTER STRIP
══════════════════════════════════════════ */
.wt-newsletter {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #005a94 60%, var(--blue-light) 100%);
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

.wt-newsletter::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(241,203,83,.15) 0%, transparent 60%);
  pointer-events: none;
}

.wt-newsletter-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative; z-index: 1;
}

.wt-newsletter-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  background: rgba(241,203,83,.25); color: var(--gold);
  border-radius: 20px; padding: 4px 14px; margin-bottom: 12px;
  letter-spacing: .5px; text-transform: uppercase;
}

.wt-newsletter h3 {
  font-size: clamp(20px, 4vw, 28px); font-weight: 800;
  color: #fff; margin: 0 0 8px; line-height: 1.2;
}

.wt-newsletter-sub {
  font-size: 14px; color: rgba(255,255,255,.75); margin: 0 0 24px;
}

.wt-newsletter-form {
  display: flex; gap: 8px; max-width: 520px;
  margin: 0 auto;
}

.wt-newsletter-input {
  flex: 1; min-width: 0;
  padding: 14px 18px;
  border: none; border-radius: 10px;
  font-size: 14px; outline: none;
  color: var(--text-dark); background: #fff;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: box-shadow .2s;
}
.wt-newsletter-input:focus { box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.wt-newsletter-input::placeholder { color: #aaa; }

.wt-newsletter-btn {
  background: var(--gold); color: var(--blue-dark);
  border: none; border-radius: 10px;
  padding: 14px 24px; font-size: 14px; font-weight: 800;
  cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(241,203,83,.4);
}
.wt-newsletter-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(241,203,83,.5); }

.wt-newsletter-msg {
  margin-top: 12px; font-size: 13px; min-height: 20px;
  font-weight: 600;
}
.wt-newsletter-msg.ok  { color: #a8f5c9; }
.wt-newsletter-msg.err { color: #fca5a5; }

.wt-newsletter-trust {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 14px;
  font-size: 11px; color: rgba(255,255,255,.55);
}
.wt-newsletter-trust svg { width: 12px; height: 12px; }

@media (max-width: 600px) {
  .wt-newsletter { padding: 36px 16px; }
  .wt-newsletter-form { flex-direction: column; }
  .wt-newsletter-btn { width: 100%; }
}
