/* ============================================================
   Storzen Product Compare for WooCommerce — Frontend Styles
   ============================================================ */

/* ── Compare Button ───────────────────────────────────────── */
.storzen-product-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #7b2ff7;
  border-radius: 4px;
  background: transparent;
  color: #7b2ff7;
  transition: all 0.2s ease;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.storzen-product-compare-btn:hover {
  background: #7b2ff7;
  color: #fff;
}

.storzen-product-compare-btn--added {
  background: #7b2ff7;
  color: #fff;
}

.storzen-product-compare-btn--loading {
  opacity: 0.6;
  cursor: wait;
}

/* ── Compare Wrapper ──────────────────────────────────────── */
.storzen-product-compare-wrapper {
  max-width: 100%;
  overflow-x: auto;
  margin: 20px 0 40px;
  font-family: inherit;
}

.storzen-product-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.storzen-product-compare-header h2 {
  margin: 0;
  font-size: 22px;
  color: #1a1a2e;
}

/* ── Clear Button ─────────────────────────────────────────── */
.storzen-product-compare-clear-btn {
  padding: 8px 16px;
  background: #fff;
  color: #e74c3c;
  border: 2px solid #e74c3c;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.storzen-product-compare-clear-btn:hover {
  background: #e74c3c;
  color: #fff;
}

/* ── Table ────────────────────────────────────────────────── */
.storzen-product-compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.storzen-product-compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 500px;
}

.storzen-product-compare-table th,
.storzen-product-compare-table td {
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  vertical-align: top;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}

/* Header row */
.storzen-product-compare-table thead th {
  background: #1a1a2e;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  position: relative;
}

.storzen-product-compare-table thead th:first-child {
  background: #0f0f1e;
}

/* Field label column */
.storzen-product-compare-table tbody th {
  background: #f5f3ff;
  color: #4a3a7a;
  font-weight: 600;
  white-space: nowrap;
  width: 140px;
}

/* Alternating rows */
.storzen-product-compare-table tbody tr:nth-child(even) td {
  background: #f9f9f9;
}

/* Image row */
.storzen-product-compare-row--image img {
  width: 100%;
  max-width: 140px;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* Price */
.storzen-product-compare-row--price td .price {
  font-size: 16px;
  font-weight: 700;
  color: #7b2ff7;
}

/* Rating */
.storzen-star-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.storzen-rating-count {
  font-size: 12px;
  color: #888;
}

/* Stock */
.storzen-stock.in-stock {
  color: #27ae60;
  font-weight: 600;
}

.storzen-stock.out-of-stock {
  color: #e74c3c;
  font-weight: 600;
}

.storzen-no-value {
  color: #bbb;
}

/* Remove column button */
.storzen-product-compare-remove-col {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.storzen-product-compare-remove-col:hover {
  background: rgba(255,255,255,0.35);
}

/* Add to Cart in table */
.storzen-product-compare-table .add_to_cart_button {
  display: inline-block;
  padding: 9px 18px;
  background: #7b2ff7;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.storzen-product-compare-table .add_to_cart_button:hover {
  background: #6020d0;
  color: #fff;
}

/* ── Empty State ──────────────────────────────────────────── */
.storzen-product-compare-empty {
  text-align: center;
  padding: 60px 20px;
  border: 2px dashed #d0c4f7;
  border-radius: 8px;
}

.storzen-product-compare-empty p {
  font-size: 16px;
  color: #777;
  margin-bottom: 16px;
}

/* ── Toast Notification ───────────────────────────────────── */
.storzen-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99999;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  line-height: 1.4;
}

.storzen-toast a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}

.storzen-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.storzen-toast--success {
  background: #7b2ff7;
  color: #fff;
}

.storzen-toast--warning {
  background: #f39c12;
  color: #fff;
}

.storzen-toast--error {
  background: #e74c3c;
  color: #fff;
}

.storzen-toast--info {
  background: #2980b9;
  color: #fff;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .storzen-product-compare-table th,
  .storzen-product-compare-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .storzen-product-compare-header h2 {
    font-size: 18px;
  }

  .storzen-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}
