/*
Theme Name: Tholth Mall Pro Ultimate
Theme URI: https://tholth.com/mall
Author: Manus AI / Tholth
Author URI: https://tholth.com
Description: Ultimate premium mall experience — overlay-only access, 360° viewer, 3D animations, 5 skins, WooCommerce full pipeline, Taager shipping, YITH Wishlist, Visa payments, user accounts.
Version: 6.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
WC requires at least: 7.0
WC tested up to: 10.3
License: GNU General Public License v2 or later
Text Domain: tholth-mall-pro
Tags: e-commerce, overlay, 360-viewer, skinnable, woocommerce, taager, wishlist
*/

/* ═══════════════════════════════════════════════
   SKIN VARIABLES  — all theming lives here
   Overridden per body.skin-* class
   ═══════════════════════════════════════════════ */

:root, body.skin-default {
  --tm-primary:      #080a10;
  --tm-accent:       #e8c97a;
  --tm-accent-2:     #c45f3c;
  --tm-accent-rgb:   232,201,122;
  --tm-surface:      #10131c;
  --tm-surface-2:    #181c28;
  --tm-surface-3:    #21273d;
  --tm-border:       rgba(255,255,255,0.07);
  --tm-border-2:     rgba(255,255,255,0.12);
  --tm-text:         #f0eee8;
  --tm-text-2:       #b8b4aa;
  --tm-text-muted:   #6e6b64;
  --tm-text-inv:     #080a10;
  --tm-overlay-bg:   rgba(6,7,12,0.97);
  --tm-card-bg:      #13161f;
  --tm-card-hover:   #1a1e2c;
  --tm-success:      #2ec864;
  --tm-error:        #e8453c;
  --tm-warning:      #fbb040;
  --tm-shadow:       0 12px 48px rgba(0,0,0,0.7);
  --tm-shadow-sm:    0 4px 16px rgba(0,0,0,0.4);
  --tm-glow:         0 0 32px rgba(232,201,122,0.22);
  --tm-radius:       16px;
  --tm-radius-sm:    8px;
  --tm-radius-xs:    4px;
  --tm-radius-pill:  999px;
  --tm-font-display: 'Cormorant Garamond', Georgia, serif;
  --tm-font-body:    'DM Sans', system-ui, sans-serif;
  --tm-font-mono:    'JetBrains Mono', monospace;
  --tm-speed-fast:   0.15s;
  --tm-speed-mid:    0.32s;
  --tm-speed-slow:   0.6s;
  --tm-ease:         cubic-bezier(0.4,0,0.2,1);
  --tm-ease-bounce:  cubic-bezier(0.34,1.56,0.64,1);
  --tm-ease-out:     cubic-bezier(0,0,0.2,1);
}

body.skin-ivory {
  --tm-primary:      #f7f3ec;
  --tm-accent:       #a67c1a;
  --tm-accent-2:     #7c4e2d;
  --tm-accent-rgb:   166,124,26;
  --tm-surface:      #fffdf8;
  --tm-surface-2:    #f2ece0;
  --tm-surface-3:    #e8dfd0;
  --tm-border:       rgba(0,0,0,0.08);
  --tm-border-2:     rgba(0,0,0,0.14);
  --tm-text:         #1a1208;
  --tm-text-2:       #4a3d2a;
  --tm-text-muted:   #8a7a66;
  --tm-text-inv:     #fffdf8;
  --tm-overlay-bg:   rgba(247,243,236,0.97);
  --tm-card-bg:      #fff;
  --tm-card-hover:   #fffef9;
  --tm-shadow:       0 12px 48px rgba(0,0,0,0.1);
  --tm-shadow-sm:    0 4px 16px rgba(0,0,0,0.06);
  --tm-glow:         0 0 32px rgba(166,124,26,0.15);
}

body.skin-azure {
  --tm-primary:      #020b1a;
  --tm-accent:       #4fc3f7;
  --tm-accent-2:     #7c4dff;
  --tm-accent-rgb:   79,195,247;
  --tm-surface:      #041020;
  --tm-surface-2:    #071835;
  --tm-surface-3:    #0c224a;
  --tm-border:       rgba(79,195,247,0.1);
  --tm-border-2:     rgba(79,195,247,0.2);
  --tm-text:         #e4f3fd;
  --tm-text-2:       #8ab8d6;
  --tm-text-muted:   #4a7a9a;
  --tm-text-inv:     #020b1a;
  --tm-overlay-bg:   rgba(2,11,26,0.97);
  --tm-card-bg:      #060f24;
  --tm-card-hover:   #0c1a38;
  --tm-glow:         0 0 40px rgba(79,195,247,0.2);
}

body.skin-rose {
  --tm-primary:      #140610;
  --tm-accent:       #f48fb1;
  --tm-accent-2:     #e91e63;
  --tm-accent-rgb:   244,143,177;
  --tm-surface:      #1c0c18;
  --tm-surface-2:    #261220;
  --tm-surface-3:    #321828;
  --tm-border:       rgba(244,143,177,0.1);
  --tm-border-2:     rgba(244,143,177,0.2);
  --tm-text:         #fce4ec;
  --tm-text-2:       #c4849a;
  --tm-text-muted:   #8a5870;
  --tm-text-inv:     #140610;
  --tm-overlay-bg:   rgba(20,6,16,0.97);
  --tm-card-bg:      #1a0a16;
  --tm-card-hover:   #261020;
  --tm-glow:         0 0 32px rgba(244,143,177,0.22);
}

body.skin-forest {
  --tm-primary:      #020e07;
  --tm-accent:       #69f0ae;
  --tm-accent-2:     #ff8a65;
  --tm-accent-rgb:   105,240,174;
  --tm-surface:      #041208;
  --tm-surface-2:    #071a0e;
  --tm-surface-3:    #0c2416;
  --tm-border:       rgba(105,240,174,0.1);
  --tm-border-2:     rgba(105,240,174,0.18);
  --tm-text:         #e4f5e9;
  --tm-text-2:       #84b894;
  --tm-text-muted:   #4a7a5a;
  --tm-text-inv:     #020e07;
  --tm-overlay-bg:   rgba(2,14,7,0.97);
  --tm-card-bg:      #06120a;
  --tm-card-hover:   #0c1c12;
  --tm-glow:         0 0 32px rgba(105,240,174,0.2);
}

/* ═══════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--tm-primary);
  color: var(--tm-text);
  font-family: var(--tm-font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--tm-speed-mid) var(--tm-ease), color var(--tm-speed-mid) var(--tm-ease);
}

img { display: block; max-width: 100%; }
a   { color: var(--tm-accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ═══════════════════════════════════════════════
   AMBIENT BACKDROP
   ═══════════════════════════════════════════════ */

#tm-backdrop {
  position: fixed; inset: 0; z-index: 0;
  background: var(--tm-primary);
  overflow: hidden;
  pointer-events: none;
}
#tm-backdrop::before {
  content: '';
  position: absolute; inset: -40%;
  background:
    radial-gradient(ellipse 55% 45% at 25% 35%, rgba(var(--tm-accent-rgb), 0.055) 0%, transparent 70%),
    radial-gradient(ellipse 45% 55% at 75% 70%, rgba(var(--tm-accent-rgb), 0.03) 0%, transparent 65%);
  animation: backdropDrift 22s ease-in-out infinite alternate;
}
@keyframes backdropDrift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(2%, 1.5%) scale(1.04); }
}

/* ═══════════════════════════════════════════════
   LOADER
   ═══════════════════════════════════════════════ */

#tm-loader {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: var(--tm-primary);
  transition: opacity var(--tm-speed-slow) var(--tm-ease), visibility var(--tm-speed-slow);
}
#tm-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.tm-loader-logo { font-family: var(--tm-font-display); font-size: 2.4rem; font-weight: 700; color: var(--tm-text); }
.tm-loader-logo span { color: var(--tm-accent); }

.tm-loader-bar { width: 180px; height: 2px; background: var(--tm-surface-3); border-radius: 1px; overflow: hidden; }
.tm-loader-bar-fill { height: 100%; background: var(--tm-accent); border-radius: 1px; animation: loaderFill 1.8s var(--tm-ease) forwards; }
@keyframes loaderFill { from { width: 0; } to { width: 100%; } }

.tm-loader-status { font-size: 0.75rem; color: var(--tm-text-muted); letter-spacing: 0.06em; }

/* ═══════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════ */

#tm-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(180deg, var(--tm-overlay-bg) 0%, transparent 100%);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--tm-border);
}

.tm-logo { font-family: var(--tm-font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.04em; color: var(--tm-text); }
.tm-logo span { color: var(--tm-accent); }

.tm-topbar-right { display: flex; align-items: center; gap: 10px; }

/* Skin pills */
.tm-skin-switcher { display: flex; gap: 5px; background: var(--tm-surface-2); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-pill); padding: 4px; }
.tm-skin-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; transition: border-color var(--tm-speed-fast), transform var(--tm-speed-fast); }
.tm-skin-dot.active, .tm-skin-dot:hover { transform: scale(1.2); border-color: var(--tm-text); }
.tm-skin-dot[data-skin="default"] { background: conic-gradient(#e8c97a 0deg 180deg, #0d0d0d 180deg); }
.tm-skin-dot[data-skin="ivory"]   { background: conic-gradient(#a67c1a 0deg 180deg, #f7f3ec 180deg); }
.tm-skin-dot[data-skin="azure"]   { background: conic-gradient(#4fc3f7 0deg 180deg, #020b1a 180deg); }
.tm-skin-dot[data-skin="rose"]    { background: conic-gradient(#f48fb1 0deg 180deg, #140610 180deg); }
.tm-skin-dot[data-skin="forest"]  { background: conic-gradient(#69f0ae 0deg 180deg, #020e07 180deg); }

/* Icon buttons */
.tm-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tm-surface-2); border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm); color: var(--tm-text); font-size: 1.05rem;
  transition: background var(--tm-speed-fast), transform var(--tm-speed-fast), box-shadow var(--tm-speed-fast);
}
.tm-icon-btn:hover { background: var(--tm-surface-3); transform: translateY(-2px); box-shadow: var(--tm-shadow-sm); }

.tm-badge-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--tm-accent); color: var(--tm-text-inv);
  font-size: 0.62rem; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: var(--tm-radius-pill); display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ═══════════════════════════════════════════════
   OVERLAY BOARD — Product Grid
   ═══════════════════════════════════════════════ */

#tm-board {
  position: fixed; inset: 0; z-index: 10;
  padding: 72px 24px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--tm-surface-3) transparent;
}
#tm-board::-webkit-scrollbar { width: 5px; }
#tm-board::-webkit-scrollbar-thumb { background: var(--tm-surface-3); border-radius: 3px; }

/* Filter bar */
#tm-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; animation: slideDown var(--tm-speed-slow) var(--tm-ease-out) both; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

.tm-filter-btn {
  padding: 7px 16px; border-radius: var(--tm-radius-pill);
  border: 1px solid var(--tm-border); background: var(--tm-surface-2);
  color: var(--tm-text-muted); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.03em;
  transition: all var(--tm-speed-fast) var(--tm-ease);
}
.tm-filter-btn:hover, .tm-filter-btn.active {
  background: var(--tm-accent); color: var(--tm-text-inv); border-color: var(--tm-accent);
  transform: translateY(-2px); box-shadow: var(--tm-glow);
}

/* Search bar */
#tm-search-row { display: flex; gap: 10px; margin-bottom: 20px; }
#tm-search-input {
  flex: 1; padding: 10px 16px;
  background: var(--tm-surface-2); border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm); color: var(--tm-text); font-size: 0.88rem;
  transition: border-color var(--tm-speed-fast), box-shadow var(--tm-speed-fast);
  outline: none;
}
#tm-search-input::placeholder { color: var(--tm-text-muted); }
#tm-search-input:focus { border-color: var(--tm-accent); box-shadow: 0 0 0 3px rgba(var(--tm-accent-rgb), 0.15); }

/* Grid */
#tm-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }

/* Product card */
.tm-card {
  background: var(--tm-card-bg); border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius); overflow: hidden; cursor: pointer;
  position: relative;
  opacity: 0; animation: cardIn var(--tm-speed-slow) var(--tm-ease-out) forwards;
  transition: border-color var(--tm-speed-mid), background var(--tm-speed-mid);
  will-change: transform;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(28px) scale(0.97); } to { opacity: 1; transform: none; } }

.tm-card:hover { border-color: rgba(var(--tm-accent-rgb), 0.35); background: var(--tm-card-hover); }

.tm-card-badge-row { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.tm-badge {
  padding: 3px 9px; border-radius: var(--tm-radius-pill);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
}
.tm-badge-sale   { background: #2a7cff; color: #fff; }
.tm-badge-new    { background: var(--tm-accent); color: var(--tm-text-inv); }
.tm-badge-hot    { background: #e8453c; color: #fff; }
.tm-badge-360    { background: rgba(255,255,255,0.1); color: var(--tm-text); border: 1px solid var(--tm-border-2); backdrop-filter: blur(8px); }

/* Wishlist star on card */
.tm-card-wish {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); border-radius: 50%; backdrop-filter: blur(6px);
  font-size: 0.9rem; color: var(--tm-text); transition: all var(--tm-speed-fast);
  border: 1px solid var(--tm-border);
}
.tm-card-wish:hover, .tm-card-wish.wished { color: #e8453c; background: rgba(232,69,60,0.15); border-color: rgba(232,69,60,0.3); }
.tm-card-wish.wished { animation: heartPop 0.3s var(--tm-ease-bounce); }
@keyframes heartPop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.4); } }

/* Image */
.tm-card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--tm-surface-2); }
.tm-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--tm-speed-slow) var(--tm-ease); }
.tm-card:hover .tm-card-img img { transform: scale(1.07); }
.tm-360-spin-hint {
  position: absolute; bottom: 8px; right: 8px; width: 34px; height: 34px;
  background: rgba(0,0,0,0.5); border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--tm-text);
  backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--tm-speed-fast);
  animation: spin360 3s linear infinite;
}
.tm-card:hover .tm-360-spin-hint { opacity: 1; }
@keyframes spin360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Card body */
.tm-card-body { padding: 14px 16px 16px; }
.tm-card-cat  { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--tm-accent); font-weight: 600; margin-bottom: 5px; }
.tm-card-name { font-family: var(--tm-font-display); font-size: 1.12rem; font-weight: 600; color: var(--tm-text); line-height: 1.25; margin-bottom: 10px; }

.tm-card-swatches { display: flex; gap: 5px; margin-bottom: 12px; }
.tm-swatch { width: 14px; height: 14px; border-radius: 50%; border: 2px solid transparent; transition: transform var(--tm-speed-fast), border-color var(--tm-speed-fast); cursor: pointer; }
.tm-swatch:hover, .tm-swatch.active { transform: scale(1.25); border-color: var(--tm-text); }

.tm-card-foot { display: flex; align-items: center; justify-content: space-between; }
.tm-card-price { font-size: 1.05rem; font-weight: 700; color: var(--tm-text); }
.tm-card-price .old { font-size: 0.78rem; color: var(--tm-text-muted); text-decoration: line-through; margin-left: 5px; font-weight: 400; }
.tm-qv-btn {
  padding: 5px 12px; border-radius: var(--tm-radius-pill);
  background: var(--tm-surface-3); border: 1px solid var(--tm-border);
  color: var(--tm-text); font-size: 0.73rem; font-weight: 500;
  transition: all var(--tm-speed-fast);
}
.tm-qv-btn:hover { background: var(--tm-accent); color: var(--tm-text-inv); border-color: var(--tm-accent); transform: translateY(-2px); box-shadow: var(--tm-glow); }

/* ═══════════════════════════════════════════════
   SHARED PANEL BASE (overlay, account, cart, checkout)
   ═══════════════════════════════════════════════ */

.tm-panel-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--tm-speed-mid) var(--tm-ease), visibility var(--tm-speed-mid);
}
.tm-panel-overlay.open { opacity: 1; visibility: visible; }

.tm-panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  cursor: pointer;
}

.tm-panel {
  position: relative; z-index: 1;
  background: var(--tm-surface); border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius); box-shadow: var(--tm-shadow);
  max-height: 92vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--tm-surface-3) transparent;
  transform: translateY(24px) scale(0.98);
  transition: transform var(--tm-speed-mid) var(--tm-ease-bounce);
}
.tm-panel::-webkit-scrollbar { width: 5px; }
.tm-panel::-webkit-scrollbar-thumb { background: var(--tm-surface-3); border-radius: 3px; }
.tm-panel-overlay.open .tm-panel { transform: none; }

.tm-panel-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--tm-surface-2); border: 1px solid var(--tm-border);
  border-radius: 50%; color: var(--tm-text); font-size: 1rem;
  transition: background var(--tm-speed-fast), transform var(--tm-speed-fast);
}
.tm-panel-close:hover { background: var(--tm-error); transform: rotate(90deg); }

/* ═══════════════════════════════════════════════
   PRODUCT DETAIL PANEL
   ═══════════════════════════════════════════════ */

#tm-product-panel .tm-panel {
  width: 100%; max-width: 960px;
  display: grid; grid-template-columns: 1fr 1fr;
}
@media (max-width: 680px) { #tm-product-panel .tm-panel { grid-template-columns: 1fr; } }

/* Viewer pane */
.tm-viewer-pane {
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
  background: var(--tm-surface-2); border-right: 1px solid var(--tm-border);
}

#tm-360-canvas {
  position: relative; aspect-ratio: 1; border-radius: var(--tm-radius-sm);
  overflow: hidden; background: var(--tm-surface-3);
  cursor: grab; user-select: none;
  transition: transform var(--tm-speed-fast);
}
#tm-360-canvas:active { cursor: grabbing; }
#tm-360-canvas.zoomed { transform: scale(1.6); transform-origin: center; z-index: 5; }
#tm-360-canvas img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.07s; }

.tm-viewer-ctrl-row { display: flex; align-items: center; gap: 8px; }
.tm-vctrl {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--tm-surface-3); border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-xs); color: var(--tm-text); font-size: 0.9rem;
  transition: background var(--tm-speed-fast), transform var(--tm-speed-fast);
}
.tm-vctrl:hover, .tm-vctrl.on { background: var(--tm-accent); color: var(--tm-text-inv); }

.tm-viewer-progress { flex: 1; height: 3px; background: var(--tm-surface-3); border-radius: 2px; overflow: hidden; }
.tm-viewer-fill { height: 100%; background: var(--tm-accent); border-radius: 2px; transition: width 0.08s linear; }

.tm-thumb-strip { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.tm-thumb-strip::-webkit-scrollbar { display: none; }
.tm-thumb { flex-shrink: 0; width: 50px; height: 50px; border-radius: var(--tm-radius-xs); border: 2px solid var(--tm-border); overflow: hidden; cursor: pointer; transition: border-color var(--tm-speed-fast), transform var(--tm-speed-fast); }
.tm-thumb:hover, .tm-thumb.active { border-color: var(--tm-accent); transform: scale(1.06); }
.tm-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Info pane */
.tm-info-pane { padding: 26px 24px 26px; display: flex; flex-direction: column; gap: 16px; }

.tm-info-cat   { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tm-accent); font-weight: 600; }
.tm-info-name  { font-family: var(--tm-font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.2; color: var(--tm-text); }
.tm-info-sku   { font-size: 0.72rem; color: var(--tm-text-muted); font-family: var(--tm-font-mono); }

.tm-rating-row { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--tm-text-muted); }
.tm-stars { color: var(--tm-accent); letter-spacing: 2px; }

.tm-price-row { display: flex; align-items: baseline; gap: 10px; }
.tm-price-now  { font-size: 1.85rem; font-weight: 800; color: var(--tm-text); }
.tm-price-was  { font-size: 1.05rem; color: var(--tm-text-muted); text-decoration: line-through; }
.tm-price-save { padding: 2px 9px; background: rgba(46,200,100,0.14); color: #2ec864; border-radius: var(--tm-radius-pill); font-size: 0.75rem; font-weight: 700; }

/* Variation blocks */
.tm-var-block { display: flex; flex-direction: column; gap: 7px; }
.tm-var-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--tm-text-muted); }

.tm-color-opts { display: flex; gap: 7px; flex-wrap: wrap; }
.tm-color-swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform var(--tm-speed-fast) var(--tm-ease-bounce), border-color var(--tm-speed-fast);
}
.tm-color-swatch:hover  { transform: scale(1.25) translateY(-3px); }
.tm-color-swatch.active { border-color: var(--tm-text); transform: scale(1.15); }

.tm-size-opts { display: flex; gap: 7px; flex-wrap: wrap; }
.tm-size-btn {
  min-width: 42px; padding: 6px 12px;
  background: var(--tm-surface-2); border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-xs); color: var(--tm-text-muted);
  font-size: 0.8rem; font-weight: 500; text-align: center;
  transition: all var(--tm-speed-fast);
}
.tm-size-btn:hover  { background: var(--tm-surface-3); color: var(--tm-text); transform: translateY(-2px); }
.tm-size-btn.active { background: var(--tm-accent); color: var(--tm-text-inv); border-color: var(--tm-accent); }
.tm-size-btn.oos    { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; pointer-events: none; }

/* Qty */
.tm-qty-row { display: flex; align-items: center; gap: 12px; }
.tm-qty-ctrl { display: flex; align-items: center; background: var(--tm-surface-2); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs); overflow: hidden; }
.tm-qty-btn  { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--tm-text); font-size: 1rem; transition: background var(--tm-speed-fast); }
.tm-qty-btn:hover { background: var(--tm-surface-3); }
.tm-qty-num  { width: 36px; text-align: center; font-weight: 600; font-size: 0.88rem; color: var(--tm-text); }

/* Taager shipping preview */
.tm-shipping-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; background: rgba(46,200,100,0.08);
  border: 1px solid rgba(46,200,100,0.2); border-radius: var(--tm-radius-xs);
  font-size: 0.8rem; color: var(--tm-success);
}
.tm-shipping-preview .icon { font-size: 1rem; }

/* CTA row */
.tm-cta-row { display: flex; gap: 8px; }
.tm-btn-cart {
  flex: 1; padding: 13px 20px;
  background: var(--tm-accent); color: var(--tm-text-inv); border-radius: var(--tm-radius-sm);
  font-size: 0.88rem; font-weight: 700; letter-spacing: 0.04em;
  transition: all var(--tm-speed-mid) var(--tm-ease-bounce); position: relative; overflow: hidden;
}
.tm-btn-cart::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); transition: background var(--tm-speed-fast); }
.tm-btn-cart:hover  { transform: translateY(-3px); box-shadow: var(--tm-glow); }
.tm-btn-cart:hover::after { background: rgba(255,255,255,0.1); }
.tm-btn-cart:active { transform: scale(0.97); }
.tm-btn-cart.success { background: var(--tm-success); }

.tm-btn-wish { width: 48px; background: var(--tm-surface-2); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: var(--tm-text); transition: all var(--tm-speed-fast); }
.tm-btn-wish:hover, .tm-btn-wish.wished { background: rgba(232,69,60,0.15); color: #e8453c; border-color: rgba(232,69,60,0.3); }

.tm-btn-checkout-now {
  width: 100%; padding: 12px; margin-top: -6px;
  background: var(--tm-surface-2); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-sm);
  color: var(--tm-text-2); font-size: 0.82rem; font-weight: 500;
  transition: all var(--tm-speed-fast); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tm-btn-checkout-now:hover { background: var(--tm-surface-3); color: var(--tm-text); }

/* Accordion */
.tm-accordion { display: flex; flex-direction: column; gap: 2px; }
.tm-acc-item  { border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs); overflow: hidden; }
.tm-acc-head  { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: var(--tm-surface-2); color: var(--tm-text); font-size: 0.83rem; font-weight: 600; transition: background var(--tm-speed-fast); }
.tm-acc-head:hover { background: var(--tm-surface-3); }
.tm-acc-chevron { font-size: 0.68rem; transition: transform var(--tm-speed-fast); }
.tm-acc-item.open .tm-acc-chevron { transform: rotate(180deg); }
.tm-acc-body  { max-height: 0; overflow: hidden; transition: max-height var(--tm-speed-mid) var(--tm-ease); background: var(--tm-surface); }
.tm-acc-item.open .tm-acc-body { max-height: 600px; }
.tm-acc-inner { padding: 12px 14px; font-size: 0.82rem; color: var(--tm-text-2); line-height: 1.7; }
.tm-acc-inner table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.tm-acc-inner td   { padding: 5px 0; border-bottom: 1px solid var(--tm-border); }
.tm-acc-inner td:first-child { color: var(--tm-text-muted); width: 40%; }

/* ═══════════════════════════════════════════════
   CART SIDE-PANEL
   ═══════════════════════════════════════════════ */

#tm-cart-panel .tm-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-height: 100vh;
  border-radius: var(--tm-radius) 0 0 var(--tm-radius);
  transform: translateX(100%); transition: transform var(--tm-speed-mid) var(--tm-ease);
  display: flex; flex-direction: column;
}
#tm-cart-panel.open .tm-panel { transform: translateX(0); }

.tm-cart-header { padding: 20px 20px 14px; border-bottom: 1px solid var(--tm-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.tm-cart-title  { font-family: var(--tm-font-display); font-size: 1.3rem; font-weight: 700; color: var(--tm-text); }

.tm-cart-items  { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: var(--tm-surface-3) transparent; }

.tm-cart-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--tm-surface-2); border-radius: var(--tm-radius-sm); border: 1px solid var(--tm-border); }
.tm-cart-item-img { width: 60px; height: 60px; border-radius: var(--tm-radius-xs); overflow: hidden; flex-shrink: 0; background: var(--tm-surface-3); }
.tm-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.tm-cart-item-info { flex: 1; min-width: 0; }
.tm-cart-item-name { font-size: 0.85rem; font-weight: 600; color: var(--tm-text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-cart-item-meta { font-size: 0.75rem; color: var(--tm-text-muted); margin-bottom: 6px; }
.tm-cart-item-price-row { display: flex; align-items: center; gap: 8px; }
.tm-cart-item-price { font-size: 0.88rem; font-weight: 700; color: var(--tm-accent); }
.tm-cart-item-qty  { display: flex; align-items: center; gap: 4px; background: var(--tm-surface-3); border-radius: var(--tm-radius-xs); padding: 2px 4px; }
.tm-cart-item-qty button { width: 20px; height: 20px; font-size: 0.8rem; color: var(--tm-text); display: flex; align-items: center; justify-content: center; }
.tm-cart-item-qty span   { width: 24px; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--tm-text); }
.tm-cart-item-remove { margin-left: auto; color: var(--tm-text-muted); font-size: 0.85rem; transition: color var(--tm-speed-fast); padding: 4px; }
.tm-cart-item-remove:hover { color: var(--tm-error); }

.tm-cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--tm-text-muted); font-size: 0.88rem; }
.tm-cart-empty-icon { font-size: 3rem; opacity: 0.4; }

.tm-cart-footer { padding: 14px 20px 20px; border-top: 1px solid var(--tm-border); flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.tm-cart-totals { display: flex; flex-direction: column; gap: 6px; }
.tm-cart-total-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--tm-text-2); }
.tm-cart-total-row.grand { font-size: 1rem; font-weight: 700; color: var(--tm-text); padding-top: 6px; border-top: 1px solid var(--tm-border); }
.tm-btn-checkout {
  width: 100%; padding: 14px; background: var(--tm-accent); color: var(--tm-text-inv);
  border-radius: var(--tm-radius-sm); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em;
  transition: all var(--tm-speed-mid) var(--tm-ease-bounce);
}
.tm-btn-checkout:hover { transform: translateY(-2px); box-shadow: var(--tm-glow); }
.tm-payicons { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.72rem; color: var(--tm-text-muted); }
.tm-payicons span { background: var(--tm-surface-2); border: 1px solid var(--tm-border); padding: 3px 8px; border-radius: var(--tm-radius-xs); font-weight: 500; }

/* ═══════════════════════════════════════════════
   CHECKOUT OVERLAY
   ═══════════════════════════════════════════════ */

#tm-checkout-panel .tm-panel { width: 100%; max-width: 840px; }

.tm-checkout-grid { display: grid; grid-template-columns: 1fr 340px; }
@media (max-width: 700px) { .tm-checkout-grid { grid-template-columns: 1fr; } }

.tm-checkout-left  { padding: 26px; display: flex; flex-direction: column; gap: 20px; }
.tm-checkout-right { padding: 26px; background: var(--tm-surface-2); border-left: 1px solid var(--tm-border); display: flex; flex-direction: column; gap: 16px; }

.tm-section-title { font-family: var(--tm-font-display); font-size: 1.1rem; font-weight: 700; color: var(--tm-text); margin-bottom: 12px; }

/* Form fields */
.tm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-field-row.single { grid-template-columns: 1fr; }
.tm-field { display: flex; flex-direction: column; gap: 5px; }
.tm-field label { font-size: 0.75rem; font-weight: 600; color: var(--tm-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tm-field input, .tm-field select { padding: 10px 14px; background: var(--tm-surface); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs); color: var(--tm-text); font-size: 0.88rem; outline: none; transition: border-color var(--tm-speed-fast), box-shadow var(--tm-speed-fast); }
.tm-field input:focus, .tm-field select:focus { border-color: var(--tm-accent); box-shadow: 0 0 0 3px rgba(var(--tm-accent-rgb), 0.12); }
.tm-field select option { background: var(--tm-surface); color: var(--tm-text); }

/* Shipping zones (Taager) */
.tm-shipping-zones { display: flex; flex-direction: column; gap: 8px; }
.tm-zone-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--tm-surface); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs); cursor: pointer; transition: border-color var(--tm-speed-fast), background var(--tm-speed-fast); }
.tm-zone-option:hover, .tm-zone-option.active { border-color: var(--tm-accent); background: rgba(var(--tm-accent-rgb), 0.06); }
.tm-zone-option input[type="radio"] { accent-color: var(--tm-accent); }
.tm-zone-label { flex: 1; }
.tm-zone-name  { font-size: 0.85rem; font-weight: 600; color: var(--tm-text); }
.tm-zone-time  { font-size: 0.75rem; color: var(--tm-text-muted); }
.tm-zone-price { font-size: 0.88rem; font-weight: 700; color: var(--tm-accent); }

/* Payment methods */
.tm-payment-methods { display: flex; flex-direction: column; gap: 8px; }
.tm-payment-method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--tm-surface); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs); cursor: pointer; transition: border-color var(--tm-speed-fast), background var(--tm-speed-fast); }
.tm-payment-method:hover, .tm-payment-method.active { border-color: var(--tm-accent); background: rgba(var(--tm-accent-rgb), 0.06); }
.tm-payment-method input[type="radio"] { accent-color: var(--tm-accent); }
.tm-payment-icon  { font-size: 1.4rem; }
.tm-payment-label { flex: 1; }
.tm-payment-name  { font-size: 0.85rem; font-weight: 600; color: var(--tm-text); }
.tm-payment-desc  { font-size: 0.73rem; color: var(--tm-text-muted); }

/* Order summary */
.tm-order-lines { display: flex; flex-direction: column; gap: 8px; }
.tm-order-line  { display: flex; justify-content: space-between; align-items: center; font-size: 0.83rem; color: var(--tm-text-2); }
.tm-order-line .name { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-order-line .price { font-weight: 600; color: var(--tm-text); }
.tm-sep { height: 1px; background: var(--tm-border); }
.tm-order-grand { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 700; color: var(--tm-text); }

.tm-btn-place-order {
  width: 100%; padding: 14px; background: var(--tm-accent); color: var(--tm-text-inv);
  border-radius: var(--tm-radius-sm); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em;
  transition: all var(--tm-speed-mid) var(--tm-ease-bounce);
}
.tm-btn-place-order:hover { transform: translateY(-2px); box-shadow: var(--tm-glow); }
.tm-secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.73rem; color: var(--tm-text-muted); }

/* ═══════════════════════════════════════════════
   ACCOUNT PANEL
   ═══════════════════════════════════════════════ */

#tm-account-panel .tm-panel { width: 100%; max-width: 560px; }

.tm-account-wrap { padding: 28px 28px 32px; }

/* Tabs */
.tm-account-tabs { display: flex; border-bottom: 1px solid var(--tm-border); margin-bottom: 24px; }
.tm-account-tab { padding: 10px 18px; font-size: 0.83rem; font-weight: 600; color: var(--tm-text-muted); border-bottom: 2px solid transparent; transition: color var(--tm-speed-fast), border-color var(--tm-speed-fast); cursor: pointer; }
.tm-account-tab.active { color: var(--tm-accent); border-color: var(--tm-accent); }

.tm-tab-pane { display: none; }
.tm-tab-pane.active { display: block; }

/* Auth form */
.tm-auth-form { display: flex; flex-direction: column; gap: 14px; }
.tm-auth-form .tm-field input { width: 100%; }
.tm-btn-auth {
  width: 100%; padding: 12px; background: var(--tm-accent); color: var(--tm-text-inv);
  border-radius: var(--tm-radius-sm); font-size: 0.88rem; font-weight: 700;
  transition: all var(--tm-speed-mid) var(--tm-ease-bounce);
}
.tm-btn-auth:hover { transform: translateY(-2px); box-shadow: var(--tm-glow); }
.tm-auth-divider { display: flex; align-items: center; gap: 10px; color: var(--tm-text-muted); font-size: 0.78rem; }
.tm-auth-divider::before, .tm-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--tm-border); }
.tm-auth-link { font-size: 0.8rem; color: var(--tm-accent); text-align: center; cursor: pointer; }
.tm-auth-error { padding: 8px 12px; background: rgba(232,69,60,0.12); border: 1px solid rgba(232,69,60,0.25); border-radius: var(--tm-radius-xs); color: var(--tm-error); font-size: 0.8rem; display: none; }
.tm-auth-error.show { display: block; }

/* Logged in - my account */
.tm-my-account { display: flex; flex-direction: column; gap: 16px; }
.tm-account-avatar { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--tm-surface-2); border-radius: var(--tm-radius-sm); border: 1px solid var(--tm-border); }
.tm-avatar-icon { width: 52px; height: 52px; background: var(--tm-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tm-text-inv); font-weight: 700; }
.tm-account-name { font-size: 1rem; font-weight: 600; color: var(--tm-text); }
.tm-account-email { font-size: 0.78rem; color: var(--tm-text-muted); }

.tm-account-menu { display: flex; flex-direction: column; gap: 2px; }
.tm-account-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--tm-surface-2); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs);
  color: var(--tm-text); font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: background var(--tm-speed-fast), border-color var(--tm-speed-fast);
}
.tm-account-menu-item:hover { background: var(--tm-surface-3); border-color: var(--tm-border-2); }
.tm-account-menu-item .icon { font-size: 1rem; width: 20px; text-align: center; }
.tm-account-menu-item .arrow { margin-left: auto; color: var(--tm-text-muted); font-size: 0.75rem; }

/* Orders list */
.tm-orders-list { display: flex; flex-direction: column; gap: 8px; }
.tm-order-row { padding: 12px 14px; background: var(--tm-surface-2); border: 1px solid var(--tm-border); border-radius: var(--tm-radius-xs); display: flex; align-items: center; justify-content: space-between; }
.tm-order-id   { font-size: 0.8rem; font-weight: 600; color: var(--tm-text); font-family: var(--tm-font-mono); }
.tm-order-date { font-size: 0.75rem; color: var(--tm-text-muted); }
.tm-order-status { padding: 3px 9px; border-radius: var(--tm-radius-pill); font-size: 0.7rem; font-weight: 700; }
.tm-status-processing { background: rgba(42,124,255,0.15); color: #4fc3f7; }
.tm-status-completed  { background: rgba(46,200,100,0.15); color: #2ec864; }
.tm-status-pending    { background: rgba(251,176,64,0.15); color: #fbb040; }
.tm-order-total { font-size: 0.88rem; font-weight: 700; color: var(--tm-accent); }

/* ═══════════════════════════════════════════════
   ORDER SUCCESS PANEL
   ═══════════════════════════════════════════════ */

#tm-success-panel .tm-panel { width: 100%; max-width: 460px; }
.tm-success-wrap { padding: 40px 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.tm-success-icon { font-size: 4rem; animation: successBounce 0.6s var(--tm-ease-bounce); }
@keyframes successBounce { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tm-success-title  { font-family: var(--tm-font-display); font-size: 1.8rem; font-weight: 700; color: var(--tm-text); }
.tm-success-sub    { font-size: 0.88rem; color: var(--tm-text-2); }
.tm-success-order  { font-family: var(--tm-font-mono); font-size: 1rem; color: var(--tm-accent); }
.tm-success-ship   { padding: 12px 20px; background: rgba(46,200,100,0.1); border: 1px solid rgba(46,200,100,0.2); border-radius: var(--tm-radius-sm); font-size: 0.82rem; color: var(--tm-success); width: 100%; }
.tm-btn-continue { padding: 12px 28px; background: var(--tm-accent); color: var(--tm-text-inv); border-radius: var(--tm-radius-sm); font-size: 0.88rem; font-weight: 700; transition: all var(--tm-speed-mid) var(--tm-ease-bounce); }
.tm-btn-continue:hover { transform: translateY(-2px); box-shadow: var(--tm-glow); }

/* ═══════════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════════ */

#tm-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.tm-toast {
  padding: 11px 18px; background: var(--tm-surface-2); border: 1px solid var(--tm-border);
  border-left: 3px solid var(--tm-accent); border-radius: var(--tm-radius-sm);
  color: var(--tm-text); font-size: 0.83rem; box-shadow: var(--tm-shadow-sm); pointer-events: all;
  display: flex; align-items: center; gap: 9px;
  animation: toastIn var(--tm-speed-mid) var(--tm-ease-bounce) forwards, toastOut var(--tm-speed-mid) var(--tm-ease) 3.2s forwards;
}
.tm-toast.error  { border-left-color: var(--tm-error); }
.tm-toast.success{ border-left-color: var(--tm-success); }
@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to   { transform: translateX(110%); opacity: 0; } }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
  #tm-product-grid   { grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); }
  .tm-info-name      { font-size: 1.5rem; }
  #tm-cart-panel .tm-panel { width: 320px; }
}
@media (max-width: 560px) {
  #tm-board        { padding: 68px 12px 12px; }
  #tm-topbar       { padding: 0 14px; }
  #tm-cart-panel .tm-panel { width: 100%; border-radius: var(--tm-radius) var(--tm-radius) 0 0; top: auto; bottom: 0; max-height: 85vh; }
  .tm-checkout-left, .tm-checkout-right { padding: 18px; }
  .tm-field-row { grid-template-columns: 1fr; }
}
