/* RESET Y ESTILOS BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background-color: #fdfaf6;
    color: #333;
    line-height: 1.6;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.descripcion {
    display: none;
}

.btn,
button {
    background-color: #6B4226;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

table,
th,
td {
    border: 1px solid #ddd;
}

th,
td {
    padding: 12px;
    text-align: center;
}

th {
    background-color: #f4f4f4;
    color: #6B4226;
    font-weight: 600;
}

tr:hover {
    background-color: #f1f1f1;
}

.paginacion {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0;
    list-style: none;
    padding: 0;
}

.paginacion li {
    margin: 0;
}

.paginacion a,
.paginacion span {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    color: #6b4226;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.paginacion a:hover {
    background-color: #6b4226;
    color: #fff;
}

.paginacion .active span {
    background-color: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

.paginacion .disabled span {
    color: #aaa;
    border-color: #eee;
    cursor: default;
}

/* HEADER */
.site-header {
    background-color: #6B4226;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 70px;
    display: block;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.menu a {
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s;
}

.menu a:hover {
    color: #f0c27b;
}

.icons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.icons a {
    color: #fff;
    font-size: 1.3em;
    transition: color 0.3s;
}

.icons a:hover {
    color: #f0c27b;
}

/* BANNER VIDEO */
.video-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-banner video {
    width: 100%;
    height: 60vh;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    padding: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.video-overlay h1,
.video-overlay h2 {
    color: white;
    margin: 0.5rem 0;
}

.video-overlay h1 {
    font-size: 2rem;
}

.video-overlay h2 {
    font-size: 1.2rem;
}

.sobre-nosotros {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px 20px;
}

.sobre-nosotros .contenido,
.sobre-nosotros .imagen {
    flex: 1 1 100%;
}

.sobre-nosotros .contenido .subtitulo {
    color: #a38b4e;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.sobre-nosotros .contenido h2 {
    font-size: 1.8em;
    color: #6B4226;
    margin-bottom: 10px;
}

.container {
    padding: 0 15px;
}

h1,
h2,
h3 {
    color: #6B4226;
    margin-bottom: 15px;
    font-weight: 700;
}

h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
}

h3 {
    font-size: 1.2em;
}

.sobre-nosotros .contenido hr {
    width: 80px;
    border: 1.5px solid #6B4226;
    margin: 15px 0;
}

.sobre-nosotros .contenido p {
    font-size: 1em;
    color: #333;
    line-height: 1.7;
    margin-bottom: 25px;
}

.sobre-nosotros .contenido .btn {
    font-size: 0.95em;
    border-radius: 25px;
    padding: 12px 25px;
}

.sobre-nosotros .imagen img {
    width: 100%;
    border-radius: 0 30px 30px 0;
    box-shadow: 15px 15px 25px rgba(28, 16, 71, 0.25);
    object-fit: cover;
}

.productos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding: 0 15px;
}

.producto {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 240px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding-bottom: 15px;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.producto img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.producto h3 {
    margin: 15px 0 5px;
    padding: 0 10px;
}

.producto p {
    padding: 0 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.producto p strong {
    color: #6B4226;
    font-size: 1.1em;
}

.producto .btn {
    margin-top: 10px;
    font-size: 0.9em;
}

.ver-mas {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 80px;
}

@media (min-width: 768px) {
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        max-width: 1400px;
        margin: 0 auto;

    }

    .sobre-nosotros {
        flex-direction: row;
        max-width: 1200px;
        margin: 100px auto;
    }

    .video-banner video {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .video-overlay h1 {
        font-size: 3rem;
    }

    .video-overlay h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   REGISTRO
   ========================================================================== */
/* FORMULARIO */
.form-container {
    max-width: 100%;
    margin: 80px 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-container label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    font-size: 0.95em;
}

.form-container input[type="text"],
.form-container input[type="tel"],
.form-container input[type="email"],
.form-container textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.form-container textarea {
    min-height: 120px;
    resize: vertical;
}

.form-container .checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 15px;
    font-weight: normal;
    font-size: 0.9em;
}

.form-container .checkbox-container input {
    margin-right: 10px;
}

.form-container button {
    margin-top: 25px;
    width: 100%;
    padding: 12px;
    background: #6B4226;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.form-container button:hover {
    background: #54351f;
}

/* CARRITO ICONO */
.carrito-icono {
    position: relative;
    display: inline-block;
}

.carrito-icono .badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #f44336;
    color: #fff;
    font-size: 0.75em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
}

/* CARRITO */
.carrito-container {
    text-align: center;
    padding: 0 20px;
}

.carrito-container h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.carrito-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto 20px;
    background: #fff;
    display: table;
    overflow-x: visible;
    white-space: normal;
}

.carrito-container th,
.carrito-container td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1em;
}

.carrito-container tbody tr:hover td {
    background-color: #f9f9f9;
}

.carrito-container tbody tr:last-child td {
    border-bottom: none;
}

.carrito-container strong {
    display: inline-block;
    margin-top: 10px;
}

.carrito-container .btn {
    margin: 10px 5px 0;
    font-size: 1em;
}

/* =====================
   MEDIA QUERIES
   ===================== */
@media (min-width: 600px) {
    .form-container {
        max-width: 800px;
        margin: 80px 30%;
    }

    .carrito-container table {
        max-width: 800px;
    }

}

@media (min-width: 768px) {

    .form-container h2,
    .carrito-container h2 {
        font-size: 1.75em;
    }

    .form-container label {
        font-size: 1em;
    }

    .form-container input,
    .form-container textarea {
        font-size: 1em;
    }
}

.perfil-container {
    max-width: 100%;
    margin: 40px 15px;
    background: #fff;
    padding: 30px 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    box-sizing: border-box;
}

.perfil-container h2 {
    margin-bottom: 20px;
    font-size: 1.6em;
}

.perfil-container h3 {
    margin-top: 40px;
    color: #6B4226;
    font-size: 1.2em;
}

.tabla-perfil {
    margin-top: 20px;
    overflow-x: auto;
}

.tabla-perfil table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.tabla-perfil th,
.tabla-perfil td {
    padding: 10px;
    border: 1px solid #ccc;
}

.tabla-perfil th {
    background-color: #f5f5f5;
    color: #6B4226;
    font-weight: 600;
}

.form-registro {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    margin-top: 20px;
}

.form-registro label {
    font-weight: 500;
    color: #6B4226;
}

.form-registro input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* GALERÍA */
.galeria {
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 20px 10px;
    justify-content: center;
    overflow-x: auto;
}

.galeria img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #8B4513;
    border-radius: 5px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.galeria img:hover {
    transform: scale(1.05);
}

/* TITULOS */
h1 {
    text-align: center;
    color: #8B4513;
    margin: 20px 0;
}

/* MENSAJE BIENVENIDA */
#welcomeMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    color: #fff;
    z-index: 9999;
}

#welcomeMessage h2 {
    color: white;
}

.welcome-content {
    position: relative;
    background: #6f4e37;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    text-align: center;
}

.close-x {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    color: white;
}

/* FOOTER */
.site-footer {
    margin-top: auto;
    background: #6B4226;
    color: #fff;
    padding: 30px 20px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 60px;
    width: auto;
    display: block;
}

.footer-menu,
.legal-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-menu a,
.legal-menu a {
    color: #f1f1f1;
    transition: color 0.3s;
}

.footer-menu a:hover,
.legal-menu a:hover {
    color: #f0c27b;
}

.footer-menu {
    margin-right: 50px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    color: #ccc;
    font-size: 0.9em;
}

/* PANEL ADMIN */
.admin-panel {
    max-width: 100%;
    margin: 40px 15px;
    background: #fff;
    padding: 40px 15px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.admin-panel h2 {
    font-size: 1.8em;
    color: #6B4226;
    margin-bottom: 10px;
}

.admin-panel p {
    color: #555;
    margin-bottom: 30px;
}

.admin-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.admin-options a {
    background: #6B4226;
    color: #fff;
    padding: 18px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(107, 66, 38, 0.2);
    width: 100%;
    max-width: 250px;
    text-align: center;
}

/* Hover para admin */
.admin-options a:hover {
    background-color: #54351f;
    transform: translateY(-3px);
}

/* ======== MEDIA QUERIES ======== */
@media (min-width: 600px) {
    .perfil-container {
        max-width: 700px;
        margin: 50px auto;
        padding: 30px;
    }

    .galeria img {
        width: 250px;
        height: 250px;
    }

    .admin-panel {
        max-width: 900px;
        margin: 50px auto;
        padding: 40px;
    }

    .admin-options a {
        width: 250px;
    }
}

@media (min-width: 900px) {
    .perfil-container {
        max-width: 800px;
    }

    .galeria img {
        width: 300px;
        height: 300px;
    }
}

.admin-seccion {
  max-width: 100%;
  margin: 20px auto;
  padding: 0 10px;
  font-family: Arial, sans-serif;
  color: #333;
}

.admin-seccion h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Formulario filtros dentro de admin-seccion */
.admin-seccion form#filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  background: #fff;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgb(0 0 0 / 0.1);
}

.admin-seccion form#filtros label {
  flex: 0 0 100%;
  font-weight: bold;
  margin-top: 0.5rem;
}

.admin-seccion form#filtros select,
.admin-seccion form#filtros input[type="text"],
.admin-seccion form#filtros input[type="date"],
.admin-seccion form#filtros button {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.admin-seccion form#filtros button {
  cursor: pointer;
  /* No cambio colores, dejo que herede */
  transition: background-color 0.3s ease;
}

/* Tabla responsive con scroll horizontal solo en .admin-seccion */
.admin-seccion table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 5px;
  overflow-x: auto;
  display: block;  /* para scroll horizontal en móvil */
  box-shadow: 0 0 5px rgb(0 0 0 / 0.1);
}

/* Mantener el header fijo visualmente con display: table */
.admin-seccion table thead tr {
  display: table;
  width: 100%;
  table-layout: fixed;
  background-color: inherit; /* no cambio color */
  color: inherit;
}

.admin-seccion table tbody {
  display: block;
  max-height: 400px; /* opcional, para scroll vertical si hay muchas filas */
  overflow-y: auto;
  width: 100%;
}

.admin-seccion table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
  border-bottom: 1px solid #ddd;
}

/* Celdas con padding y borde */
.admin-seccion table th,
.admin-seccion table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  border-right: 1px solid #ddd;
  font-size: 0.9rem;

  /* Manejo de textos largos */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px; /* límite para que nombres largos no estiren la tabla */
}

.admin-seccion table th:last-child,
.admin-seccion table td:last-child {
  border-right: none;
}

/* Botones y selects dentro de la tabla (heredan estilos) */
.admin-seccion table button.btn {
  padding: 5px 10px;
  font-size: 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  border: none;
  /* no cambio colores */
}

.admin-seccion table select {
  padding: 4px 6px;
  border-radius: 3px;
  border: 1px solid #ccc;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 90px;
}

/* Responsive tablets en adelante */
@media (min-width: 768px) {
  .admin-seccion form#filtros {
    flex-wrap: nowrap;
  }

  .admin-seccion form#filtros label {
    flex: 0 0 auto;
    margin: 0 0.5rem 0 0;
    align-self: center;
    width: auto;
  }

  .admin-seccion table,
  .admin-seccion table tbody,
  .admin-seccion table thead tr,
  .admin-seccion table tbody tr {
    display: table;
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  .admin-seccion table th,
  .admin-seccion table td {
    white-space: normal;
    max-width: none;
    font-size: 1rem;
  }
}