/* Paleta de Colores:
   Fondo Blanco: #ffffff
   Botones Verde-Azul Aguamarina: #00a896 / #028090
   Bordes de Tarjetas: #00a896
   Hover Dorado: #d4af37 (o #e5a93b)
*/
:root {
    --bg-main: #ffffff;
    --primary-color: #00a896;
    --primary-hover: #028090;
    --card-border: #00a896;
    --hover-gold: #d4af37;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --status-pending: #f39c12;
    --status-ready: #2ecc71;
    --status-alert: #e74c3c;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    flex: 1;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 2px solid var(--primary-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}
.nav-left, .nav-right {
    display: flex;
    gap: 10px;
}
.nav-title h1 {
    font-size: 1.6rem;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* Botones */
.btn {
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 3px 8px rgba(0, 168, 150, 0.35);
}
.btn-secondary {
    background-color: #f0fdfc;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-danger {
    background-color: #e74c3c;
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #c0392b;
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Barra de Búsqueda */
.search-wrapper {
    margin: 20px auto 30px;
    max-width: 600px;
    display: flex;
    box-shadow: var(--shadow);
    border-radius: 30px;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}
.search-input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
}
.search-btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 0 24px;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Grid de Categorías Centradas */
.categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}
.category-card {
    background: #ffffff;
    border: 2px solid var(--card-border);
    border-radius: 12px;
    width: 220px;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow);
}
.category-card:hover {
    border-color: var(--hover-gold);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.45);
    transform: translateY(-5px);
}
.category-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: #f7fafc;
}
.category-card h3 {
    padding: 14px 10px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Grid de Productos */
.products-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}
.product-card {
    background: #ffffff;
    border: 2px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.product-card:hover {
    border-color: var(--hover-gold);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.45);
    transform: translateY(-4px);
}
.product-img-box {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f8fafc;
}
.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card.agotado .product-img-box img {
    filter: grayscale(100%);
    opacity: 0.8;
}
/* Listón Agotado entre centro derecho y centro bajo */
.ribbon-agotado {
    position: absolute;
    bottom: 25px;
    right: 0;
    background: #e74c3c;
    color: #ffffff;
    padding: 6px 18px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}
.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-info h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}
.product-info .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Modales / Popups */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-light);
}

/* Visor de imágenes de producto con zoom (+ / -) */
.viewer-images-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 280px;
    background: #f0fdfc;
    border-radius: 8px;
    margin-bottom: 12px;
}
.viewer-images-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
    transform-origin: center center;
}
.zoom-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}
.btn-zoom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.thumbnails img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}
.thumbnails img.active {
    border-color: var(--hover-gold);
}

/* Burbuja Flotante de Pedido en Parte Inferior Izquierda */
.floating-order-bubble {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: #ffffff;
    border: 2px solid var(--card-border);
    border-radius: 30px;
    padding: 8px 18px 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.floating-order-bubble:hover {
    transform: translateY(-3px);
}
.order-circle-status {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.order-circle-status.orange {
    background-color: var(--status-pending);
}
.order-circle-status.green {
    background-color: var(--status-ready);
}
/* Punto animado de notificación roja que alumbra y opaca */
.pulse-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background-color: #e74c3c;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(231, 76, 60, 0.7);
    animation: pulseGlow 1.4s infinite ease-in-out;
}
@keyframes pulseGlow {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.8);
        opacity: 1;
    }
    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
        opacity: 0.4;
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
        opacity: 1;
    }
}

/* Panel Administrador: Malla 2x2 */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 25px 0;
}
@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .logo{
        width: 70%;
        height: auto;
    }
}
.admin-panel {
    background: #ffffff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.admin-panel h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 16px;
    border-bottom: 2px solid #eef2f5;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.88rem;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 0.92rem;
}
.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}
.table-responsive {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 14px;
}
table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
table.admin-table th, table.admin-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eef2f5;
    text-align: left;
}
table.admin-table th {
    background-color: #f7fafc;
    color: var(--primary-color);
    position: sticky;
    top: 0;
}
.footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
    color: var(--text-light);
    margin-top: auto;
}
.logo{
    width: 38%;
    height: auto;
    align-items: center;
    align-self: center;
    align-content: center;
}