/*
  Hoja de estilos principal de la tienda
  - Tipografías, layout general y componentes
  - Reglas para mostrar/ocultar tienda según autenticación
*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap');

/* GENERALES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #cbd7e6;
    overflow-x: hidden;
}

/* No mostrar la tienda hasta que el usuario esté aprobado */
#shop { display: none; }
body.auth-approved #shop { display: block; }

/* Aviso de estado de acceso */
.access-status {
    width: 100%;
    padding: 10px 16px;
    text-align: center;
    background: #ffe9a8; /* amarillo suave */
    color: #080817;
    font-weight: 600;
}

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

button {
    outline: none;
    border: none;
    cursor: pointer;
    background: none;
}

fieldset {
    border: none;
}

/* LAYOUT */
.in-line {
    display: flex;
    justify-content: center;
    align-items: center;
}

.in-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

/* THEMES */
.theme-sky {
    background-color: #43628b;
    color: white;
}

.theme-sky-dark {
    background-color: #080817;
    color: white;
}

/* HEADER */
.header {
    justify-content: space-between;
    padding: 15px 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.auth-actions .button { padding: 8px 12px; }
.user-greet { color: #fff; font-weight: 600; }

.branding-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    margin-right: 16px;
}

/* BANNER */
.banner-estetica {
    position: relative;
    width: 100vw;
    height: 200px;
    overflow: hidden;
}

.banner-estetica .banner-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 200px;
    background: url('images/bginicio.png') center center / cover no-repeat;
    filter: blur(16px) brightness(0.8);
    z-index: 1;
}

.banner-estetica .banner-img-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* FILTROS */
.filters-container {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    gap: 20px;
}

.filters-heading-container {
    justify-content: space-between;
    margin-bottom: 20px;
}

.filters-title h2 {
    font-size: 1.5rem;
}

.clear-btn {
    border: none;
    background: transparent;
    padding: 10px;
    align-items: center;
    color: #080817;
    cursor: pointer;
}

.clear-btn:hover {
    color: #43628b;
}

.filters-search-container {
    margin: 20px 0;
}

#input-search {
    height: 40px;
    width: 100%;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.checkboxes-container {
    margin-top: 15px;
}

.input-category {
    justify-content: flex-start;
    margin: 10px 0;
    cursor: pointer;
}

.input-category input {
    margin-right: 10px;
}

/* PRODUCTOS */
.products-container {
    flex: 1;
    padding: 20px;
}

.products-header { display:flex; align-items:center; justify-content: space-between; gap:12px; padding:12px 16px; margin-bottom:20px; border-radius:8px; }

.product {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-img-container {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.product-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s;
}

.product:hover .product-img {
    transform: scale(1.05);
}

.product-content {
    padding: 15px;
    text-align: center;
}

.product-price {
    margin-bottom: 10px;
    font-weight: bold;
    color: #080817;
}

.product-name {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #080817;
}

.button {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.button-simple-solid {
    background: #080817;
    color: white;
}

.button-simple-solid:hover {
    background: #43628b;
}

/* MODALES */
.modal-service {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-service:not(.is-hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    transform: translateY(-20px);
    transition: all 0.3s;
}

.modal-service:not(.is-hidden) .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #43628b;
}

.close-modal:hover {
    color: #080817;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #080817;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #43628b;
}

.modal-content input[type="text"],
.modal-content input[type="file"],
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content button[type="submit"] {
    margin-top: 20px;
    padding: 12px;
    background: #080817;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.modal-content button[type="submit"]:hover {
    background: #43628b;
}

/* FOOTER */
.footer-main {
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.logo {
    width: 30px;
    height: auto;
    margin-right: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .auth-actions { width: 100%; justify-content: flex-end; }
    .banner-estetica, .banner-estetica .banner-bg, .banner-estetica .banner-img-container { height: 160px; }
    .filters-container {
        flex-direction: column;
    }
    
    .filters-aside {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .products-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    
    .open-filters-btn {
        display: flex !important;
    }
    
    .filters-aside {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100vh;
        background: white;
        z-index: 100;
        padding: 20px;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .filters-aside.active {
        display: block;
    }
    
    .close-filters-btn {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .products-list { grid-template-columns: 1fr; }
    .product-img-container { height: 140px; }
    .button { padding: 9px 14px; font-size: 0.85rem; }
    .product-name { font-size: 1rem; }
}
.is-hidden {
    display: none !important;
}
/* Ajuste de layout para filtros ocultos en escritorio */
@media (min-width: 769px) {
    .filters-container {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
    }
    .filters-aside {
        width: 300px;
        min-width: 250px;
        max-width: 350px;
        display: block;
        position: static;
        height: auto;
        box-shadow: none;
        padding: 20px;
        background: transparent;
    }
    .filters-aside:not(.active) {
        display: none;
    }
    .products-container {
        flex: 1 1 0%;
        width: 100%;
        transition: width 0.3s;
    }
}/* Ajuste de layout para filtros ocultos en escritorio */
@media (min-width: 769px) {
    .filters-container {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
    }
    .filters-aside {
        width: 300px;
        min-width: 250px;
        max-width: 350px;
        display: block;
        position: static;
        height: auto;
        box-shadow: none;
        padding: 20px;
        background: transparent;
    }
    .filters-aside:not(.active) {
        display: none;
    }
    .products-container {
        flex: 1 1 0%;
        width: 100%;
        transition: width 0.3s;
    }
}

/* PayPal buttons container inside modals */
.paypal-buttons { margin-top: 16px; }
