/*
1. Variables (design system)
2. Reset / base
3. Tipografía y Colores
4. Layout (section, container, grid)
5. Navegación
6. Componentes
  1 - cards
  2 - buttons
  3 - badges
7. Secciones
  1 - hero
  2 - home previews
  3 - workshops
  4 - gallery
  5 - about
  6 - contact
  7 - admin
8. Animaciones
9. Responsive
10. Legales
*/



/*  ---   1. Variables (design system)   ---  */

:root {
  /* Colors */
  --bg-main: #f8f9fb;
  --bg-card: #ffffff;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --accent: #ad7d4dbe;
  --important: #472808be;
  --beige-lino: #f7f2ee;
  --verde-salvia: #A8B5A2;
  --marron-madera: #8e7f79;
  --gris-piedra: #5E5E5E;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Shadow */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);

  /* Animation */
  --ease: cubic-bezier(.4,0,.2,1);
  --fast: 150ms;
  --normal: 300ms;
}


/* LOGO */

.logo h2 {
  display: flex;
  flex-direction: column;
  line-height: 1;
  margin: 0;
}

.logo .logo-new {
  font-family: 'Allura', cursive;
  font-size: 2.8rem;
  color: #5E5E5E;
}

.logo .logo-beginning {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 0.3rem;
  color: #8C6E63;
}
.logo img {
  height: 60px;
}


/*  ---   2. Reset / base   ---  */

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

html {
  scroll-behavior: smooth;
}





/*  ---   3. Tipografía y Colores   ---  */

h1 {
  font-size: var(--text-3xl);
  margin-bottom: 1rem;
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: var(--text-xl);
}
h1, h2, h3 {
  letter-spacing: -0.3px;
}
small {
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
}
.link {
  text-decoration: underline;
}


/* Typography scale */
:root{
--text-xs: 0.75rem;
--text-sm: 0.85rem;
--text-base: 1rem;
--text-lg: 1.2rem;
--text-xl: 1.5rem;
--text-2xl: 2rem;
--text-3xl: 2.6rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--beige-lino);
  color: var(--gris-piedra);
  font-weight: 300;
  letter-spacing: 0.3px;
}

.btn--primary {
  background-color: var(--verde-salvia);
  color: white;
}

.btn--primary:hover {
  background-color: var(--marron-madera);
}
a {
  color: var(--gris-piedra);
}

a:hover {
  color: var(--marron-madera);
}




/*  ---   4. Layout (section, container, grid)   ---  */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.section {
  margin-bottom: 4rem;
  margin: 4rem 0;
}

.section__title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.section__title--center {
  text-align: center;
  margin-bottom: 2rem;
}



/*  ---   5. Navegación   ---  */


.navbar {
  background: var(--beige-lino);
  box-shadow: var(--shadow-sm);
}


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

.nav-center {
  display: flex;
  gap: 2rem;
}

.nav-center a {
  font-size: 0.9rem;
  position: relative;
}

.nav-center a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width var(--fast) var(--ease);
}

.nav-center a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn--small {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}


.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
}

/* modifier para botones en nav */
.btn--ghost {
  background: transparent;
  color: var(--text-main);
  padding: 0.3rem 0.6rem;
}

/* Contenedor */
.nav-user {
  position: relative;
}

/* Dropdown base */
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  min-width: 200px;
  padding: 0.5rem 0;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 100;
}

/* Estado abierto */
.nav-user.is-open .nav-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Items del dropdown */
.nav-user-dropdown a,
.nav-user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Hover elegante */
.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover {
  background-color: #f7f7f7;
}

/* Separador opcional */
.nav-user-dropdown form {
  margin: 0;
}
.nav-user-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-user.is-open .nav-user-toggle {
  font-weight: 600;
}



/*  ---   6. Componentes   ---  */
/*  ---   6. Componentes  1 - cards   ---  */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--normal) var(--ease),
    box-shadow var(--normal) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Card elements */
.card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
}

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

.card__title {
  font-size: 1rem;
  font-weight: 600;
}

.card__text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modifiers */
.card--compact {
  padding: 0.5rem;
}

.card--wide {
  width: 260px;
  min-width: 260px;
}


.card--clickable {
  cursor: pointer;
}

.card,
.workshop-row {
  background: var(--bg-card);
  backdrop-filter: blur(4px);
}

/* --- artwork cards --- */

.card__image--square {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.card__image--square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.6rem;
}

.card__title--small {
  font-size: 0.95rem;
  font-weight: 500;
}

.card__price {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.card--artwork .card__image img {
  transition: transform var(--normal) var(--ease);
}

.card--artwork:hover .card__image img {
  transform: scale(1.05);
}
.card--artwork {
  position: relative;
}

.card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* --- artwork detail --- */

.artwork-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.artwork-detail__main {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.artwork-detail__main img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: opacity var(--normal) var(--ease);
}

.artwork-detail__thumbs {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
}

.artwork-detail__thumbs img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform var(--fast) var(--ease);
}
.artwork-detail__main-img.fade-out {
  opacity: 0;
}
.artwork-detail__thumbs img:hover {
  transform: scale(1.05);
}

.artwork-detail__title {
  font-size: 1.8rem;
  margin: 0.5rem 0;
}

.artwork-detail__price {
  font-size: 1.2rem;
  color: var(--important);
  margin-bottom: 1rem;
}

.artwork-detail__description {
  color: var(--text-muted);
  line-height: 1.6;
}
/* --- filter pills --- */

.filters--artwork {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: background var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.filter-pill--active {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-md);
}


.filter-pill:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}


/*  ---   6. Componentes  1 - horizontal scroll   ---  */

.container--narrow {
  max-width: 1410px;
}

.h-scroll {
  padding-bottom: 0.5rem;
  padding-right: 1rem;
  overflow-x: auto;
  display: flex;
  gap: 1.2rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}


.h-scroll:active {
  cursor: grabbing;
}

.h-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
}
.h-scroll > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Hide scrollbar */
.h-scroll::-webkit-scrollbar {
  height: 6px;
}

.h-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.h-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}



.h-scroll .card--wide {
  min-width: 260px; /* igual que artworks */
  flex: 0 0 auto;   /* importante para que no se achique */
}



/*  ---   6. Componentes  2 - buttons   ---  */

.btn {
  border: none;
  background: var(--accent);
  color: white;
  padding: 0.45rem 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}

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

/* button modifier */
.btn--danger {
  background: #dc2626;
}


/*  ---   6. Componentes  3 - badges   ---  */

.badge {
  align-self: flex-start;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 500;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

/* Badge modifiers */
.badge--success {
  background: #16a34a;
}

.badge--muted {
  background: var(--text-muted);
}

/* badge por estado (modifier) */
.badge--Disponible {
  background: #16a34a;
}

.badge--Completo {
  background: #dc2626;
}

.badge--Finalizado {
  background: #6b7280;
}
/* --- registration status badges --- */

.badge--reg-pending {
  background: #f59e0b; /* naranja */
}

.badge--reg-confirmed {
  background: #16a34a; /* verde */
}

.badge--reg-cancelled {
  background: #dc2626; /* rojo */
}

/* --- payment status badges --- */

.badge--pay-pending {
  background: #f59e0b; /* naranja */
}

.badge--pay-paid {
  background: #16a34a; /* verde */
}

.badge--pay-cancelled {
  background: #6b7280; /* gris */
}

.badge--pay-refunded {
  background: #3b82f6; /* azul */
}



/* -- badges adicionales para dashboard -- */


.badge--pendiente {
  background: #f59e0b; /* naranja */
}

.badge--disponible {
  background: #3b82f6; /* azul */
}

/* tabla admin simple y responsive */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th,
.admin-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
  font-weight: 600;
  color: var(--text-main);
}

.admin-table tbody tr:hover {
  background: #f3f4f6;
}



/*  ---   6. Componentes  4 - global helper   ---  */



/* form elements (helper global) */
input,
textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid #ddd;
  font-family: inherit;
}

textarea {
  min-height: 120px;
}



/*  ---   7. Secciones   ---  */
/*  ---   7. Secciones  1 - hero   ---  */

/* 7. Secciones 1 - hero */
.hero {
  background: url('/static/images/hero-bg.jpg') center/cover no-repeat;
  border-radius: var(--radius-lg);
  padding: 6rem 1rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius-lg);
}

.hero-container {
  position: relative; /* para que el overlay no tape el texto */
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 1rem;
  }
  .hero__title {
    font-size: 2rem;
  }
  .hero__subtitle {
    font-size: 1rem;
  }
}


/*  ---   7. Secciones  2 - home previews   ---  */

/*  ---   7. Secciones  3 - workshops   ---  */

/* --- workshop row layout --- */

.workshop-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.workshop-row {
  display: flex;
  gap: 1.2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--normal) var(--ease),
              transform var(--normal) var(--ease);
  height: 220px;
}
.workshop-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.workshop-row__image {
  flex: 0 0 60%;
  position: relative;
  overflow: hidden;
}
.workshop-row__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.workshop-row__content {
  flex: 1;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}
.workshop-row__title {
  font-size: 1.1rem;
  font-weight: 600;
}
.workshop-row__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}


.workshop-row__user-info {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}


/* --- workshop detail --- */

.workshop-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.workshop-detail__title {
  font-size: 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.workshop-detail__price {
  font-size: 1rem;
  color: var(--accent);
}

.workshop-detail__description {
  color: var(--text-muted);
  line-height: 1.6;
}

.workshop-detail__main-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.workshop-detail__main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.workshop-detail__user {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}


/*  ---   7. Secciones  4 - gallery   ---  */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}



/*  ---   7. Secciones  5 - about   ---  */


.about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.about__title {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
}

.about__text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about__highlight {
  color: var(--text-main);
}

.about__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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



/*  ---   7. Secciones  6 - contact   ---  */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: 1px solid #e5e7eb;
  transition: border var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}



/*  ---   8. Animaciones   ---  */

/* 8. Animaciones */

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp var(--normal) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards hover ya lo tenés con transform y shadow */


/*  ---   9. Responsive   ---  */

@media (max-width: 768px) {
  .card--wide {
    width: 220px;
  }

  .section__title {
    font-size: 1.2rem;
  }
  
}
@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__title {
    font-size: 1.8rem;
  }
  .workshop-row {
    flex-direction: column; /* En móvil, imagen arriba, texto abajo */
    height: auto; /* Quitamos el alto fijo para que el texto respire */
  }
  .workshop-row__image {
    flex: 0 0 200px; /* Alto fijo de la imagen en móvil */
  }
}




/*  ---   10. Legales   ---  */

/* --- LEGAL --- */

.legal {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.2rem;
  font-weight: 500;
}

.legal h3 {
  margin-top: 1.2rem;
  font-size: 1rem;
  font-weight: 500;
}

.legal p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.legal ul {
  margin: 0.8rem 0 1.2rem 1.2rem;
  color: var(--text-muted);
}

.legal li {
  margin-bottom: 0.4rem;
}


.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #111;
  color: white;
  padding: 1rem;
  z-index: 9999;
}

.cookie-content {
  max-width: 900px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cookie-buttons button {
  padding: 0.5rem 1rem;
  cursor: pointer;
}
