/* =========================================================
   YOYO STORE - Shared Reusable UI Component Library
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .container { padding-inline: 28px; }
}

/* Brand Logo Lockup */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.brand-logo img {
  height: 46px;
  width: auto;
  object-fit: contain;
}
.brand-logo--sm img { height: 38px; }
.brand-logo--lg img { height: 112px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--blush-500), var(--blush-600));
  color: var(--text-on-brand);
  box-shadow: var(--shadow-blush);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--blush-600), var(--blush-700));
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #fff;
  box-shadow: 0 8px 20px rgba(196, 155, 85, 0.28);
}
.btn-gold:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--text-primary);
  color: #fff;
}
.btn-dark:hover:not(:disabled) {
  background: #3B2D30;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-blush);
}
.btn-outline:hover:not(:disabled) {
  background: var(--blush-50);
  border-color: var(--blush-500);
  color: var(--blush-700);
}

.btn-soft {
  background: var(--blush-50);
  color: var(--blush-700);
}
.btn-soft:hover:not(:disabled) {
  background: var(--blush-100);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
}
.btn-whatsapp:hover { background: #1FB958; }

.btn-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
.btn-danger:hover {
  background: var(--status-danger);
  color: #fff;
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  position: relative;
  transition: var(--transition);
}
.icon-btn:hover {
  background: var(--blush-50);
  border-color: var(--blush-300);
  color: var(--blush-600);
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
}
.badge-blush { background: var(--blush-500); color: #fff; }
.badge-soft { background: var(--blush-100); color: var(--blush-700); }
.badge-gold { background: var(--gold-100); color: var(--gold-600); border: 1px solid var(--border-gold); }
.badge-dark { background: var(--text-primary); color: #fff; }
.badge-success { background: var(--status-success-bg); color: var(--status-success); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); }
.badge-danger { background: var(--status-danger-bg); color: var(--status-danger); }
.badge-info { background: var(--status-info-bg); color: var(--status-info); }
.badge-purple { background: var(--status-purple-bg); color: var(--status-purple); }

/* Form Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}
.form-label .req { color: var(--status-danger); }
.form-control {
  width: 100%;
  padding: 11px 14px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  font-size: 16px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
@media (min-width: 768px) {
  .form-control { font-size: 0.92rem; }
}
.form-control:focus {
  outline: none;
  border-color: var(--blush-500);
  box-shadow: 0 0 0 4px rgba(200, 121, 139, 0.14);
}
textarea.form-control {
  resize: vertical;
  min-height: 86px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Cards */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xs);
}
.card-body { padding: 18px; }

/* Product Card */
.product-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-blush);
}

.product-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-ivory);
  overflow: hidden;
  cursor: pointer;
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.product-card:hover .product-card__img {
  transform: scale(1.05);
}

.product-card__badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  z-index: 2;
}

.product-card__fav {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
  z-index: 2;
  transition: var(--transition);
}
.product-card__fav:hover { transform: scale(1.08); }
.product-card__fav.is-fav {
  color: #D64566;
  background: #FFF0F3;
}

.product-card__body {
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  min-height: 2.6em;
}
.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.product-card__price {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--blush-700);
}
.product-card__old-price {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.swatch-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid rgba(39, 30, 32, 0.16);
  box-shadow: inset 0 0 0 1.5px #fff;
}
.size-mini-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.size-mini {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-ivory);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}

.product-card__actions {
  margin-top: auto;
  padding-top: 6px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.product-card__actions .btn {
  padding: 9px 10px;
  font-size: 0.8rem;
  border-radius: 11px;
  min-height: 38px;
}
@media (min-width: 520px) {
  .product-card__actions {
    grid-template-columns: 1fr auto;
  }
}
@media (max-width: 480px) {
  .product-card__body { padding: 10px; gap: 6px; }
  .product-card__title { font-size: 0.85rem; }
  .product-card__price { font-size: 0.98rem; }
  .product-card__badges .badge { font-size: 0.66rem; padding: 3px 8px; }
}

/* Modal & Bottom Sheet */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 20, 23, 0.52);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-panel {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(28px);
  transition: transform 0.28s var(--ease);
}
@media (min-width: 640px) {
  .modal-panel {
    border-radius: var(--radius-lg);
    transform: scale(0.96);
  }
}
.modal-panel--lg { max-width: 780px; }
.modal-backdrop.is-open .modal-panel {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 5;
}
.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
}
.modal-body { padding: 20px; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--text-primary);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border-right: 4px solid var(--gold-500);
  animation: toastIn 0.3s var(--ease);
}
.toast--success { border-right-color: #46B97D; }
.toast--danger { border-right-color: #F06A7E; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 46px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-blush);
}
.empty-state__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--blush-50);
  color: var(--blush-600);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* Utility */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-blush { color: var(--blush-600); }
.text-gold { color: var(--gold-600); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
