/* ===== PERFIL VETERINARIA CSS ===== */

/* HERO */
.perfil-hero {
  padding: 90px 0 0; position: relative; overflow: hidden;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.ph-bg { position: absolute; inset: 0; pointer-events: none; }

/* Banner imagen */
.perfil-banner {
  width: 100%; height: 220px; object-fit: cover;
  display: block; border-bottom: 1px solid var(--border);
}

.perfil-hero-card {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 32px 36px;
  margin: -40px 0 0;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
}
.phc-left { display: flex; align-items: center; gap: 24px; flex: 1; }
.phc-avatar {
  font-size: 2.5rem; width: 80px; height: 80px; border-radius: 20px;
  background: rgba(29,78,216,.1);
  border: 2px solid rgba(29,78,216,.15);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--accent); font-weight: 800; font-size: 1.8rem;
}
.phc-status { font-size: .8rem; font-weight: 700; color: #16a34a; margin-bottom: 6px; }
.phc-status.off { color: var(--muted); }
.phc-info h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 4px; }
.phc-responsable { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.phc-trust { font-size: .78rem; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.phc-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.phc-meta span { font-size: .82rem; color: var(--muted); }
.phc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.phc-btn-wp {
  background: #25d366; color: #fff; padding: 14px 24px;
  border-radius: 12px; font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: .2s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; flex: 2;
  justify-content: center; min-width: 160px;
}
.phc-btn-wp:hover { box-shadow: 0 6px 20px rgba(37,211,102,.4); transform: translateY(-2px); }
.phc-btn-wp:active { transform: translateY(0); }
.phc-btn-call {
  background: rgba(29,78,216,.08); color: var(--accent);
  border: 1px solid rgba(29,78,216,.2); padding: 12px 20px;
  border-radius: 12px; font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: .2s; white-space: nowrap;
}
.phc-btn-call:hover { background: rgba(29,78,216,.15); }
.phc-btn-maps {
  background: rgba(124,58,237,.08); color: var(--accent2);
  border: 1px solid rgba(124,58,237,.15); padding: 12px 20px;
  border-radius: 12px; font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: .2s; white-space: nowrap;
}
.phc-btn-maps:hover { background: rgba(124,58,237,.15); }

/* BODY */
.perfil-body { padding: 40px 0 80px; }

/* TABS */
.perfil-tabs {
  display: flex; gap: 4px; margin-bottom: 32px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 6px; width: fit-content;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  overflow-x: auto;
}
.ptab {
  padding: 10px 24px; border-radius: 10px; border: none;
  background: transparent; color: var(--muted); font-family: inherit;
  font-size: .9rem; font-weight: 600; cursor: pointer; transition: .2s;
  white-space: nowrap;
}
.ptab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(29,78,216,.25); }
.ptab:hover:not(.active) { color: var(--text); background: var(--bg2); }
.ptab-panel { display: none; }
.ptab-panel.active { display: block; }

/* INFO GRID */
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.full-width { grid-column: 1 / -1; }
.info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.ic-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.ic-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ic-row:last-child { border-bottom: none; }
.ic-label { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ic-val { font-size: .88rem; text-align: right; font-weight: 500; }
.ic-maps-row { border-bottom: none !important; justify-content: center; padding-top: 14px; }
.ic-maps-btn {
  color: var(--accent2); font-size: .85rem; font-weight: 600; text-decoration: none;
  padding: 8px 16px; border: 1px solid rgba(124,58,237,.2);
  background: rgba(124,58,237,.06); border-radius: 8px; transition: .2s;
}
.ic-maps-btn:hover { background: rgba(124,58,237,.12); }
.ic-turno-now {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.2);
  border-radius: 10px; padding: 10px 14px;
}
.ic-turno-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 1.5s infinite; flex-shrink: 0; }
#ic-turno-text { font-size: .82rem; font-weight: 600; color: #16a34a; }
.servicios-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.serv-tag {
  background: rgba(29,78,216,.08); color: var(--accent);
  border: 1px solid rgba(29,78,216,.15); padding: 6px 14px;
  border-radius: 50px; font-size: .82rem; font-weight: 600;
}
.ic-desc { color: var(--muted); line-height: 1.7; font-size: .92rem; }

/* TIENDA */
.tienda-header { margin-bottom: 24px; }
.tienda-header h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.tienda-sub { color: var(--muted); font-size: .9rem; }
.tienda-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-btn {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  padding: 8px 16px; border-radius: 50px; font-family: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer; transition: .2s;
}
.cat-btn.active, .cat-btn:hover { background: rgba(29,78,216,.08); border-color: var(--accent); color: var(--accent); }
.productos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.producto-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.producto-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(29,78,216,.1); }
.pc-img {
  height: 140px; background: var(--bg2); display: flex;
  align-items: center; justify-content: center; font-size: 3.5rem;
  border-bottom: 1px solid var(--border);
}
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 16px; }
.pc-cat { font-size: .7rem; color: var(--accent2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.pc-nombre { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.pc-desc { font-size: .78rem; color: var(--muted); line-height: 1.5; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-footer { display: flex; align-items: center; justify-content: space-between; }
.pc-precio { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.pc-disponible { font-size: .72rem; color: #16a34a; font-weight: 700; }
.pc-agotado { font-size: .72rem; color: var(--muted); font-weight: 700; }
.tienda-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.tienda-empty h3 { margin-bottom: 8px; color: var(--text); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; max-width: 520px; width: 100%;
  overflow: hidden; position: relative;
  transform: scale(.95); transition: transform .2s;
  box-shadow: 0 24px 80px rgba(0,0,0,.15);
}
.modal-overlay.open .modal-card { transform: scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px; background: var(--bg2);
  border: 1px solid var(--border); color: var(--text); width: 32px; height: 32px;
  border-radius: 50%; font-size: .9rem; cursor: pointer; z-index: 1;
}
.modal-img {
  height: 200px; background: var(--bg2); display: flex;
  align-items: center; justify-content: center; font-size: 5rem;
  border-bottom: 1px solid var(--border);
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 24px; }
.modal-cat { font-size: .75rem; color: var(--accent2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.modal-nombre { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.modal-precio { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin-bottom: 12px; }
.modal-desc { color: var(--muted); line-height: 1.7; font-size: .9rem; margin-bottom: 20px; }
.modal-wp {
  display: block; text-align: center; background: #25d366; color: #fff;
  padding: 14px; border-radius: 12px; font-weight: 700; text-decoration: none;
  transition: .2s;
}
.modal-wp:hover { box-shadow: 0 6px 20px rgba(37,211,102,.4); }

/* RESEÑAS */
.resenas-header { margin-bottom: 24px; }
.rating-big { display: flex; align-items: center; gap: 16px; }
.rb-num { font-size: 3.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.rb-stars { font-size: 1.2rem; margin-bottom: 4px; color: #f59e0b; }
.rb-count { font-size: .82rem; color: var(--muted); }
.nueva-resena {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.nr-title { font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.star-picker { display: flex; gap: 6px; margin-bottom: 14px; font-size: 1.8rem; cursor: pointer; }
.sp-star { color: var(--border); transition: color .15s; }
.sp-star.active { color: #f59e0b; }
.nueva-resena .form-group { margin-bottom: 12px; }
.nueva-resena input,
.nueva-resena textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; color: var(--text);
  font-family: inherit; font-size: .95rem; outline: none;
  transition: border-color .2s; resize: vertical;
}
.nueva-resena input:focus,
.nueva-resena textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }
.resenas-list { display: flex; flex-direction: column; gap: 14px; }
.resena-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.rc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.rc-nombre { font-weight: 700; font-size: .9rem; }
.rc-fecha { font-size: .75rem; color: var(--muted); }
.rc-stars { font-size: .9rem; margin-bottom: 8px; color: #f59e0b; }
.rc-texto { font-size: .88rem; color: var(--muted); line-height: 1.6; }

/* RESPONSIVE */
@media(max-width:768px) {
  .perfil-hero { padding: 70px 0 0; }
  .perfil-banner { height: 160px; }
  .perfil-hero-card { flex-direction: column; align-items: flex-start; margin: -24px 16px 0; padding: 24px; }
  .phc-left { flex-direction: column; align-items: flex-start; }
  .phc-actions { width: 100%; }
  .phc-btn-wp, .phc-btn-call, .phc-btn-maps { flex: 1; text-align: center; }
  .info-grid { grid-template-columns: 1fr; }
  .perfil-tabs { width: 100%; }
  .ptab { flex: 1; text-align: center; font-size: .8rem; padding: 10px 8px; }
  .productos-grid { grid-template-columns: repeat(2, 1fr); }
  .perfil-body { padding: 28px 0 60px; }
}
@media(max-width:480px) {
  .productos-grid { grid-template-columns: 1fr; }
  .perfil-hero-card { margin: -24px 0 0; border-radius: 16px 16px 0 0; }
}

/* ── LOADING SKELETON ──────────────────────────────────────── */
@keyframes perfil-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.perfil-loading {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 24px; text-align: center;
}
.perfil-loading .pl-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 37%, var(--bg2) 63%);
  background-size: 800px 100%; animation: perfil-shimmer 1.4s ease infinite;
}
.perfil-loading .pl-line {
  height: 16px; border-radius: 8px;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 37%, var(--bg2) 63%);
  background-size: 800px 100%; animation: perfil-shimmer 1.4s ease infinite;
}
.perfil-loading .pl-title { width: 240px; height: 22px; }
.perfil-loading .pl-sub { width: 180px; }
.perfil-loading .pl-long { width: 300px; }
