/* ==========================================================================
   Lumière Beauty — reusable components: buttons, forms, cards, modals…
   ========================================================================== */

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.7rem; border-radius: var(--radius-pill);
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans),
    transform var(--trans), box-shadow var(--trans);
  text-align: center; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: var(--white); box-shadow: 0 8px 20px rgba(183, 110, 121, 0.28); }
.btn--primary:hover { background: var(--brand-dark); box-shadow: 0 6px 16px rgba(158, 87, 99, 0.32); }
.btn--dark { background: var(--dark); color: var(--white); }
.btn--dark:hover { background: #3B322D; }
.btn--gold { background: var(--gold); color: var(--dark); }
.btn--gold:hover { background: var(--gold-dark); color: var(--white); }
.btn--outline { border-color: var(--dark); color: var(--dark); background: transparent; }
.btn--outline:hover { background: var(--dark); color: var(--white); }
.btn--ghost { border-color: var(--border-strong); color: var(--dark); background: var(--white); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn--sm { padding: 0.55rem 1.15rem; font-size: 0.86rem; }
.btn--lg { padding: 1rem 2.2rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .icon--spinner { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.text-link { font-weight: 600; color: var(--brand-dark); display: inline-flex; align-items: center; gap: 0.35rem; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- badges & tags */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.7rem; border-radius: var(--radius-pill); line-height: 1.2;
}
.badge--sale { background: var(--brand); color: var(--white); }
.badge--new { background: var(--gold); color: var(--white); }
.badge--best { background: var(--dark); color: var(--gold); }
.badge--low { background: #F6E3D5; color: #A05A2C; }
.badge--info { background: var(--beige); color: var(--brand-dark); }
.badge--muted { background: var(--cream); color: var(--text); }
.badge--success { background: #E4EEE2; color: var(--green); }
.badge--warn { background: #F7EBD7; color: #96702E; }

/* ---------------------------------------------------------------- price & stars */
.price { display: inline-flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.price--current { font-weight: 700; color: var(--dark); }
.price--sale { color: var(--brand-dark); font-weight: 700; }
.price--old { color: #B4A79E; text-decoration: line-through; font-size: 0.9em; font-weight: 500; }
.price--save { color: var(--brand-dark); font-size: 0.82rem; font-weight: 600; }

.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; stroke-width: 0; }
.stars .icon.is-empty { color: #E4D6CD; }
.stars__label { font-size: 0.85rem; color: var(--text); margin-inline-start: 0.35rem; }

/* ---------------------------------------------------------------- product card */
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform var(--trans), box-shadow var(--trans);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-card__media { position: relative; display: block; background: var(--cream); overflow: hidden; }
.product-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 600ms ease; }
.product-card:hover .product-card__media img { transform: scale(1.05); }
.product-card__badges { position: absolute; top: 0.8rem; inset-inline-start: 0.8rem; display: flex; gap: 0.4rem; z-index: 2; }
.product-card__wishlist {
  position: absolute; top: 0.7rem; inset-inline-end: 0.7rem; z-index: 2;
  width: 38px; height: 38px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.92); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: all var(--trans);
}
.product-card__wishlist:hover { color: var(--brand); transform: scale(1.08); }
.product-card__wishlist.is-active { color: var(--brand); }
.product-card__wishlist.is-active .icon { fill: var(--brand); stroke: var(--brand); }
.product-card__quick {
  position: absolute; inset: auto 0.8rem 0.8rem; z-index: 2;
  display: flex; justify-content: center;
  opacity: 0; translate: 0 8px; transition: opacity var(--trans), translate var(--trans);
}
.product-card__quick .btn { width: 100%; }
.product-card:hover .product-card__quick, .product-card:focus-within .product-card__quick {
  opacity: 1; translate: 0 0;
}
.product-card__body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.product-card__brand { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); }
.product-card__name { font-size: 1rem; font-weight: 600; color: var(--dark); line-height: 1.35; }
.product-card__name:hover { color: var(--brand-dark); }
.product-card__rating { display: flex; align-items: center; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; margin-top: auto; padding-top: 0.55rem; }
.product-card__add {
  width: 44px; height: 44px; flex: none; border-radius: 99px;
  background: var(--cream); color: var(--dark);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--trans);
}
.product-card__add:hover { background: var(--brand); color: var(--white); transform: scale(1.06); }

/* ---------------------------------------------------------------- quantity stepper */
.qty {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-pill);
  overflow: hidden; background: var(--white); height: 44px;
}
.qty button {
  width: 40px; height: 100%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--dark); transition: background var(--trans);
}
.qty button:hover { background: var(--cream); color: var(--brand-dark); }
.qty button .icon { width: 15px; height: 15px; }
.qty input {
  width: 40px; text-align: center; border: 0; outline: none; font-weight: 600; color: var(--dark);
  -moz-appearance: textfield; appearance: textfield; background: transparent;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------------------------------------------------------------- forms */
.form-field { display: grid; gap: 0.4rem; }
.form-field label { font-size: 0.88rem; font-weight: 600; color: var(--dark); }
.form-field .req { color: var(--brand); }
.input, .textarea, .select-wrap select {
  width: 100%; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0.72rem 1rem; background: var(--white); color: var(--dark); font-size: 0.95rem;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.textarea { resize: vertical; min-height: 110px; }
.input:focus, .textarea:focus, .select-wrap select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.12);
}
.input.is-invalid, .textarea.is-invalid { border-color: #C04B4B; }
.form-error { font-size: 0.8rem; color: #C04B4B; display: none; }
.form-error.is-visible { display: block; }
.form-msg { font-size: 0.9rem; display: none; align-items: center; gap: 0.5rem; border-radius: var(--radius-sm); padding: 0.7rem 1rem; }
.form-msg.is-visible { display: flex; }
.form-msg--success { background: #E4EEE2; color: #3F5A3C; }
.form-msg--error { background: #F9E4E4; color: #A03B3B; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-inline-end: 2.4rem; cursor: pointer; }
.select-wrap::after {
  content: ""; position: absolute; right: 1rem; top: 50%; translate: 0 -30%;
  border: 5px solid transparent; border-top-color: var(--text); pointer-events: none;
}
.check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; color: var(--text); cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.check .count { margin-inline-start: auto; font-size: 0.8rem; color: #A99C93; }
.form-hint { font-size: 0.8rem; color: #A99C93; }

/* ---------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
}
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(41, 35, 33, 0.6); }
.modal__dialog {
  position: relative; background: var(--bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: min(880px, 100%);
  max-height: 92vh; overflow-y: auto;
  animation: modal-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 0.9rem; inset-inline-end: 0.9rem; z-index: 3;
  width: 38px; height: 38px; border-radius: 99px; background: var(--white); color: var(--dark);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.modal__close:hover { color: var(--brand); }
.modal--narrow .modal__dialog { width: min(460px, 100%); }
.qv-grid { display: grid; grid-template-columns: 1fr; }
.qv-media { background: var(--cream); }
.qv-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.qv-body { padding: 1.8rem; display: grid; gap: 0.9rem; align-content: start; }
.qv-body h2 { font-size: 1.6rem; }
.gateway-body { padding: 1.8rem; }
.gateway-body h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 0.6rem; }
.gateway-total { font-size: 2rem; font-family: var(--font-head); color: var(--dark); margin: 0.8rem 0 1.2rem; }

/* ---------------------------------------------------------------- cart drawer items */
.dcart-line { display: grid; grid-template-columns: 74px 1fr auto; gap: 0.9rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border); align-items: center; }
.dcart-line img { width: 74px; height: 92px; object-fit: cover; border-radius: var(--radius-sm); }
.dcart-line__name { font-weight: 600; color: var(--dark); font-size: 0.92rem; line-height: 1.3; }
.dcart-line__name:hover { color: var(--brand); }
.dcart-line__variant { font-size: 0.78rem; color: #A99C93; }
.dcart-line__controls { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.5rem; }
.dcart-line .qty { height: 34px; }
.dcart-line .qty button { width: 30px; }
.dcart-line .qty input { width: 30px; font-size: 0.85rem; }
.dcart-line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; } /* aligns to inline-end via flex in RTL automatically */
.dcart-line__price { font-weight: 700; color: var(--dark); font-size: 0.95rem; }
.dcart-line__remove { color: #B4A79E; padding: 0.25rem; }
.dcart-line__remove:hover { color: var(--brand-dark); }
.dcart-empty { text-align: center; padding: 3rem 1rem; }
.dcart-empty .icon { width: 44px; height: 44px; color: var(--border-strong); margin: 0 auto 1rem; }
.dcart-empty p { color: var(--text); margin-bottom: 1.2rem; }

/* ---------------------------------------------------------------- gallery lightbox (instagram) */
.lightbox img { border-radius: var(--radius-lg); width: min(560px, 86vw); }
.lightbox figcaption { text-align: center; margin-top: 0.8rem; color: #F3EBE5; font-size: 0.9rem; }
.lightbox__dialog { background: transparent; box-shadow: none; overflow: visible; }

/* ---------------------------------------------------------------- wishlist page */
.wishlist-item { display: flex; flex-direction: column; gap: 0.6rem; }
.wishlist-item .product-card { flex: 1; }
.wishlist-item__move { justify-content: center; }

/* ---------------------------------------------------------------- misc helpers */
.skeleton-note { font-size: 0.85rem; color: #A99C93; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 1.4rem 0; }
.hide { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
