
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-glow: rgba(0, 0, 0, 0.05);
    
    /* Fallback variables for catalog presets */
    --surface: #ffffff;
    --surface-rgb: 255, 255, 255;
    --accent-rgb: 59, 130, 246;
    --text-primary: var(--text-main);
    --text-secondary: var(--text-muted);
    --accent-hover: #2563eb;
    --border-radius: 24px;
    --transition-fast: 180ms ease;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary, #f3f4f6);
    color: var(--text-main, #1f2937);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

.profile-container {
    width: 100%;
    max-width: 580px;
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.05));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    animation: profileEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.profile-banner {
    height: 150px;
    width: calc(100% + 4rem);
    margin: -3rem -2rem 2.5rem -2rem;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    box-shadow: inset 0 -30px 40px rgba(10, 11, 16, 0.85);
}

.profile-banner + .profile-header .avatar-wrapper {
    margin-top: -85px;
    border: 6px solid var(--bg-primary);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
}

.verified-icon {
    vertical-align: middle;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.4));
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}

.avatar-wrapper {
    position: relative;
    width: 128px;
    height: 128px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    padding: 3px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.05);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    background: var(--bg-secondary);
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.profile-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
}

/* Empty State Styling - Premium and alive */
.empty-state {
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    margin-top: 1.5rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.empty-state:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.empty-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Link Buttons Styling */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.profile-link {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.profile-link:hover, .profile-link:focus {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    outline: none;
}

.profile-link:focus-visible {
    outline: 2px solid var(--text-main);
    outline-offset: 4px;
}

.profile-link:active {
    transform: translateY(0);
}

.profile-footer {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.profile-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.profile-footer a:hover {
    color: var(--text-muted);
}

/* Error/Blocked Pages Style */
.error-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-back {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }
    .profile-container {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }
    .profile-name {
        font-size: 1.75rem;
    }
    .profile-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 390px) {
    .profile-container {
        padding: 2rem 1.2rem;
        border-radius: 20px;
    }
    .profile-name {
        font-size: 1.5rem;
    }
    .avatar-wrapper {
        width: 110px;
        height: 110px;
    }
    .profile-banner + .profile-header .avatar-wrapper {
        margin-top: -70px;
    }
}

@media (max-width: 360px) {
    .profile-container {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    .profile-name {
        font-size: 1.4rem;
    }
    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }
    .profile-banner + .profile-header .avatar-wrapper {
        margin-top: -65px;
    }
}

/* ==========================================================================
   Product Catalog
   ========================================================================== */
.bio6-product-catalog {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(var(--surface-rgb), 0.5);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bio6-catalog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.bio6-catalog-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.cat-section {
    margin-top: 2rem;
    padding-top: 1rem;
}

.cat-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.cat-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.header-sticky {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 100;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin: 0 -1.5rem 1rem -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    overflow-x: auto;
}

.nav-cats {
    display: flex;
    gap: 10px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-cats::-webkit-scrollbar {
    display: none;
}

.nav-link-cat {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    transition: all var(--transition-fast);
}

.nav-link-cat:hover {
    background: var(--accent-blue);
    color: #fff;
}

/* Base Card (comum) */
.bio6-product-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.bio6-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.bio6-product-image {
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.bio6-product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bio6-product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.bio6-product-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex: 1;
}

.bio6-product-price-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.bio6-product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.bio6-product-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: background var(--transition-fast);
    border: none;
    cursor: pointer;
}

.bio6-product-btn-inline:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.bio6-product-btn-inline.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ================= PRESET STORE (Grid) ================= */
.catalog-preset-store .bio6-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.catalog-preset-store .bio6-product-card {
    flex-direction: column;
}

.catalog-preset-store .bio6-product-image {
    width: 100%;
    height: 180px;
}

/* ================= PRESET FOOD (Lista iFood-like) ================= */
.catalog-preset-food .bio6-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .catalog-preset-food .bio6-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.catalog-preset-food .bio6-product-card {
    flex-direction: row;
    height: 140px;
}

.catalog-preset-food .bio6-product-image {
    width: 120px;
    height: 100%;
    border-radius: 0;
}

.catalog-preset-food .bio6-product-info {
    padding: 0.8rem;
}

.catalog-preset-food .bio6-product-name {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.catalog-preset-food .bio6-product-desc {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

.catalog-preset-food .bio6-product-price {
    font-size: 1rem;
}

.bio6-catalog-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.bio6-btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    font-weight: 600;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.bio6-btn-outline:hover {
    background: var(--accent-blue);
    color: #ffffff;
}

/* ==========================================================================
   TABS STRUCTURE (Wave 3C)
   ========================================================================== */

.ls-tab-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    padding: 0;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ls-tab-header-wrapper {
    padding: 3rem 2rem 0 2rem;
}

.ls-tab-buttons {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: none;
}
.ls-tab-buttons::-webkit-scrollbar { display: none; }

.ls-tab-button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ls-tab-button:hover {
    color: var(--text-main);
}

.ls-tab-button.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.ls-tab-pane {
    display: none;
    padding: 2rem;
    animation: fadeInTab 0.3s ease forwards;
}

.ls-tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modifier: Catalog active with food preset (solid background) */
.ls-tab-card--catalog {
    background: #ffffff;
    color: #1a1a1a;
    border-color: transparent;
}

.ls-tab-card--catalog .profile-name,
.ls-tab-card--catalog .profile-description {
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
}

.ls-tab-card--catalog .ls-tab-button {
    color: #666666;
}
.ls-tab-card--catalog .ls-tab-button.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.ls-tab-card--catalog .ls-tab-buttons {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.ls-tab-card--catalog .bio6-product-catalog {
    border-color: rgba(0, 0, 0, 0.1);
    background: transparent;
}

/* HIGHLIGHTS CSS */
.bio6-highlights-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.bio6-highlights-wrapper::-webkit-scrollbar { display: none; }
.bio6-highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-width: 64px;
    text-decoration: none;
}
.bio6-highlight-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.bio6-highlight-thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    background-color: #f0f0f0;
}
.bio6-highlight-title {
    font-size: 11px;
    color: var(--text-primary, #333);
    text-align: center;
    max-width: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Bio6 Rich Links Integration */
.bio6-rich-link-block {
    text-align: center;
    margin-bottom: 12px;
}
.bio6-rich-link-a {
    display: inline-block;
    max-width: 100%;
}
.bio6-rich-link-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
.bio6-rich-link-embed {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
}
.bio6-rich-link-embed iframe {
    width: 100%;
    max-width: 100%;
    border: none;
    display: block;
    min-height: 250px;
}
/* CSS para Blocos Funcionais Wave 8Z.4 */
.bio6-google-map-block {
    margin-bottom: 1rem;
}
.bio6-google-map-frame {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 12px;
}
.bio6-google-reviews-block {
    margin-bottom: 1rem;
}
.bio6-google-reviews-frame {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
}
.bio6-social-video-grid-block {
    margin-bottom: 1rem;
}
.bio6-social-video-grid-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}
.bio6-social-video-grid-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.bio6-social-video-grid-item {
    display: block;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
}
.bio6-social-video-grid-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CSS para Aba de Barbearia - Wave 8Z.5 */
.bio6-barber-tab { padding: 10px 0; }
.bio6-barber-header { margin-bottom: 20px; text-align: center; }
.bio6-barber-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 5px; color: var(--text-primary); }
.bio6-barber-subtitle { font-size: 0.9rem; color: var(--text-secondary); margin: 0; }
.bio6-barber-form { background: var(--bg-card); border-radius: 12px; padding: 20px; border: 1px solid var(--border-color); }
.bio6-barber-field { margin-bottom: 15px; }
.bio6-barber-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.bio6-barber-select { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-input); color: var(--text-light); font-size: 0.95rem; outline: none; }
.bio6-barber-select:focus { border-color: var(--primary); }
.bio6-barber-days { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.bio6-barber-day-btn { flex: 1; min-width: 100px; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; text-align: center; }
.bio6-barber-day-btn.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 700; }
.bio6-barber-slots { min-height: 100px; margin-bottom: 20px; }
.bio6-barber-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; }
.bio6-barber-slot-btn { padding: 10px 5px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-input); color: var(--text-primary); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; }
.bio6-barber-slot-btn:hover { border-color: var(--primary); }
.bio6-barber-slot-btn.active { background: var(--primary); color: #000; border-color: var(--primary); }
.bio6-barber-empty, .bio6-barber-error, .bio6-barber-loading { text-align: center; padding: 30px 10px; color: var(--text-secondary); font-size: 0.9rem; border: 1px dashed var(--border-color); border-radius: 8px; }
.bio6-barber-error { color: #ff6b6b; border-color: rgba(255,107,107,0.3); background: rgba(255,107,107,0.05); }
.bio6-barber-action { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-color); text-align: center; }
.bio6-barber-selected-text { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 15px; }
.bio6-barber-submit-btn { width: 100%; padding: 14px; border-radius: 8px; border: none; background: var(--primary-grad, var(--primary)); color: #000; font-size: 1rem; font-weight: 700; cursor: pointer; transition: opacity 0.2s; }
.bio6-barber-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bio6-barber-notice { margin-top: 15px; color: var(--text-muted); line-height: 1.4; }
.bio6-hidden { display: none !important; }
.bio6-barber-input { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-input); color: var(--text-light); font-size: 0.95rem; outline: none; box-sizing: border-box; }
.bio6-barber-input:focus { border-color: var(--primary); }

/* ==========================================================================
   WAVE 9J - COMPATIBILIDADE DE BLOCOS RICOS E LEGADO (CUSTOM HTML)
   ========================================================================== */

/* Compatibilidade para Custom HTML contendo iframes nus (ex: YouTube/Spotify) */
.custom-html-block iframe,
.link-button iframe,
.ls-custom-button iframe {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Margens padronizadas para links herdados e blocos customizados do BD */
.link-button,
.ls-custom-button,
.custom-html-block {
    margin-bottom: 1rem;
    display: block;
}

/* Correcao de Imagens Improvisadas em Textos Normais */
.custom-html-block img,
.link-button img,
.ls-custom-button img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 8px auto;
}

/* Fallback seguro para classes legadas residuais em banco */
.custom-html-block [class*="ls-"],
.ls-custom-button {
    max-width: 100%;
}
