/* Estilos Luxury para ZonaRoja */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@300;400;600&display=swap');

:root {
    --primary: #722f37; /* Wine Red */
    --accent: #c5a059;  /* Gold */
    --bg: #fffaf5;      /* Cream */
    --dark: #2c1810;
    --white: #ffffff;
    --gray: #9e9e9e;
    --shadow: 0 10px 30px rgba(114, 47, 55, 0.08);
    --card-bg: #ffffff;
    --text-main: #2c1810;
    --border-color: rgba(197, 160, 89, 0.2);
}

body.dark-mode {
    --primary: #c5a059;
    --bg: #0a0a0a;
    --dark: #ffffff;
    --white: #1a1a1a;
    --card-bg: #111111;
    --text-main: #ffffff;
    --border-color: #c5a059;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
h1, h2, h3 { font-family: 'Playfair Display', serif; }
body { background-color: var(--bg); color: var(--text-main); transition: 0.3s; line-height: 1.6; }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 1rem; }
.w-full { width: 100%; }

header {
    background-color: var(--white);
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0; z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
}

.logo-container { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-circle { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }
.logo-text { margin: 0; font-size: 1.3rem; color: var(--primary); letter-spacing: 2px; }

/* Navigation */
nav { display: flex; align-items: center; }
nav a { color: var(--text-main); text-decoration: none; margin-left: 1.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
nav a:hover { color: var(--accent); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; }

/* Search Bar */
.search-container { flex: 1; max-width: 400px; margin: 0 2rem; }
.search-input { width: 100%; padding: 0.6rem 1.2rem; border-radius: 50px; border: 1px solid var(--border-color); background: var(--bg); color: var(--text-main); outline: none; transition: 0.3s; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1); }

/* Grid System */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }

.card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
}

.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(114, 47, 55, 0.15); }

.card-img-container { position: relative; height: 420px; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover img { transform: scale(1.05); }

.card-video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: 0.5s; z-index: 1;
}
.card:hover .card-video { opacity: 1; }

.card-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 1.5rem; color: white; z-index: 2;
}

.card-top-tags { position: absolute; top: 1rem; left: 1rem; display: flex; gap: 0.5rem; z-index: 3; }
.vip-tag { background: var(--accent); color: #000; padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; }
.video-tag { background: rgba(255,255,255,0.2); backdrop-filter: blur(5px); color: white; padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }

.name-age h3 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.price { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.location-text { font-size: 0.8rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; }

/* Buttons */
.btn {
    background: var(--primary); color: white; padding: 0.9rem 1.8rem;
    border-radius: 50px; border: none; cursor: pointer; text-transform: uppercase;
    letter-spacing: 1.5px; transition: 0.3s; font-weight: 600; font-size: 0.85rem;
    display: inline-block; text-decoration: none;
}
.btn:hover { background: var(--accent); transform: scale(1.02); }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

/* Filters */
.filters { margin-bottom: 3rem; }
.city-buttons { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.city-btn { padding: 0.6rem 1.2rem; border-radius: 50px; border: 1px solid var(--border-color); background: var(--white); color: var(--text-main); text-decoration: none; font-size: 0.85rem; transition: 0.3s; }
.city-btn:hover, .city-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); backdrop-filter: blur(10px); padding: 2rem; overflow-y: auto; }
.modal-content { background: var(--bg); max-width: 900px; margin: auto; border-radius: 25px; overflow: hidden; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
.close-modal { position: absolute; right: 25px; top: 25px; color: white; font-size: 35px; cursor: pointer; z-index: 10; transition: 0.3s; }
.close-modal:hover { color: var(--accent); transform: rotate(90deg); }

.carousel-container { height: 600px; background: #000; position: relative; }
.carousel-slide { display: none; height: 100%; }
.carousel-slide img, .carousel-slide video { width: 100%; height: 100%; object-fit: contain; }

.prev, .next { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); padding: 1.5rem; color: white; background: rgba(0,0,0,0.2); border-radius: 0 10px 10px 0; transition: 0.3s; }
.next { right: 0; border-radius: 10px 0 0 10px; }
.prev:hover, .next:hover { background: var(--accent); }

.modal-info { padding: 3rem; }
.modal-details { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.detail-item h4 { color: var(--accent); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 0.5rem; }

/* Profile & Forms */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--gray); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.9rem; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg); color: var(--text-main); outline: none; transition: 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; }
.photo-slot { aspect-ratio: 3/4; border: 2px dashed var(--border-color); border-radius: 15px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; transition: 0.3s; }
.photo-slot.has-image { border: none; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.delete-photo { position: absolute; top: 8px; right: 8px; background: var(--primary); color: white; border: none; border-radius: 50%; width: 25px; height: 25px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.upload-btn { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--accent); font-size: 2.5rem; }

.theme-toggle { background: none; border: 1px solid var(--border-color); color: var(--accent); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.theme-toggle:hover { border-color: var(--accent); background: rgba(197, 160, 89, 0.05); }

/* Responsive */
@media (max-width: 992px) {
    .profile-grid { grid-template-columns: 1fr !important; }
    .modal-details { grid-template-columns: 1fr; }
    .carousel-container { height: 450px; }
}

@media (max-width: 768px) {
    header { padding: 0.8rem 1rem; }
    .search-container { display: none; } 
    .mobile-menu-btn { display: block; }
    nav { 
        position: fixed; top: 65px; left: 0; width: 100%; background: var(--white); 
        flex-direction: column; padding: 2rem; gap: 1.5rem; border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%); transition: 0.4s; z-index: 99;
    }
    nav.active { transform: translateY(0); }
    nav a { margin: 0; font-size: 1.1rem; }
    
    .logo-text { font-size: 1.1rem; }
    
    .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem; }
    .card-img-container { height: 300px; }
    .name-age h3 { font-size: 1rem; }
    .price { font-size: 0.9rem; }
    
    .modal { padding: 0; }
    .modal-content { border-radius: 0; min-height: 100vh; }
    .carousel-container { height: 400px; }
    .modal-info { padding: 1.5rem; }

    /* Admin Table Responsive */
    table, thead, tbody, th, td, tr { display: block; width: 100%; }
    thead tr { position: absolute; top: -9999px; left: -9999px; }
    tr { border: 1px solid var(--border-color); margin-bottom: 1.5rem; border-radius: 12px; padding: 15px; background: var(--white); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
    td { border: none; position: relative; padding: 10px 0 10px 45% !important; text-align: right; min-height: 40px; display: flex; align-items: center; justify-content: flex-end; }
    td:before { position: absolute; top: 10px; left: 0; width: 40%; padding-right: 10px; white-space: nowrap; font-weight: bold; text-align: left; color: var(--gray); font-size: 0.8rem; text-transform: uppercase; }
    td:nth-of-type(1):before { content: "Nombre"; }
    td:nth-of-type(2):before { content: "Email"; }
    td:nth-of-type(3):before { content: "Ciudad"; }
    td:nth-of-type(4):before { content: "Estado"; }
    td:nth-of-type(5):before { content: "Acciones"; }
    
    /* Fix for action buttons in mobile table */
    td:nth-of-type(5) { flex-direction: column; align-items: stretch; padding-left: 0 !important; }
    td:nth-of-type(5):before { position: static; width: 100%; margin-bottom: 10px; }
    
    .profile-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .card { padding: 1.5rem !important; }
    
    /* Dashboard Stats Mobile */
    .grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr !important; }
    .card-img-container { height: 450px; }
    .city-buttons { gap: 0.5rem; }
    .city-btn { padding: 0.5rem 1rem; font-size: 0.75rem; }
}
