/* =====================================================
   Mavaro Bottle Personalizer — Frontend Styles v1.1
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

/* ── VARIABLES ── */
:root {
  --mp-accent:    #EF9350;
  --mp-primary:   #2E4343;
  --mp-mid:       #A8A8A8;
  --mp-grey:      #808080;
  --mp-charcoal:  #2B2B2B;
  --mp-caramel:   #D0A97D;
  --mp-brown:     #A56337;
  --font-display: 'Cormorant', serif;
  --font-body:    'DM Sans', sans-serif;

  /* Bottle render size — change ONE value to resize everything */
  --bottle-w: 120px;
}

/* ── WRAPPER ── */
.mavaro-personalizer-wrap {
  background: #fff;
  padding: 80px 40px;
  font-family: var(--font-body);
  color: var(--mp-charcoal);
  max-width: 1400px;
  margin: 0 auto;
}

/* ── HEADING ── */
.mp-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--mp-primary);
  text-align: center;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(-24px);
  animation: mpFadeDown 0.8s ease 0.2s forwards;
}
.mp-heading span { color: var(--mp-accent); }

/* ── 3-COLUMN GRID ── */
.mp-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 36px;
  align-items: start;
}

/* ── SIDE PANELS ── */
.mp-panel {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.05);
}
.mp-left  {
  opacity: 0;
  transform: translateX(-40px);
  animation: mpSlideRight 0.8s ease 0.5s forwards;
}
.mp-right {
  opacity: 0;
  transform: translateX(40px);
  animation: mpSlideLeft 0.8s ease 0.5s forwards;
}

.mp-step-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mp-accent);
  margin-bottom: 8px;
}
.mp-panel-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--mp-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}

/* ── SEARCH DROPDOWN ── */
.mp-search-wrap {
  position: relative;
  margin-bottom: 20px;
}
.mp-search-row {
  display: flex;
  align-items: center;
  background: #f8f8f8;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.mp-search-row:focus-within { border-color: var(--mp-accent); }

.mp-search-icon {
  padding: 0 12px;
  color: var(--mp-mid);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.mp-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 13px 8px 13px 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--mp-charcoal);
  outline: none;
}
.mp-search-input::placeholder { color: var(--mp-mid); }

.mp-clear-btn {
  padding: 0 12px;
  cursor: pointer;
  color: var(--mp-mid);
  background: none;
  border: none;
  font-size: 17px;
  line-height: 1;
  display: none;
  align-items: center;
}
.mp-clear-btn.visible { display: flex; }

/* Dropdown list */
.mp-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}
.mp-dropdown.open { display: block; }
.mp-dropdown::-webkit-scrollbar { width: 4px; }
.mp-dropdown::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

.mp-dropdown-item {
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--mp-charcoal);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mp-dropdown-item:hover,
.mp-dropdown-item.focused       { background: rgba(239,147,80,0.06); }
.mp-dropdown-item.selected      { background: rgba(239,147,80,0.1); color: var(--mp-accent); font-weight: 500; }
.mp-dropdown-item.out-of-stock  { opacity: 0.4; pointer-events: none; }
.mp-dropdown-item .item-price   { font-size: 12px; color: var(--mp-grey); font-weight: 400; white-space: nowrap; }
.mp-dropdown-item mark          { background: rgba(239,147,80,0.25); color: inherit; border-radius: 2px; padding: 0 1px; }

.mp-dropdown-loading,
.mp-dropdown-empty {
  padding: 14px;
  text-align: center;
  color: var(--mp-mid);
  font-size: 13px;
}

/* Fragrance info card */
.mp-frag-card {
  background: linear-gradient(135deg, #fdf9f4, #f8f1e8);
  border: 1px solid rgba(208,169,125,0.22);
  border-radius: 12px;
  padding: 18px;
  min-height: 90px;
}
.mp-frag-placeholder {
  color: var(--mp-mid);
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
  line-height: 1.6;
}
.mp-frag-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--mp-primary);
  margin-bottom: 4px;
}
.mp-frag-price {
  font-size: 13px;
  color: var(--mp-accent);
  font-weight: 500;
  margin-bottom: 8px;
}
.mp-frag-desc {
  font-size: 12px;
  line-height: 1.65;
  color: var(--mp-grey);
}

/* ══════════════════════════════════════════
   BOTTLE CENTER COLUMN
   Bottle image rendered at --bottle-w wide.
   Label overlay calibrated to this Mavaro
   50ml bottle mockup (rosy/nude bottle).
   ══════════════════════════════════════════ */
.mp-bottle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  opacity: 0;
  animation: mpFadeUp 0.9s ease 0.3s forwards;
}

.mp-bottle-stage {
  position: relative;
  width: var(--bottle-w);
  display: inline-block;
}

/* Soft shadow under bottle */
.mp-bottle-stage::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 20px;
  background: rgba(0,0,0,0.07);
  filter: blur(12px);
  border-radius: 50%;
  z-index: 0;
}

.mp-bottle-img {
  width: var(--bottle-w);
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

/* No-image placeholder (shown when no bottle image uploaded) */
.mp-bottle-placeholder {
  width: var(--bottle-w);
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border-radius: 12px;
  border: 2px dashed #ddd;
  gap: 12px;
  color: var(--mp-mid);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

/* ══════════════════════════════════════════
   LABEL OVERLAY
   Bottle image: 200px wide → ~476px tall
   (aspect ratio 500:1190 from source crop)

   White label on bottle:
     top  ≈ 41% of height = 195px
     left ≈ 17% of width  = 34px
     w    ≈ 64% of width  = 128px
     h    ≈ 23% of height = 110px

   TO ADJUST: nudge top/left by a few px at a time.
   ══════════════════════════════════════════ */
.mp-bottle-label {
  position: absolute;
  top:    195px;
  left:   34px;
  width:  128px;
  height: 110px;
  z-index: 10;
  pointer-events: none;

  /* Label appearance */
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;

  /* Layout: logo row / fragrance row / name row */
  display: grid;
  grid-template-rows: 28px 1fr 28px;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 8px 6px;
  gap: 2px;
}

.mp-label-logo {
  width: 60px;
  height: auto;
  display: block;
  align-self: center;
}

.mp-label-fragrance {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #111;
  display: block;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: center;
  max-width: 100%;
  word-break: break-word;
  transition: font-size 0.2s ease;
}

/* Auto-shrink long fragrance names */
.mp-label-fragrance.long  { font-size: 10px; }
.mp-label-fragrance.xlong { font-size: 8px;  }

.mp-label-customer-wrap {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.mp-label-for {
  font-family: var(--font-body);
  font-size: 6px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #aaa;
  display: block;
}

.mp-label-name {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  color: #444;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  transition: all 0.3s ease;
}

.mp-label-divider {
  width: 20px;
  height: 1px;
  background: var(--mp-caramel);
  opacity: 0.5;
  margin: 0 auto;
}

/* ── RIGHT PANEL FIELDS ── */
.mp-field { margin-bottom: 22px; }

.mp-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mp-grey);
  margin-bottom: 8px;
  font-weight: 500;
}

.mp-field input[type="text"] {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid rgba(0,0,0,0.12);
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--mp-charcoal);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.05em;
}
.mp-field input[type="text"]:focus { border-color: var(--mp-accent); }

.mp-char-hint {
  font-size: 11px;
  color: var(--mp-mid);
  margin-top: 5px;
}

.mp-divider {
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 20px 0;
}

/* Price row */
.mp-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.mp-price-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mp-grey);
}
.mp-price-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--mp-primary);
}

/* Message banner */
.mp-message {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.mp-message.success {
  background: rgba(46,67,67,0.08);
  color: var(--mp-primary);
  border-left: 3px solid var(--mp-primary);
}
.mp-message.error {
  background: rgba(220,53,69,0.07);
  color: #c0392b;
  border-left: 3px solid #c0392b;
}

/* Add to Cart button */
.mp-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 28px;
  background: var(--mp-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, opacity 0.2s;
}
.mp-cart-btn:hover:not(:disabled) {
  background: var(--mp-accent);
  transform: translateY(-1px);
}
.mp-cart-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.mp-cart-btn.loading {
  opacity: 0.65;
  pointer-events: none;
}
.mp-cart-btn.added { background: #2ecc71; }

/* Trust badges */
.mp-trust-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.mp-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--mp-grey);
}
.mp-trust-item svg {
  color: var(--mp-accent);
  stroke: var(--mp-accent);
  flex-shrink: 0;
}

/* ── ANIMATIONS ── */
@keyframes mpFadeDown   { to { opacity: 1; transform: translateY(0); } }
@keyframes mpFadeUp     { to { opacity: 1; transform: translateY(0); } }
@keyframes mpSlideRight { to { opacity: 1; transform: translateX(0); } }
@keyframes mpSlideLeft  { to { opacity: 1; transform: translateX(0); } }

/* ══════════════════════════════════════════
   RESPONSIVE — single column below 960px
   ══════════════════════════════════════════ */
@media (max-width: 960px) {
  .mavaro-personalizer-wrap {
    padding: 48px 20px;
  }
  .mp-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
    gap: 24px;
  }
  .mp-bottle-wrap { order: -1; }
  .mp-heading {
    font-size: 32px;
    margin-bottom: 32px;
  }

  /* Keep bottle same size on mobile — already compact at 200px */
  .mp-bottle-stage { width: var(--bottle-w); }
  .mp-bottle-img   { width: var(--bottle-w); }

  /* Label stays the same since bottle width unchanged */
}