/* =========================================================
   Legal Library — Design tokens (extraídos del prototipo Figma)
   ========================================================= */
:root {
  /* Colores */
  --color-bg-inicio: #e9e9e9;
  --color-bg-panel: #f5f5f5;
  --color-text-body: #545454;
  --color-white: #ffffff;

  /* Gradientes */
  --gradient-warm: linear-gradient(76deg, #ff7e5a 2%, #ffd5c0 96%);
  --gradient-search: linear-gradient(19deg, #5aa7ff 60.7%, #ff7e5a 60.7%, #ffc0c0 149%);
  --gradient-chip: linear-gradient(5deg, #ffba5a 8%, #ffd5c0 128%);
  --gradient-placeholder: linear-gradient(160deg, #545454 0%, #2b2b2b 100%);

  /* Radios */
  --radius-pill: 38px;
  --radius-chip: 30.5px;
  --radius-card: 20px;

  /* Sombras */
  --shadow-card: 0px 2px 4px rgba(0, 0, 0, 0.17);
  --shadow-pill: 0px 4px 4px rgba(0, 0, 0, 0.1);
  --shadow-product-img: 8px 9px 14.6px rgba(0, 0, 0, 0.1);

  /* Tipografías */
  --font-display: "Dela Gothic One", cursive, sans-serif;
  --font-body: "Josefin Sans", "Segoe UI", sans-serif;

  --page-width: 1280px;
}

/* =========================================================
   Reset base
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg-inicio);
  color: var(--color-text-body);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

:focus-visible {
  outline: 2px solid #5aa7ff;
  outline-offset: 2px;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   Layout de página (ancho fijo de escritorio, 1280px)
   ========================================================= */
.page {
  width: var(--page-width);
  min-width: var(--page-width);
  min-height: 100vh;
  background: var(--color-bg-panel);
  padding: 32px 40px 80px;
}

/* =========================================================
   Header (compartido entre inicio y legales-dermo)
   ========================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.logo-link {
  display: inline-flex;
}

.logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-warm);
  box-shadow: var(--shadow-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-bar {
  width: 220px;
  height: 52px;
  padding: 0 6px 0 24px;
  border-radius: var(--radius-chip);
  background: var(--gradient-search);
  box-shadow: var(--shadow-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-bar-text {
  color: var(--color-white);
  font-weight: 600;
  font-size: 16px;
}

.search-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.menu-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dcdcdc;
  box-shadow: var(--shadow-pill);
}

/* =========================================================
   Hero (solo inicio)
   ========================================================= */
.hero {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
}

.hero-photo {
  flex: 1.7;
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-card);
  background: var(--gradient-placeholder);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-warm);
  opacity: 0.15;
}

.hero-photo h1 {
  position: relative;
  z-index: 1;
  padding: 32px;
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 0.98;
  color: var(--color-white);
}

.hero-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-card {
  flex: 1;
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.hero-card .material-symbols-outlined {
  font-size: 36px;
  color: var(--color-text-body);
}

.hero-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--color-text-body);
}

.hero-card p {
  font-size: 16px;
  font-weight: 400;
}

.btn-add-product {
  height: 52px;
  border-radius: var(--radius-chip);
  background: var(--gradient-warm);
  box-shadow: var(--shadow-pill);
  color: var(--color-white);
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   Favoritos (solo inicio)
   ========================================================= */
.favorites-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.favorites-banner h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--color-text-body);
}

.star-placeholder {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--gradient-warm);
  display: inline-block;
}

.favorites-banner p {
  font-size: 16px;
}

/* =========================================================
   Grilla de categorías (solo inicio)
   ========================================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--gradient-placeholder);
}

.category-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-pill {
  height: 54px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--gradient-warm);
  box-shadow: var(--shadow-pill);
  color: var(--color-white);
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-pill[disabled],
a.category-pill:not([href]) {
  opacity: 0.85;
}

/* =========================================================
   Banda de título "DERMO COSMÉTICOS" (solo legales-dermo)
   ========================================================= */
.title-banner {
  position: relative;
  min-height: 260px;
  margin-bottom: 40px;
  border-radius: var(--radius-card);
  background: var(--gradient-placeholder);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.title-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-warm);
  opacity: 0.15;
}

.title-banner h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 1.08;
  color: var(--color-white);
}

/* =========================================================
   Chips de marca (solo legales-dermo)
   ========================================================= */
.brand-chips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.brand-chips-row {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.brand-chip {
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-chip);
  background: var(--gradient-chip);
  box-shadow: var(--shadow-pill);
  color: var(--color-text-body);
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* =========================================================
   Tarjetas de producto (solo legales-dermo, generadas por JS)
   ========================================================= */
.product-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.product-card {
  width: 936px;
  min-height: 255px;
  padding: 24px 28px;
  border-radius: var(--radius-card);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 28px;
}

.product-photo-frame {
  flex: 0 0 148px;
  width: 148px;
  height: 197px;
  border-radius: var(--radius-card);
  background: var(--color-white);
  box-shadow: var(--shadow-product-img);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
}

.product-photo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info {
  flex: 1 1 auto;
  max-width: 657px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.product-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  color: var(--color-text-body);
}

.product-code {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  color: var(--color-text-body);
}

.product-ayp {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-text-body);
}

.product-ayp strong {
  font-weight: 700;
}

.copy-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 4px;
  color: var(--color-text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.copy-icon .material-symbols-outlined {
  font-size: 19px;
}

.copy-icon.copied {
  color: #3fa34d;
}

.btn-copy-all {
  flex: 0 0 166px;
  width: 166px;
  height: 37px;
  align-self: center;
  border-radius: var(--radius-chip);
  background: var(--gradient-warm);
  box-shadow: var(--shadow-pill);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  transition: background 0.2s ease;
}

.btn-copy-all.copied {
  background: #3fa34d;
}
