/* ====================================================================
   UTILITIES MODULE
   Componentes reutilizables, animaciones, helpers flex/grid
   ==================================================================== */

/* ====================================================================
   FLEXBOX UTILITIES
   ==================================================================== */

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* ====================================================================
   GRID UTILITIES
   ==================================================================== */

.grid {
  display: grid;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.grid-rows-1 { grid-template-rows: 1fr; }
.grid-rows-2 { grid-template-rows: repeat(2, 1fr); }
.grid-rows-3 { grid-template-rows: repeat(3, 1fr); }

.gap-0 { gap: 0; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.auto-cols-fr { grid-auto-columns: 1fr; }
.auto-rows-fr { grid-auto-rows: 1fr; }

/* ====================================================================
   POSITION UTILITIES
   ==================================================================== */

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* ====================================================================
   SIZE UTILITIES
   ==================================================================== */

.w-full { width: 100%; }
.w-screen { width: 100vw; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }

.min-h-screen { min-height: 100vh; }
.max-w-full { max-width: var(--max-width-full); }
.max-w-editorial { max-width: var(--max-width-editorial); }

/* ====================================================================
   OVERFLOW UTILITIES
   ==================================================================== */

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* ====================================================================
   OPACITY UTILITIES
   ==================================================================== */

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ====================================================================
   VISIBILITY UTILITIES
   ==================================================================== */

.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

.hidden {
  display: none;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.inline-block {
  display: inline-block;
}

/* ====================================================================
   Z-INDEX UTILITIES
   ==================================================================== */

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }
.z-auto { z-index: auto; }

/* ====================================================================
   ANIMATIONS
   ==================================================================== */

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

/* Reveal */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-reveal {
  animation: reveal 0.8s ease-out forwards;
  opacity: 0;
}

/* Slide Up */
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

/* Slide Down */
@keyframes slideDown {
  from {
    transform: translateY(-40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-down {
  animation: slideDown 0.8s ease-out forwards;
}

/* Slide In Left */
@keyframes slideInLeft {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

/* Slide In Right */
@keyframes slideInRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* Scale Up */
@keyframes scaleUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-scale-up {
  animation: scaleUp 0.6s ease-out forwards;
}

/* Image Reveal (left to right) */
@keyframes imageReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.animate-image-reveal {
  animation: imageReveal 0.8s ease-out forwards;
  clip-path: inset(0 100% 0 0);
}

/* Pulse */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ====================================================================
   TRANSITION UTILITIES
   ==================================================================== */

.transition {
  transition: var(--transition);
}

.transition-slow {
  transition: var(--transition-slow);
}

.transition-none {
  transition: none;
}

/* ====================================================================
   TRANSFORM UTILITIES
   ==================================================================== */

.translate-x-0 { transform: translateX(0); }
.translate-y-0 { transform: translateY(0); }

.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:translate-y--2:hover {
  transform: translateY(-2px);
}

.hover\:opacity-75:hover {
  opacity: 0.75;
}

.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.group:hover .group-hover\:translate-y--4 {
  transform: translateY(-4px);
}

/* ====================================================================
   SHADOW UTILITIES
   ==================================================================== */

.shadow-none {
  box-shadow: none;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ====================================================================
   BORDER RADIUS UTILITIES
   ==================================================================== */

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* ====================================================================
   ASPECT RATIO UTILITIES
   ==================================================================== */

.aspect-auto { aspect-ratio: auto; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }

/* ====================================================================
   RESPONSIVE UTILITIES
   ==================================================================== */

@media (max-width: 1024px) {
  .lg\:hidden {
    display: none;
  }
}

@media (max-width: 768px) {
  .md\:hidden {
    display: none;
  }

  .md\:grid-cols-1 {
    grid-template-columns: 1fr;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .md\:mb-lg {
    margin-bottom: var(--spacing-lg);
  }

  .md\:p-md {
    padding: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .sm\:hidden {
    display: none;
  }

  .sm\:grid-cols-1 {
    grid-template-columns: 1fr;
  }

  .sm\:text-center {
    text-align: center;
  }

  .sm\:mb-md {
    margin-bottom: var(--spacing-md);
  }

  .sm\:p-sm {
    padding: var(--spacing-sm);
  }
}

/* ====================================================================
   BUTTONS
   ==================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-montserrat);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  border-radius: 0;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  border-color: var(--color-text);
  background: transparent;
  color: var(--color-text);
}

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

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 11px;
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 13px;
}

/* ====================================================================
   FORM UTILITIES
   ==================================================================== */

input,
textarea,
select {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: var(--spacing-sm);
  border-radius: 2px;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(182, 161, 107, 0.1);
}

/* ====================================================================
   CONTAINER QUERIES (Future)
   ==================================================================== */

@supports (container-type: inline-size) {
  .container-card {
    container-type: inline-size;
  }

  @container (min-width: 400px) {
    .container-card-content {
      grid-template-columns: 1fr 1fr;
    }
  }
}

/* ============================================================
   HOVER UNIFICADO — Agregado
   Sin cajas oscuras. Solo acento dorado sutil.
============================================================ */

.ly-ct-opt:hover,
.ly-ct-opt:focus {
  background: rgba(182,161,107,.06) !important;
  color: var(--txt, #111) !important;
  padding-left: 6px;
}
.ly-ct-opt:hover::after { color: var(--acc, #b6a16b) !important; transform: translateX(4px); }

.ly-dd__btn:hover,
.ly-dd.open .ly-dd__btn,
.ly-dd.active-filter .ly-dd__btn {
  color: var(--txt, #111) !important;
  background: none !important;
  border-bottom-color: var(--acc, #b6a16b) !important;
}

.ly-view-btn.active { color: var(--txt, #111) !important; border-bottom-color: var(--acc, #b6a16b) !important; background: none !important; }
.ly-view-btn:hover  { color: var(--txt, #111) !important; background: none !important; }

.ly-dd__opt:hover { background: rgba(182,161,107,.05) !important; }
.ly-dd__opt.active { color: var(--txt, #111) !important; }

.ly-arc-card__a:hover .ly-arc-card__lv-inner { background: rgba(182,161,107,.04) !important; }
.ly-gallery-btn:hover { color: var(--txt, #111) !important; background: none !important; }
