/* ===== VELORIA — WOOCOMMERCE CSS ===== */

/* ── Shop Page ───────────────────────────────────────────── */
.woocommerce-products-header h1 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--space-2);
}

/* ── Filter Sidebar ──────────────────────────────────────── */
.veloria-filter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-group {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-2) 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.filter-group__body {
  padding-top: var(--space-3);
}

.filter-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-check-list label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.filter-check-list label:hover { color: var(--color-primary); }

.filter-check-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* Price Range */
.price-range {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.price-range__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.price-range__inputs input {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.price-range__slider {
  width: 100%;
  accent-color: var(--color-primary);
}

/* Star Rating Filter */
.rating-filter {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.rating-filter label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.rating-stars-display {
  display: flex;
  gap: 2px;
  color: var(--color-star);
}

/* Filter Actions */
.filter-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.filter-actions .btn { flex: 1; }

/* Mobile Filter Toggle */
.mobile-filter-toggle {
  display: none;
  width: 100%;
  margin-bottom: var(--space-4);
}

/* Active Filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 12px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text);
  font-weight: 600;
}

.active-filter-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color var(--transition-fast);
}

.active-filter-tag button:hover { color: var(--color-error); }

/* ── Single Product ──────────────────────────────────────── */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-gallery__main {
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-alt);
  position: relative;
}

.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery__thumbnails {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.product-gallery__thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background: var(--color-surface-alt);
}

.product-gallery__thumb:hover,
.product-gallery__thumb.is-active {
  border-color: var(--color-primary);
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Summary */
.product-summary__brand {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.product-summary h1 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  margin-bottom: var(--space-3);
}

.product-summary__rating {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.product-summary__rating .star-rating { font-size: var(--text-base); }

.review-count-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-summary__price {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
  line-height: 1;
}

.product-summary__price del {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  font-weight: 400;
  text-decoration: line-through;
  margin-right: var(--space-2);
}

.product-summary__price ins {
  text-decoration: none;
  color: var(--color-sale);
}

.product-summary__short-desc {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

/* Quantity + ATC */
.product-form-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.qty-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
}

.qty-btn {
  width: 44px;
  height: 52px;
  border: none;
  background: none;
  color: var(--color-text);
  font-size: var(--text-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.qty-btn:hover { background: var(--color-surface-alt); }

input.qty {
  width: 64px;
  text-align: center;
  border: none;
  border-inline: 1px solid var(--color-border);
  border-radius: 0;
  height: 52px;
  font-weight: 700;
  font-size: var(--text-md);
  padding: 0 var(--space-2);
}

.btn-add-to-cart { flex: 1; max-width: 280px; height: 52px; }

.btn-wishlist-product {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-wishlist-product:hover, .btn-wishlist-product.is-active {
  background: var(--color-accent);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

/* Product Meta */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
}

.product-meta span + span::before { content: ' | '; opacity: 0.5; }

.stock-in-stock { color: var(--color-success); font-weight: 600; }
.stock-out-of-stock { color: var(--color-error); font-weight: 600; }

/* Trust badges on product */
.product-trust-badges {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-4);
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
}

.product-trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.product-trust-badge svg { color: var(--color-primary); }

/* Product Tabs */
.product-tabs {
  margin-top: var(--space-9);
}

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}

.tab-btn {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-btn:hover { color: var(--color-primary); }
.tab-btn.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ── Reviews ─────────────────────────────────────────────── */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.review-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.review-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.review-author-info { flex: 1; }

.review-author-name {
  font-weight: 700;
  font-size: var(--text-sm);
  display: block;
}

.review-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.review-stars { margin-left: auto; display: flex; gap: 2px; color: var(--color-star); }

.review-body { font-size: var(--text-sm); line-height: 1.7; color: var(--color-text-muted); }

/* Review Form */
.review-form {
  background: var(--color-surface-alt);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.review-form__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-5);
}

.review-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.rating-input { display: flex; gap: var(--space-1); }

.rating-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-border-dark);
  transition: color var(--transition-fast), transform var(--transition-bounce);
  padding: 0;
}

.rating-star-btn:hover, .rating-star-btn.is-active { color: var(--color-star); transform: scale(1.2); }

/* ── Cart ────────────────────────────────────────────────── */
.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.cart-table thead th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
}

.cart-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.cart-table tbody tr:hover { background: var(--color-surface-alt); }

.cart-table td {
  padding: var(--space-4);
  vertical-align: middle;
}

.cart-product-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.cart-product-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.cart-remove {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.cart-remove:hover { color: var(--color-error); background: var(--color-error-light); }

/* Cart Totals */
.cart-totals {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.cart-totals__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.cart-total-row:last-child { border-bottom: none; }

.cart-total-row--total {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.cart-total-row--total .amount { color: var(--color-primary); font-size: var(--text-xl); }

/* Coupon */
.coupon-form {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.coupon-form input {
  flex: 1;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Checkout ────────────────────────────────────────────── */
.checkout-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
  font-family: var(--font-body);
}

.checkout-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-8);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  position: relative;
}

.checkout-step__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.checkout-step.is-complete .checkout-step__icon { background: var(--color-success); color: var(--color-white); }
.checkout-step.is-active .checkout-step__icon { background: var(--color-primary); color: var(--color-white); }

.checkout-step__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.checkout-step.is-active .checkout-step__label { color: var(--color-primary); }
.checkout-step.is-complete .checkout-step__label { color: var(--color-success); }

.checkout-step::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--color-border);
  min-width: 40px;
  margin: 0 var(--space-2);
}

.checkout-step:last-child::after { display: none; }
.checkout-step.is-complete::after { background: var(--color-success); }

/* Order Summary */
.order-summary {
  background: var(--color-surface-alt);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.order-summary-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.order-summary-item img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.order-summary-item__info { flex: 1; }
.order-summary-item__name { font-weight: 600; }
.order-summary-item__qty { color: var(--color-text-muted); font-size: var(--text-xs); }
.order-summary-item__price { font-weight: 700; color: var(--color-primary); }

/* ── My Account ──────────────────────────────────────────── */
.account-nav {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.account-nav ul {
  list-style: none;
  padding: var(--space-3) 0;
  margin: 0;
}

.account-nav li a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.account-nav li a:hover { background: var(--color-surface-alt); color: var(--color-primary); }

.account-nav li.is-active a {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ── Wishlist Page ───────────────────────────────────────── */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-6);
}

.wishlist-empty {
  text-align: center;
  padding: var(--space-12);
}

.wishlist-empty svg { color: var(--color-border-dark); margin: 0 auto var(--space-5); }

/* ── Compare ─────────────────────────────────────────────── */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 2px solid var(--color-primary);
  padding: var(--space-4) 0;
  z-index: var(--z-fixed);
  box-shadow: 0 -4px 24px rgba(45,27,105,0.15);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.compare-bar.is-visible { transform: translateY(0); }

.compare-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.compare-bar__products {
  display: flex;
  gap: var(--space-3);
  flex: 1;
}

.compare-product-slot {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  position: relative;
  overflow: hidden;
}

.compare-product-slot img { width: 100%; height: 100%; object-fit: cover; }

.compare-product-slot__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-error);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* WooCommerce reset overrides */
.woocommerce form .form-row { margin: 0 0 var(--space-4); }
.woocommerce form .form-row label { margin-bottom: var(--space-2); display: block; }
.woocommerce-page table.shop_table { border-radius: var(--radius-xl); overflow: hidden; }
.woocommerce-message { background: var(--color-success-light); border-color: var(--color-success); color: var(--color-text); padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); }
.woocommerce-error { background: var(--color-error-light); color: var(--color-error); }
