/* ============================================
   DONCELLA CINEMA — Tienda (compra, reproductor, Mis películas)
   ============================================ */

/* ---- Bloque de compra en la página de la película ---- */
.film-buy {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  border-radius: 1.2rem;
  margin-bottom: 3rem;
  transform: translateZ(0);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.film-buy-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(35%) brightness(.32);
}

.film-buy-inner {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 3.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.store-label {
  font-family: var(--sans);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(245,242,237,.6);
}

.film-buy-price {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -.02em;
}

.film-buy-price small {
  font-family: var(--sans);
  font-style: normal;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(245,242,237,.6);
  margin-left: .6rem;
  vertical-align: middle;
}

.film-buy-note {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(245,242,237,.78);
  max-width: 34rem;
}

.store-form { display: flex; flex-direction: column; gap: .9rem; max-width: 30rem; }

.store-input {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--white);
  background: rgba(245,242,237,.06);
  border: 1px solid rgba(245,242,237,.22);
  border-radius: 999px;
  padding: .85rem 1.25rem;
  outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.store-input::placeholder { color: rgba(245,242,237,.45); }
.store-input:focus { border-color: rgba(245,242,237,.6); background: rgba(245,242,237,.1); }

.store-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }

.store-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .95rem 1.4rem;
  border: 1px solid var(--white);
  background: var(--white);
  color: var(--black);
  transition: opacity .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  text-decoration: none;
}
.store-btn:hover { opacity: .85; }
.store-btn--ghost { background: transparent; color: var(--white); border-color: rgba(245,242,237,.4); }
.store-btn--ghost:hover { border-color: var(--white); opacity: 1; }
.store-btn--test { background: transparent; color: var(--accent); border: 1px dashed var(--accent); }
.store-btn[disabled] { opacity: .45; cursor: wait; }
.store-btn small { font-weight: 500; letter-spacing: .08em; opacity: .65; text-transform: none; font-size: .72rem; }

.store-msg {
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.5;
  color: var(--accent);
  min-height: 1.4em;
}
.store-msg a { text-decoration: underline; }

.store-fine {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .04em;
  color: rgba(245,242,237,.5);
}
.store-fine a { color: rgba(245,242,237,.8); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Páginas oscuras: reproductor y Mis películas ---- */
.store-page {
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  padding: calc(var(--nav-h) + 2.5rem) 0 6rem;
  flex: 1;
}

.store-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: .75rem 0 2rem;
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 1.2rem;
  overflow: hidden;
  transform: translateZ(0);
}
.player-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.player-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: rgba(245,242,237,.75);
  pointer-events: none;
}

.store-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.myfilms-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.myfilms-card {
  position: relative;
  display: block;
  aspect-ratio: 2/3;
  border-radius: 1.2rem;
  overflow: hidden;
  transform: translateZ(0);
  color: var(--white);
}
.myfilms-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(25%) brightness(.6);
  transition: filter .5s var(--ease), transform .6s var(--ease);
}
.myfilms-card:hover img { filter: grayscale(0%) brightness(.55); transform: scale(1.03); }
.myfilms-card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem; }
.myfilms-card-title { font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1.1; margin-bottom: .5rem; }

.store-section { max-width: 32rem; }
.store-section p.lead { font-family: var(--serif); font-size: 1.1rem; line-height: 1.6; color: rgba(245,242,237,.8); margin-bottom: 1.5rem; }

.store-hidden { display: none !important; }

@media (max-width: 600px) {
  .store-buttons { flex-direction: column; }
  .store-btn { width: 100%; }
  .player-wrap { border-radius: .6rem; }
}

.store-msg[data-status]:empty { display: none; }
.store-msg[data-status] { margin-bottom: 1.75rem; max-width: 34rem; }

/* ---- Banner de tienda en la pagina de la pelicula ---- */
.store-banner {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: 2.5rem 0 3rem;
  padding: 1.25rem 1.5rem;
  border-radius: .9rem;
  border: 1px solid rgba(10, 10, 8, .14);
  color: var(--black);
  text-decoration: none;
  text-align: center;
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.store-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/ofrenda2.webp') center / cover no-repeat;
  opacity: .12;
  transition: opacity .3s var(--ease), transform .6s var(--ease);
}
.store-banner > span { position: relative; z-index: 1; }
.store-banner:hover::before { opacity: .18; transform: scale(1.04); }
.store-banner-arrow { transition: transform .25s ease; }
.store-banner:hover .store-banner-arrow { transform: translateX(4px); }

/* ---- Pagina de tienda (subdominio films) ---- */
.store-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.store-top-logo { width: 34px; height: auto; display: block; }
.store-top nav { display: flex; align-items: center; gap: 1.25rem; }
.store-top a {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: .75;
}
.store-top a:hover { opacity: 1; }
.store-page-main {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 1.25rem 4rem;
}
.store-footer {
  padding: 1.5rem;
  text-align: center;
  font-family: var(--sans);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}
.store-footer a { color: inherit; text-decoration: none; }
@media (max-width: 640px) {
  .store-banner { font-size: .6rem; letter-spacing: .22em; padding: 1.1rem 1.1rem; }
}
