@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/Chillax-Extralight.ttf') format('truetype'),
       url('../fonts/Chillax-Extralight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/Chillax-Light.ttf') format('truetype'),
       url('../fonts/Chillax-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/Chillax-Regular.ttf') format('truetype'),
       url('../fonts/Chillax-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/Chillax-Medium.ttf') format('truetype'),
       url('../fonts/Chillax-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/Chillax-Semibold.ttf') format('truetype'),
       url('../fonts/Chillax-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/Chillax-Bold.ttf') format('truetype'),
       url('../fonts/Chillax-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-cream: #EDE8DD;
  --bg-card-cream: #DFDACF;
  --bg-card-hover: #D5CFC3;
  --bg-dark-olive: #21281A;
  --bg-dark-card: #2B3322;
  --olive-accent: #898433;
  --olive-light: #A8A348;
  --text-dark: #171B12;
  --text-muted-dark: #6E7265;
  --text-cream: #EDE8DD;
  --text-muted-cream: #A6AC9B;
  --font-brand: 'Chillax', system-ui, -apple-system, sans-serif;
  --font-body: 'Chillax', 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, a, input, select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Bulletproof Hero Background for Safari / iOS */
#home {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #0b0f0b;
  background-image: linear-gradient(rgba(0,0,0,0.38), rgba(0,0,0,0.58)), url('../assets/hero_monstera.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

h1, h2, h3, h4, .font-brand {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Badges & Capsules */
.brand-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(23, 27, 18, 0.15);
  background: rgba(23, 27, 18, 0.04);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s ease;
}
.brand-capsule:hover {
  background: rgba(23, 27, 18, 0.08);
  border-color: var(--text-dark);
}

.brand-capsule-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-cream);
  transition: all 0.3s ease;
}

/* Vinyl Player & Music Section */
@keyframes spin-vinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.vinyl-outer-frame {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 1px solid rgba(23, 27, 18, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
  padding: 1.5rem;
}

.vinyl-disk {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at center, transparent 38px, rgba(0,0,0,0.95) 39px),
    repeating-radial-gradient(circle at center, #111 0, #111 2px, #262626 3px, #111 4px),
    conic-gradient(from 45deg, rgba(255,255,255,0.07) 0deg, rgba(0,0,0,0.4) 90deg, rgba(255,255,255,0.07) 180deg, rgba(0,0,0,0.4) 270deg, rgba(255,255,255,0.07) 360deg);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 12px 24px -8px rgba(0, 0, 0, 0.3),
    inset 0 0 35px rgba(0,0,0,0.8),
    inset 0 0 0 1px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: spin-vinyl 12s linear infinite;
  animation-play-state: paused;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.vinyl-disk.spinning {
  animation-play-state: running;
}

.vinyl-center {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #181818;
  box-shadow: 0 0 15px rgba(0,0,0,0.7);
  position: relative;
  z-index: 2;
}

.vinyl-center::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #0a0a0a;
  border: 2px solid #555;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

/* Coffee Product Cards */
.product-card-container {
  border-radius: 24px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.product-card-container:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.product-card-box {
  border-radius: 18px;
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  transition: transform 0.4s ease;
}
.product-bag-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.22));
  transition: transform 0.4s ease;
}
.product-card-container:hover .product-bag-img {
  transform: scale(1.08);
}

/* Gallery Masonry & Art Cards */
.art-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card-cream);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.art-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 45px rgba(0,0,0,0.1);
}
.art-card-img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.art-card:hover .art-card-img {
  transform: scale(1.05);
}

/* Track list */
.track-row {
  transition: all 0.25s ease;
}
.track-row.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Modals (Safari WebKit & iOS Safe Areas) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 12, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Cart Drawer (iOS 100dvh & touch scrolling) */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: 100dvh;
  background: #EDE8DD;
  z-index: 10001;
  box-shadow: -15px 0 40px rgba(0,0,0,0.25);
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.cart-drawer.active {
  right: 0;
}

/* Mobile Menu Drawer (iOS Safari Safe Areas) */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: #171B12;
  color: #EDE8DD;
  z-index: 10002;
  box-shadow: 15px 0 40px rgba(0,0,0,0.5);
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding-top: calc(2rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-drawer.active {
  left: 0;
}
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Scrollable Tracklist Container (Deslizado hacia abajo para nuevas canciones) */
.tracklist-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.tracklist-scroll::-webkit-scrollbar {
  width: 5px;
}
.tracklist-scroll::-webkit-scrollbar-track {
  background: rgba(23, 27, 18, 0.08);
  border-radius: 9999px;
}
.tracklist-scroll::-webkit-scrollbar-thumb {
  background: rgba(23, 27, 18, 0.35);
  border-radius: 9999px;
}
.tracklist-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 27, 18, 0.65);
}


/* Resilient Baseline Fallback Rules (without breaking Tailwind utility precedence) */
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.hidden { display: none; }
@media (min-width: 640px) {
  .sm\:inline-block { display: inline-block; }
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none; }
}
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:inline-block { display: inline-block; }
  .md\:hidden { display: none; }
}
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
}
#admin-login-gate.hidden,
#admin-app-shell.hidden,
#login-error-msg.hidden {
  display: none !important;
}
