/* ============================================
   SelfEvents — Product Page Styles
   Port 1:1 din new-design/new_design 2/v1/css/product.css
   Gallery, options selector, tabs,
   quantity picker, sticky CTA mobile
   ============================================ */

/* --- Gallery --- */
.gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.gallery-main img {
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.gallery-main:hover img {
  transform: scale(1.03);
}

.gallery-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: #BA2257;
}

/* --- Color/Option Selector (legacy buttons) --- */
.option-btn {
  border: 2px solid #E8DED4;
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
  cursor: pointer;
  background: white;
}

.option-btn:hover {
  border-color: #7A6F68;
}

.option-btn.selected {
  border-color: #BA2257;
  background: #BA2257;
  color: white;
}

/* --- Select (culoare fundiță) --- */
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #7A6F68;
  border-bottom: 2px solid #7A6F68;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: #fff;
  border: 1px solid #E8DED4;
  border-radius: 12px;
  padding: 0.85rem 2.75rem 0.85rem 1rem;
  font-size: 0.9rem;
  color: #2D2926;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-select:focus {
  outline: none;
  border-color: #BA2257;
  box-shadow: 0 0 0 3px rgba(186, 34, 87, 0.12);
}
.form-select:invalid { color: #9E9490; }

/* --- Cantități uzuale (presets) --- */
.qty-preset {
  min-width: 44px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid #E8DED4;
  border-radius: 9999px;
  background: #fff;
  color: #7A6F68;
  cursor: pointer;
  transition: all 0.2s ease;
}
.qty-preset:hover { border-color: #BA2257; color: #BA2257; }
.qty-preset.is-active {
  background: #BA2257;
  border-color: #BA2257;
  color: #fff;
}

/* --- Îți mai recomandăm (add-on bundle) --- */
.addon-box {
  border: 1px solid #E8DED4;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  background: #FFFAF5;
}
.addon-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2D2926;
  margin-bottom: 0.85rem;
}
.addon-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0;
  cursor: pointer;
  border-top: 1px solid rgba(232, 222, 212, 0.7);
}
.addon-row:first-of-type { border-top: none; }
.addon-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #BA2257;
  cursor: pointer;
}
.addon-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  background: #F5EDE4;
}
.addon-name {
  flex: 1;
  font-size: 0.83rem;
  line-height: 1.3;
  color: #2D2926;
}
.addon-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: #BA2257;
  white-space: nowrap;
}

/* --- Progres transport gratuit --- */
.ship-progress-label {
  font-size: 0.78rem;
  color: #7A6F68;
  margin-bottom: 0.4rem;
}
.ship-progress-label strong { color: #BA2257; }
.ship-progress-label.is-complete { color: #657255; }
.ship-progress-track {
  height: 6px;
  border-radius: 9999px;
  background: #F5EDE4;
  overflow: hidden;
}
.ship-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, #D4396F, #BA2257);
  transition: width 0.4s ease;
}
.ship-progress-fill.is-complete {
  background: linear-gradient(90deg, #95A580, #7D8B6A);
}

/* --- Quantity Picker --- */
.qty-picker {
  display: inline-flex;
  align-items: center;
  border: 1px solid #E8DED4;
  border-radius: 9999px;
  overflow: hidden;
}

.qty-picker button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.qty-picker button:hover {
  background: #F5EDE4;
}

.qty-picker input {
  width: 48px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
}

.qty-picker input::-webkit-inner-spin-button,
.qty-picker input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* --- Product Tabs --- */
.tab-btn {
  position: relative;
  padding-bottom: 12px;
  color: #7A6F68;
  transition: color 0.2s ease;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.tab-btn.active {
  color: #2D2926;
}

.tab-btn.active::after {
  background: #BA2257;
}

.tab-btn:hover {
  color: #2D2926;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Sticky Add to Cart (Mobile) --- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 250, 245, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid #E8DED4;
  padding: 12px 24px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-cta.visible {
  transform: translateY(0);
}

/* --- Lightbox --- */
.lightbox {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-height: 85vh;
  max-width: 90vw;
  object-fit: contain;
}

/* --- Cross-sell Scroll --- */
.cross-sell-track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cross-sell-track::-webkit-scrollbar {
  display: none;
}

.cross-sell-track > * {
  scroll-snap-align: start;
}
