:root {
    --primary-color: #431516;
    --primary-dark: #391818;
    --primary-light: #6cd9e0;
    --primary-soft: rgba(11, 163, 173, 0.1);
    --success-color: #431516;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
    --border-radius: 1rem;
    --border-radius-sm: 0.75rem;
    --border-radius-lg: 1.25rem;
    --border-radius-xl: 2rem;
}

/* ==================== UTILIDADES Y ANIMACIONES ==================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== COMPONENTES DE PÁGINA ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-header h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Business Selector */
.business-selector-wrapper {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.filters-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.filter-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
}

.filter-label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.form-select {
    border-radius: 0.75rem;
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
}

/* ==================== STEPPER ==================== */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 70px;
    color: var(--gray-400);
}

.stepper-item::before,
.stepper-item::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid var(--gray-300);
    width: 100%;
    top: 20px;
    z-index: 2;
}

.stepper-item::before {
    left: -50%;
}

.stepper-item::after {
    left: 50%;
}

.stepper-item:first-child::before,
.stepper-item:last-child::after {
    content: none;
}

.stepper-item .step-counter {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-400);
    color: white;
    margin-bottom: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.stepper-item.active .step-counter {
    background: var(--primary-color);
    transform: scale(1.05);
}

.stepper-item.completed .step-counter {
    background: var(--primary-color);
}

.stepper-item.completed::after {
    border-bottom: 2px solid var(--success-color);
}

.stepper-item .step-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.stepper-item.active .step-name {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 640px) {
    .stepper-wrapper {
        padding: 1rem;
        gap: 0.25rem;
    }

    .stepper-item .step-counter {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .stepper-item .step-name {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .stepper-item::before,
    .stepper-item::after {
        top: 16px;
    }
}

@media (max-width: 480px) {
    .stepper-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .stepper-item {
        flex-direction: row;
        gap: 1rem;
        width: 100%;
    }

    .stepper-item::before,
    .stepper-item::after {
        display: none;
    }

    .stepper-item .step-counter {
        width: 36px;
        height: 36px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .stepper-item .step-name {
        font-size: 0.9rem;
        white-space: normal;
        text-align: left;
    }

    .stepper-item.completed .step-counter {
        background: var(--success-color);
    }
}

/* ==================== TARJETAS DE PRODUCTO (MODERNAS) ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card-modern {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: 100%;
}

.product-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.product-card-modern.selected {
    border: 2px solid var(--success-color);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* Badge de usos */
.uses-badge-modern {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--gray-200);
}

.uses-badge-modern i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Vista previa de la tarjeta regalo */
.gift-card-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1.6/1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: var(--transition);
    min-height: 200px;
}

.preview-content {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
}

.preview-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    z-index: 1;
}

.preview-logo {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.preview-logo i {
    font-size: 1.5rem;
    color: white;
}

.preview-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    width: 100%;
}

.preview-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.preview-code {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: var(--gray-800);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* Contenido de la tarjeta */
.product-content {
    padding: 1.25rem 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.4rem;
}

.product-description {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Meta de producto (precio, validez) */
.product-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 0.5rem;
    background: var(--gray-100);
    border-radius: 0.75rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: help;
}

.meta-label {
    font-size: 0.7rem;
    color: var(--gray-600);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.meta-value {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
}

/* Precio unificado */
.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.price-original {
    font-size: 0.8rem;
    color: var(--gray-600);
    text-decoration: line-through;
    text-decoration-color: #dc3545;
    text-decoration-thickness: 1.5px;
}

.price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.discount-badge {
    background: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
}

/* Badge de características */
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.feature-badge i {
    font-size: 0.9rem;
}

/* ==================== TARJETAS DE NEGOCIO ==================== */
.business-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    height: 100%;
    position: relative;
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.business-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 163, 173, 0.2);
}

.business-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 1.5rem auto 1rem;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.business-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-info {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}

.business-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.business-location {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
}

.business-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==================== TARJETAS DE COMPRA (PASOS 2-5) ==================== */
.purchase-container {
    max-width: 1000px;
    margin: 0 auto;
}

.purchase-card {
    background: white;
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.purchase-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem;
    text-align: center;
}

.purchase-header i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.purchase-header h3 {
    color: white;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
}

.purchase-body {
    padding: 2rem;
}

/* Preview del producto seleccionado */
.selected-product-preview {
    background: white;
    border-radius: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.preview-large {
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.product-info-summary {
    text-align: center;
    margin-bottom: 1.5rem;
}

.product-info-summary h4 {
    color: var(--gray-800);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-info-summary .price-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.product-features-mini {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.feature-mini-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.feature-mini-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Resumen de compra */
.summary-card {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-box {
    background: var(--gray-100);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total-row {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-300);
}

.summary-label {
    font-weight: 600;
    color: var(--gray-700);
}

.summary-value {
    color: var(--gray-800);
}

/* ==================== RESULTADOS Y ESTADOS VACÍOS ==================== */
.result-card {
    text-align: center;
}

.gift-details {
    background: var(--gray-100);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 3px solid var(--primary-color);
    text-align: left;
}

.success-icon {
    color: var(--success-color);
    animation: scaleIn 0.3s ease;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state-modern {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: 1.25rem;
    border: 1px dashed var(--gray-300);
}

.empty-state-modern i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.empty-state-modern h3 {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.empty-state-modern p {
    color: var(--gray-600);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* ==================== BOTONES Y ACCIONES ==================== */
.action-buttons-modern {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-modern {
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-modern.primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(11, 163, 173, 0.2);
}

.btn-modern.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(11, 163, 173, 0.3);
}

.btn-modern.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-modern.outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-modern.outline:hover {
    background: var(--primary-soft);
    transform: translateY(-2px);
}

.btn-modern.success {
    background: var(--success-color);
    color: white;
}

.btn-primary-custom {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(11, 163, 173, 0.3);
}

.btn-outline-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ==================== FORMULARIOS ==================== */
.form-control-custom {
    border-radius: 0.75rem;
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    width: 100%;
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(11, 163, 173, 0.25);
    outline: none;
}

/* Checkbox personalizado */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 8px;
    transition: var(--transition);
}

.custom-checkbox:hover {
    background: var(--gray-200);
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* ==================== MODALES Y OVERLAYS ==================== */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.show {
    display: flex;
    opacity: 1;
}

.custom-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-modal.show .custom-modal-content {
    transform: scale(1);
}

.custom-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.custom-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.custom-modal-close:hover {
    color: #333;
}

.custom-modal-body {
    padding: 1.5rem;
    color: #666;
    text-align: center;
}

.custom-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.custom-modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
}

.custom-modal-btn-primary {
    background: var(--primary-color);
    color: white;
}

.custom-modal-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(11, 163, 173, 0.3);
}

.custom-modal-btn-secondary {
    background: var(--gray-100);
    color: #333;
    border: 1px solid var(--gray-300);
}

.custom-modal-btn-secondary:hover {
    background: var(--gray-200);
}

/* Modal Zencita (de gift_card_products.php) */
.modal-zencita .modal-header {
    background: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.modal-zencita .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-zencita .modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-zencita .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-zencita .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Loading overlay y modal */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(11, 163, 173, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    color: var(--gray-600);
    font-weight: 500;
}

.loading-modal .modal-content {
    background: transparent;
    box-shadow: none;
    border: none;
}

.loading-modal .modal-body {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.spinner-large {
    width: 3rem;
    height: 3rem;
}

/* ==================== ALERTAS ==================== */
.alert-custom {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
}

.alert-custom.error {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-custom.success {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-custom.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-custom.info {
    background: var(--primary-soft);
    border-left-color: var(--primary-color);
    color: var(--gray-800);
}

/* ==================== STRIPE ==================== */
#payment-element {
    margin-bottom: 24px;
}

.stripe-card-container {
    padding: 16px;
    border: 1px solid var(--gray-300);
    border-radius: 0.75rem;
    background: white;
    margin: 20px 0;
}

.payment-error {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
    padding: 12px;
    border-radius: 0.75rem;
    margin: 16px 0;
    display: none;
}

.payment-error.show {
    display: block;
}

/* ==================== TOOLTIPS ==================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: var(--gray-800);
    color: white;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    border-radius: 0.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
    box-shadow: var(--shadow);
    letter-spacing: normal;
    text-transform: none;
}

[data-tooltip]:hover:before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ==================== BADGES ==================== */
.badge-value {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* ==================== MEDIA QUERIES GENERALES ==================== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .purchase-header {
        padding: 0.5rem;
    }

    .purchase-body {
        padding: 1.5rem;
    }

    .product-meta {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .preview-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .action-buttons-modern {
        flex-direction: column;
        width: 100%;
    }

    .btn-modern {
        width: 100%;
        justify-content: center;
    }

    .product-features-mini {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .selected-product-preview .preview-large {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .purchase-header i {
        font-size: 2.5rem;
    }

    .purchase-header h3 {
        font-size: 1.2rem;
    }

    .summary-box {
        padding: 1rem;
    }

    .gift-details {
        padding: 1rem;
    }

    .success-icon {
        font-size: 4rem;
    }

    .custom-modal-btn {
        min-width: 80px;
        padding: 0.6rem 1rem;
    }

    .custom-modal-content {
        width: 95%;
    }
}

:root {
    --primary-color: #431516;
    --primary-light: rgba(11, 163, 173, 0.1);
    --primary-dark: #09939c;
    --success-color: #28a745;
    --gray-light: #e0e0e0;
    --gray-medium: #aaa;
    --gray-dark: #666;
    --white: #ffffff;
    --step-size: 48px;
    --step-size-mobile: 40px;
    --step-font-size: 1.2rem;
    --step-font-size-mobile: 1rem;
}

/* ========== STEPPER REDISEÑADO - MÁS MODERNO ========== */
.stepper-wrapper {
    width: 100%;
    margin: 2rem 0 3rem;
    padding: 0;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 0.5rem;
    flex: 1;
}

.progress-step .step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    background: white;
}

.progress-step.completed .step-circle {
    background: var(--primary-color);
    color: white;
    border: none;
}

.progress-step.active .step-circle {
    background: var(--primary-color);
    color: white;
    border: none;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(11, 163, 173, 0.2), 0 8px 20px rgba(11, 163, 173, 0.3);
}

.progress-step.pending .step-circle {
    background: white;
    color: var(--gray-medium);
    border: 2px solid var(--gray-light);
    box-shadow: none;
}

.progress-step .step-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-dark);
    letter-spacing: 0.3px;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.progress-step.completed .step-label {
    color: var(--primary-color);
}

/* Línea conectora */
.step-connector {
    position: absolute;
    top: 28px;
    left: 70px;
    right: 70px;
    height: 3px;
    background: linear-gradient(90deg,
            var(--primary-color) 0%,
            var(--primary-color) var(--progress),
            var(--gray-light) var(--progress),
            var(--gray-light) 100%);
    z-index: 1;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .progress-step .step-circle {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .step-connector {
        top: 24px;
        left: 50px;
        right: 50px;
    }

    .progress-step .step-label {
        font-size: 0.8rem;
    }
}

/* ========== ESTILOS DE PRODUCTOS ========== */
.product-card-modern {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    overflow: hidden;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(11, 163, 173, 0.15);
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-card-modern .p-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-modern .btn {
    margin-top: auto;
}

.gift-card-preview {
    width: 100%;
    height: 200px;
}

.preview-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    color: white;
    position: relative;
}

.preview-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
}

.preview-logo {
    font-size: 2rem;
    z-index: 1;
}

.preview-amount {
    font-size: 2.5rem;
    font-weight: 700;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-card-showcase {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(11, 163, 173, 0.1);
}

.gift-card-preview-large {
    width: 100%;
    max-width: 400px;
    height: 240px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.preview-content-large {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    color: white;
    position: relative;
}

.preview-content-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
}

.preview-logo-large {
    font-size: 2.5rem;
    z-index: 1;
}

.preview-amount-large {
    font-size: 3rem;
    font-weight: 700;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.user-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.user-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.discount-badge {
    background: #ff4757;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.gift-option {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-light);
    margin-bottom: 1.5rem;
}

.gift-fields {
    transition: all 0.3s ease;
    overflow: hidden;
}

.gift-fields.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.gift-fields.expanded {
    max-height: 500px;
    opacity: 1;
}

.express-button {
    padding: 1rem;
    font-size: 1.2rem;
    border-radius: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s;
}

.express-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 163, 173, 0.3);
}

.express-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.success-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gift-code {
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 12px;
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
    border: 2px dashed var(--primary-color);
    margin: 1.5rem 0;
}

.gift-code span {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 163, 173, 0.3);
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1.1rem;
}

.custom-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#loginModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #333;
    color: white;
    font-size: 0.85rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 10;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

.gift-instructions {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
    border-left: 4px solid var(--primary-color);
}

.gift-instructions h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.gift-instructions p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--gray-dark);
}

.gift-instructions ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.gift-instructions li {
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.gift-instructions strong {
    color: var(--primary-color);
}

/* Botón "Reservar cita" del paso 1 */
.gift-booking-action {
    margin: 0.6rem 0 0.25rem;
}

.gift-instructions .gift-booking-btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    color: #fff;
}

.gift-instructions .gift-booking-btn:hover,
.gift-instructions .gift-booking-btn:focus-visible {
    color: #fff;
}

/* Estilo para el contenedor de pago siempre visible */
.payment-section {
    margin-top: 2rem;
    border-top: 1px solid var(--gray-light);
    padding-top: 2rem;
}