:root {
    --brand-primary: #07999A;
    --bg-body: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --feature-title-color: #e53e3e;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

.main-header {
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-inner, .section-inner {
    width: 95%;
    max-width: 1300px;
    margin: 0 auto;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
    position: relative;
}

.logo-container a { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 65px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    padding: 5px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--brand-primary);
    border-bottom: 3px solid var(--brand-primary);
}

.user-panel { display: flex; align-items: center; gap: 15px; }
.admin-link { color: var(--brand-primary); font-weight: 700; text-decoration: none; transition: color 0.2s; }
.admin-link:hover { color: #045c5d; text-decoration: underline; }
.btn-logout { color: #e53e3e; font-weight: 700; text-decoration: none; transition: color 0.2s; }
.btn-logout:hover { color: #c53030; text-decoration: underline; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--brand-primary);
    cursor: pointer;
    padding: 5px;
}

.main-content {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.admin-container {
    width: 95%;
    max-width: 1300px;
    margin: 40px auto;
}

.admin-title { margin: 0 0 5px 0; font-size: 1.8em; color: var(--text-dark); }
.admin-subtitle { margin: 0; color: var(--text-muted); font-size: 1em; }

.admin-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.admin-card .card-body { padding: 40px; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 800px; }
th { background-color: #f8fafc; color: var(--text-muted); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
td { padding: 16px 20px; border-bottom: 1px solid var(--border-color); color: var(--text-dark); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f1f5f9; }

.login-container { width: 90%; max-width: 400px; margin: 80px auto; background: #ffffff; padding: 40px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); border-radius: 12px; }
.login-container h2 { text-align: center; margin-bottom: 30px; font-weight: 800; color: var(--text-dark); }
.login-container input { width: 100%; padding: 12px 15px; margin: 8px 0 20px 0; border: 1px solid var(--border-color); border-radius: 6px; box-sizing: border-box; font-size: 1em; transition: border-color 0.2s; }
.login-container input:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px rgba(7, 153, 154, 0.1); }
.login-container button { width: 100%; padding: 14px; background-color: var(--brand-primary); color: #ffffff; border: none; border-radius: 6px; font-weight: bold; font-size: 1.1em; cursor: pointer; transition: background-color 0.2s; }
.login-container button:hover { background-color: #058283; }

.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 10px; color: var(--text-dark); }
.form-control { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 6px; box-sizing: border-box; font-size: 1em; transition: all 0.2s; background-color: #ffffff; color: var(--text-dark); }
.form-control:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px rgba(7, 153, 154, 0.1); }
textarea.form-control { resize: vertical; min-height: 100px; font-family: inherit; }

input[type="file"].form-control { padding: 8px 15px; background-color: #f8fafc; cursor: pointer; color: var(--text-muted); }
input[type="file"]::file-selector-button { background-color: #e2e8f0; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 600; color: var(--text-dark); cursor: pointer; transition: background-color 0.2s; margin-right: 15px; }
input[type="file"]::file-selector-button:hover { background-color: #cbd5e1; }

.form-group label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-primary); cursor: pointer; vertical-align: middle; margin-right: 8px; position: relative; top: -2px; }

.btn-link { text-decoration: none; color: var(--brand-primary); font-weight: 600; transition: color 0.2s; display: inline-block; }
.btn-link:hover { color: #045c5d; text-decoration: underline; }
.btn-link.text-muted { color: var(--text-muted); }
.btn-link.text-muted:hover { color: var(--text-dark); }

.dashboard-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; }

.btn-primary { background-color: var(--brand-primary); color: white; border: none; padding: 12px 28px; border-radius: 6px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block; transition: all 0.2s; font-size: 1em; }
.btn-primary:hover { background-color: #058283; transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(7, 153, 154, 0.2); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

.badge { padding: 6px 12px; border-radius: 9999px; font-size: 0.85em; font-weight: 600; display: inline-block; text-align: center; }
.badge-active { background-color: #dcfce7; color: #166534; }
.badge-inactive { background-color: #fee2e2; color: #991b1b; }

.table-actions { display: flex; gap: 15px; }
.btn-action { text-decoration: none; font-size: 0.9em; font-weight: 600; transition: color 0.2s; }
.btn-edit { color: var(--brand-primary); }
.btn-edit:hover { color: #045c5d; text-decoration: underline; }
.btn-delete { color: #e53e3e; }
.btn-delete:hover { color: #c53030; text-decoration: underline; }

.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; color: var(--text-dark); }
.empty-state { padding: 40px !important; color: var(--text-muted); font-size: 1.1em; }

.store-hero-banner { width: 100%; position: relative; background-color: #1a1a1a; overflow: hidden; }
.banner-wrapper { position: relative; width: 100%; min-height: 400px; display: flex; justify-content: center; align-items: center; padding: 60px 0; }
.banner-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0.9; }
.glass-narrative { position: relative; z-index: 10; width: 85%; max-width: 800px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 20px; padding: 40px; text-align: center; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15); }
.glass-narrative h2 { color: var(--brand-primary); font-size: 2.2em; margin: 0 0 15px 0; font-weight: 900; }
.glass-narrative p { font-size: 1.15em; line-height: 1.6; color: #1a202c; margin: 0; font-weight: 500; }

.store-features { background-color: #ffffff; padding: 60px 0; border-bottom: 1px solid var(--border-color); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; text-align: center; }
.feature-item { display: flex; flex-direction: column; align-items: center; }
.feature-icon { color: #4a5568; width: 48px; height: 48px; margin-bottom: 15px; }
.feature-title { color: var(--feature-title-color); font-size: 1.1em; margin: 0 0 10px 0; font-weight: bold; }
.feature-desc { color: var(--text-muted); font-size: 0.95em; margin: 0; line-height: 1.4; }

.store-catalog { background-color: #f8fafc; padding: 60px 0; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 15px; }
.catalog-heading { margin: 0; color: var(--text-dark); font-size: 1.8em; font-weight: 800; }
.filter-form { display: flex; align-items: center; gap: 10px; }

.grid-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.card { background-color: #ffffff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.card-img { width: 100%; height: 220px; object-fit: cover; padding: 0; margin: 0; border-bottom: 1px solid var(--border-color); }
.card-img-placeholder { width: 100%; height: 220px; background-color: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #718096; font-weight: bold; border-bottom: 1px solid var(--border-color); }
.card-body { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.card-category { font-size: 11px; text-transform: uppercase; color: var(--brand-primary); font-weight: 800; margin-bottom: 10px; letter-spacing: 0.5px; }
.card-title { margin: 0 0 12px 0; font-size: 1.3em; color: var(--text-dark); font-weight: 700; }
.card-description { font-size: 0.95em; color: var(--text-muted); line-height: 1.5; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.btn-read-more { background: none; border: none; color: var(--brand-primary); font-weight: bold; cursor: pointer; padding: 0; text-align: left; font-size: 0.9em; margin-bottom: 20px; flex-grow: 1; }
.btn-read-more:hover { text-decoration: underline; }
.card-price { font-size: 1.6em; font-weight: 900; color: var(--text-dark); margin-bottom: 20px; }
.btn-whatsapp { background-color: var(--brand-primary); color: #ffffff; text-align: center; padding: 14px; border-radius: 6px; text-decoration: none; font-weight: bold; display: block; transition: background-color 0.2s; font-size: 1.05em; }
.btn-whatsapp:hover { background-color: #058283; }
.empty-catalog-msg { grid-column: 1 / -1; text-align: center; padding: 60px; background: #ffffff; border-radius: 12px; border: 1px dashed var(--border-color); font-size: 1.2em; color: var(--text-muted); }

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px); }
.modal-content { background-color: #ffffff; margin: 10% auto; padding: 30px; border: none; width: 90%; max-width: 600px; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); position: relative; animation: modalFadeIn 0.3s; }
@keyframes modalFadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.close-modal { color: #94a3b8; float: right; font-size: 28px; font-weight: bold; cursor: pointer; line-height: 1; transition: color 0.2s; }
.close-modal:hover { color: var(--brand-primary); }
#modalTitle { color: var(--brand-primary); margin-top: 0; font-size: 1.6em; font-weight: 800;}
#modalDesc { color: var(--text-dark); line-height: 1.6; font-size: 1.05em; margin-bottom: 0;}

.main-footer {
    background-color: #1a202c;
    color: #a0aec0;
    text-align: center;
    padding: 25px 0;
    font-size: 0.95em;
    flex-shrink: 0;
    width: 100%;
}
.footer-container { width: 95%; max-width: 1200px; margin: 0 auto; }

.fade-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    .header-inner {
        width: 92%;
        padding: 10px 0;
    }

    .section-inner {
        width: 92%;
    }

    .brand-logo {
        height: 45px;
    }

    .menu-toggle {
        display: flex;
        order: 2;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 12px;
        background: rgba(7, 153, 154, 0.08);
    }

    .menu-toggle:active {
        transform: scale(0.96);
    }

    .logo-container {
        order: 1;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        box-sizing: border-box;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
        gap: 4px;
        order: 3;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 13px 14px;
        box-sizing: border-box;
        border-bottom: none;
        border-radius: 10px;
        font-size: 0.98em;
    }

    .main-nav a:hover,
    .main-nav a.active {
        color: var(--brand-primary);
        background: rgba(7, 153, 154, 0.08);
        border-bottom: none;
    }

    .user-panel {
        display: none;
    }

    /*
       Orden solamente en celular:
       1. Catálogo
       2. Beneficios
       3. Bloque de confianza
    */
    .store-catalog {
        order: 1;
        padding: 24px 0 34px;
        background: radial-gradient(circle at top left, rgba(7, 153, 154, 0.08), transparent 36%), #f8fafc;
    }

    .store-features {
        order: 2;
        padding: 28px 0;
        background-color: #ffffff;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .store-hero-banner {
        order: 3;
        background-color: #0f172a;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 22px;
        padding: 16px;
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: 18px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .catalog-heading {
        text-align: left;
        margin-bottom: 0;
        font-size: 1.45em;
        line-height: 1.15;
    }

    .filter-form {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
    }

    .filter-form label {
        font-size: 0.9em;
        color: var(--text-muted);
    }

    .filter-form .form-control,
    .filter-form select {
        width: 100%;
        min-height: 46px;
        border-radius: 12px;
        background-color: #f8fafc;
        font-size: 1em;
    }

    .grid-catalog {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card {
        border-radius: 18px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .card:hover {
        transform: none;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .card-img,
    .card-img-placeholder {
        height: 165px;
    }

    .card-body {
        padding: 18px;
    }

    .card-category {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .card-title {
        font-size: 1.15em;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .card-description {
        font-size: 0.94em;
        line-height: 1.45;
        margin-bottom: 8px;
        -webkit-line-clamp: 3;
    }

    .btn-read-more {
        margin-bottom: 16px;
        font-size: 0.92em;
    }

    .card-price {
        font-size: 1.45em;
        margin-bottom: 14px;
    }

    .btn-whatsapp {
        padding: 14px;
        border-radius: 12px;
        font-size: 1em;
        box-shadow: 0 8px 16px rgba(7, 153, 154, 0.20);
    }

    .empty-catalog-msg {
        padding: 35px 20px;
        border-radius: 18px;
        font-size: 1em;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .feature-item {
        padding: 16px 10px;
        background: #f8fafc;
        border: 1px solid var(--border-color);
        border-radius: 16px;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 8px;
        color: var(--brand-primary);
    }

    .feature-title {
        font-size: 0.92em;
        line-height: 1.2;
        margin-bottom: 5px;
    }

    .feature-desc {
        font-size: 0.8em;
        line-height: 1.35;
    }

    .banner-wrapper {
        min-height: auto;
        padding: 34px 0;
    }

    .banner-image {
        opacity: 0.45;
    }

    .glass-narrative {
        width: 84%;
        padding: 22px;
        border-radius: 18px;
        text-align: left;
        background: rgba(255, 255, 255, 0.92);
    }

    .glass-narrative h2 {
        font-size: 1.45em;
        line-height: 1.15;
        margin-bottom: 10px;
    }

    .glass-narrative p {
        font-size: 0.95em;
        line-height: 1.55;
        display: block;
        overflow: visible;
    }

    .modal {
        padding: 18px;
        box-sizing: border-box;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        margin: 20vh auto 0;
        padding: 24px 20px;
        border-radius: 18px;
        box-sizing: border-box;
    }

    #modalTitle {
        font-size: 1.35em;
        padding-right: 28px;
    }

    #modalDesc {
        font-size: 0.98em;
        line-height: 1.55;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .dashboard-header h2 {
        text-align: center;
        margin-bottom: 0;
    }

    .dashboard-header .btn-primary,
    .dashboard-header .btn-link {
        width: 100%;
        text-align: center;
        display: block;
        margin-top: 5px;
        box-sizing: border-box;
    }

    .admin-card .card-body {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .header-inner,
    .section-inner {
        width: 90%;
    }

    .catalog-heading {
        font-size: 1.32em;
    }

    .card-img,
    .card-img-placeholder {
        height: 145px;
    }

    .card-body {
        padding: 16px;
    }

    .card-title {
        font-size: 1.08em;
    }

    .card-price {
        font-size: 1.32em;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 12px;
        padding: 14px;
    }

    .feature-icon {
        flex: 0 0 34px;
        margin-bottom: 0;
    }

    .feature-title {
        margin-bottom: 3px;
    }

    .glass-narrative {
        width: 86%;
        padding: 20px;
    }

    .glass-narrative h2 {
        font-size: 1.32em;
    }

    .glass-narrative p {
        font-size: 0.9em;
    }
}

