/* Darauche Audio Web - funciones de cliente. La prioridad visual sigue siendo móvil. */
.client-view {
  min-height: 60vh;
  padding: 4px 0 20px;
}
.client-view[hidden] { display: none !important; }
.client-view-heading {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.client-view-heading h1 { font-size: 25px; }
.client-back {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}
.client-view-content { min-width: 0; }
.client-loading,
.client-empty,
.client-auth-gate {
  min-height: 130px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}
.client-empty strong,
.client-auth-gate strong { color: var(--text); font-size: 18px; }
.client-primary,
.client-secondary,
.client-danger {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
}
.client-primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}
.client-secondary {
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--text);
}
.client-danger {
  border: 1px solid rgba(255, 103, 113, .45);
  background: rgba(255, 103, 113, .09);
  color: var(--danger);
}
.client-primary:disabled,
.client-secondary:disabled,
.client-danger:disabled { opacity: .48; cursor: default; }

.auth-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.auth-switcher button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.auth-switcher button.is-active {
  border-color: rgba(35, 153, 255, .65);
  background: var(--surface-alt);
  color: var(--text);
}
.auth-card,
.profile-card,
.profile-actions,
.cart-summary {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.client-form { display: grid; gap: 10px; }
.client-field { display: grid; gap: 6px; }
.client-field span { color: var(--muted); font-size: 12px; font-weight: 700; }
.client-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  padding: 0 13px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 16px;
}
.client-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35, 153, 255, .10); }
.auth-note { margin: 12px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.client-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 103, 113, .10);
  color: #ff9da4;
  font-size: 13px;
}

.profile-card { text-align: left; }
.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}
.profile-name { margin: 12px 0 13px; font-size: 23px; }
.profile-meta { padding: 9px 0; border-top: 1px solid var(--line); }
.profile-meta:first-of-type { border-top: 0; }
.profile-meta small { display: block; color: var(--muted); font-size: 11px; }
.profile-meta strong { display: block; margin-top: 2px; font-size: 14px; word-break: break-word; }
.profile-actions { margin-top: 12px; display: grid; gap: 10px; }

.client-product-list { display: grid; gap: 10px; }
.client-product-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.client-product-image {
  width: 92px;
  height: 92px;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
}
.client-product-image img { width: 100%; height: 100%; object-fit: contain; }
.client-product-copy { min-width: 0; display: flex; flex-direction: column; }
.client-product-copy h3 {
  margin: 2px 0 5px;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.client-product-price { margin-top: auto; font-size: 16px; font-weight: 900; }
.client-row-actions { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.client-row-actions button { min-height: 36px; padding: 0 11px; border-radius: 10px; font-size: 12px; }

.cart-line {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.cart-line + .cart-line { margin-top: 9px; }
.cart-line-image { width: 78px; height: 78px; overflow: hidden; border-radius: 10px; background: #fff; }
.cart-line-image img { width: 100%; height: 100%; object-fit: contain; }
.cart-line h3 { margin: 1px 0 4px; font-size: 14px; line-height: 1.35; }
.cart-line-price { color: var(--muted); font-size: 12px; }
.cart-line-subtotal { margin-top: 4px; font-weight: 900; }
.quantity-control { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.quantity-control button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 19px;
  cursor: pointer;
}
.quantity-control strong { min-width: 23px; text-align: center; }
.cart-remove { margin-left: auto; width: auto !important; padding: 0 9px; color: var(--danger) !important; font-size: 12px !important; }
.cart-summary { margin-top: 12px; }
.cart-summary-row { display: flex; justify-content: space-between; gap: 15px; align-items: baseline; }
.cart-summary-row strong { font-size: 23px; }
.cart-summary-actions { display: grid; gap: 9px; margin-top: 14px; }
.cart-next-note { color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }

.detail-client-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 9px;
  margin-top: 16px;
}
.detail-client-actions button { min-height: 48px; }
.favorite-toggle.is-favorite { border-color: rgba(35, 153, 255, .65); color: var(--blue); }

.nav-cart-icon,
.cart-icon-action { position: relative; }
.nav-cart-badge {
  position: absolute;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 9px;
  line-height: 1;
  font-style: normal;
}
.nav-cart-icon .nav-cart-badge { top: -7px; right: -11px; }
.cart-icon-action .nav-cart-badge { top: -5px; right: -5px; }

@media (max-width: 760px) {
  body.client-panel-open #storefront-content { display: none; }
  body.client-panel-open .main-content { padding-top: 8px; }
  .client-view { padding-bottom: 8px; }
  .client-view-heading h1 { font-size: 22px; }
  .client-view-heading .eyebrow { margin-bottom: 1px; }
  .client-back { margin-left: -6px; }
  .client-product-row { grid-template-columns: 82px minmax(0, 1fr); }
  .client-product-image { width: 82px; height: 82px; }
  .detail-client-actions { grid-template-columns: 1fr 1.35fr; }
}

@media (max-width: 370px) {
  .client-product-row { grid-template-columns: 72px minmax(0, 1fr); gap: 9px; }
  .client-product-image { width: 72px; height: 72px; }
  .cart-line { grid-template-columns: 68px minmax(0, 1fr); gap: 9px; }
  .cart-line-image { width: 68px; height: 68px; }
  .detail-client-actions { grid-template-columns: 1fr; }
}
