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

html {
    scroll-behavior: smooth;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2d3436;
    background-color: #f8f9fa;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #ff5b00;
    text-decoration: none;
}

a:hover {
    color: #e65500;
}

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

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

/* Header */
.header {
    background: #2c3e50;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}

.logo span {
    color: #ff5b00;
}

.logo:hover {
    color: #fff;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-links a {
    color: #ecf0f1;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 91, 0, 0.15);
    color: #ff5b00;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Main */
.main {
    flex: 1;
    padding: 40px 0;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 80px 0 0;
    text-align: center;
    margin: -40px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 750px;
    margin: 0 auto;
    padding: 40px 0 50px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 18px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 35px;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn-primary {
    padding: 14px 36px;
    font-size: 1.05rem;
}

/* Hero stats */
.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    margin-top: 20px;
}

.hero-stat {
    background: rgba(0,0,0,0.25);
    padding: 30px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.hero-stat-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    color: #ff5b00;
    margin-bottom: 5px;
}

.hero-stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #ff5b00;
    color: #fff;
}

.btn-primary:hover {
    background: #e65500;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 91, 0, 0.4);
}

.btn-secondary {
    background: #3498db;
    color: #fff;
}

.btn-secondary:hover {
    background: #2980b9;
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-cta {
    background: #fff;
    color: #1a1a2e;
}

.btn-cta:hover {
    background: #ecf0f1;
    color: #1a1a2e;
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #ff5b00;
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Services */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.servicio-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.servicio-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ff5b00, #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.servicio-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.servicio-card p {
    color: #636e72;
    font-size: 0.95rem;
}

/* Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.benefit-item {
    background: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.benefit-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    background: rgba(255, 91, 0, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ff5b00;
}

.benefit-item h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #1a1a2e;
    font-weight: 700;
}

.benefit-item p {
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Process */
.section-dark {
    background: #1a1a2e;
    margin: 60px -999px;
    padding: 60px 999px;
}

.section-dark .section-title {
    color: #fff;
}

.section-dark .section-title::after {
    background: #ff5b00;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.process-step {
    text-align: center;
    padding: 35px 25px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.3s;
}

.process-step:hover {
    transform: translateY(-4px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff5b00;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.process-step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 700;
}

.process-step p {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* CTA section */
.cta-section {
    text-align: center;
    padding: 60px 0;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 15px;
}

.cta-section p {
    color: #636e72;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Product Cards */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.producto-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.producto-card .img-wrap {
    height: 220px;
    overflow: hidden;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.producto-card:hover .img-wrap img {
    transform: scale(1.05);
}

.producto-card .info {
    padding: 20px;
}

.producto-card .categoria-tag {
    display: inline-block;
    background: #eef2f7;
    color: #636e72;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.producto-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #2c3e50;
}

.producto-card .precio {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff5b00;
    margin-bottom: 15px;
}

.producto-card .descripcion {
    color: #636e72;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No image placeholder */
.no-img {
    color: #b2bec3;
    font-size: 0.9rem;
    text-align: center;
}

/* Catalog layout */
.catalogo-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
}

.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    align-self: flex-start;
    position: sticky;
    top: 90px;
}

.sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff5b00;
}

.categoria-links {
    list-style: none;
}

.categoria-links li {
    margin-bottom: 5px;
}

.categoria-links a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #636e72;
    transition: all 0.2s;
    font-weight: 500;
}

.categoria-links a:hover,
.categoria-links a.active {
    background: #eef2f7;
    color: #ff5b00;
}

/* Gallery */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.galeria-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: #ecf0f1;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.galeria-item:hover img {
    transform: scale(1.08);
}

.galeria-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
    font-weight: 500;
    font-size: 1.1rem;
}

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

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ff5b00;
}

.footer-col p {
    color: #bdc3c7;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: #bdc3c7;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: #ff5b00;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    color: #95a5a6;
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: auto;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-text {
    font-size: 0.85rem;
    color: #636e72;
    margin-top: 4px;
}

/* Alert messages */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
}

.admin-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    align-self: flex-start;
    position: sticky;
    top: 90px;
}

.admin-sidebar h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff5b00;
    color: #2c3e50;
}

.admin-nav {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #636e72;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #eef2f7;
    color: #ff5b00;
}

.admin-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.admin-content h2 {
    margin-bottom: 25px;
    color: #2c3e50;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.stat-card .numero {
    font-size: 2.5rem;
    font-weight: 800;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover td {
    background: #f8f9fa;
}

table .img-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

table .acciones {
    display: flex;
    gap: 8px;
}

/* Login */
.login-wrap {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.login-wrap h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Image preview */
.img-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stat {
        padding: 20px 15px;
    }

    .hero-stat-num {
        font-size: 1.6rem;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }
    .menu-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #2c3e50;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav.open {
        max-height: 300px;
    }

    .nav-links {
        flex-direction: column;
        padding: 10px 20px 20px;
        gap: 0;
    }

    .nav-links a {
        display: block;
        padding: 12px 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-content {
        padding: 30px 0 40px;
    }

    .catalogo-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .lightbox {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0 0;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .productos-grid {
        grid-template-columns: 1fr;
    }

    .galeria-grid {
        grid-template-columns: 1fr 1fr;
    }
}
