/* routine-builder.css - Mi Nueva Rutina Facial - MASTER LAB EDITION */

:root {
    --lab-bg: #fafaf9;
    --lab-text-main: #0f172a;
    --lab-text-muted: #64748b;
    --lab-glass-surface: rgba(255, 255, 255, 0.75);
    --lab-glass-border: rgba(255, 255, 255, 1);

    /* Thermal Accents */
    --lab-am-warmth: rgba(254, 215, 170, 0.25);
    /* Light Sunrise Gold */
    --lab-pm-twilight: rgba(199, 210, 254, 0.25);
    /* Deep Indigo Dusk */

    --lab-accent-glow: #f43f5e;
    --lab-danger: #e11d48;
    --lab-warning: #f59e0b;

    /* Advanced Shadows */
    --shadow-float: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-micro: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(244, 63, 94, 0.2);

    /* Fonts */
    --font-serif: 'Instrument Serif', 'Playfair Display', serif;
    --font-sans: 'Inter', system-ui, sans-serif;

    /* Fixed Grayscale Noise - Very subtle */
    --noise-url: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.lab-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 10rem;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--lab-bg);
    position: relative;
    overflow-x: hidden;
}

/* Base Laboratory Texture - Reduced opacity to 0.015 */
.lab-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--noise-url);
    opacity: 0.015;
    pointer-events: none;
    z-index: 1;
}


/* Split View */
.routine-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    /* Increased gap */
    align-items: start;
}

/* Routine Columns - Chromatic Split */
.routine-column {
    background: var(--lab-glass-surface);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--lab-glass-border);
    border-radius: 48px;
    padding: 3.5rem 3rem;
    box-shadow: var(--shadow-float);
    min-height: 700px;
    position: relative;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.am-col {
    background: linear-gradient(180deg, var(--lab-am-warmth) 0%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0.8) 100%);
}

.pm-col {
    background: linear-gradient(180deg, var(--lab-pm-twilight) 0%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0.8) 100%);
}

.routine-column:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.12);
}

.col-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.col-header h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.04em;
    color: var(--lab-text-main);
}

.col-header i {
    font-size: 2rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.am-col .col-header i {
    color: #f59e0b;
}

.pm-col .col-header i {
    color: #6366f1;
}

/* Routine Items - Floating Cards */
.routine-slots {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Routine Items - High-End Floating Cards */
.routine-item-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.02);
    border-radius: 24px;
    padding: 1.25rem 1.75rem;
    gap: 1.75rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-micro);
}

.routine-item-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    z-index: 10;
}

.step-badge {
    background: var(--lab-text-main);
    color: #fff;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    /* Prevent shrinking */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.item-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    transition: filter 0.3s, transform 0.3s;
}

.routine-item-card:hover .item-thumb {
    transform: rotate(-3deg) scale(1.1);
}

.item-brand {
    color: var(--lab-accent-glow);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-weight: 900;
}

.item-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--lab-text-main);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
    max-width: 320px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* 2 lines max */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--lab-text-main);
    font-weight: 700;
    margin-top: 0.15rem;
    opacity: 0.8;
}

/* Item Action Reveal */
.item-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.routine-item-card:hover .item-actions {
    opacity: 1;
    transform: translateX(0);
}

.btn-action {
    background: #f1f5f9;
    color: var(--lab-text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-remove-item {
    background: #fff1f2;
    color: var(--lab-danger);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-item:hover {
    background: var(--lab-danger);
    color: #fff;
}

/* New Minimalist/Aesthetic Buttons */
.btn-remove-alt {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: all 0.2s;
    line-height: 1;
    z-index: 10;
}

.btn-remove-alt:hover {
    color: var(--lab-danger);
    transform: scale(1.1);
}

.item-price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.item-price {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    color: var(--lab-text-main);
    font-weight: 700;
    opacity: 0.9;
}

.btn-add-suggestion {
    background: transparent;
    border: 1px dashed #cbd5e1;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.btn-add-suggestion:hover {
    border-style: solid;
    border-color: var(--lab-text-main);
    color: var(--lab-text-main);
    transform: rotate(90deg);
}

.item-actions-minimal {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.btn-buy-now-alt {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-buy-now-alt:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.is-bought .btn-buy-now-alt {
    background: #22c55e;
}

/* Purchased State */
.routine-item-card.is-bought {
    border-color: #22c55e;
    background: #f0fdf4;
    opacity: 0.8;
}

.routine-item-card.is-bought .item-thumb {
    filter: grayscale(0.5);
}

.bought-tick {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #22c55e;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
    z-index: 20;
    border: 2px solid #fff;
}

.btn-buy-now {
    background: #22c55e !important;
    color: #fff !important;
}

.btn-buy-now:hover {
    background: #16a34a !important;
}

/* Alerts */
.chemist-alerts {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeSlideUp 0.5s ease-out;
}

/* Alerts - Professional Diagnostic Style */
.alert-box {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    border: none;
    border-left: 4px solid var(--lab-danger);
    color: var(--lab-text-main);
    padding: 1.5rem;
    border-radius: 4px 16px 16px 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.alert-box.medium {
    border-color: var(--lab-warning);
}

.alert-icon {
    font-size: 1.25rem;
    color: var(--lab-danger);
}

.alert-box.medium .alert-icon {
    color: var(--lab-warning);
}

.alert-content strong {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.alert-content p {
    color: var(--lab-text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Sticky Action Bar - Floating Glass */
.lab-actions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    padding: 0.75rem 0.75rem 0.75rem 2rem;
    border-radius: 100px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 2.5rem;
    z-index: 1000;
    width: auto;
    max-width: 90%;
    transition: all 0.3s ease;
}

.total-cost span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lab-text-muted);
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.total-cost strong {
    font-size: 1.75rem;
    font-family: var(--font-serif);
    color: var(--lab-text-main);
    line-height: 1;
}

.btn-shop-routine {
    background: var(--lab-text-main);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.btn-shop-routine:hover {
    background: #000;
    transform: scale(1.05);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.4);
}

.empty-slot-msg {
    text-align: center;
    color: #94a3b8;
    padding: 2rem;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .routine-split-view {
        grid-template-columns: 1fr;
    }

    .lab-actions {
        width: 90%;
        justify-content: space-between;
        padding: 0.75rem 1.5rem;
        bottom: 1rem;
    }

    .btn-shop-routine {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Redesigned Add Button - Expert Style (DEPRECATED in favor of btn-add-suggestion) */
.btn-add-expert {
    display: none !important;
}

/* Gap Cards - Expert Phase Layout (Global) */
.gap-card {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 32px;
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.gap-card:hover {
    background: #fff;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px) scale(1.02);
    border-color: var(--lab-accent-glow);
}

.gap-card:hover .btn-add-suggestion {
    background: var(--lab-text-main);
    color: #fff;
    border-style: solid;
    transform: rotate(90deg);
}

.gap-content {
    flex-grow: 1;
}

.gap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.gap-phase-name {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--lab-text-main);
    letter-spacing: -0.02em;
}

.gap-description {
    color: var(--lab-text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 400px;
    margin: 0;
}

.gap-badge {
    background: #f1f5f9;
    color: #475569;
}
}

/* Animations & Micro-Interactions */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes marchingAnts {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: -20;
    }

    /* Matches dash-array */
}

/* Mobile Master Lab */
@media (max-width: 768px) {
    .lab-container {
        padding-top: 0;
        /* Reduced for mobile */
        padding-bottom: 8rem;
    }

    .routine-split-view {
        gap: 1.5rem;
    }

    .routine-column {
        padding: 2rem 1.5rem;
        border-radius: 32px;
        min-height: auto;
    }

    .col-header h2 {
        font-size: 2.2rem;
    }

    .routine-item-card {
        padding: 1rem;
        gap: 1rem;
        border-radius: 18px;
    }

    .item-name {
        font-size: 1.15rem;
        max-width: 180px;
    }

    .item-actions {
        opacity: 1;
        /* Always visible on mobile */
        transform: none;
    }

    .lab-actions {
        padding: 0.5rem 0.5rem 0.5rem 1.5rem;
        gap: 1rem;
        bottom: 1rem;
    }

    .total-cost strong {
        font-size: 1.4rem;
    }

    .btn-shop-routine {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Consolidated Smart Suggestion Modal - Master Lab Style */
.suggestion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    /* Darker backdrop */
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.suggestion-modal.active {
    display: flex;
    opacity: 1;
}

.suggestion-modal-content {
    /* --- PREMIUM MODAL DESIGN (SPECTACULAR VISUALS) --- */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    border-radius: 40px;
    box-shadow: 0 40px 100px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(40px) scale(0.98);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.suggestion-modal.active .suggestion-modal-content {
    transform: translateY(0) scale(1);
}

.suggestion-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 10;
}

.suggestion-modal-header h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    letter-spacing: -0.03em;
    color: var(--lab-text-main);
    margin: 0;
    font-weight: 400;
    background: linear-gradient(45deg, var(--lab-text-main), #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-close-modal {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--lab-text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background: var(--lab-text-main);
    border-color: var(--lab-text-main);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

.suggestion-modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem 3rem 4rem;
    /* Soft noise background if available, else sleek grey gradient */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(248, 250, 252, 0.8) 100%);
}

.suggestion-modal-body::-webkit-scrollbar {
    width: 8px;
}

.suggestion-modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Grid Override for Modal */
.suggestion-modal-body .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

/* --- PREMIUM CARD DESIGN --- */
.suggestion-modal-body .product-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    position: relative;
    height: 100%;
    /* Hover Lift */
}

.suggestion-modal-body .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.08);
    /* Darker border on hover */
}

/* Image Area */
.suggestion-modal-body .product-image-wrapper {
    width: 100%;
    height: 200px;
    /* Slightly Reduced fixed height */
    background: transparent;
    border-radius: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    /* Increased padding to frame images better */
    position: relative;
    border: none;
}

.suggestion-modal-body .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.05));
    mix-blend-mode: multiply;
    /* Helps white backgrounds blend in */
    border-radius: 12px;
    /* Soften rectangular crops */
}

.suggestion-modal-body .product-card:hover .product-image {
    transform: scale(1.05);
    /* Subtler zoom */
}

/* Badges - Fix Float Issue */
.suggestion-modal-body .card-badge-pos {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align right */
    gap: 6px;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

.suggestion-modal-body .badge-distributed {
    width: auto !important;
    /* Override fixed width */
    height: auto !important;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--lab-text-main);
    text-decoration: none;
    transition: transform 0.2s;
    pointer-events: auto;
}

.suggestion-modal-body .badge-distributed:hover {
    transform: scale(1.05);
}

.suggestion-modal-body .badge-distributed i,
.suggestion-modal-body .badge-distributed svg {
    width: 14px;
    height: 14px;
    color: var(--color-accent-1);
    /* Use accent color for icons */
}

/* Content Area */
.suggestion-modal-body .product-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.suggestion-modal-body .product-brand {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.suggestion-modal-body .product-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--lab-text-main);
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
    /* Fixed height for alignment */
}

.suggestion-modal-body .product-title a {
    text-decoration: none;
    color: inherit;
}


/* Hidden elements in modal */
.suggestion-modal-body .product-details-expandable,
.suggestion-modal-body .btn-toggle-details,
.suggestion-modal-body .badge-exceptional {
    /* Exceptional badge can stay if we position it absolutely distinct from image wrapper */
    /* For now hide to clean up */
    display: none !important;
}

/* Footer / Action */
.suggestion-modal-body .product-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.suggestion-modal-body .price-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.suggestion-modal-body .price-current {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--lab-text-main);
}

.suggestion-modal-body .price-old {
    text-decoration: line-through;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.suggestion-modal-body .badge-discount-inline {
    background: #fee2e2;
    color: #ef4444;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}


/* Premium Action Button */
.suggestion-modal-body .btn-add {
    width: 100%;
    background: #0f172a;
    /* Dark Slate */
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 16px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.suggestion-modal-body .btn-add:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 640px) {
    .suggestion-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .suggestion-modal-header {
        padding: 1.5rem;
    }

    .suggestion-modal-header h3 {
        font-size: 1.8rem;
    }

    .suggestion-modal-body {
        padding: 1rem;
    }

    .suggestion-modal-body .products-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 columns on mobile */
        gap: 0.75rem;
    }

    .suggestion-modal-body .product-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .suggestion-modal-body .product-title {
        font-size: 0.95rem;
        height: 2.6rem;
    }

    .suggestion-modal-body .btn-add {
        padding: 10px;
        font-size: 0.75rem;
    }

    /* Shop Confirmation Modal - Premium Style */
    .shop-confirm-content {
        max-width: 500px;
        height: auto;
        padding: 3rem;
        text-align: center;
        border-radius: 40px;
    }

    .shop-confirm-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .shop-icon {
        width: 80px;
        height: 80px;
        background: var(--lab-am-warmth);
        color: var(--lab-warning);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
    }

    .shop-confirm-body h2 {
        font-family: var(--font-serif);
        font-size: 2.5rem;
        color: var(--lab-text-main);
        margin: 0;
    }

    .shop-confirm-body p {
        color: var(--lab-text-muted);
        font-size: 1.1rem;
        line-height: 1.6;
        margin: 0;
    }

    .shop-confirm-body strong {
        color: var(--lab-text-main);
    }

    .shop-actions {
        display: flex;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
    }

    .btn-cancel-shop {
        flex: 1;
        background: #f1f5f9;
        color: var(--lab-text-muted);
        border: none;
        padding: 1rem;
        border-radius: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
    }

    .btn-confirm-shop {
        flex: 2;
        background: var(--lab-text-main);
        color: #fff;
        border: none;
        padding: 1rem;
        border-radius: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .btn-cancel-shop:hover {
        background: #e2e8f0;
        color: var(--lab-text-main);
    }

    .btn-confirm-shop:hover {
        background: #000;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    @media (max-width: 640px) {
        .shop-confirm-content {
            width: 90%;
            padding: 2rem;
            margin: auto;
        }
    }
}

/* --- PREMIUM PROFILE SELECTOR (SPECTACULAR EDITION) --- */
.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    /* Allow scrolling on the overlay backdrop for long content on mobile */
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.profile-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 48px;
    padding: 4rem 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.profile-phase {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: slideUpPhase 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-phase.active {
    display: flex;
}

.profile-card h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin: 0;
    color: var(--lab-text-main);
    letter-spacing: -0.03em;
}

.profile-card p {
    color: var(--lab-text-muted);
    font-size: 1.15rem;
    margin: -1rem 0 1rem;
    font-weight: 300;
}

.profile-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-options.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.btn-profile {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-micro);
}

.btn-profile:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

.btn-profile:hover .btn-title {
    color: #fff;
}

.btn-profile:hover .btn-desc {
    color: rgba(255, 255, 255, 0.6);
}

.btn-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--lab-text-main);
    display: block;
    margin-bottom: 0.25rem;
    transition: color 0.3s;
}

.btn-desc {
    font-size: 0.85rem;
    color: var(--lab-text-muted);
    font-weight: 400;
    transition: color 0.3s;
}

.profile-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpPhase {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .profile-card {
        padding: 2rem 1.25rem;
        border-radius: 28px;
        margin: auto;
        /* Center in the scrollable view */
        width: 92%;
    }

    .profile-phase {
        gap: 1rem;
    }

    .profile-card h2 {
        font-size: 1.55rem;
    }

    .profile-card p {
        font-size: 0.9rem;
        margin-top: -0.25rem;
        margin-bottom: 0.5rem;
    }

    .profile-options.grid-2x2 {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .btn-profile {
        padding: 1rem;
        border-radius: 16px;
    }

    .btn-title {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
    }

    .btn-desc {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

/* --- EDUCATIONAL GUIDE SECTION --- */
.educational-guide-section {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 32px;
    padding: 3rem;
    margin: 4rem 0 5rem;
    animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--lab-text-main);
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.guide-num {
    background: #000;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.guide-content strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    color: var(--lab-text-main);
}

.guide-content p {
    font-size: 0.95rem;
    color: var(--lab-text-muted);
    line-height: 1.5;
    margin: 0;
}

.badge-imprescindible,
.badge-opcional,
.badge-importante {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-imprescindible {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-opcional {
    background: #f8fafc;
    color: #64748b;
}

.badge-importante {
    background: #fff7ed;
    color: #c2410c;
}

/* --- REFINED PRODUCT CARD LAYOUT --- */
.routine-item-card.product-selected {
    padding: 1rem 1.75rem;
    gap: 2rem;
}

.step-indicator-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 60px;
    flex-shrink: 0;
}

.step-label-mini {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--lab-text-main);
    letter-spacing: -0.01em;
}

.product-selection-core {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    position: relative;
}

.product-selection-core .item-thumb {
    width: 50px;
    height: 50px;
}

.product-selection-core .item-name {
    font-size: 1.15rem;
    max-width: 260px;
}

@media (max-width: 768px) {
    .educational-guide-section {
        padding: 2rem 1.5rem;
    }

    .guide-title {
        font-size: 2rem;
    }

    .routine-item-card.product-selected {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step-indicator-left {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        padding-bottom: 0.5rem;
        margin-bottom: 0.25rem;
    }

    .step-label-mini {
        font-size: 1.2rem;
    }
}

/* --- STICKY ROUTINE CONTROLS --- */
.routine-sticky-controls {
    z-index: 990;
    margin-bottom: 2rem;
    padding: 0;
    transition: all 0.3s ease;
}

.routine-profile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.routine-steps-heading {
    flex-grow: 1;
    text-align: center;
    font-size: 1.1rem;
    font-family: var(--font-serif);
    margin: 0;
    padding: 0 1.5rem;
    color: var(--lab-text-main);
    letter-spacing: -0.01em;
    font-weight: 700;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #0f172a;
}

.profile-info i {
    font-size: 1.4rem;
    color: #6366f1;
}

.profile-info strong {
    font-weight: 700;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skin-tag {
    background: #000;
    color: #fff;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-left: 0.5rem;
}

.btn-change-profile {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-change-profile:hover {
    background: #f8fafc;
    border-color: #000;
    color: #000;
}

@media (max-width: 600px) {
    .routine-profile-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-info {
        flex-direction: column;
        gap: 0.25rem;
    }

    .skin-tag {
        margin-left: 0;
    }
}

/* --- MINOR GUIDE SPECIFIC --- */
.guide-grid.grid-2-col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .guide-grid.grid-2-col {
        grid-template-columns: 1fr;
    }
}

/* pulsing animation for the routine button */
@keyframes pulse-accent {
    0% {
        box-shadow: 0 0 0 0 rgba(192, 133, 82, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(192, 133, 82, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(192, 133, 82, 0);
    }
}

.btn-pulsing {
    animation: pulse-accent 2s infinite;
}

/* Integrated Guide Badges */
.gap-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.routine-item-card.gap-card .badge-imprescindible,
.routine-item-card.gap-card .badge-opcional,
.routine-item-card.gap-card .badge-importante {
    margin: 0;
    font-size: 0.6rem;
    padding: 1px 6px;
}

.step-indicator-left .badge-imprescindible,
.step-indicator-left .badge-opcional,
.step-indicator-left .badge-importante {
    margin: 0;
    font-size: 0.5rem;
    padding: 1px 6px;
    width: auto;
}

/* Mobile Sticky Header Adjustments */
@media (max-width: 768px) {
    .routine-sticky-controls {
        top: 70px;
        margin-bottom: 1.5rem;
    }

    .routine-profile-bar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        border-radius: 12px;
    }

    .routine-steps-heading {
        font-size: 1rem;
        order: -1;
    }

    .profile-info {
        font-size: 0.8rem;
    }
}

/* --- FULL CARD FLIP ANIMATION --- */
.card-flip-container {
    flex-grow: 1;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
    z-index: 10;
    min-height: 280px;
    /* Ensure minimum height for the flip area */
    margin-bottom: 0.5rem;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.card-flip-container.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    /* Ensure content stays inside */
}

.flip-card-front {
    position: relative;
    /* Gives height to container */
    height: 100%;
    background-color: #fff;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(20, 184, 166, 0.2);
    overflow-y: auto;
}

.product-content-flip-top {
    padding: 0 1.25rem 1rem;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure images fit well in the front face */
.flip-card-front .product-image-wrapper {
    margin-bottom: 0.5rem;
    height: 180px;
    /* Slightly compacted for the flip version */
    flex-shrink: 0;
}

/* Expert Content styling */
.expert-opinion-content {
    text-align: left;
    position: relative;
    width: 100%;
}

.expert-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #0d9488;
    font-weight: 800;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid rgba(13, 148, 136, 0.2);
    padding-bottom: 0.25rem;
    width: fit-content;
}

.expert-opinion-content p {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.4;
    color: #115e59;
    font-style: italic;
    margin: 0;
}