:root {
    --bg-deep: #f5f8fa;
    --bg-ocean: #e4ebf1;
    --surface: #ffffff;
    --surface-strong: #f8fafc;
    --line: rgba(0, 56, 130, 0.12);
    --line-strong: rgba(0, 56, 130, 0.24);
    --cyan: #0077cd;
    --cyan-strong: #004eb3;
    --orange: #e34839;
    --yellow: #ffd100;
    --white: #ffffff;
    --text-main: #003882;
    --text-dark: #122137;
    --muted: #576b80;
    --danger: #d90429;
    --success: #2a9d8f;
    --shadow: 0 12px 32px rgba(0, 32, 64, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(255, 209, 0, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(0, 119, 205, 0.12), transparent 30%),
        linear-gradient(180deg, #f0f4f8 0%, #eef3f7 100%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 20px 56px;
}

.hero-shell {
    position: relative;
    padding: 32px 20px 12px;
}

#heroPrimaryProduct {
    color: #FFF !important;
}

#heroPrimaryProduct span {
    color: #FFF !important;
}

.hero-backdrop {
    position: absolute;
    inset: 18px 20px auto;
    height: 280px;
    border-radius: 40px;
    background: url(../images/alberca-mariposa-tepathe-banner.jpg) 60%;
    opacity: 0.6;
    border: 1px solid rgba(124, 232, 255, 0.18);
    box-shadow: var(--shadow);
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 16px;
}

#heroSummaryText {
    color: #FFF !important;
}

.brand-pill,
.section-badge,
.summary-kicker,
.eyebrow,
.mini-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
}

.summary-kicker {
    background: rgba(0, 27, 58, 0.342);
    border: 1px solid rgba(124, 232, 255, 0.28);
    color: #b8e70c;
}

.brand-pill,
.section-badge,
.summary-kicker,
.mini-label {
    background: rgba(124, 232, 255, 0.12);
    border: 1px solid rgba(124, 232, 255, 0.28);
    color: var(--cyan);
}

.section-badge.warm {
    color: var(--orange);
    background: rgba(255, 138, 42, 0.12);
    border-color: rgba(255, 138, 42, 0.28);
}

.section-badge.accent {
    color: var(--yellow);
    background: rgba(255, 210, 74, 0.14);
    border-color: rgba(255, 210, 74, 0.28);
}

.eyebrow {
    padding: 0;
    background: none;
    border: 0;
    color: var(--cyan);
}

.hero-brand h1 {
    margin-top: 8px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    max-width: 12ch;
}

.hero-brand p {
    max-width: 56ch;
    margin-top: 16px;
    color: var(--muted);
    font-size: 1rem;
}

.hero-summary {
    align-self: end;
    background: rgb(0 59 111);
    border: 1px solid rgba(255, 210, 74, 0.24);
    border-radius: var(--radius-xl);
    padding: 28px;
    backdrop-filter: blur(16px);
}

.hero-summary strong {
    display: block;
    margin: 18px 0 10px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.hero-summary span:last-child {
    color: var(--muted);
}

.main-header {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.logo-lockup {
    display: flex;
    gap: 14px;
    align-items: center;
}

.logo-mark {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    color: #000000;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 18px 34px rgba(255, 138, 42, 0.24);
}

.logo-lockup h2 {
    font-size: 1.3rem;
}

.progress-container {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(0, 56, 130, 0.04);
    min-width: 0;
}

.progress-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.progress-steps li {
    color: rgba(248, 252, 255, 0.52);
    font-size: 0.84rem;
}

.progress-steps li.active {
    color: var(--cyan);
    font-weight: 700;
}

.progress-bar-bg {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-bar-fill {
    width: 16.66%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan-strong), var(--yellow));
    transition: width 0.35s ease;
}

.step-section {
    display: none;
}

.step-section.active {
    display: block;
    animation: rise 0.35s ease;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header,
.step-body,
.step-footer,
.catalog-group,
.admin-card,
.admin-table-card,
.admin-sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.step-header,
.step-body,
.catalog-group,
.admin-card,
.admin-table-card,
.admin-sidebar {
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 16px rgba(0, 56, 130, 0.04);
}

.step-header {
    margin-bottom: 24px;
    padding: 32px;
}

.split-header {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.step-header h2,
.catalog-group__head h3,
.summary-panel h3,
.payment-panel h3,
.admin-card h3,
.admin-table-card h3 {
    margin-top: 14px;
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    line-height: 1.1;
}

.step-header p,
.catalog-group__head p,
.step-side-note span,
.inline-banner,
.empty-state p,
.summary-panel p,
.payment-panel p,
.admin-card p,
.admin-table-card p,
.field-error,
.footer-help {
    color: var(--muted);
}

.step-side-note {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(124, 232, 255, 0.16), rgba(124, 232, 255, 0.05));
    border: 1px solid rgba(124, 232, 255, 0.22);
}

.step-side-note.alt {
    background: linear-gradient(180deg, rgba(255, 210, 74, 0.16), rgba(255, 138, 42, 0.06));
    border-color: rgba(255, 210, 74, 0.2);
}

.step-side-note strong {
    display: block;
    margin-bottom: 8px;
}

.step-body {
    padding: 24px 28px;
}

.compact-body {
    padding: 24px 28px;
}

.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 56, 130, 0.08);
}

.step-footer.centered {
    justify-content: center;
}

.inline-banner {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(124, 232, 255, 0.18);
}

.inline-banner.info {
    background: rgba(124, 232, 255, 0.08);
}

.catalog-groups {
    display: grid;
    gap: 18px;
}

.catalog-group {
    padding: 22px;
}

.catalog-group__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.product-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(0, 56, 130, 0.04);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 210, 74, 0.44);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
}

.product-card.is-selected {
    border-color: rgba(16, 212, 255, 0.56);
    box-shadow: 0 18px 32px rgba(16, 212, 255, 0.16);
    transform: scale(1.02);
}

.product-card--upsell {
    /* Mismo estilo blanco para mantener consistencia con entradas */
    background: var(--surface);
}

.product-card__top h3 {
    margin: 10px 0 8px;
    font-size: 1.15rem;
}

.product-card__top p {
    color: var(--muted);
    font-size: 0.92rem;
    min-height: 52px;
}

.product-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 138, 42, 0.16);
    color: var(--orange);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-card__bottom {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-top: 18px;
}

.product-price {
    display: block;
    font-size: 1.4rem;
    color: var(--text-main);
}

.product-meta {
    display: block;
    color: rgba(180, 202, 215, 0.78);
    font-size: 0.85rem;
    margin-top: 6px;
}

.qty-control {
    min-width: 124px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    border-radius: 999px;
    padding: 6px;
    background: var(--bg-ocean);
    border: 1px solid rgba(0, 56, 130, 0.08);
}

.qty-btn {
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(0, 119, 205, 0.06);
    color: var(--cyan);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.qty-btn:hover {
    background: var(--cyan);
    color: #fff;
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-control span {
    text-align: center;
    font-weight: 700;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
    align-content: start;
}

.date-group {
    width: 100%;
}

.field-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 56, 130, 0.16);
    background: #ffffff;
    color: var(--text-dark);
    outline: none;
    font-size: 16px; /* Prevents iOS auto-zoom */
    line-height: normal;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 56, 130, 0.02);
    -webkit-appearance: none; /* Strip native iOS styles */
    appearance: none;
}

.field-input::placeholder {
    color: #a0b2c1;
}

.field-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    background-color: transparent;
    opacity: 0.6;
}

.field-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.field-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 119, 205, 0.12), inset 0 2px 4px rgba(0, 56, 130, 0.02);
    transform: translateY(-1px);
}

.field-input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.12), inset 0 2px 4px rgba(0, 56, 130, 0.02);
}

.field-input.is-valid {
    border-color: var(--success);
}

.field-error {
    min-height: 20px;
    font-size: 0.88rem;
    color: var(--danger);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.step-inline-error {
    min-height: 24px;
    margin-top: 12px;
    color: var(--danger);
    font-weight: 600;
}

.step-inline-error.compact {
    margin-top: 18px;
}

.main-grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: start;
}

.summary-panel,
.payment-panel,
.empty-state,
.loader-card,
.payment-instructions {
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 56, 130, 0.04);
}

.summary-panel__head {
    margin-bottom: 20px;
}

.resumen-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.resumen-list li,
.total-resumen {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.total-resumen {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.2rem;
}

.payment-options {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.pay-option input {
    display: none;
}

/* Ocultar opcion PayPal visualmente */
.pay-option--paypal {
    display: none !important;
}

.pay-box {
    display: block;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid rgba(0, 56, 130, 0.14);
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pay-option input:checked+.pay-box {
    border-color: rgba(255, 210, 74, 0.6);
    background: linear-gradient(180deg, rgba(255, 209, 0, 0.16), rgba(255, 138, 42, 0.08));
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.12);
    transform: translateY(-2px);
}

.btn-primary,
.btn-secondary {
    min-height: 54px;
    padding: 0 26px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    color: #000000;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    box-shadow: 0 8px 24px rgba(255, 138, 42, 0.24);
}

.btn-secondary {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(124, 232, 255, 0.18);
}

.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.98);
}

.btn-primary:hover,
.btn-secondary:hover,
button:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(255, 138, 42, 0.36);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-state,
.loader-card,
.success-body {
    padding: 32px;
    text-align: center;
}

.success-header {
    text-align: center;
}

.success-icon {
    margin: 20px auto 0;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 212, 255, 0.28), rgba(255, 210, 74, 0.18));
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: 0.1em;
}

.success-folio {
    display: inline-block;
    margin: 10px 0 20px;
    font-size: 2rem;
    color: var(--yellow);
}

.payment-instructions ul {
    margin-top: 14px;
    padding-left: 18px;
    color: var(--muted);
}

.admin-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 26px 20px 56px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

.admin-sidebar {
    padding: 24px;
    position: sticky;
    top: 18px;
    height: fit-content;
}

.sidebar-nav {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.sidebar-nav a {
    display: block;
    padding: 14px 16px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid transparent;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    color: var(--text-main);
    background: rgba(124, 232, 255, 0.08);
    border-color: rgba(124, 232, 255, 0.16);
}

.admin-content {
    display: grid;
    gap: 18px;
}

.admin-topbar,
.admin-grid,
.admin-rule-grid,
.admin-table {
    display: grid;
    gap: 16px;
}

.admin-topbar {
    grid-template-columns: 1.2fr auto;
    align-items: center;
}

.admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card,
.admin-table-card {
    padding: 24px;
}

.admin-stat {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(124, 232, 255, 0.18);
    color: var(--text-main);
    font-size: 0.86rem;
}

.admin-table {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.admin-table .head,
.admin-table .cell {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table .head {
    color: var(--cyan);
    font-weight: 700;
}

.footer-help {
    font-size: 0.92rem;
}

@media (max-width: 960px) {

    .hero-card,
    .main-header,
    .split-header,
    .main-grid-layout,
    .admin-layout,
    .admin-topbar,
    .admin-grid,
    .admin-rule-grid,
    .admin-table {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .progress-steps {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 640px) {

    .hero-shell {
        padding: 12px;
        width: 100%;
        overflow: hidden;
    }

    .hero-card {
        padding: 24px 20px;
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
        border-radius: var(--radius-lg);
    }

    .hero-brand h1 {
        font-size: clamp(2rem, 8vw, 2.75rem);
        line-height: 1.1;
    }

    .hero-backdrop {
        inset: 12px;
        height: auto;
        bottom: 12px;
        border-radius: 20px;
        background: url(../images/alberca-mariposa-tepathe-banner.jpg) center / cover;
        opacity: 0.15;
        border: 1px solid rgba(124, 232, 255, 0.18);
        box-shadow: var(--shadow);
    }

    .hero-summary {
        padding: 20px;
        border-radius: var(--radius-lg);
    }

    .app-container {
        padding: 0 12px 64px; /* Increased bottom padding for mobile safe area */
    }

    .main-header {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    .progress-container {
        width: 100%;
        overflow: hidden;
        padding: 16px;
    }

    .progress-steps {
        font-size: 0.70rem;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        overflow: hidden;
    }

    .progress-steps li {
        font-size: 0.70rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .step-header,
    .step-body,
    .catalog-group,
    .admin-card,
    .admin-table-card,
    .admin-sidebar {
        padding: 20px;
    }

    .step-header {
        border-radius: var(--radius-lg);
        margin-bottom: 12px;
        text-align: center;
    }

    .split-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step-body.form-grid {
        grid-template-columns: 1fr;
        padding: 24px 20px;
    }

    .main-grid-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-card {
        padding: 18px;
    }

    .product-card__bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .qty-control {
        min-width: 100%;
        padding: 6px;
        grid-template-columns: 48px 1fr 48px;
    }

    .qty-btn {
        width: 48px;
        height: 48px;
    }

    .step-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px;
        gap: 12px;
    }

    .compact-body,
    .step-body {
        padding: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .catalog-group {
        border-radius: var(--radius-lg);
    }

    .catalog-group__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 20px;
    }

    .catalog-group__head h3 {
        margin-top: 6px;
    }

    .catalog-groups {
        gap: 16px;
    }

    .summary-panel,
    .payment-panel,
    .payment-instructions {
        border-radius: var(--radius-md);
        padding: 20px;
    }

    .success-header {
        padding-top: 10px;
    }
    
    .success-icon {
        width: 64px;
        height: 64px;
        margin-top: 10px;
    }

    .success-folio {
        font-size: 1.8rem;
    }

    .admin-layout {
        grid-template-columns: 1fr;
        padding: 12px 14px 40px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
        min-height: 56px;
    }
}