/* =========================================================
   AM Wishlist - Styles
   ========================================================= */

/* ----- Category navigation tabs ----- */
.amwishlist-categories-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4e4e7;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.amwishlist-cat-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #52525b;
  background: #f4f4f5;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.amwishlist-cat-tab:hover {
  color: #18181b;
  background: #e4e4e7;
  text-decoration: none;
}

.amwishlist-cat-tab.active {
  color: #fff;
  background: #18181b;
  border-color: #18181b;
}

/* ----- Category group ----- */
.amwishlist-category-group {
  margin-bottom: 32px;
}

.amwishlist-category-title {
  font-size: 18px;
  font-weight: 600;
  color: #18181b;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #18181b;
}

/* ----- Product card ----- */
.amwishlist-product-card {
  margin-bottom: 24px;
  position: relative;
}

.amwishlist-product-img {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  margin-bottom: 12px;
}

.amwishlist-product-img a {
  display: block;
}

.amwishlist-product-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.amwishlist-product-card:hover .amwishlist-product-img img {
  transform: scale(1.03);
}

/* ----- Remove button (X on image) ----- */
.amwishlist-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.amwishlist-remove-btn i {
  font-size: 16px;
  color: #71717a;
}

.amwishlist-product-card:hover .amwishlist-remove-btn {
  opacity: 1;
}

.amwishlist-remove-btn:hover {
  background: #fee2e2;
}

.amwishlist-remove-btn:hover i {
  color: #dc2626;
}

/* ----- Product info ----- */
.amwishlist-product-info {
  margin-bottom: 12px;
}

.amwishlist-product-name {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.4;
}

.amwishlist-product-name a {
  color: #18181b;
  text-decoration: none;
}

.amwishlist-product-name a:hover {
  color: #3b82f6;
}

.amwishlist-reference {
  font-size: 12px;
  color: #a1a1aa;
  margin-bottom: 2px;
}

.amwishlist-manufacturer {
  font-size: 12px;
  color: #71717a;
  margin-bottom: 6px;
}

/* ----- Price block ----- */
.amwishlist-price-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.amwishlist-price {
  font-size: 16px;
  font-weight: 700;
  color: #18181b;
}

.amwishlist-regular-price {
  font-size: 13px;
  color: #a1a1aa;
  text-decoration: line-through;
}

/* ----- Stock indicator ----- */
.amwishlist-stock {
  font-size: 12px;
  margin-bottom: 8px;
}

.amwishlist-stock .status-stock {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.amwishlist-stock .stock-green {
  background: #22c55e;
}

.amwishlist-stock .stock-red {
  background: #ef4444;
}

.amwishlist-in-stock {
  color: #16a34a;
}

.amwishlist-out-stock {
  color: #dc2626;
}

/* ----- Actions (add to cart) ----- */
.amwishlist-actions {
  margin-top: 8px;
}

.amwishlist-actions .btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* ----- Toggle wishlist button (product page) -----
   Uses Panda theme's hover_fly_btn styling natively.
   Display as block so it goes below the add-to-cart button.
   Scoped to NOT affect miniature icons. */
.amwishlist-toggle-btn:not(.amwishlist-mini-icon) {
  display: block;
  width: 100%;
  margin-top: 10px;
}

/* Active state (star turns red) - applies to all instances */
.amwishlist-toggle-btn.st_added .icon_btn {
  color: #ef4444;
}

/* ----- Miniature wishlist icon (on product listings) -----
   Uses Panda's layer_btn (position:absolute) + hover_out (display:none until hover).
   Panda shows .layer_btn.hover_out on .pro_outer_box:hover. */
.amwishlist-mini-icon.layer_btn {
  top: 10px;
  right: 10px;
  cursor: pointer;
}

/* ----- Sidebar product list ----- */
#amwishlist-sidebar-products {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.amwishlist-sidebar-item {
  padding: 10px 0;
  border-bottom: 1px solid #f4f4f5;
}

.amwishlist-sidebar-img {
  width: 50px;
  min-width: 50px;
  height: 50px;
  margin-right: 10px;
}

.amwishlist-sidebar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.amwishlist-sidebar-name {
  font-size: 13px;
  display: block;
  color: #18181b;
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: 2px;
}

.amwishlist-sidebar-name:hover {
  color: #3b82f6;
}

.amwishlist-sidebar-price {
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
}

.amwishlist-sidebar-remove {
  border: none;
  background: none;
  cursor: pointer;
  color: #a1a1aa;
  padding: 4px;
  margin-left: 8px;
  transition: color 0.2s ease;
}

.amwishlist-sidebar-remove:hover {
  color: #dc2626;
}

.amwishlist-sidebar-empty {
  text-align: center;
  color: #71717a;
  padding: 20px 0;
  font-size: 14px;
}

/* ----- Empty wishlist ----- */
.amwishlist-empty {
  text-align: center;
  padding: 60px 20px;
}

.amwishlist-empty > i {
  font-size: 64px;
  color: #d4d4d8;
  display: block;
  margin-bottom: 16px;
}

.amwishlist-empty p {
  font-size: 16px;
  color: #71717a;
  margin-bottom: 20px;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .amwishlist-categories-nav {
    flex-wrap: nowrap;
    padding-bottom: 8px;
    margin-bottom: 16px;
  }

  .amwishlist-cat-tab {
    font-size: 12px;
    padding: 6px 12px;
  }

  .amwishlist-category-title {
    font-size: 16px;
  }

  .amwishlist-remove-btn {
    opacity: 1;
  }

  .amwishlist-product-name {
    font-size: 13px;
  }

  .amwishlist-price {
    font-size: 14px;
  }
}
