@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@300;500&display=swap');

:root {
    --pink: #FFDDE6;
    --gold: #B4975A;
    --dark: #2c2c2c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--pink);
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
}

header {
    padding: 30px 20px; /* Reducimos un poco el padding */
    text-align: center;
}

.logo-img {
    max-width: 380px; /* Tamaño máximo en PC */
    width: 100%;      /* Para que sea responsivo */
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.02); /* Pequeño efecto al pasar el mouse */
}

/* Ajuste específico para móviles */
@media (max-width: 600px) {
    .logo-img {
        max-width: 200px; /* Más pequeño en celulares para que no ocupe toda la pantalla */
    }
    
    header {
        padding: 20px 10px;
    }
}

header h1 {
    font-family: 'Cinzel', serif;
    letter-spacing: 8px;
    color: var(--gold);
    font-size: 2.2rem;
}

header span {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--gold);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

/* Grid de Joyas */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.jewelry-card {
    background: #fff;
    transition: 0.4s;
    cursor: pointer;
}

.jewelry-card:hover { transform: translateY(-5px); }

.card-image {
    height: 350px;
    overflow: hidden;
}

.card-image img {
    width: 100%; height: 100%; object-fit: cover;
}

.card-details {
    padding: 20px;
    text-align: center;
}

.card-details h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.view-btn {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #999;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* --- MODAL CON SWIPER --- */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
}

.modal-content {
    position: relative;
    background: #fff;
    width: 95%;
    max-width: 900px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
        height: 550px;
        overflow: hidden;
    }
}

.modal-body {
    display: flex;
    flex-direction: column;
    width: 100%;
}

@media (min-width: 768px) {
    .modal-body { flex-direction: row; }
}

.swiper {
    width: 100%;
    height: 350px;
    background: #000;
}

@media (min-width: 768px) {
    .swiper { width: 60%; height: 100%; }
}

.swiper-slide img {
    width: 100%; height: 100%; object-fit: contain;
}

.modal-text {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.modal-text h2 { font-family: 'Cinzel', serif; color: var(--gold); margin-bottom: 15px; }
.modal-text p { font-size: 0.9rem; color: #666; margin-bottom: 25px; line-height: 1.6; }

.close-btn {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    font-size: 2rem; color: #fff;
    cursor: pointer; z-index: 20;
}

@media (min-width: 768px) {
    .close-btn { color: #333; }
}

.btn-wa {
    background: var(--gold);
    color: #fff;
    text-decoration: none;
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Colores de Swiper */
.swiper-button-next, .swiper-button-prev { color: var(--gold) !important; }
.swiper-pagination-bullet-active { background: var(--gold) !important; }

.filter-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1px;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--gold);
    color: #fff;
}

/* Animación suave al filtrar */
.jewelry-card {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- Estilos para el Login de Admin --- */
.admin-body {
    background-color: var(--pink);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.login-box .form-group {
    margin-bottom: 15px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
}

.login-box input:focus {
    border-color: var(--gold);
}

.btn-admin {
    width: 100%;
    background: var(--gold);
    color: white;
    border: none;
    padding: 12px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 2px;
}

.btn-admin:hover {
    background: var(--dark);
}

/* --- ESTILOS DASHBOARD ADMIN --- */

.admin-container {
    max-width: 100%;
    margin: 30px auto;
    padding: 20px;
    background: #fdfdfd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--pink);
    padding-bottom: 15px;
}

.admin-header h1 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.5rem;
}

/* Estilo para las cajas/tarjetas del admin */
.admin-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.admin-card h3 {
    font-family: 'Cinzel', serif;
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 1.2rem;
}

/* Formularios en Admin */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

/* Tabla Responsiva */
.table-wrapper {
    overflow-x: auto; /* Permite scroll lateral en móviles */
    margin-top: 20px;
}

.table-admin {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 500px; /* Evita que se colapse demasiado */
}

.table-admin th {
    background: var(--pink);
    color: var(--dark);
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
    font-family: 'Cinzel', serif;
}

.table-admin td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.table-admin img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* Botones de Acción */
.btn-danger {
    background: #e74c3c !important;
}

.btn-edit {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    display: inline-block;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
}

.btn-edit:hover, .btn-delete:hover {
    opacity: 0.8;
}

/* Ajustes para Móvil */
@media (max-width: 600px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-container {
        margin: 10px;
        padding: 15px;
    }

    .btn-edit, .btn-delete {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
}