@font-face {
  font-family: 'DM Sans';
  src: url('../assets/DM_Sans/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 1000;
  font-style: normal;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../assets/DM_Sans/DMSans-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 1000;
  font-style: italic;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #F3EDE1;
  --text: #350E02;
  --logo: #350E02;
  --icon: #350E02;
  --line: #DCD2C6;
  --line-opacity: 1;
  --featured-bg: #E4DBCF;
  --library-divider-fill: #F3EDE1;
  --library-divider-stroke: #DCD2C6;
  --border: #DCD2C6;
  --btn-primary: #350E02;
  --star: #350E02;
}

body {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 24px 24px;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-feature-settings: "liga" 1, "salt" 1, "ss01" 1, "ss02" 1;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 9999;
}

/* Overlay decorative lines */
.overlay-line {
  position: absolute;
  top: 368px;
  bottom: 0;
  width: 1px;
  background: #DCD2C6;
  z-index: 0;
  pointer-events: none;
}

.overlay-line-left {
  left: 48px;
}

.overlay-line-right {
  right: 48px;
}

.overlay-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
.nav {
  width: 100%;
  max-width: 1280px;
  height: auto;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  z-index: 9999;
}

.nav-inner {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-tabs {
  display: none;
  padding: 4px;
  align-items: center;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(53, 14, 2, 0.01);
}
/* Pestañas BROWSE/LIBRARY/ACCOUNT visibles en tablet/desktop (≥768px); en
   móvil la nav queda limpia (logo + cuenta) para no desbordar a 402px. */
@media (min-width: 768px) { .nav-tabs { display: flex; } }

.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  /* Spring on the active pill so the fill settles with a touch of
     overshoot; press is handled separately below. */
  transition: background-color 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Animated active indicator: a thin underline that springs in/out and
   slides between tabs (each tab owns its own, the active one reveals). */
.nav-tab::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--bg);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-tab.active::after {
  transform: scaleX(1);
  opacity: 0.85;
}

.nav-tab:not(.active):hover {
  background: rgba(53, 14, 2, 0.05);
}

.nav-tab:active {
  transform: scale(0.96);
}

.nav-tab.active {
  background: var(--text);
}

.nav-tab.active .nav-tab-label {
  color: var(--bg);
  font-weight: 900;
  text-transform: uppercase;
}

.nav-tab:not(.active) .nav-tab-label {
  color: var(--text);
  font-weight: 400;
}

.nav-tab-label {
  font-size: 16px;
  white-space: nowrap;
  background: transparent;
}

.nav-tab-divider {
  width: 1px;
  height: 16px;
  background: #DCD2C6;
  margin: 0 4px;
}

.nav-logo {
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-logo svg {
  display: block;
  color: var(--logo);
}

.nav-user-icon svg {
  color: var(--icon);
}

.nav-user {
  display: flex;
  align-items: center;
  margin-left: auto;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
  position: relative;
}

.nav-user:hover {
  background: var(--text);
}

.nav-user:hover .nav-user-icon svg path {
  fill: var(--bg);
}

.nav-user-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(53, 14, 2, 0.01);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: fill 0.15s ease;
}

/* The nav-user-icon already has position: relative from line 182 */

.skin-modal {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  width: 260px;
  z-index: 9999;
}

.skin-modal.is-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skin-option {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.skin-line {
  width: 100%;
  height: 1px;
  background: var(--line);
  opacity: var(--line-opacity);
}

.skin-option:hover {
  background: rgba(53, 14, 2, 0.05);
  border-radius: 8px;
}

.skin-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.skin-colors {
  display: flex;
  gap: 8px;
}

.skin-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: block;
  position: relative;
}

.skin-color::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--text);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.skin-check {
  pointer-events: none;
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.skin-option.is-active .skin-check {
  background: var(--text);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8L6.5 11.5L13 4.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8L6.5 11.5L13 4.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}

.skin-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero Section */
.hero {
  width: 100%;
  max-width: 1280px;
  height: 368px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  top: -200px;
  bottom: -200px;
  width: 100%;
  height: auto;
  background: url('../assets/spider-man.webp') 50% / cover no-repeat;
  opacity: 0.1;
}

.hero-divider {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  opacity: var(--line-opacity);
  z-index: 1;
}

.hero-divider-top {
  top: 0;
}

.hero-divider-bottom {
  bottom: 0;
}

.hero-content {
  width: 100%;
  position: relative;
  z-index: 1;
  padding: 0 48px 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 80px;
}

.hero-cover {
  flex-shrink: 0;
  width: 320px;
  height: 429px;
  transform: rotate(-4deg);
}

.hero-cover .comic-cover {
  width: 320px;
  height: 429px;
}

.hero-cover:hover {
  z-index: 2;
}

.hero-cover:hover .cover-shadow-1 {
  transform: translateX(-8px) rotateY(-12deg) scale(1.02);
}

.hero-cover:hover .cover-shadow-2 {
  transform: translateX(-16px) rotateY(-12deg) scale(1.04);
}

.hero-cover:hover .cover-shadow-3,
.hero-cover:hover .cover-reflection,
.hero-cover:hover .cover-triangle svg {
  transform: translateX(-24px) rotateY(-20deg) scale(1.066);
}

.hero-cover:hover .cover-triangle svg path[fill^="url"] {
  fill-opacity: 0;
}

.hero-cover .cover-shadow-1 {
  top: 14px;
  left: 6px;
  width: 100%;
  height: 93%;
}

.hero-cover .cover-shadow-2 {
  top: 7px;
  right: 0;
  width: 100%;
  height: 96%;
}

.hero-info {
  flex: 1;
  max-width: 700px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px 0 40px 0;
}

.hero-publisher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hero-publisher-text {
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
  line-height: 32px;
  letter-spacing: 0.48px;
}

.hero-publisher-sub {
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: 0.48px;
}

.hero-publisher svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hero-publisher svg path {
  stroke: var(--text);
  stroke-width: 2;
}

/* In the Figma, publisher label sits in a row with the icon */
.hero-publisher-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-title {
  color: var(--text);
  font-feature-settings: 'ss02' on;
  font-family: 'DM Sans', sans-serif;
  font-size: 80px;
  font-style: normal;
  font-weight: 900;
  line-height: 104%;
  letter-spacing: -3.2px;
  margin-bottom: 24px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 4px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--btn-primary);
  color: var(--bg);
  padding: 0 20px;
  border: 1px solid transparent;
}

.btn-primary .btn-label {
  font-weight: 900;
  text-transform: uppercase;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--text);
  font-feature-settings: 'ss02' on;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  text-align: center;
}

.btn-primary .btn-price {
  font-weight: 400;
}

.btn-primary:hover {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--text);
}

.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

/* Store Container */
.store {
  position: relative;
  max-width: 1280px;
  width: 100%;
  height: auto;
  margin: 40px auto 0 auto;
  border-radius: 8px;
  overflow: visible;
  border: 1px solid var(--border);
}

.section-library {
  margin-top: 0;
  margin-bottom: 160px;
  padding-top: 48px;
}

.section-library .covers-grid {
  gap: 0;
  height: auto;
  margin-bottom: 0;
}

.section-library .covers-row {
  position: relative;
  z-index: 1;
}

.section-featured {
  margin-top: 160px;
}

.covers-row .cover-shadow-1 {
  left: 14px;
}

.library-frame {
  height: 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: absolute;
  left: -49px;
  right: -49px;
  bottom: -26px;
  display: flex;
  justify-content: center;
  z-index: 0;
}

.library-divider {
  position: absolute;
  bottom: -10px;
  left: -56px;
  right: -56px;
  display: flex;
  justify-content: center;
  z-index: 0;
  color: var(--library-divider-fill);
}

.library-divider svg path {
  fill: var(--library-divider-fill);
  stroke: var(--library-divider-stroke);
}

/* Section */

.sections {
  position: relative;
  width: auto;
  height: auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  margin: 0 48px;
  display: flex;
  flex-direction: column;
  gap: 160px;
}

.section {
  position: relative;
  width: 100%;
  height: auto;
}

.section-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 80px;
  height: 32px;
  position: relative;
}

.section-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--line);
  opacity: var(--line-opacity);
  transform: translateY(-50%);
}

.section-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 400;
  font-size: 24px;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.96px;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  padding: 0 16px;
  z-index: 1;
}

.section-view-all {
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 4px 0 8px;
  background: var(--bg);
  border: 1px solid var(--text);
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  letter-spacing: 0.42px;
  transition: background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  margin-right: 48px;
  z-index: 1;
}

.section-view-all svg path {
  stroke: var(--text);
}

.section-view-all:hover {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

.section-view-all:active {
  transform: scale(0.96);
}

.section-view-all svg {
  width: 20px;
  height: 20px;
}

.section-view-all svg path {
  stroke: var(--text);
  transition: stroke 0.2s ease;
}

.section-view-all:hover svg path {
  stroke: var(--bg);
}

/* Featured List */
.featured-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 28px;
  padding: 0 48px;
}

.featured-item {
  display: flex;
  gap: 20px;
  width: 100%;
  height: auto;
  background: var(--featured-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.featured-item .comic-cover {
  width: 152px;
  height: 204px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  border-radius: 6px;
}

.featured-item .comic-cover:hover {
  z-index: 2;
}

.featured-item .comic-cover:not(:hover) {
  filter: saturate(0.9);
}

.featured-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 0 20px;
}

.featured-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-author {
  font-weight: 400;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.48px;
}

.featured-title {
  font-weight: 900;
  font-size: 22px;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.88px;
}

.featured-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-value {
  font-weight: 500;
  font-size: 24px;
  color: var(--text);
  letter-spacing: 0.48px;
}

.featured-rating svg {
  width: 12px;
  height: 12px;
}

.featured-rating svg path {
  fill: var(--star);
}

/* Covers Grid */
.covers-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
}

.covers-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 48px;
}

.covers-group {
  position: relative;
  width: 100%;
}

.section--collapsible .covers-row:not(:first-child) {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 48px;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  pointer-events: none;
}

.section--collapsible .covers-group:not(:first-child) {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.section--collapsible .featured-item:nth-child(n+3) {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.section--collapsible .section-view-all svg {
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section--collapsible.is-expanded .section-view-all svg {
  transform: rotate(180deg);
}

.section--collapsible.is-expanded .covers-row:not(:first-child) {
  opacity: 1;
  max-height: 400px;
  padding: 0 48px;
  overflow: visible;
  pointer-events: auto;
}

.section--collapsible.is-expanded .covers-row:not(:first-child) .comic-cover,
.section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover {
  animation: fadeUpReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0s;
}

.section--collapsible.is-expanded .covers-row:not(:first-child) .comic-cover:nth-child(1),
.section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(1) { animation-delay: 0s; }

.section--collapsible.is-expanded .covers-row:not(:first-child) .comic-cover:nth-child(2),
.section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(2) { animation-delay: 0.06s; }

.section--collapsible.is-expanded .covers-row:not(:first-child) .comic-cover:nth-child(3),
.section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(3) { animation-delay: 0.12s; }

.section--collapsible.is-expanded .covers-row:not(:first-child) .comic-cover:nth-child(4),
.section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(4) { animation-delay: 0.18s; }

.section--collapsible.is-expanded .covers-row:not(:first-child) .comic-cover:nth-child(5),
.section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(5) { animation-delay: 0.24s; }

body .section--collapsible .covers-group:not(:first-child) .comic-cover {
  animation: none !important;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body .section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover {
  opacity: 1;
  transform: translateY(0);
  animation: fadeUpReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0s;
}

body .section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(1) { animation-delay: 0s; }
body .section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(2) { animation-delay: 0.06s; }
body .section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(3) { animation-delay: 0.12s; }
body .section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(4) { animation-delay: 0.18s; }
body .section--collapsible.is-expanded .covers-group:not(:first-child) .comic-cover:nth-child(5) { animation-delay: 0.24s; }

.section--collapsible.is-expanded .covers-group:not(:first-child) {
  opacity: 1;
  max-height: 400px;
  overflow: visible;
  pointer-events: auto;
}

.section--collapsible.is-expanded .featured-item:nth-child(n+3) {
  opacity: 1;
  max-height: 400px;
  pointer-events: auto;
}

.section-collection .covers-grid,
.section-library .covers-grid {
  transition: row-gap 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-collection.is-expanded .covers-grid {
  row-gap: 80px;
}

.section-library.is-expanded .covers-grid {
  row-gap: 80px;
}

.covers-row .comic-cover {
  width: 152px;
  height: 204px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  border-radius: 6px;
}

.covers-row .comic-cover:hover {
  z-index: 2;
}

.covers-row .comic-cover:not(:hover) {
  filter: saturate(0.9);
}

/* Comic Cover Component */
.comic-cover {
  position: relative;
  width: 100%;
  max-width: 152px;
  height: auto;
  max-height: 204px;
  flex-shrink: 0;
  border-radius: 4px;
  perspective: 1200px;
}

.cover-shadow {
  position: absolute;
  border-radius: 4px;
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.comic-cover:hover .cover-shadow-1 {
  transform: translateX(-4px) rotateY(-12deg) scale(1.02);
}

.comic-cover:hover .cover-shadow-2 {
  transform: translateX(-8px) rotateY(-12deg) scale(1.04);
}

.comic-cover:hover .cover-shadow-3,
.comic-cover:hover .cover-reflection,
.comic-cover:hover .cover-triangle svg {
  transform: translateX(-12px) rotateY(-20deg) scale(1.066);
}

.comic-cover:hover .cover-triangle svg path[fill^="url"] {
  fill-opacity: 0;
}

.cover-shadow-1 {
  top: 7px;
  left: 12px;
  width: 91%;
  height: 93%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 1px 0 1px 0 rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(2px);
}

.cover-shadow-2 {
  top: 3px;
  right: 3px;
  width: 97%;
  height: 96.5%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 1px 0 1px 0 rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(2px);
}

.cover-shadow-3 {
  inset: 0;
  right: 6px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  box-shadow: 1px 0 1px 0 rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(2px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cover-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 97%;
  height: 67%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    transparent 100%
  );
  clip-path: polygon(0 0, 100% 0, 100% 67%, 0% 100%);
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cover-triangle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cover-triangle svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Section spacing: last section needs bottom margin */
.section-collection {
  padding-bottom: 56px;
}

/* ========================================
TABLET STYLES LANDSCAPE (1024px - 1199px)
======================================== */
@media (min-width: 1024px) and (max-width: 1199px) and (orientation: landscape) {

  .section-view-all{
    margin-right: 24px;
  }

  .covers-row {
    padding: 0 24px;
  }
  
  .sections {
    margin: 0 32px;
  }

  .featured-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 24px;
  }

  .library-divider {
    bottom: -10px;
    left: -36px;
    right: -36px;
  }

  .library-frame {
    height: 14px;
    left: -32px;
    right: -32px;
    bottom: -21px;
  }

  .hero-content {
    gap: 64px;
  }

  .hero-info {
    padding: 40px 0;
  }

  .section--collapsible .featured-item:nth-child(n+3) {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .section--collapsible.is-expanded .featured-item:nth-child(n+3) {
    opacity: 1;
    max-height: 400px;
    pointer-events: auto;
  }

  .section--collapsible.is-expanded .covers-row:not(:first-child) {
    padding: 0 24px;
  }

}

/* ========================================
TABLET STYLES PORTRAIT (768px - 1023px)
======================================== */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {

  .sections {
    margin: 0 24px;
    gap: 92px;
  }

  .section-header {
    margin-bottom: 56px;
  }

  .section-library {
    margin-bottom: 120px;
  }

  .section-view-all {
    margin-right: 24px;
  }

  .covers-row {
    padding: 0 24px;
  }

  .library-divider {
    bottom: -10px;
    left: -27px;
    right: -27px;
  }

  .library-frame {
    height: 12px;
    left: -25px;
    right: -25px;
    bottom: -17px;
  }

  .covers-grid {
    gap: 40px;
  }

  .covers-row .comic-cover {
    width: calc(152px * 0.8);
    height: calc(204px * 0.8);
  }

  .covers-row .comic-cover:nth-last-child(-n+1) {
    display: none;
  }

  .hero {
    height: auto;
    /* El héroe es FULL-WIDTH: anula el padding lateral del body para llegar a
       los bordes (los textos/portadas sí llevan el +4 de padding interno). */
    margin-left: -12px;
    margin-right: -12px;
  }

  .hero-content {
    flex-direction: column;
    align-content: center;
    padding: 0 16px;
    gap: 24px;
  }

  .hero-cover,
  .hero-cover .comic-cover {
    top: -40px;
    width: calc(320px * 0.9);
    height: calc(429px * 0.9);
  }

  .hero-info {
    padding: 24px 0 40px 0;
    align-items: center;
    text-align: center;
    align-content: center;
  }

  .hero-publisher {
    justify-content: center;
  }

  .section-featured {
    margin-top: 120px;
  }

  .featured-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 24px;
  }

  .section--collapsible .featured-item:nth-child(n+3) {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .section--collapsible.is-expanded .featured-item:nth-child(n+3) {
    opacity: 1;
    max-height: 400px;
    pointer-events: auto;
  }

  .section-collection.is-expanded .covers-grid {
    row-gap: 40px;
}

.section--collapsible.is-expanded .covers-row:not(:first-child) {
    padding: 0 24px;
}

}

/* ========================================
MOBILE STYLES (390px - 767px)
======================================== */
@media (max-width: 767px) {

  body {
    /* +4px de padding interno a cada lado (textos, flechas y portadas no
       full-bleed); los elementos full-width (héroe, divisores) lo compensan. */
    padding: 24px 12px 8px 12px;
  }

  .store {
    margin: 24px auto 0 auto;
  }
  .sections {
    margin: 0 !important;
    border: none;
    gap: 80px;
  }

  .section-header {
    margin-bottom: 32px !important;
    justify-content: space-between;
  }

  .section-title {
    position: static;
    transform: none;
    font-size: 20px;
    letter-spacing: 0.7px;
    padding: 0 12px;
  }

  .section-library {
    margin-bottom: 80px;
    padding-top: 40px;
  }

  .section-view-all {
    margin-right: 12px !important;
  }

  .covers-row {
    padding: 0 24px !important;
  }

  .library-divider {
    bottom: -12px !important;
    left: 0 !important;
    right: 0 !important;
  }

  .library-frame {
    height: 8px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -12px !important;
  }

  .covers-grid {
    gap: 20px;
  }

  .section-collection.is-expanded .covers-grid {
    row-gap: 20px;
  }

  .comic-cover {
    width: calc(152px * 0.7) !important;
    height: calc(204px * 0.7) !important;
  }

  .hero-content {
    flex-direction: column;
    align-content: center;
    padding: 0 16px;
    gap: 24px;
  }

  .hero-cover,
  .hero-cover .comic-cover {
    width: calc(320px * 0.6) !important;
    height: calc(429px * 0.6) !important;
  }

  .hero-info {
    padding: 12px 0 24px 0 !important;
    align-items: center;
    text-align: center;
    align-content: center;
  }

  .hero-publisher {
    justify-content: center;
  }

  .hero-title {
    font-size: 48px;
    line-height: 48px;
    letter-spacing: -1.92px;
  }

  .title-line1,
  .title-line2 {
    display: block;
  }

  .hero-publisher-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0.48px;
    text-transform: uppercase;
  }

  .hero-publisher-sub {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.48px;
  }

  .view-text {
    display: none;
  }

  .library-divider svg {
    stroke-width: 1.5px !important;
  }

  .section-featured {
    margin-top: 120px;
  }

  .featured-list {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 24px;
    padding: 0 24px;
  }

  .featured-list .featured-item {
    max-width: 100%;
  }
  
  .sections {
    margin: 0;
    border: none;
    gap: 92px;
  }

  .section-header {
    margin-bottom: 56px;
  }

  .section-library {
    margin-bottom: 92px;
  }

  .section-view-all {
    margin-right: 24px;
  }

  .covers-row {
    padding: 0 12px !important;
  }

  .library-divider {
    bottom: -10px;
    left: -27px;
    right: -27px;
  }

  .library-frame {
    height: 12px;
    left: -25px;
    right: -25px;
    bottom: -17px;
  }

  .covers-grid {
    gap: 16px;
  }

  .covers-row .comic-cover {
    width: calc(152px * 0.8) !important;
    height: calc(204px * 0.8) !important;
  }

  .covers-row .comic-cover:nth-last-child(-n+2) {
    display: none;
  }

  .hero {
    height: auto;
    /* El héroe es FULL-WIDTH: anula el padding lateral del body para llegar a
       los bordes (los textos/portadas sí llevan el +4 de padding interno). */
    margin-left: -12px;
    margin-right: -12px;
  }

  .hero-content {
    flex-direction: column;
    align-content: center;
    padding: 0 16px;
    gap: 24px;
  }

  .hero-cover,
  .hero-cover .comic-cover {
    width: calc(320px * 0.7) !important;
    height: calc(429px * 0.7) !important;
  }

  .hero-info {
    padding: 24px 0 40px 0;
    align-items: center;
    text-align: center;
    align-content: center;
  }

  .hero-publisher {
    justify-content: center;
  }

  .section-featured {
    margin-top: 92px;
  }

  .featured-list {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 16px;
    padding: 0 12px;
  }

  .featured-list .featured-item {
    max-width: 100%;
    padding: 8px;
  }

.featured-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0 10px;
  }

  .featured-meta {
    gap: 0;
  }

  .featured-author {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: -0.42px;
  }

  .featured-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.6px;
  }

  .rating-value {
    font-size: 24px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0.72px;
    text-transform: uppercase;
  }
}
/* Skin Themes */
body.skin-classic {
  --bg: #F3EDE1;
  --text: #350E02;
  --logo: #350E02;
  --icon: #350E02;
  --line: #DCD2C6;
  --line-opacity: 1;
  --featured-bg: #E4DBCF;
  --library-divider-fill: #F3EDE1;
  --library-divider-stroke: #DCD2C6;
}

body.skin-dark {
  --bg: #1E0910;
  --text: #FFCF74;
  --logo: #FFCF74;
  --icon: #FFCF74;
  --line: #FFCF74;
  --line-opacity: 0.16;
  --featured-bg: #250C14;
  --border: rgba(255, 207, 116, 0.16);
  --btn-primary: #FFCF74;
  --library-divider-fill: #1E0910;
  --library-divider-stroke: rgba(255, 207, 116, 0.16);
  --star: #FFCF74;
}

body.skin-forest {
  --bg: #EEEEEE;
  --text: #37383D;
  --logo: #312F30;
  --line: #312F30;
  --line-opacity: 0.12;
  --featured-bg: rgba(49, 47, 48, 0.08);
  --library-divider-fill: #EEEEEE;
  --library-divider-stroke: rgba(49, 47, 48, 0.12);
  --border: rgba(49, 47, 48, 0.12);
  --btn-primary: #37383D;
}

body.skin-ocean {
  --bg: #03A6DB;
  --text: #FEE737;
  --logo: #FEE737;
  --icon: #FEE737;
  --line: #FEE737;
  --line-opacity: 0.24;
  --featured-bg: #059DCE;
  --library-divider-fill: #03A6DB;
  --library-divider-stroke: rgba(254, 231, 55, 0.24);
  --border: rgba(254, 231, 55, 0.24);
  --btn-primary: #FEE737;
  --star: #FEE737;
}

body.skin-sunset {
  --bg: #05379D;
  --text: #FFFFFF;
  --logo: #FFFFFF;
  --icon: #FFFFFF;
  --line: #FFFFFF;
  --line-opacity: 0.24;
  --featured-bg: #05328F;
  --library-divider-fill: #05379D;
  --library-divider-stroke: rgba(255, 255, 255, 0.24);
  --border: rgba(255, 255, 255, 0.24);
  --btn-primary: #EC0E17;
  --star: #EC0E17;
}

body.skin-sunset .btn-primary {
  color: #FFFFFF;
}

body.skin-sunset .btn-primary:hover {
  background: #FFFFFF;
  color: #EC0E17;
  border-color: #FFFFFF;
}

/* Intro Animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUpReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nav-logo,
.nav-user {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.nav-user {
  animation-delay: 0.1s;
}

.nav-logo {
  animation-delay: 0.1s;
}

.store .sections .section-library .section-header {
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.2s;
}

.store .sections .section-library .library-divider,
.store .sections .section-library .library-frame {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.5s;
}

.store .sections .section-library .covers-row .comic-cover {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.store .sections .section-library .covers-row .comic-cover:nth-child(1) { animation-delay: 0.6s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(2) { animation-delay: 0.66s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(3) { animation-delay: 0.72s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(4) { animation-delay: 0.78s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(5) { animation-delay: 0.84s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(6) { animation-delay: 0.9s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(7) { animation-delay: 0.96s; }
.store .sections .section-library .covers-row .comic-cover:nth-child(8) { animation-delay: 1.02s; }

.hero-bg {
  animation: fadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1s;
}

.hero-cover {
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.1s;
}

.hero-publisher {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.25s;
}

.hero-title {
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.4s;
}

.hero-buttons {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.55s;
}

.section-featured .section-header {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.7s;
}

.featured-list .featured-item:nth-child(-n+2) {
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.featured-list .featured-item:nth-child(1) { animation-delay: 1.9s; }
.featured-list .featured-item:nth-child(2) { animation-delay: 1.98s; }

/* Nav tabs — settle in just before logo & user */
.nav-tabs {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.05s;
}

/* Hero dividers — frame the hero before & after its content */
.hero-divider-top {
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.9s;
}
.hero-divider-bottom {
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.65s;
}

/* Collection section — header first, then a diagonal cover cascade */
.section-collection .section-header {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 2.0s;
}

.section-collection .covers-row .comic-cover {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Diagonal cascade: each row starts 150ms after the previous,
   covers within a row stagger 50ms apart. */
.section-collection .covers-row:nth-child(1) .comic-cover:nth-child(1) { animation-delay: 2.10s; }
.section-collection .covers-row:nth-child(1) .comic-cover:nth-child(2) { animation-delay: 2.15s; }
.section-collection .covers-row:nth-child(1) .comic-cover:nth-child(3) { animation-delay: 2.20s; }
.section-collection .covers-row:nth-child(1) .comic-cover:nth-child(4) { animation-delay: 2.25s; }
.section-collection .covers-row:nth-child(1) .comic-cover:nth-child(5) { animation-delay: 2.30s; }
.section-collection .covers-row:nth-child(2) .comic-cover:nth-child(1) { animation-delay: 2.25s; }
.section-collection .covers-row:nth-child(2) .comic-cover:nth-child(2) { animation-delay: 2.30s; }
.section-collection .covers-row:nth-child(2) .comic-cover:nth-child(3) { animation-delay: 2.35s; }
.section-collection .covers-row:nth-child(2) .comic-cover:nth-child(4) { animation-delay: 2.40s; }
.section-collection .covers-row:nth-child(2) .comic-cover:nth-child(5) { animation-delay: 2.45s; }
.section-collection .covers-row:nth-child(3) .comic-cover:nth-child(1) { animation-delay: 2.40s; }
.section-collection .covers-row:nth-child(3) .comic-cover:nth-child(2) { animation-delay: 2.45s; }
.section-collection .covers-row:nth-child(3) .comic-cover:nth-child(3) { animation-delay: 2.50s; }
.section-collection .covers-row:nth-child(3) .comic-cover:nth-child(4) { animation-delay: 2.55s; }
.section-collection .covers-row:nth-child(3) .comic-cover:nth-child(5) { animation-delay: 2.60s; }

@media (prefers-reduced-motion: reduce) {
  .nav-logo, .nav-user, .nav-tabs,
  .section-library .section-header,
  .library-divider, .library-frame,
  .section-library .covers-row .comic-cover,
  .hero-bg, .hero-cover, .hero-publisher, .hero-title, .hero-buttons,
  .hero-divider-top, .hero-divider-bottom,
  .section-featured .section-header,
  .featured-list .featured-item,
  .section-collection .section-header,
  .section-collection .covers-row .comic-cover {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.section--collapsible.is-expanded .featured-list .featured-item:nth-child(n+3) {
  animation: fadeUpReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.section--collapsible.is-expanded .featured-list .featured-item:nth-child(3) { animation-delay: 0s; }
.section--collapsible.is-expanded .featured-list .featured-item:nth-child(4) { animation-delay: 0.08s; }

/* ========================================
   Interactive covers
======================================== */
.covers-row .comic-cover,
.featured-item .comic-cover,
.hero-cover .comic-cover {
  cursor: pointer;
}

/* Tactile press on tappable covers: a subtle settle-in scale that reads
   as a physical depress. Spring decel keeps it premium, not bouncy. */
.covers-row .comic-cover,
.featured-item .comic-cover,
.hero-cover .comic-cover {
  transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.covers-row .comic-cover:active,
.featured-item .comic-cover:active,
.hero-cover .comic-cover:active {
  transform: scale(0.96);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

.comic-cover:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 6px;
}

.nav-tab:focus-visible,
.section-view-all:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

body.modal-locked {
  overflow: hidden;
}

/* ========================================
   Comic Detail Modal
======================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  /* Intermediate progressive-blur veil: scrim + blur */
  background: rgba(18, 8, 2, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

/* Dialog springs open FROM the tapped cover: --origin-x/--origin-y are
   set in JS to the cover's centre so the scale/translate reads as the
   panel growing out of the cover. Spring curve gives a confident settle. */
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform-origin: var(--origin-x, 50%) var(--origin-y, 50%);
  transform: translate(var(--origin-dx, 0px), var(--origin-dy, 12px)) scale(0.9);
  transition: opacity 0.26s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(53, 14, 2, 0.01);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.modal-close:hover {
  background: var(--text);
  color: var(--bg);
  transform: rotate(90deg);
}

.modal-close:active {
  transform: scale(0.92);
}

.modal-body {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.modal-cover {
  flex-shrink: 0;
  width: 248px;
  display: flex;
  align-items: flex-start;
  /* El libro es MÁS GRANDE y SALE ~16px por encima del borde superior del modal
     (padding 32 + 16) para solapar el marco — efecto "rompe la tarjeta". */
  align-self: flex-start;
  margin-top: -48px;
  position: relative;
  z-index: 3;
}

.modal-cover .comic-cover {
  width: 248px;
  max-width: 248px;
  height: 332px;
  max-height: 332px;
}

.modal-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
}

.modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-author {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  opacity: 0.7;
  letter-spacing: 0.3px;
}

.modal-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--text);
  font-feature-settings: 'ss02' on;
}

.modal-issue {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  opacity: 0.6;
  letter-spacing: 0.3px;
}

.modal-blurb {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  opacity: 0.85;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-price {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text);
}

.modal-add {
  height: 44px;
  padding: 0 22px;
}

.modal-add.is-added {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-dialog {
    transition: opacity 0.12s linear;
    transform: none !important;
  }
  .nav-tab,
  .nav-tab::after,
  .section-view-all,
  .section-view-all svg,
  .covers-row .comic-cover,
  .featured-item .comic-cover,
  .hero-cover .comic-cover,
  .btn {
    transition-duration: 0.01ms !important;
  }
  .nav-tab:active,
  .section-view-all:active,
  .section-view-all:hover,
  .covers-row .comic-cover:active,
  .featured-item .comic-cover:active,
  .hero-cover .comic-cover:active,
  .btn:active {
    transform: none !important;
  }
}

@media (max-width: 767px) {
  .modal {
    padding: 16px;
    align-items: flex-end;
  }

  .modal-dialog {
    padding: 24px 20px;
    max-height: 92vh;
    /* overflow VISIBLE para que el libro pueda sobresalir por arriba del modal
       (con auto se recortaba). El contenido del cómic es corto y cabe. */
    overflow: visible;
  }

  .modal-body {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .modal-cover {
    width: 188px;
    align-self: center;
    margin-top: -44px;   /* sale por encima del borde superior del modal (sheet) */
    position: relative;
    z-index: 3;
  }

  .modal-cover .comic-cover {
    width: 188px !important;
    max-width: 188px;
    height: 252px !important;
    max-height: 252px;
  }

  .modal-info {
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .modal-title {
    font-size: 28px;
    letter-spacing: -0.8px;
  }

  .modal-footer {
    justify-content: center;
    width: 100%;
  }
}
