/* ==========================================================================
   MERCH VF ESHOP - additive styles for new UI (sidebar, product detail,
   badges, wishlist, password toggle...). Kept separate from style.css.
   ========================================================================== */

/* Password visibility toggle */
.password-field-wrap { position: relative; }
.password-field-wrap input { padding-right: 44px; width: 100%; }
.password-toggle-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.password-toggle-btn:hover { color: var(--accent-gold); }

/* Toggle switch (shared visual with admin.css) */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; vertical-align: middle; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--bg-tertiary);
  border: 1px solid var(--border-color); border-radius: 999px; transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: var(--text-secondary); border-radius: 50%; transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-olive); border-color: var(--accent-gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--accent-gold); }

/* Catalog layout: off-canvas sidebar + grid */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .shop-layout { grid-template-columns: 1fr; } }

.shop-sidebar {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 20px; position: sticky; top: 100px;
}
@media (max-width: 900px) {
  .shop-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw;
    z-index: 200; overflow-y: auto; border-radius: 0; transform: translateX(-100%);
    transition: var(--transition); box-shadow: var(--shadow-tactical);
  }
  .shop-sidebar.open { transform: translateX(0); }
}
.shop-sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 199;
}
.shop-sidebar-overlay.open { display: block; }
.shop-sidebar h4 { color: var(--accent-gold); font-size: 1rem; margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.shop-sidebar h4:first-child { margin-top: 0; }
.sidebar-search { display: flex; gap: 6px; margin-bottom: 8px; }
.sidebar-collection-list { display: flex; flex-direction: column; gap: 6px; }
.sidebar-collection-list label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.sidebar-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 0.85rem; }
.btn-sidebar-toggle { display: none; }
@media (max-width: 900px) {
  .btn-sidebar-toggle { display: inline-flex; }
}

/* Collection group headers in flat/grouped catalog view */
.collection-group-title {
  font-family: var(--font-heading); font-size: 2rem; color: var(--accent-gold);
  margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color);
}
.collection-group-title:first-child { margin-top: 0; }

/* Stock label */
.stock-label { font-size: 0.85rem; font-weight: bold; }
.stock-label.low { color: var(--accent-red); }
.stock-label.ok { color: var(--accent-olive-bright); }
.stock-label.out { color: var(--text-muted); }

/* Product badges on cards / detail */
.product-badges { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 2; align-items: flex-end; }

.btn-wishlist-card {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(11, 13, 12, 0.65); border: 1px solid var(--border-color); color: #fff;
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.btn-wishlist-card:hover, .btn-wishlist-card.active { color: var(--accent-red); border-color: var(--accent-red); }
.product-badge-pill {
  font-family: var(--font-subheading); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 999px; background: var(--accent-gold); color: #000; font-weight: 700;
}
.product-badge-pill.limited { background: var(--accent-red); color: #fff; }
.product-badge-pill.last { background: var(--accent-orange); color: #000; }

/* Wishlist heart button */
.btn-wishlist {
  background: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.btn-wishlist:hover, .btn-wishlist.active { color: var(--accent-red); border-color: var(--accent-red); }

/* Breadcrumb + back button on product detail */
.breadcrumb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; font-size: 0.9rem; color: var(--text-secondary); }
.breadcrumb-row a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb-row a:hover { color: var(--accent-gold); }
.btn-back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--accent-gold); text-decoration: none;
  font-family: var(--font-subheading); font-weight: 700; margin-bottom: 16px;
}
.btn-back:hover { text-decoration: underline; }

.icon { display: inline-block; vertical-align: middle; }

/* Flash messages (customer-facing pages — admin.css defines the same classes for the admin panel) */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.9rem; }
.flash-success { background: rgba(104, 132, 107, 0.2); border: 1px solid var(--accent-olive-bright); color: var(--text-primary); }
.flash-error { background: rgba(211, 47, 47, 0.15); border: 1px solid var(--accent-red); color: var(--text-primary); }
.flash-warning { background: rgba(203, 161, 53, 0.15); border: 1px solid var(--accent-gold); color: var(--text-primary); }

/* Product detail photo gallery thumbnails */
.product-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm);
  border: 2px solid var(--border-color); cursor: pointer; transition: var(--transition); opacity: 0.7;
}
.product-gallery-thumb:hover { opacity: 1; }
.product-gallery-thumb.active { border-color: var(--accent-gold); opacity: 1; }

/* Quantity stepper (product detail add-to-cart) */
.qty-stepper { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 4px; }
.qty-stepper .btn-icon { width: 32px; height: 32px; }
.qty-stepper input {
  width: 44px; text-align: center; background: transparent; border: none; color: var(--text-primary);
  font-family: var(--font-heading); font-size: 1.1rem; -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
