* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0 !important;
    background-color: #f5f5f5;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


.stock-list {
    margin-top: .6rem;
    /* Por defecto, los elementos se apilarán verticalmente (comportamiento normal de un div) */
    display: block; /* o display: flex; con flex-direction: column; si prefieres flexbox */
}



:root {
  --main-font: 'Inter', sans-serif;
  --titles-font: 'Cormorant Garamond', serif;
}

/* Aplicación de fuentes */
body {
  font-family: var(--main-font);
}

header, header * , h1, h2, h3, h4, .title, .titulo, .subtitle, .subtitulo {
  font-family: var(--titles-font);
}

body { font-family: var(--main-font); }


html {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    height: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.main-header {
    
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding-block: 0.3em;
    padding-inline: min(0.5em, 3%);
    background-color: #06050a;
    color: #fff;
    z-index: 1000;
}

.logo img {
    height: 65px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.search-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    height: 2em;
    max-width: 20em;
    box-sizing: border-box;
    
}

#search {
    flex: 1;
    height: 2em;
    padding: 0 0.5em;
    border: 0.063em solid #ccc;
    border-radius: 0.3em 0 0 0.3em;
    font-size: 0.9em;
    box-sizing: border-box;
}

#search-btn {
    height: 2.13em;
    padding: 0 0.8em;
    border: 0.01em solid #ccc;
    border-left: none;
    border-radius: 0 0.3em 0.3em 0;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #06050a;
    border-color: #fff;
}

#search-btn img {
    width: 0.8em;
    height: 0.8em;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 1em;
}

.btn-group {
    display: flex;
}

.main-header .btn {
    background-color: #06050a;
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    padding: 0.3em 0.6em;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.5rem;
    white-space: nowrap;
    font-weight: 300;
}

.main-header .btn.active {
    text-decoration-line: underline;
    text-decoration-color: #fff;
    padding-bottom: 0.3em;
    display: inline-block;
}

#cart {
    position: relative;
    display: inline-block;
}

#cart-count {
    position: absolute;
    top: -.6em;
    right: -0.8em;
    color: #fff;
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 350;
    min-width: 1.6em;
    text-align: center;
    line-height: 1;
    padding: 0;
}

.hamburger {
    /* default: hidden en escritorio, se mostrará en pantallas pequeñas con la @media más abajo */
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 5px;
    z-index: 1002;
}

.hamburger span {
    width: 100%;
    height: 1px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Menú móvil (off-canvas) */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100%;
    background-color: #06050a;
    color: #fff;
    transition: left 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}

.mobile-menu.open {
    left: 0;
}

.mobile-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #06050a;
}

.close-menu {
    align-self: flex-end;
    background: none;
    border: none;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
    padding: 5px 10px;
}

.mobile-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.mobile-btn-group .btn {
    width: 100%;
    text-align: left;
    padding: 10px;
    font-size: 22px;
    background-color: #06050a;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- MEDIA QUERY para comportamiento en pantallas pequeñas ----
   Muestra el icono hamburguesa y oculta controles de escritorio,
   ajusta logo, header y ancho del menú lateral. Ajusta el breakpoint
   (768px) si preferís otro punto de cambio. */

@media (max-width: 768px) {

    
      /* por defecto en móvil mostramos solo un icono compacto */
  .main-header .search-container,
  header .search-container {
    width: auto !important;
    min-width: 0 !important;
    padding: 4px !important;
    background: transparent !important; /* fondo transparente en estado cerrado */
    box-shadow: none !important;
    border: none !important;
  }

  /* ocultar el input en móvil, mostrar solo icono */
 
  /*
  .main-header .search-container input,
  .search-container input {
    display: none !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
  }   

  /* icono visible, colocado a la derecha junto al carrito (o donde tengas right-controls) */
  .search-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    z-index: 10040 !important;
  }

  /* Clase que abre el buscador en móvil: hace aparecer input expandido */
  .main-header.search-open .search-container,
  header.search-open .search-container {
    position: absolute !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #fff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border-radius: 10px !important;
    padding: 6px 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .main-header.search-open .search-container input,
  header.search-open .search-container input {
    display: inline-block !important;
    width: calc(100% - 44px) !important;
    max-width: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: width 180ms ease, opacity 180ms ease;
  }

  /* botón cerrar (puedes usar el mismo toggle) */
  .main-header.search-open .search-toggle {
    background: transparent !important;
  }
    
    
    header, header * , h1, h2, h3, h4, .title, .titulo, .subtitle, .subtitulo {
  font-family: var(--titles-font);
  text-align: center;
}

    /* muestra el botón hamburguesa */
    .hamburger {
        display: flex;
    }

     /* En móvil: ocultamos búsqueda y botones de usuario, pero dejamos visible el carrito */
    /* Mostrar el botón hamburguesa sigue siendo responsabilidad del media query más arriba */
    .right-controls {
        /* mantener el contenedor visible y alineado en móvil para poder mostrar el carrito */
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    /* ocultar elementos específicos dentro de right-controls que no queremos en móvil */
    .right-controls .btn-group,
    .right-controls .search-container,
    .right-controls #search-form,
    .right-controls .user-btn {
        display: none !important;
        visibility: hidden !important;
    }

    /* FORZAR que sólo el carrito sea visible y clickeable en móvil */
    .right-controls .cart-container {
        display: inline-flex !important;
        visibility: visible !important;
        position: relative;
        z-index: 1002;
    }

    /* ajustar tamaño del icono / etiqueta si hace falta en móvil */
    .right-controls .cart-icon { 
        font-size: 1.4rem;
        width: auto;
        height: auto;
        display: inline-block;
    }
    .right-controls .cart-label {
        display: none; /* si prefieres mostrar sólo el icono en móvil; pon display:inline-block si quieres texto */
    }

    /* ajusta tamaño del logo para que quepa en header móvil */
    .logo img {
        height: 44px;
        width: auto;
        max-width: 120px;
        object-fit: contain;
    }

    /* reduce la altura del header en móvil para ahorrar espacio */
    header.main-header {
        height: 60px;
        padding: 8px 10px;
        align-items: center;
    }

    /* menú lateral más ancho en pantallas pequeñas (proporcional) */
    .mobile-menu {
        width: 80%;
        left: -100%;
    }

    .mobile-menu.open {
        left: 0;
    }

    /* separación para que el contenido del menú no quede bajo el header */
    .mobile-menu-content {
        padding-top: 18px;
    }
}

.content {
    flex: 1;
    padding: min(0.5rem, 1%);
    margin-top: 5px;
    margin-bottom: 20px;
}

.centered-content {
    max-width: 1200px;
    margin: 0 auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2em 0.5em;
}

.product-item {
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0.5em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: center;
}

.product-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 0.001em;
}

.product-item h3 {
    font-size: 1.4rem;
    margin: 0.1em 0em;
    line-height: 1.5em;
    width: 100%;
}

.product-item p {
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 0.95rem;
    width: 100%;
}

.product-item input[type="number"] {
    width: 100%;
    padding: 0.4em;
    margin-bottom: 0.2em;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    font-size: 0.83rem;
}

.product-item select {
    width: 100%;
    padding: 0.4em;
    margin-bottom: 0.2em;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    font-size: 0.83rem;
    margin: 0.1em 0em;
    line-height: 1.5em;
    width: 100%;
}

.form-container {
    max-width: 600px;
    margin: 1em auto;
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    background-color: #fff;
}

.form-container input {
    margin: 0.5em 0;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
}

.form-container select {
    margin: 0.5em 0;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
}

.form-container button {
    margin: 0.5em 0;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    background-color: #000;
    color: #fff;
    cursor: pointer;
}

.form-container button:hover {
    background-color: #222;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

th {
    border: 1px solid #ddd;
    padding: 0.5em;
    text-align: left;
    background-color: #f5f5f5;
}

td {
    border: 1px solid #ddd;
    padding: 0.5em;
    text-align: left;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 2em;
    border-radius: 0.5rem;
}

.modal:not(.cart-modal) .modal-content {
    max-width: 500px;
    width: 90%;
    margin: 10% auto;
}

.modal-content input {
    width: 100%;
    margin: 0.5em 0;
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
}

.modal-content button {
    width: 100%;
    margin: 0.3em 0;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    background-color: #000;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.modal-content button:hover {
    background-color: #222;
}

/* Icono carrito: SVG antiguo y Material Icons (ambos soportados) */
.cart-icon svg,
.cart-icon .material-icons {
    display: block;
    width: 40px;
    height: auto;
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;

    /* para icon font */
    font-size: 1.6rem;
    line-height: 1;
    vertical-align: middle;
}

/* Aseguramos que el contenedor se pueda usar como botón y alinee icon + texto */
.cart-container {
    position: relative;
    display: inline-flex;
    align-items: self-end;
    cursor: pointer;
}

/* contador (ya existía) se mantiene, pero lo dejamos claro aquí */
.cart-count {
    position: absolute;
    top: -0.4em;
    right: -0.4em;
    background-color: #fff;
    color: #000;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 999px;
}

/* Etiqueta "Carrito" junto al icono */
.cart-label {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
    user-select: none;
}

.type-filters.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: left; /* Centra los botones en lugar de estirarlos */
    gap: 0.3em; /* Espacio pequeño entre botones */
    margin-bottom: 1.2em; /* Espacio debajo del grupo de botones */
}



.type-filters .btn {
    font-size: 0.85rem; /* Tamaño de fuente más pequeño */
    font-weight: 200; /* Peso de fuente normal para no verse grueso */
    background-color: #06050a;
    color: #fff;
    border: none;
    border-radius: 0.35rem; /* Bordes más suaves y pequeños */
    padding: 0.15em 0.5em; /* Padding reducido para botones más compactos */
    cursor: pointer;
    white-space: nowrap;
    width: auto; /* Ancho automático, no ocupa todo el espacio */
    transition: background-color 0.2s ease; /* Efecto suave al hover */
}

.type-filters .btn:hover {
    background-color: #222; /* Cambio de color al pasar el mouse */
}
.type-filters .btn.active {
    background-color: #fff; /* Estilo para el botón activo */
    color: #06050a;
    font-weight: 600;
}
.product-description {
    font-size: 0.85rem;
    overflow-wrap: break-word;
    font-weight: 200;
    color: gray;
    text-align: left;
    margin: 0.25em 0;
    padding: 0.02em;
    word-break: break-all;
    line-height: 1.2em;
}

.product-type {
    
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1.2rem;
    width: 100%;
}

.category-name {
    
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
}

.price {
    
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
}

.price-normal {
    
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
}

.price-diferenciado {
    
    color: #ff0000;
}

.quantity-label {
    font-weight: normal;
    margin-right: 0.5em;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5em;
}

.quantity-label {
    margin-right: 0.5em;
}

.quantity-wrapper input[type="number"] {
    width: 60px;
    margin: 0;
}

.quantity-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 0.4rem;
    margin-bottom: 0.5em;
}

.quantity-container input[type="number"] {
    background-color: #f2f2f2;
    border: 1px solid #ffffff00;
    border-radius: 0.3rem;
    padding: 5px;
    width: 60px;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
}

input[type=number]::-webkit-inner-spin-button {
    opacity: 1;
}

input[type=number]::-webkit-outer-spin-button {
    opacity: 1;
}

.btn {
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 0.4rem;
    padding: 0.3em 0.6em;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    font-weight: 300;
    margin: 0.1em 0em;
    line-height: 2.5em;
    width: 100%;
    text-decoration: none;
}

.footer-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.footer-logo {
    height: 85px;
    width: auto;
    margin-left: 50px;
    padding-block: 0.6em;
}

.footer-content p {
    flex: 1;
    margin: 0;
    text-align: center;
}

.main-footer {
    background-color: #fff;
    color: #000;
    padding-block: 0.6em;
    box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.1);
}

.main-footer a {
    color: inherit;
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

.footer-contact {
    margin: 0;
    font-size: 0.9rem;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
    margin: 0 0.5em;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.separator {
    color: #000;
    margin: 0 0.5em;
}

.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 10px;
    width: 48px;
    height: 48px;
    z-index: 10000;
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.type-filters {
    margin-bottom: 20px;
}

.product-item .category-name {
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
}

.product-item .price {
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
}

.product-item .price-normal {
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
}

.product-item .product-type {
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1rem;
    width: 100%;
    font-weight: 500;
}

.product-item button {
    margin: 0.1em 0em;
    line-height: 1.5em;
    font-size: 1.2rem;
    width: 100%;
}

.product-item .product-stock {
    margin: 0.2em 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
}
#login-popup .modal-content {
    max-width: 400px;
    width: 100%;
    padding: 2em;
    background-color: #fff;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#login-popup .modal-content h2 {
    margin-bottom: 1em;
    text-align: center;
}

#login-popup .modal-content input {
    max-width: 400px;
    margin: 0.6em 0;
}

#login-popup .modal-content .button-row {
    max-width: 400px;
    margin: 0.6em 0;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

#login-popup .modal-content .button-row button {
    width: 10%;
    margin: 0;
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 0.4rem;
    padding: 0.5em;
    cursor: pointer;
    font-size: 0.95rem;
}

#login-popup .modal-content p#login-error {
    margin-top: 1em;
    color: red;
}

.cart-total {
    font-weight: bold;
    margin: 0.5em 0;
}

.cart-table-container {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    margin-bottom: 1em;
}

.cart-modal .modal-content button {
    margin: 0.5em 0;
}

.action-container {
    display: flex;
    gap: 10px;
}

.action-container select {
    flex: 1;
}

.action-container button {
    flex: 1;
}

.orders-section {
    margin-top: 2em;
}

.orders-list .order {
    border: 1px solid #ddd;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 0.4rem;
    background-color: #fff;
}

.orders-list .order h3 {
    margin: 0 0 0.5em;
}

.orders-list .order .meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5em;
}

.orders-list .order table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5em;
}

.orders-list .order th {
    border: 1px solid #ddd;
    padding: 0.25em 0.5em;
    text-align: left;
    font-size: 0.9rem;
}

.orders-list .order td {
    border: 1px solid #ddd;
    padding: 0.25em 0.5em;
    text-align: left;
    font-size: 0.9rem;
}

.image-modal .modal-content {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    position: relative;
    padding: 0;
    background: none;
    border-radius: 0;
}



/* Estilos para el botón de cerrar (X) del modal de imagen */
.image-modal .close-modal {
  position: absolute;
  top: 14px;             /* distancia desde arriba */
  right: 14px;          /* distancia desde la derecha */
  font-size: 2rem;      /* tamaño de la X */
  color: white;         /* color de la X */
  cursor: pointer;
  z-index: 5;           /* encima de la imagen */
  background: rgba(0, 0, 0, 0.4); /* fondo semi-transparente para contraste */
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
/* Efecto al pasar el mouse o tocar */
.image-modal .close-modal:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.1);
}

#users-list td img {
    max-width: 20px;
    height: auto;
    display: block;
    margin: 0 auto;
}

#users-list td {
    text-align: center;
    vertical-align: middle;
}

#users-table {
    max-width: none;
    width: 100%;
}

.orders-list .order {
    border: 1px solid #ddd;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: 0.6rem;
    background-color: #fff;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    line-height: 1.15;
    overflow: hidden;
}

.orders-list .order .order-col-date {
    flex: 0 0 200px;
    text-align: left;
    color: #6b6b6b;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-list .order .order-col-main {
    flex: 1 1 auto;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.orders-list .order .order-col-actions {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    white-space: nowrap;
}

.orders-list .order.delivered {
    background-color: #6be395;
}

.orders-list .order small {
    font-size: 0.95rem;
    color: #444;
}

.orders-list .order .meta {
    font-size: 0.95rem;
    color: #444;
}

.orders-list .order .status-label {
    font-size: 0.95rem;
    color: #444;
}

.orders-list .order select {
    font-size: 0.9rem;
}

.orders-list .order button {
    font-size: 0.9rem;
}

.orders-list .order .btn {
    font-size: 0.9rem;
}

#orders-list .order .order-col-date small {
    font-weight: 500;
    color: #222;
    font-size: 0.98rem;
}

#orders-list .order .order-user {
    font-weight: 500;
    color: #fff;
    font-size: 0.95rem;
    margin-top: .35rem;
}

#orders-list .order .order-user strong {
    font-weight: 500;
}

.orders-list .order .order-user {
    font-weight: 500;
    color: #222;
    font-size: 0.95rem;
    margin-top: .35rem;
}

.orders-list .order .order-user b {
    font-weight: 500;
}

.orders-list .order .meta-small {
    font-size: 0.95rem;
    color: #666;
}

.orders-list .order select {
    margin-left: 0.5em;
    font-size: 0.9rem;
}

.orders-list .order button {
    margin-left: 0.5em;
    font-size: 0.9rem;
}

.orders-list .order .btn {
    margin-left: 0.5em;
    font-size: 0.9rem;
}

.orders-list .order div {
    word-break: break-word;
    white-space: normal;
}

.orders-list .order span {
    word-break: break-word;
    white-space: normal;
}

.orders-list .order small {
    font-size: 0.9em;
    color: #666;
}

.orders-list .order .status-label {
    font-weight: 600;
}

.orders-list .order select {
    margin-left: 0.5em;
}

.orders-list .order button {
    margin-left: 0.5em;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1em;
    margin-top: 1em;
}

.modal-buttons button {
    width: auto;
    padding: 0.5em 1em;
}

#products-table th {
    padding: 5px;
    text-align: center;
}

#products-table td {
    padding: 5px;
    text-align: center;
}

#products-table th:nth-child(1) {
    width: 30%;
}

#products-table td:nth-child(1) {
    width: 30%;
}

#products-table th:nth-child(2) {
    width: 15%;
}

#products-table td:nth-child(2) {
    width: 15%;
}

#products-table th:nth-child(3) {
    width: 15%;
}

#products-table td:nth-child(3) {
    width: 15%;
}

#products-table th:nth-child(4) {
    width: 10%;
}

#products-table td:nth-child(4) {
    width: 10%;
}

#products-table th:nth-child(5) {
    width: 30%;
}

#products-table td:nth-child(5) {
    width: 30%;
}

.barcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.barcode-container svg {
    margin-bottom: 5px;
}
/* --- Evitar interferencias con impresión de etiquetas --- */
.barcode-container svg,
.barcode-container img,
.label svg,
.label img,
.label canvas {
    background: transparent !important;
    -webkit-filter: none !important;
    filter: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.label img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== Restaurar estilo botones en página de códigos de barras ===== */
.codigos-barras .btn,
.codigos-barras button.btn {
  display: inline-block !important;
  padding: 8px 14px !important;    /* alto y ancho del botón */
  line-height: 1 !important;
  border-radius: 6px !important;
  text-align: center !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  min-height: 36px !important;
  box-sizing: border-box !important;
  background-color: #000 !important;    /* fondo negro, ajusta si tu diseño es otro */
  color: #fff !important;               /* texto blanco */
  border: none !important;
  transition: background-color .15s ease !important;
}

/* Hover consistente */
.codigos-barras .btn:hover,
.codigos-barras button.btn:hover {
  background-color: #222 !important;
  color: #fff !important;
}

.search-container {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

#search-input {
    width: 80%;
    max-width: 500px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
}

.barcode-search {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.barcode-search #search-input {
    width: 80%;
    max-width: 500px;
    height: 39px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    box-sizing: border-box;
}

.barcode-search #search-btn {
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 5px 5px 0;
    background-color: #06050a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-search #search-btn img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.category-search {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.category-search #category-search-input {
    width: 80%;
    max-width: 500px;
    height: 40px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    box-sizing: border-box;
}

.category-search #category-search-btn {
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 5px 5px 0;
    background-color: #06050a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-search #category-search-btn img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.relations-container {
    max-width: 1200px;
    margin: 0 auto;
}

#relations-list {
    width: 250%;
    table-layout: fixed;
}

#relations-list th {
    padding: 0.75em;
    text-align: center;
}

#relations-list td {
    padding: 0.75em;
    text-align: center;
}

#relations-list th:nth-child(1) {
    width: 10%;
}

#relations-list td:nth-child(1) {
    width: 10%;
}

#relations-list th:nth-child(2) {
    width: 20%;
}

#relations-list td:nth-child(2) {
    width: 20%;
}

#relations-list th:nth-child(3) {
    width: 20%;
}

#relations-list td:nth-child(3) {
    width: 20%;
}

#relations-list th:nth-child(4) {
    width: 15%;
}

#relations-list td:nth-child(4) {
    width: 15%;
}

#relations-list th:nth-child(5) {
    width: 15%;
}

#relations-list td:nth-child(5) {
    width: 15%;
}

#relations-list th:nth-child(6) {
    width: 25%;
}

#relations-list td:nth-child(6) {
    width: 25%;
}

#relations-list td button {
    display: inline-block;
    width: auto;
    margin: 0 0.5em;
    padding: 0.3em 0.6em;
    font-size: 0.9rem;
}

.relation-search {
    text-align: center;
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.relation-search #relation-search-input {
    max-width: 400px;
    height: 35px;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.relation-search #relation-search-input:focus {
    border-color: #fff;
    outline: none;
}

.relation-search #relation-search-btn {
    height: 37px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background-color: #06050a;
    cursor: pointer;
    display: DESK flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.relation-search #relation-search-btn:hover {
    background-color: #222;
}

.relation-search #relation-search-btn img {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.gestion-categorias .content {
    min-height: calc(100vh - 100px);
}

.gestion-categorias .main-footer {
    width: 100%;
    position: relative;
    bottom: 0;
}

.product-search {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.product-search #product-search-input {
    width: 80%;
    max-width: 500px;
    height: 40px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    box-sizing: border-box;
}

.product-search #product-search-btn {
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 5px 5px 0;
    background-color: #06050a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-search #product-search-btn img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

#edit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: #fff;
    padding: 2em;
    border-radius: 0.5rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    max-width: 600px;
    width: 90%;
    display: none;
    max-height: 80vh;
    overflow-y: auto;
}

#product-list {
    overflow-x: auto;
}

#products-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

#products-table th {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    background-color: #f2f2f2;
}

#products-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.historial-page .centered-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.historial-page .orders-section {
    width: 100%;
    margin: 1.25rem auto;
}

.historial-page .orders-intro {
    color: #444;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.historial-page .orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.8rem;
}

#orders-section .orders-list .order {
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    font-size: 1rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
    flex-direction: column;
    
}

#orders-section .orders-list .order.delivered {
    background-color: #6be395;
}

#orders-section .orders-list .order .order-col-date {
    flex: 0 0 200px;
    text-align: left;
    color: #6b6b6b;
    font-size: 0.95rem;
}

#orders-section .orders-list .order .order-col-main {
    flex: 1 1 auto;
    text-align: left;
}

#orders-section .orders-list .order .order-col-actions {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

#orders-section .orders-list .order div {
    word-break: break-word;
    white-space: normal;
}

#orders-section .orders-list .order span {
    word-break: break-word;
    white-space: normal;
}

#orders-section .orders-list .order .status-label {
    font-weight: 600;
    font-size: 1.1rem;
}

#orders-section .orders-list .order .btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.87rem;
    min-width: 140px;
}

.historial-page .orders-list .order {
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.4rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    font-size: 1.2rem;
    line-height: 1.05;
}

.historial-page .orders-list .order .order-col-date {
    flex: 0 0 220px;
    text-align: left;
    color: #6b6b6b;
    font-size: 1rem;
}

.historial-page .orders-list .order .order-col-main {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 600;
}

.historial-page .orders-list .order .order-col-actions {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.historial-page .orders-list .order .status-label {
    font-weight: 600;
    font-size: 1.4rem;
}

.historial-page .orders-list .order .btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 160px;
    text-align: center;
}

.historial-page .orders-list .order.delivered {
    background-color: #6be395;
}

.historial-page .orders-list .order small {
    font-size: 0.95rem;
    color: #666;
}

.historial-page .orders-list .order .meta-small {
    font-size: 0.95rem;
    color: #666;
}

#orders-list {
    /* este contenedor ahora coincide con .orders-list */;
}

#orders-list .order {
    font-size: 1rem !important;
    line-height: 1.15 !important;
    background-color: #fff !important;
    color: inherit;
    border-radius: 0.4rem;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

#orders-list .order.delivered {
    background-color: #6be395 !important;
}

#orders-list .order small {
    font-size: 0.95rem;
    color: #444;
}

#orders-list .order .meta {
    font-size: 0.95rem;
    color: #444;
}

#orders-list .order .status-label {
    font-size: 0.95rem;
    color: #444;
}

#orders-list .order {
    word-break: break-word;
    white-space: normal;
}

#orders-list .order div {
    word-break: break-word;
    white-space: normal;
}

#orders-list .order span {
    word-break: break-word;
    white-space: normal;
}

.stock-section {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 0.6rem;
    background: #fff;
    border: 1px solid #e6e6e6;
}

.stock-section h2 {
    margin: 0 0 .5rem 0;
    font-size: 1.1rem;
}

.stock-message {
    font-weight: 300;
    margin-bottom: .4rem;
    font-size: 14px;
}

.stock-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.stock-item {
    padding: .45rem .6rem;
    border-radius: .5rem;
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: center;
    font-size: 1rem;
}

.stock-item .prod-name {
    font-weight: 300;
}

.stock-item .prod-stock {
    min-width: 70px;
    text-align: right;
    font-weight: 700;
}

.stock-ok {
    background: #eafaf0;
    color: #1b6b2d;
    border: 1px solid #c9efd3;
}

.stock-mid {
    background: #fff8e1;
    color: #7a5b00;
    border: 1px solid #f3e4a8;
}

.stock-low {
    background: #ffecec;
    color: #8b0000;
    border: 1px solid #f1c4c4;
}

.stock-empty {
    color: #666;
    font-style: italic;
}

.order-col-date .order-date-strong {
    font-weight: 700;
    font-size: 1.05rem;
    color: #333;
}

.order-user-strong {
    font-weight: 700;
    font-size: 1.02rem;
    color: #2b2b2b;
}

.stock-container {
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 1rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 1rem;
}

.stock-message {
    font-weight: 300;
    color: #333;
}

.stock-list .stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px dashed #eee;
}

.stock-item .prod-name {
    font-size: 1rem;
}

.stock-item .prod-stock {
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

.stock-item.stock-low {
    background: rgba(255, 0, 0, 0.03);
    color: #9b1b1b;
}

.stock-item.stock-mid {
    background: rgba(255, 193, 7, 0.03);
    color: #7a5a00;
}

.stock-message.stock-ok {
    color: #1b8a2b;
    font-weight: 700;
}

#productos-sin-stock {
    margin-bottom: 60px;
    margin-top: 10px;
}

#users-list {
    font-size: 0.85rem;
}

#users-list th {
    padding: 0.4em 0.6em;
}

#users-list td {
    padding: 0.4em 0.6em;
}

.input-spinner {
    display: inline-block;
    margin-left: 6px;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}

.hero-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #111;
    display: block;
}

.hero-carousel.hero-carousel--desktop {
    height: 400px;
    max-height: 600px;
    margin-top: 0px;
}

.hero-carousel.hero-carousel--mobile {
    height: 100vw;
    max-height: 160px;
    min-height: 180px;
    margin-top: 0px;
}

.hero-carousel .slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 420ms ease;
    will-change: transform;
}

.hero-carousel .slide {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.hero-carousel .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-carousel .slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-carousel .hc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.15);
    color: #cccccc3b;
    border: none;
    padding: .6rem .8rem;
    cursor: pointer;
    border-radius: 8px;
    z-index: 50;
    font-size: 1.05rem;
}

.hero-carousel .hc-arrow.prev {
    left: 12px;
}

.hero-carousel .hc-arrow.next {
    right: 12px;
}

.hero-carousel .hc-dotbar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    display: flex;
    gap: 8px;
    z-index: 50;
}

.hero-carousel .hc-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer;
}

.hero-carousel .hc-dot.active {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.hero-carousel .slide .overlay {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 18%;
    color: #fff; z-index: 45; text-align: center; text-shadow: 0 3px 10px rgba(0,0,0,0.45);
    padding: .4rem 1rem; border-radius: 6px; max-width: 90%;
}

.hero-carousel:focus {
    outline: 3px solid rgba(0,0,0,0.06);
}

.portada-list, .portada-list * {
    box-sizing: border-box;
}

.portada-list {
    margin-top: 1rem;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    align-items: start;
    width: 100%;
}

.portada-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    min-height: auto;
    overflow: hidden;
}

.portada-thumb-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
}

.portada-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.portada-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 44px;
    font-size: 0.92rem;
    color: #222;
}

.portada-meta strong {
    display: block;
    font-size: 0.95rem;
}

.portada-meta .portada-alt {
    color: #666;
    font-size: 0.85rem;
}

.portada-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
    position: static !important;
    transform: none !important;
    z-index: 2 !important;
}

.portada-actions .left {
    display: flex;
    gap: 8px;
    align-items: center;
}

.portada-actions .right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.small-btn {
    padding: .35rem .55rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1;
}

.small-danger {
    color: #c33;
    border-color: #f6c5c5;
    background: #fff;
}

.input-inline {
    padding: .35rem .5rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 0.88rem;
}

.portada-item .portada-actions > * {
    white-space: nowrap;
}

.portada-pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    flex-direction: column;
}

.portada-pagination .btn {
    padding: .45rem .85rem;
    border-radius: 8px;
}

.portada-actions {
    position: static !important;
    transform: none !important;
}

:root {
    --header-height: 100px;
}

.hero-carousel {
    margin-top: calc(var(--header-height) + 0px);
}

.admin-buttons .btn {
    background: linear-gradient(180deg,#111,#000);
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    border-radius: 5px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: transform .12s ease, box-shadow .12s ease;
}

.admin-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

/* ------------------ CART: UNIFIED STYLES (sustituye reglas anteriores) ------------------ */
.cart-modal {
  background: linear-gradient(
    to left,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.06) 30%,
    rgba(0,0,0,0.03) 60%,
    rgba(0,0,0,0) 100%
  );
  z-index: 1200;
}

/* Panel del carrito - única definición (desktop/tablet) */
.cart-modal .modal-content {
  box-sizing: border-box;
  background: #fff;
  border-radius: 8px 0 0 8px;
  width: 60vw;            /* aumento: ocupa 60% del viewport */
  max-width: 1500px;      /* tope razonable */
  min-width: 460px;       /* evita colapsar en pantallas pequeñas */
  position: fixed;
  top: -40px;
  height: 100vh;
  padding: 3.5rem;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}

/* cuando se muestra */
.cart-modal.open .modal-content,
.cart-modal.show .modal-content,
.cart-modal.active .modal-content,
.cart-modal[aria-hidden="false"] .modal-content {
  transform: translateX(0);
}

/* tabla del carrito */
.cart-table,
.cart-modal .modal-content table {
  width: center;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px; /* texto más legible */
}

.cart-table th,
.cart-table td,
.cart-modal .modal-content table th,
.cart-modal .modal-content table td {
  
  border: 1px solid #e6e6e6;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  line-height: 1.3;
}

/* columnas: reservar espacio a imagen y producto */
.cart-modal .modal-content table th:nth-child(1),
.cart-modal .modal-content table td:nth-child(1) { width: 15%; }
.cart-modal .modal-content table th:nth-child(2),
.cart-modal .modal-content table td:nth-child(2) { width: 14%; }
.cart-modal .modal-content table th:nth-child(3),
.cart-modal .modal-content table td:nth-child(3) { width: 17%; }
.cart-modal .modal-content table th:nth-child(4),
.cart-modal .modal-content table td:nth-child(4) { width: 16%; }
.cart-modal .modal-content table th:nth-child(5),
.cart-modal .modal-content table td:nth-child(5) { width: 13%; }
.cart-modal .modal-content table th:nth-child(6),
.cart-modal .modal-content table td:nth-child(6) { width: 14%; }
.cart-modal .modal-content table th:nth-child(7),
.cart-modal .modal-content table td:nth-child(7) { width: 13%; }

/* --- comportamiento general para que la tabla pueda scrollear --- */
.cart-modal .modal-content { 
  /* permite scroll horizontal en móvil */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
}

/* evita que las celdas hagan wrap, forzando que la tabla crezca */
.cart-modal .modal-content table,
.cart-modal .modal-content table th,
.cart-modal .modal-content table td {
  white-space: nowrap;
  width: auto; /* no obligues width:100% en móvil */
}

/* imagen del producto, unificada y agrandada */
.cart-table img,
.cart-modal .modal-content table img {
  width: 140px;
  max-height: 120px;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* inputs y botones dentro del carrito */
.cart-table input[type="number"],
.cart-modal .modal-content input[type="number"] {
  
  padding: 8px;
  font-size: .9rem;
  border-radius: 6px;
  box-sizing: border-box;
  text-align: center;
}

.cart-table button,
.cart-modal .modal-content button,
.cart-actions button {
  font-size: .9rem;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

/* acciones */
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.cart-actions .primary {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 18px;
  font-size: 1.08rem;
  border-radius: 8px;
}

.cart-actions .secondary {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 8px;
}

/* total */
.cart-total {
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 0.6rem;
  text-align: right;
}

/* === Miniaturas del carrito: 1:1, centradas igual que en index === */
.cart-item-img {
  width: 110px;               /* tamaño desktop por fila (ajustá si querés) */
  height: 110px;              /* fuerza 1:1 */
  aspect-ratio: 1 / 1;        /* respaldo moderno */
  object-fit: cover;          /* recorta y centra (foco en el centro) */
  object-position: center;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
/* sutil al hover / focus */
.cart-item-img:hover,
.cart-item-img:focus {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  outline: none;
}

/* "presionado" - clase agregada por los handlers inline */
.cart-item-img-pressed,
.cart-item-img:active {
  transform: scale(1.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  position: relative;   /* necesario para z-index */
  z-index: 1500;        /* elevar la miniatura mientras se presiona */
}
/* === Modal de imagen: por encima del carrito (z-index mayor) === */
.image-modal {
  z-index: 2200 !important;     /* debe ser mayor que .cart-modal (que tienes en 1200) */
}

.zoom-toggle {
  position: absolute;
  top: 58px;
  right: 14px; /* un poco a la izquierda de la X */
  font-size: 1.1rem;
  cursor: pointer;
  color: white;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.magnifier-container {
  position: relative;
  display: inline-block;
}

#magnifier-glass {
  display: none; /* oculto hasta activar */
  position: absolute;
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: none;
  width: 800px;
  height: 800px;
  background-repeat: no-repeat;
  background-size: 200% 200%; /* zoom 2x */
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  z-index: 5;
}

/* buscador dentro del modal del carrito - reutiliza el aspecto del header */
.cart-modal .search-wrapper input,
.cart-modal .search-wrapper input[type="text"],
.cart-modal .cart-search-wrapper input {
    flex: 1;
    height: 2em;
    padding: 0 0.5em;
    border: 0.063em solid #ccc;
    border-radius: 0.3em 0 0 0.3em;
    font-size: 0.9em;
    box-sizing: border-box;
}

.cart-modal .search-wrapper button,
.cart-modal .cart-search-wrapper button {
    height: 2em;
    padding: 0 0.8em;
    border: 0.01em solid #ccc;
    border-left: none;
    border-radius: 0 0.3em 0.3em 0;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #06050a;
    border-color: #fff;
    width: auto;
}

.cart-modal .search-wrapper button img,
.cart-modal .cart-search-wrapper button img {
    width: 0.8em;
    height: 0.8em;
}

/* ===== Buscador exclusivo para administrar-usuarios.html ===== */
.admin-usuarios .user-search-container {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 500px;
  width: 100%;
  margin: 0; /* ajustá si querés más separación vertical */
  justify-content: center; /* alinear al centro en la fila */
}

.admin-usuarios .user-search-input {
  width: 80%;
  max-width: 500px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px 0 0 5px;
  box-sizing: border-box;
  outline: none;
}

.admin-usuarios .user-search-btn {
  height: 40px;
  padding: 0 15px;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 5px 5px 0;
  background-color: #06050a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-usuarios .user-search-btn img {
  width: 16px;
  height: 16px;
}

.admin-usuarios .user-search-btn:hover {
  background-color: #222;
}

/* Opcional: que la tabla sea responsive si querés */
.admin-usuarios #users-list img { max-width: 80px; height: auto; display:block; }

/* ===== Modal de edición: fijar arriba de la pantalla (solo admin-usuarios) ===== */
.admin-usuarios #edit-user-modal,
.admin-usuarios .edit-user-modal { /* cubrimos posibles nombres */
  /* Si #edit-user-modal es el cuadro de diálogo en sí */
  position: fixed;
  top: 16px;                     /* separación superior */
  left: 50%;
  transform: translateX(-50%) !important; /* centrar horizontal, quitar desplazamiento vertical */
  width: min(980px, calc(100% - 32px));   /* responsive: máximo 980px, margen lateral 16px */
  max-height: calc(100vh - 32px); /* que no sobresalga de la pantalla */
  overflow-y: auto;
  z-index: 2000;                 /* por encima del overlay */
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  background: #ffffff;
  padding: 18px;
  /* Si tu modal se muestra con display:block en JS, mantenemos display por defecto */
}

/* Si tu estructura es: #edit-user-modal (overlay) > .modal-dialog (ventana),
   entonces aplicá el estilo a la clase interna: */
.admin-usuarios #edit-user-modal .modal-dialog,
.admin-usuarios .modal-overlay .modal-dialog {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) !important;
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  background: #ffffff;
  padding: 18px;
  z-index: 2001;
}

/* Opcional: transición suave al aparecer */
.admin-usuarios #edit-user-modal,
.admin-usuarios #edit-user-modal .modal-dialog {
  transition: transform 220ms ease, opacity 180ms ease;
}

/* Si tu CSS anterior centraba verticalmente usando translate(-50%, -50%),
   forzamos que no lo haga: */
.admin-usuarios #edit-user-modal,
.admin-usuarios #edit-user-modal .modal-dialog {
  /* forzamos que el translate incluya solo X */
  transform: translateX(-50%) !important;
}

/* Overlay: asegurar que el overlay cubra todo (si aplica) */
.admin-usuarios #edit-user-modal.overlay,
.admin-usuarios .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1990;
}

#edit-user-modal {
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.product-thumb {
  width: 50px !important;
  height: 50px !important;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  transition: transform .12s ease;
}
.product-thumb:hover { transform: scale(1.06); }
#products-table th:first-child,
#paused-products-table th:first-child { text-align:center; width:80px; }

.product-item .product-name {
    margin: 0.1em 0em;
    line-height: 1.2em;
    font-size: 1.5rem; /* tamaño mayor para el NOMBRE */
    width: 100%;
    font-weight: 700;   /* más visible */
    font-family: 'Cormorant Garamond', serif;
}

/* Contenedor del contador de cantidad */
.quantity {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Botones + y - con Material Symbols */
.qty-btn {
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 0.25rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.05s ease;
    line-height: 1;
}
.qty-btn:hover { background: #e0e0e0; }
.qty-btn:active { transform: scale(0.98); }

/* Tamaño del icono de Google */
.qty-btn .material-symbols-rounded {
    font-size: 20px;
}

/* Input del contador */
.quantity .qty-input,
.quantity input[type=number] {
    width: 48px;
    text-align: center;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.2rem;
}

/* Opcional: ajustar el grosor y relleno de los símbolos */
.material-symbols-rounded {
    font-variation-settings: 
      'FILL' 0,    /* 1 = sólido, 0 = contorno */
      'wght' 500,  /* grosor */
      'GRAD' 0, 
      'opsz' 20;
}
/* ---------- Contador personalizado: - (número) + ----------
   Estilos para que el selector quede como en la captura:
   - centrado, pequeño, sin Inter, con botones visibles - y +
   - input limpio y sin spin-buttons nativos
---------------------------------------------------------*/
/* Ocultar flechas nativas (WebKit) sólo para nuestros inputs .product-qty */
.product-qty::-webkit-outer-spin-button,
.product-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ocultar flechas en Firefox */
.product-qty {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Contenedor general: etiqueta + controles, centrado horizontalmente */
.quantity-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* centrado como la captura */
    gap: 6px;
    margin-top: 6px;
}

/* Etiqueta "Cantidad:" */
.quantity-label {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 18px !important;
    color: #222;
    font-weight: 500;
    margin: 0;
}

/* Controles: botón - , input , botón + */
.qty-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    border: none; /* sin borde externo fuerte para lucir minimal */
    background: transparent;
}

.product-qty {
    width: 40px;
    height: 28px;
    min-width: 40px;
    border: none;                      /* quitar borde (quita el recuadro) */
    text-align: center;
    font-size: 14px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    color: #111;
    outline: none;                     /* quitar outline */
    padding: 0;
    margin: 0 6px;
    background: transparent;           /* fondo transparente, sin recuadro */
    box-shadow: none;                  /* quitar sombras que simulen recuadro */
    box-sizing: border-box;
}

.product-qty:focus {
    outline: none;
    box-shadow: none;
    border: none;
    background: transparent;
}

/* Botones - y + : apariencia sutil como en la captura */
.qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    background: transparent;
    color: #222;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    padding: 0;
    margin: 0 4px;
}

/* efecto hover sutil */
.qty-btn:hover {
    background: rgba(0,0,0,0.06);
    border-radius: 6px;
}

/* apariencia cuando está deshabilitado */
.qty-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Icono carrito: Material Symbols Outlined - trazo muy fino */
.cart-icon .material-symbols-outlined {
  /* forzamos la familia sólo para el icono del carrito */
  font-family: 'Material Symbols Outlined' !important;

  /* FILL 0 = outline (contorno). WGT=100 -> trazo muy fino.
     opsz controla la versión óptica; opsz 20 suele dar mejor contraste para iconos */
  font-variation-settings: 'FILL' 0, 'wght' 10, 'GRAD' 0, 'opsz' 20 !important;

  /* tamaño: bajé un poco para que el trazo parezca más delicado */
  font-size: 1.9rem !important;
  vertical-align: middle;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* ayuda a la consistencia en distintos navegadores */
  text-rendering: optimizeLegibility;
}

#parent-categories-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
#parent-categories-table th, #parent-categories-table td { border: 1px solid #ddd; padding: 8px; text-align: center; }
#parent-categories-table img { max-width: 100px; height: auto; }
#add-parent-category-form { display: flex; flex-direction: column; gap: 10px; max-width: 400px; }
#edit-parent-modal { box-shadow: 0 0 10px rgba(0,0,0,0.2); }
#edit-parent-modal form { display: flex; flex-direction: column; gap: 10px; }

/* AUMENTAR TAMAÑO DE IMAGEN Y FUENTE DE LOS FILTROS DE CATEGORÍAS */
#category-image-filters {
  display: flex;
  gap: 1px;
  flex-wrap: wrap;
  align-items: center;
}

/* botón / ficha de categoría */
#category-image-filters .cat-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* contenedor de imagen */
#category-image-filters .cat-img-wrap {

  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

/* imagen dentro del contenedor: ocupa todo y mantiene cover */
#category-image-filters .cat-img-wrap img {
  width: 80%;
  height: 80%;
  object-fit: cover; /* evita deformar la imagen */
  display: block;
}

/* TOAST: aviso producto agregado - posición centrada verticalmente */
#cart-toast {
  position: fixed;
  right: 1px;
  top: 13%;
  bottom: auto;
  transform: translateY(-50%);   /* lo sube exactamente a la mitad vertical */
  display: none;                 /* oculto por defecto */
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: .5rem;
  z-index: 9999999 !important;   /* más alto por si hay stacking contexts */
  pointer-events: none;          /* evitar que el contenedor capture clicks */
  opacity: 0;
  transition: opacity .22s ease, transform .25s cubic-bezier(.2,.9,.3,1);
}

/* inner: mantiene tu estilo, asegurar pointer-events para permitir clicks dentro */
#cart-toast .cart-toast-inner {
  pointer-events: auto;
  background: #0b0b0b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 300;
  font-size: 0.85rem;
  min-width: 170px;
  text-align: center;
}

/* estado visible: lo hacemos visible y activamos pointer-events */
#cart-toast.show {
  display: flex !important;        /* visible cuando tiene .show */
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

/* ======= Mapeo localizado: botón lista-de-precios toma estilo de .main-header .btn ======= */
/* Este bloque es muy específico y solo afecta al botón con id #download-price-list en la página de lista. */

.price-container .price-download-wrapper {
  display: flex;
  justify-content: flex-start; /* alineado a la izquierda */
  align-items: center;
  padding: 1.5rem 1.5rem;
}

/* Copia exacta del estilo principal de .main-header .btn (detectado en tu styles.css) */
.header-like,
.price-container .header-like,
.price-container #download-price-list.header-like {
  background-color: #06050a;
  color: #fff;
  border: none;
  border-radius: 0.4rem;
  padding: 0.3em 0.6em;
  text-decoration: none;
  cursor: pointer;
  font-size: 1.2rem;
  white-space: nowrap;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important; /* asegurar que no tome width:100% si existe global */
  box-sizing: border-box;
  font-family: 'Cormorant Garamond';
}

/* Defensa: si tu .btn global tiene width:100% con !important, esto debe anularlo por especificidad */
.price-container #download-price-list {
  width: auto !important;
}

/* Estilo de cada item generado dentro de #stock-list */
#stock-list > * {
  position: relative;         /* para pseudo-elemento inferior */
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  overflow: visible;
  display: flex;
  justify-content: space-between;
}
/* Si tus items tienen clase específica (p. ej. .stock-item) usa:
   #stock-list > .stock-item { ... } y #stock-list > .stock-item::after { ... } */



@media (min-width: 700px) {
   

  
  
#relations-list {
    width: 100%;
    table-layout: fixed;
}  
  
  
#orders-section .orders-list .order {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    font-size: 1rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
    flex-direction: row;
}  

   
.stock-item .prod-name {
font-size: 1.2rem;
}
   
   
 .stock-item {
    padding: .45rem .6rem;
    border-radius: .5rem;
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: center;
    font-size: 1.4rem;
}  
   
   
/* Contenedor: ya tienes display:grid; aseguramos gap correcto */
#stock-list {
  gap: 1rem; /* espacio entre tarjetas */
  margin-top: .6rem;
}
/* Estilo de cada item generado dentro de #stock-list */
#stock-list > * {
  position: relative;         /* para pseudo-elemento inferior */
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  overflow: visible;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Si tus items tienen clase específica (p. ej. .stock-item) usa:
   #stock-list > .stock-item { ... } y #stock-list > .stock-item::after { ... } */   
#stock-list .stock-item { align-items: center; }
#stock-list .stock-item .prod-thumb {
  flex: 0 0 85px;
  width: 85px;
  height: 85px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-right:12px;
}
   
   
   
   
   .product-thumb {
  width: 130px !important;
  height: 120px !important;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  transition: transform .12s ease;
}
   
   
   
       .stock-list {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
   
   /* AUMENTAR TAMAÑO DE IMAGEN Y FUENTE DE LOS FILTROS DE CATEGORÍAS */
#category-image-filters {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

/* botón / ficha de categoría */
#category-image-filters .cat-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* contenedor de imagen */
#category-image-filters .cat-img-wrap {
  width: 130px;      /* ancho del contenedor de la imagen */
  height: 130px;     /* alto del contenedor de la imagen */
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

/* imagen dentro del contenedor: ocupa todo y mantiene cover */
#category-image-filters .cat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* evita deformar la imagen */
  display: block;
}
   
   
   
   
   
   /* Icono carrito: Material Symbols Outlined - trazo muy fino */
.cart-icon .material-symbols-outlined {
  /* forzamos la familia sólo para el icono del carrito */
  font-family: 'Material Symbols Outlined' !important;

  /* FILL 0 = outline (contorno). WGT=100 -> trazo muy fino.
     opsz controla la versión óptica; opsz 20 suele dar mejor contraste para iconos */
  font-variation-settings: 'FILL' 100, 'wght' 10, 'GRAD' 0, 'opsz' 1 !important;

  /* tamaño: bajé un poco para que el trazo parezca más delicado */
  font-size: 1.9rem !important;
  vertical-align: middle;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* ayuda a la consistencia en distintos navegadores */
  text-rendering: optimizeLegibility;
}
    /* ==========================
   Modal: cabecera y buscador
   ========================== */

/* contenedor de la cabecera: título a la izquierda, buscador a la derecha */
.cart-modal .cart-modal-header {
    display: flex;
    align-items: center;            /* alinear verticalmente título y buscador */
    justify-content: space-between; /* título a la izquierda, buscador a la derecha */
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1.25rem;             /* pequeño padding lateral opcional */
}


/* wrapper del buscador: tamaño fijo máximo, no crece más allá */
.cart-modal .cart-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 0 0 260px;   /* ancho fijo del buscador en el modal; ajusta 260px si quieres más/menos */
    max-width: 40%;     /* seguridad para pantallas pequeñas */
    box-sizing: border-box;
}



/* botón de la lupa: tamaño controlado, sin permitir que la imagen crezca */
.cart-modal .cart-search-wrapper button {
    flex: 0 0 46px;             /* ancho fijo del botón */
    height: 36px;
    padding: 0;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 6px 6px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #06050a;
    cursor: pointer;
}

/* imagen de la lupa: tamaño en píxeles para evitar herencias de font-size */
.cart-modal .cart-search-wrapper button img {
    width: 16px;   /* tamaño adecuado: 14-18px suele verse bien */
    height: 16px;
    display: block;
}
    
    .portada-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .portada-thumb {
        height: 130px;
    }

}

.product-item h3 {
    font-size: 1.2rem; /* Independiente en mobile: nombre más grande */
}

.product-item .product-type {
    font-size: 1rem; /* Independiente en mobile: tipo más chico */
}

/* NUEVO: estilos para el filtro de imagenes de categoría */
.category-image-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 0;
}

/* cada botón (imagen + etiqueta) */
.category-image-filters .cat-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
  font-family: inherit;
}

/* envoltorio de la miniatura: tamaño exacto 60x60 */
.category-image-filters .cat-img-wrap {
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* img debe ocupar exactamente 60x60, sin zoom por defecto */
.category-image-filters .cat-img-wrap img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  transition: transform .16s ease-in-out;
  display: block;
}

/* pequeño zoom en hover (animación sutil) */
.category-image-filters .cat-btn:hover .cat-img-wrap img {
  transform: scale(1.08);
}

/* etiqueta debajo de la imagen */
.category-image-filters .cat-label {
  margin-top: 6px;
  font-size: 12px;
  white-space: nowrap;
}

/* ocultar definitivamente los contenedores de filtro antiguos */
#product-type-filters {
  display: none !important;
}
/* NOTE: dejamos el selector para parent-category-filters en caso de que quieras ocultarlo también:
   si querés ocultarlo, descomentar la línea siguiente:
#parent-category-filters { display: none !important; }
*/

@media (min-width: 900px) {

   /* Icono carrito: Material Symbols Outlined - trazo muy fino */
.cart-icon .material-symbols-outlined {
  /* forzamos la familia sólo para el icono del carrito */
  font-family: 'Material Symbols Outlined' !important;

  /* FILL 0 = outline (contorno). WGT=100 -> trazo muy fino.
     opsz controla la versión óptica; opsz 20 suele dar mejor contraste para iconos */
  font-variation-settings: 'FILL' 0, 'wght' 10, 'GRAD' 0, 'opsz' 20 !important;

  /* tamaño: bajé un poco para que el trazo parezca más delicado */
  font-size: 1.9rem !important;

  
  vertical-align: middle;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* ayuda a la consistencia en distintos navegadores */
  text-rendering: optimizeLegibility;
}
    .portada-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .portada-thumb {
        height: 130px;
    }

  .cart-modal .modal-content {
    width: 70vw;
    max-width: 92vw;
    min-width: 0;
    height: 100%;
    border-radius: 0;
    padding: 1rem;
    position: fixed;
    box-sizing: border-box;
  }

  .cart-table img,
  .cart-modal .modal-content table img {
    width: 110px;
    max-height: 96px;
  }

  .cart-modal .modal-content table th:nth-child(1),
  .cart-modal .modal-content table td:nth-child(1) {

  }

  .cart-modal .modal-content table {
    font-size: 1rem;
    
  }

.product-item h3 {
    font-size: 1.2rem; /* Independiente en mobile: nombre más grande */
}

.product-item .product-type {
    font-size: 1rem; /* Independiente en mobile: tipo más chico */
}

@media (min-width: 1200px) {
   
   
   .content {
    flex: 1;
    padding: min(0.5rem, 1%);
    margin-top: max(2dvh, 20px);
    margin-bottom: 20px;
}
   
   
   
   /* Icono carrito: Material Symbols Outlined - trazo muy fino */
.cart-icon .material-symbols-outlined {
  /* forzamos la familia sólo para el icono del carrito */
  font-family: 'Material Symbols Outlined' !important;

  /* FILL 0 = outline (contorno). WGT=100 -> trazo muy fino.
     opsz controla la versión óptica; opsz 20 suele dar mejor contraste para iconos */
  font-variation-settings: 'FILL' 0, 'wght' 10, 'GRAD' 0, 'opsz' 20 !important;

  /* tamaño: bajé un poco para que el trazo parezca más delicado */
  font-size: 1.9rem !important;
  vertical-align: middle;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* ayuda a la consistencia en distintos navegadores */
  text-rendering: optimizeLegibility;
}
    .portada-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .portada-thumb {
        height: 120px;
    }

    .portada-item {
        padding: 8px;
        border-radius: 8px;
    }

    .portada-meta {
        font-size: 0.9rem;
    }

    .small-btn {
        font-size: 0.82rem;
        padding: .32rem .5rem;
    }

}

.product-item h3 {
    font-size: 1.2rem; /* Independiente en mobile: nombre más grande */
}

.product-item .product-type {
    font-size: 1rem; /* Independiente en mobile: tipo más chico */
}





@media (min-width: 769px) {
    
    
    .stock-message {
    font-weight: 300;
    color: #333;
}
    
    
    
    #productos-sin-stock {
    margin-bottom: 60px;
    margin-top: 40px;
}
    
    
    
    .admin-buttons .btn {
    background: linear-gradient(180deg,#111,#000);
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    padding: .7rem 1.1rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: transform .12s ease, box-shadow .12s ease;
}
    
  .btn {
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 0.4rem;
    padding: 0.3em 0.6em;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    font-weight: 200;
    margin: 0.1em 0em;
    line-height: 1.5em;
    width: 100%;
}
  
    
        /* Panel del carrito - única definición (desktop/tablet) */
    .cart-modal .modal-content {
      box-sizing: border-box;
      background: #fff;
      border-radius: 8px 0 0 8px;
      width: 60vw;            /* aumento: ocupa 60% del viewport */
      max-width: 1500px;      /* tope razonable */
      min-width: 460px;       /* evita colapsar en pantallas pequeñas */
      position: fixed;
      top: 0;
      height: 100vh;
      right: 0;
      padding: 1.6rem;
      transform: translateX(100%);
      transition: transform 0.28s ease;
      overflow-y: auto;
    }
    
    form-container {
        max-width: 800px;
    }

    #products-table {
        min-width: 100%;
        width: 100%;
    }

    #product-list {
        overflow-x: hidden;
    }

    #products-table {
        min-width: 100%;
    }

    .main-header {
        display: grid;
        grid-template-areas: "logo search right";
        grid-template-columns: 1fr 2fr 1fr;
        align-items: center;
        padding: 0 2em;
        min-height: 100px;
    }

    .main-header > .logo {
        grid-area: logo;
        text-align: center;
        margin-left: 30px;
    }

    .main-header > .search-wrapper {
        grid-area: search;
    }

    .main-header > .right-controls {
        grid-area: right;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #search {
        width: 185px;
        font-size: 0.9rem;
        padding: 0 0.5em;
    }

    .mobile-menu {
        display: none;
    }

    .hamburger {
        display: none;
    }

    #search-btn {
        height: 2.6em;
        padding: 0 1.2em;
        border-radius: 0 0.4em 0.4em 0;
    }

    #search-btn img {
        width: 1.3em;
        height: 1.2em;
        object-fit: contain;
    }

    .footer-content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .footer-logo {
        margin-left: 95px;
    }

    .footer-contact {
        font-size: 1.1rem;
        font-weight: 600;
    }

    .footer-contact a {
        font-size: 1.1rem;
        font-weight: 500;
    }

    #cart-count {
        top: 0.02em;
        right: -1.3em;
        font-family: Arial;
    }

    .admin-buttons {
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 1rem;
        margin-top: 5rem;
    }

    .admin-buttons .btn {
        display: inline-block;
        width: auto;
        margin: 0.5rem;
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
        text-align: center;
        text-decoration: none !important;
        color: #fff;
        background-color: #000;
        border: 1px solid #000;
        border-radius: 0.4rem;
        cursor: pointer;
        font-weight: 200;
    }

    #add-user-form input {
        font-size: 1.2rem;
    }

    #add-user-form select {
        font-size: 1.2rem;
    }

    #add-user-form label {
        font-size: 1.1rem;
    }

    #add-user-form button {
        font-size: 1.1rem;
    }

    }

@media (min-width: 1200px) {
    #products-table {
        max-width: 1400px;
        margin: 0 auto;
    }

    .form-container {
        max-width: 1800px;
        padding: 0.75em;
    }

    #product-list {
        overflow-x: hidden;
    }

    #products-table {
        min-width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .centered-content {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}


@media (max-width: 768px) {



.stock-list {
    margin-top: .6rem;
    /* Por defecto, los elementos se apilarán verticalmente (comportamiento normal de un div) */
    display: block; /* o display: flex; con flex-direction: column; si prefieres flexbox */
}


.stock-container {
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 1rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 1rem;
}



    .admin-buttons .btn {
    background: linear-gradient(180deg,#111,#000);
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: transform .12s ease, box-shadow .12s ease;
}
    



.cart-modal .search-wrapper button, .cart-modal .cart-search-wrapper button {
    width: auto;
    height: 2.1em !important;
}

    #edit-user-modal {
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
}
    
        .cart-modal .cart-modal-header {
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
        text-align: center;
    }
    .cart-modal .cart-search-wrapper {
        flex: 1 1 auto;
        max-width: 100%;
        
    }
    
    .cart-item-img {
    width: 72px;
    height: 72px;
  }
  .cart-item-img-pressed { transform: scale(1.12); }
    

    .cart-table img {
        width: 64px !important;
    }

  .cart-item-img {
    width: 64px;
    max-height: 64px;
  }

    .portada-list {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 12px;
    }

    .portada-item {
        flex-direction: column;
        min-height: auto;
    }

    .portada-thumb-wrapper {
        width: 100%;
        flex: 0 0 auto;
    }

    .portada-thumb {
        width: 100%;
        height: 160px;
    }

    .portada-actions {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
    }

    .hero-carousel.hero-carousel--mobile {
        max-height: 420px;
        height: 100vw;
        margin-top:0px;
    }

    .hero-carousel.hero-carousel--desktop {
        height: 400px;
        margin-top:0px;
    }

    .hero-carousel .hc-arrow {
        padding: .5rem .6rem;
        font-size: .95rem;
    }

    .hero-carousel .hc-arrow.prev {
        left: 8px;
    }

    .hero-carousel .hc-arrow.next {
        right: 8px;
    }

    .hero-carousel.hero-carousel--desktop {
        height: 400px;
    }

    .hero-carousel.hero-carousel--mobile {
        height: 360px;
    }

    .historial-page .centered-content {
        padding: 0 0.8rem;
    }

    .historial-page .orders-list .order {
        flex-direction: column;
        align-items: stretch;
        font-size: 1.15rem;
    }

    .historial-page .orders-list .order .order-col-date {
        flex: none;
        width: 100%;
        text-align: left;
    }

    .historial-page .orders-list .order .order-col-main {
        flex: none;
        width: 100%;
        text-align: left;
    }

    .historial-page .orders-list .order .order-col-actions {
        flex: none;
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .historial-page .orders-list .order .btn {
        min-width: auto;
        width: 40%;
    }

    .orders-list .order {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-list .order small {
        width: 100%;
        margin: 0.5em 0;
    }

    .orders-list .order span {
        width: 100%;
        margin: 0.5em 0;
    }

    .orders-list .order button {
        width: 100%;
        margin: 0.5em 0;
    }

    .orders-list .order select {
        width: 100%;
        margin: 0.5em 0;
    }

    .orders-list .order {
        font-size: 1.5em;
    }

    .product-search #product-search-input {
        width: 90%;
        height: 36px;
    }

    .product-search #product-search-btn {
        height: 36px;
    }

    .barcode-search #search-input {
        width: 90%;
        height: 36px;
    }

    .barcode-search #search-btn {
        height: 36px;
    }

    .category-search #category-search-input {
        width: 90%;
        height: 36px;
    }

    .category-search #category-search-btn {
        height: 36px;
    }

    .product-item h3 {
        font-size: 1.2rem;
    }

    .product-item p {
        font-size: 0.9rem;
    }

    .product-item .category-name {
        font-size: 0.9rem;
    }

    .product-item .price {
        font-size: 0.9rem;
    }

    .product-item .price-normal {
        font-size: 0.9rem;
    }

    .product-item .price-diferenciado {
        font-size: 0.9rem;
    }

    .product-item .product-type {
        font-size: 1rem;
    }

    .product-item select {
        font-size: 0.9rem;
    }

    .product-item button {
        font-size: 0.9rem;
    }

    .barcode-search #search-input {
        width: 90%;
    }

    .product-item .product-description {
        font-size: 0.6rem;
    }

    .quantity-container input[type="number"] {
        width: 90%;
        font-size: 0.9rem !important;
        padding: 4px !important;
    }

    .main-header {
        
        top: 0;
        left: 0;
        right: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas: "logo search hamburger" "logo . right-controls";
        padding: 12px 18px;
        padding-left: 2px;
        background-color: #06050a;
        color: #fff;
        z-index: 1000;
        row-gap: 8px;
        align-items: center;
        height: auto;
    }

    .main-header > .logo {
        grid-area: logo;
        justify-self: start;
        margin-left: 13px;
    }

    .main-header > .logo img {
        height: 60px;
        max-width: 160px;
        object-fit: contain;
    }

    .main-header > .search-wrapper {
        grid-area: search;
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 0px;
        width: auto;
        margin: 0;
    }

    .main-header > .search-wrapper #search {
        flex: none;
        width: 100%;
        max-width: 130px;
        height: 2.42em;
        font-size: 0.8rem;
        padding: 0 0.5em;
    }

    .main-header > .search-wrapper #search-btn img {
        width: 1em;
        height: 1em;
    }

    .main-header > .hamburger {
        grid-area: hamburger;
        justify-self: end;
        margin-left: auto;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 19px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .btn-group {
        display: none;
    }

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

    #search-btn {
        margin-left: -1px;
        height: 2.3em;
        padding: 0 1.2em;
    }

    /* --- Ajuste del contador del carrito sólo en móvil (subir y correr a la derecha) --- */
    .right-controls #cart-count,
    #cart-count {
    position: absolute; /* debe seguir siendo absolute respecto al contenedor #cart */
    top: -0.25em !important;   /* subir el contador (ajusta aquí si querés más o menos) */
    right: -1.10em !important; /* correr hacia la derecha (valores negativos lo desplazan fuera a la derecha) */
    min-width: 1.6em;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* evita que el contador capture clicks */
    }

    body.logged-in .content {
        margin-top: 1000px;
    }

    .footer-logo {
        margin-left: 25px;
    }

    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.9em;
    }

    .footer-contact .separator {
        display: none;
    }

    .footer-contact a {
        margin: 0;
    }

    .footer-contact a:last-child {
        text-indent: -20px;
    }

    .footer-contact a {
        font-size: 1.2em;
        font-weight: 500;
    }

    .cart-modal .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 3.5rem;
        position: static;
        transform: none;
        box-sizing: border-box;
        overflow-y: auto;
        overflow-x: hidden;
        font-size: 10px;
        margin-top: -40px;
    }

    .cart-modal .modal-content table {
        font-size: 10px;
        width: 100%;
        table-layout: fixed;
        overflow-x: hidden;
    }

    .cart-modal .modal-content table th {
        padding: 0.5em;
        text-align: center;
        word-wrap: break-word;
    }

    .cart-modal .modal-content table td {
        padding: 0.5em;
        text-align: center;
        word-wrap: break-word;
    }

    .cart-modal .modal-content table th:nth-child(1) {
        width: 50px;
        font-size: 10px !important;
    }

    .cart-modal .modal-content table td:nth-child(1) {
        width: 40px;
        font-size: 10px;
    }

    .cart-modal .modal-content table th:nth-child(2) {
        width: 30%;
    }

    .cart-modal .modal-content table td:nth-child(2) {
        width: 30%;
    }

    .cart-modal .modal-content table th:nth-child(3) {
        width: 15%;
    }

    .cart-modal .modal-content table td:nth-child(3) {
        width: 15%;
    }

    .cart-modal .modal-content table th:nth-child(4) {
        width: 15%;
    }

    .cart-modal .modal-content table td:nth-child(4) {
        width: 15%;
    }

    .cart-modal .modal-content table th:nth-child(5) {
        width: 15%;
    }

    .cart-modal .modal-content table td:nth-child(5) {
        width: 15%;
    }

    .cart-modal .modal-content table th:nth-child(6) {
        width: 20%;
    }.cart-table td, .cart-modal .modal-content table th, .cart-modal .modal-content table td {

    .cart-modal .modal-content table td:nth-child(6) {
        width: 20%;
    }

    .cart-modal .modal-content table button {
        font-size: 0.65rem;
        padding: 0.2em 0.4em;
    }

    .admin-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }



    .cart-icon svg {
        display: block;
        width: 35px;
        height: auto;
        shape-rendering: geometricPrecision;
        vector-effect: non-scaling-stroke;
    }

    .quantity-container {
        flex-direction: column;
    }

    .quantity-container input[type="number"] {
        width: 100%;
        font-size: 1.2rem;
        padding: 10px;
    }

    input[type="number"]::-webkit-inner-spin-button {
        opacity: 1;
    }

    input[type="number"]::-webkit-outer-spin-button {
        opacity: 1;
    }

    body {
        font-size: 0.85rem;
    }

    .form-container {
        max-width: 1800px;
        margin: 0.5em;
        padding: 0.75em;
    }

    .form-container input {
        width: 100%;
        margin: 0.3em 0;
        padding: 0.4em;
        font-size: 0.85rem;
    }

    .form-container select {
        width: 100%;
        margin: 0.3em 0;
        padding: 0.4em;
        font-size: 0.85rem;
    }

    .form-container button {
        width: 100%;
        margin: 0.3em 0;
        padding: 0.4em;
        font-size: 0.85rem;
    }

    #users-table table {
        width: 100%;
        font-size: 0.8rem;
    }

    #users-table th {
        padding: 0.4em;
    }

    #users-table td {
        padding: 0.4em;
    }

    #users-table button {
        font-size: 0.8rem;
        padding: 0.25em 0.5em;
    }

    #users-table {
        overflow-x: auto;
    }

    .relations-container {
        overflow-x: auto;
        width: 100%;
    }

    #relations-list {
        min-width: 800px;
    }

.cart-modal .modal-content table td {
  padding: 0.85rem;
  border: 1px solid #e6e6e6;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  line-height: 1.3;
  font-size: 10px;
}


}
    
    
    
    
    
}
