/* Public Wishlist stylesheet */

/* Dynamic Buttons */
.sopy-wl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  border: 1px solid #ddd;
  color: #333;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sopy-wl-btn:hover {
  background-color: #ffe4e6;
  border-color: #f43f5e;
  color: #e11d48;
}

.sopy-wl-btn.in-wishlist {
  background-color: #ffe4e6;
  border-color: #f43f5e;
  color: #e11d48;
}

/* Compact layout for WooCommerce Product Grids */
.products .product .sopy-add-wl-container,
.woocommerce ul.products li.product .sopy-add-wl-container {
  display: inline-block;
  vertical-align: middle;
}

.products .product .sopy-add-wl-container .text,
.woocommerce ul.products li.product .sopy-add-wl-container .text {
  display: none;
}

.products .product .sopy-wl-btn,
.woocommerce ul.products li.product .sopy-wl-btn {
  padding: 8px 12px;
  justify-content: center;
}

.sopy-wl-btn .sopy-heart-icon {
  font-size: 1.15em;
  line-height: 1;
}

/* Floating wishlist button */
.sopy-floating-wishlist {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #e11d48;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s ease;
}

.sopy-floating-wishlist:hover {
  transform: scale(1.1);
}

.sopy-floating-wishlist .sopy-floating-icon {
  font-size: 28px;
  color: #fff;
}

.sopy-floating-wishlist .sopy-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #111827;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Shared Shortcode styles */
.sopy-wishlist-dashboard-container {
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sopy-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 16px;
}

.sopy-sharing-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sopy-sharing-box .share-btn {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
}

.sopy-sharing-box .share-btn.fb { background-color: #3b5998; }
.sopy-sharing-box .share-btn.wa { background-color: #25d366; }
.sopy-sharing-box .share-btn.tg { background-color: #0088cc; }

.sopy-cart-style-table {
  width: 100%;
  border-collapse: collapse;
}

.sopy-cart-style-table th {
  text-align: left;
  border-bottom: 2px solid #e5e7eb;
  padding: 12px;
}

.sopy-cart-style-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.sopy-product-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sopy-product-cell img.thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

/* Toast notifier */
.sopy-toast {
  position: fixed;
  bottom: 25px;
  left: 30px;
  background-color: #111827;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: none;
  font-weight: 500;
  z-index: 10000;
}
.sopy-toast.error {
  background-color: #dc2626;
}

/* Empty State */
.sopy-empty-state {
  text-align: center;
  padding: 60px 20px;
  background-color: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.sopy-empty-icon {
  font-size: 48px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.sopy-empty {
  font-size: 16px;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

/* Grid Layout for Wishlist Cards */
.sopy-wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sopy-wl-card {
  position: relative;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sopy-wl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.sopy-wl-card-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  z-index: 10;
  padding: 4px;
  transition: color 0.2s;
}

.sopy-wl-card-remove:hover {
  color: #ef4444;
}

.sopy-wl-card-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sopy-wl-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.sopy-wl-card-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sopy-wl-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.sopy-wl-card-title a {
  color: inherit;
  text-decoration: none;
}

.sopy-wl-card-title a:hover {
  color: #2563eb;
}

.sopy-wl-card-price {
  font-size: 15px;
  font-weight: 700;
  color: #b91c1c; /* matches the red price in screenshot */
  margin-bottom: 16px;
}

.sopy-wl-card-price del {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
  margin-right: 6px;
}

.sopy-wl-card-price ins {
  text-decoration: none;
}

.sopy-wl-card-footer {
  margin-top: auto;
}

/* Sembunyikan tombol 'Lihat Tas' / View cart bawaan WooCommerce yang otomatis muncul di bawah tombol utama */
.sopy-wl-card-footer .added_to_cart {
  display: none !important;
}

.sopy-wl-btn-block {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #262626; /* Dark gray/black button like screenshot */
  color: #ffffff;
  text-align: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.sopy-wl-btn-block:hover {
  background-color: #000000;
  color: #ffffff;
}

/* Advanced E-commerce UI Styling */

/* Price and Discount */
.sopy-wl-card-price-wrap { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sopy-wl-card-price { font-size: 14px; }
.sopy-wl-card-price del { color: #94a3b8; font-size: 12px; text-decoration: line-through; margin-right: 4px; }
.sopy-wl-card-price ins { color: #dc2626; font-weight: 800; text-decoration: none; }
.sopy-wl-discount-badge { background: #fef2f2; color: #dc2626; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }

/* Native Size Selector */
.sopy-wl-size-selector { position: relative; margin-top: 12px; }
.sopy-wl-size-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  background-color: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.sopy-wl-size-select:focus, .sopy-wl-size-select:hover {
  border-color: #94a3b8;
}

/* Delete Confirmation Modal */
.sopy-wl-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  align-items: center;
  justify-content: center;
}

.sopy-wl-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  animation: sopyModalPop 0.3s ease-out;
}

@keyframes sopyModalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sopy-wl-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sopy-wl-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.sopy-wl-modal-close {
  cursor: pointer;
  color: #94a3b8;
  font-size: 18px;
}

.sopy-wl-modal-close:hover {
  color: #ef4444;
}

.sopy-wl-modal-body {
  padding: 20px;
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
}

.sopy-wl-modal-footer {
  padding: 16px 20px;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.sopy-wl-btn-outline {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: transparent;
  border-radius: 6px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.sopy-wl-btn-outline:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sopy-wl-btn-solid {
  padding: 8px 16px;
  border: none;
  background: #ef4444;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.sopy-wl-btn-solid:hover {
  background: #dc2626;
}
