@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: #141414;
    --text-main: #f5f5f5;
    --text-muted: #999;
    --accent-red: #8B0000; /* Darker red matching classic barber pole */
    --accent-blue: #4682B4; /* Steel blue */
    --gold: #D32F2F; /* Accent color changed from gold to red */
    --border-color: #222;
    --font-heading: 'Cinzel', serif;
    --font-ui: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-ui);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: #ccc;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: var(--bg-dark);
}

/* Global Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font-ui);
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: #222;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5%;
}

.logo img {
    height: 80px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('../img/barber.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Sections */
section {
    padding: 100px 5%;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 50px;
    position: relative;
    color: var(--gold);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.service-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
}

/* Gallery Masonry */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Reservation Modal / Section */
.reservation-section {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

.res-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 1px solid var(--border-color);
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #2a2a2a;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    position: relative;
    cursor: default;
    background: transparent;
    border: none;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition);
}

.step.active .step-icon {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--bg-dark);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.step.active .step-label {
    color: var(--gold);
    font-weight: 700;
}

.res-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.res-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Select & Inputs */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
}

select, input, textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

select:focus, input:focus, textarea:focus {
    border-color: var(--gold);
}

/* Service Visual Grid Selection */
.service-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.service-select-card {
    background: #111;
    border: 1px solid #222;
    padding: 24px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.service-select-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    background: #181818;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.service-select-card.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.service-select-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--gold);
    font-size: 1rem;
}

.service-select-info h4 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.service-select-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.service-select-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 15px;
}

.service-select-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.service-select-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Date Picker Glassmorphism Styling */
.date-picker-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.date-picker-wrapper input[type="date"] {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: #121212;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.date-picker-wrapper input[type="date"]:focus {
    border-color: var(--gold);
    background: #161616;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.date-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 5;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
}

.time-slot {
    background: #111;
    border: 1px solid #222;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.time-slot:hover {
    background: #1a1a1a;
    border-color: var(--gold);
    transform: scale(1.05);
}

.time-slot.selected {
    background: var(--gold);
    color: var(--bg-dark);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    transform: scale(1.05);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Footer */
footer {
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.98)), url('../img/barber.jpeg') center/cover no-repeat;
    background-attachment: fixed;
    padding: 80px 5% 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 35px 30px;
    border-radius: 16px;
    transition: var(--transition);
}

.footer-col:hover {
    transform: translateY(-5px);
    border-color: rgba(211, 47, 47, 0.4);
    box-shadow: 0 12px 35px rgba(0,0,0,0.6);
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col p i {
    color: var(--gold);
    margin-right: 8px;
    width: 20px;
}

.footer-bottom {
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3.5rem; }
    nav ul { display: none; } 
    .gallery-grid { column-count: 2; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-col { text-align: center; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; }
    .gallery-grid { column-count: 1; }
}

/* =========================================
   ADMIN PANEL STYLES
   ========================================= */
.admin-body {
    background-color: var(--bg-dark);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    padding: 25px;
    transition: var(--transition);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 40px;
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(211, 47, 47, 0.15);
    color: var(--gold);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.15);
}

.main-content {
    flex: 1;
    padding: 40px;
    background: var(--bg-dark);
    max-width: 100%;
}

.mobile-admin-header {
    display: none;
    background: var(--bg-darker);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.metric-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: rgba(211, 47, 47, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.metric-info h4 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.metric-info h2 {
    font-size: 2.2rem;
    color: var(--text-main);
}

.metric-icon {
    font-size: 2.5rem;
    color: var(--gold);
    opacity: 0.3;
}

/* Admin Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.admin-table th, .admin-table td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(255,255,255,0.02);
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Specific Responsive */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 2000;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }
    .sidebar.open {
        left: 0;
    }
    .mobile-admin-header {
        display: flex;
    }
    .main-content {
        padding: 20px;
    }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background: var(--bg-card);
    padding: 35px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

/* Admin Gallery */
.gallery-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.gallery-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.delete-btn:hover {
    background: #f44336;
    transform: scale(1.1);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-pendiente { background: #332604; color: #ffca28; border: 1px solid rgba(255, 202, 40, 0.2); }
.badge-confirmada { background: #08293a; color: #29b6f6; border: 1px solid rgba(41, 182, 246, 0.2); }
.badge-finalizada { background: #073418; color: #66bb6a; border: 1px solid rgba(102, 187, 106, 0.2); }
.badge-cancelada { background: #320d0d; color: #ef5350; border: 1px solid rgba(239, 83, 80, 0.2); }

.status-dropdown {
    background: #111;
    border: 1px solid #2a2a2a;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}
.status-dropdown:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.2);
}
.action-delete-btn {
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: #ef5350;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.action-delete-btn:hover {
    background: #ef5350;
    color: #fff;
    border-color: #ef5350;
    transform: scale(1.05);
}

/* WhatsApp Floating Button */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
}
.whatsapp-floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: #1ebd59;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.footer-map-link:hover {
    color: var(--gold) !important;
}

/* Success Modal */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.custom-modal.active {
    display: flex;
}

.custom-modal-content {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0,0,0,0.7);
    animation: zoomIn 0.35s ease;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.success-icon {
    font-size: 3.5rem;
    color: #66bb6a;
    margin-bottom: 20px;
    animation: popIcon 0.4s ease-out;
}

@keyframes popIcon {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

.custom-modal-content h2 {
    color: var(--gold);
    margin-bottom: 12px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.custom-modal-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.summary-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: left;
}

.summary-card p {
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.summary-card p:last-child {
    margin-bottom: 0;
}

.summary-card strong {
    color: var(--gold);
    font-family: var(--font-ui);
    display: inline-block;
    width: 85px;
}

@media (max-width: 576px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .admin-table th, .admin-table td {
        padding: 12px;
        font-size: 0.8rem;
    }
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
}
