/* ============================================
   Compass Demo Page Styles
   ============================================ */

.demo-section {
    padding: 60px 0 var(--section-padding);
}

.demo-layout {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    justify-content: center;
}

/* --- Phone Mockup --- */
.phone-wrapper {
    flex-shrink: 0;
}

.phone-frame {
    width: 360px;
    height: 720px;
    background: #000;
    border-radius: 40px;
    padding: 12px;
    position: relative;
    box-shadow:
        0 0 0 2px #333,
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 8px #1a1a1a;
    overflow: hidden;
}

.phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: #000;
    border-radius: 0 0 16px 16px;
    z-index: 20;
}

/* --- Phone Screens --- */
.phone-screen {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: #fff;
    border-radius: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.phone-screen::-webkit-scrollbar {
    display: none;
}

.phone-screen.screen-active {
    opacity: 1;
    visibility: visible;
}

/* --- Mock Site Header --- */
.mock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 16px 10px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #f0f0f0;
}

.mock-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    width: 32px;
}

.mock-hamburger span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
}

.mock-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mock-close svg {
    width: 18px;
    height: 18px;
}

.mock-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #333;
}

.mock-logo-icon {
    width: 22px;
    height: 22px;
}

.mock-cart {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mock-cart svg {
    width: 18px;
    height: 18px;
}

/* --- Mock Announcement Bar --- */
.mock-announcement {
    background: #144B3C;
    color: #fff;
    text-align: center;
    font-size: 0.6rem;
    padding: 6px 12px;
    font-weight: 500;
}

/* --- Mock Hero Banner --- */
.mock-hero-banner {
    height: 160px;
    background: linear-gradient(135deg, #f7d1d1 0%, #e8b4c8 50%, #d4a0b0 100%);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.mock-hero-overlay {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mock-hero-subtitle {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    font-weight: 600;
}

.mock-hero-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.mock-hero-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 14px;
    background: #B51846;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 600;
    border-radius: 3px;
    align-self: flex-start;
}

/* --- Mock Section Title --- */
.mock-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #333;
    padding: 16px 16px 8px;
}

/* --- Mock Product Grid --- */
.mock-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px 16px;
}

.mock-product-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    margin-bottom: 6px;
}

.img-1 { background: linear-gradient(135deg, #fce4ec, #f8bbd0, #f48fb1); }
.img-2 { background: linear-gradient(135deg, #fce4ec, #ef9a9a, #e57373); }
.img-3 { background: linear-gradient(135deg, #fff9c4, #fff176, #ffee58); }
.img-4 { background: linear-gradient(135deg, #e8eaf6, #c5cae9, #9fa8da); }
.img-5 { background: linear-gradient(135deg, #f3e5f5, #ce93d8, #ba68c8); }
.img-6 { background: linear-gradient(135deg, #fff8e1, #ffcc02, #ffa000); }
.img-7 { background: linear-gradient(135deg, #fce4ec, #f8bbd0, #ec407a); }
.img-8 { background: linear-gradient(135deg, #e8f5e9, #a5d6a7, #66bb6a); }

.mock-product-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #333;
}

.mock-product-price {
    font-size: 0.6rem;
    color: #888;
}

/* --- Mock Menu --- */
.mock-menu {
    padding: 8px 0;
}

.mock-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    cursor: default;
}

.mock-menu-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.4;
}

.mock-menu-expandable {
    color: #333;
    font-weight: 600;
}

.mock-menu-expanded {
    color: #B51846;
    font-weight: 600;
    background: #fdf2f4;
}

.mock-menu-expanded svg {
    color: #B51846;
    opacity: 0.7;
}

/* --- Mock Submenu --- */
.mock-submenu {
    background: #fafafa;
    border-left: 3px solid #e0e0e0;
    margin-left: 16px;
}

.mock-submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    font-size: 0.72rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    cursor: default;
}

.mock-submenu-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.4;
}

.mock-submenu-item.mock-menu-expandable {
    font-weight: 600;
    color: #333;
}

.mock-submenu-item.mock-menu-expanded {
    color: #B51846;
    font-weight: 600;
    background: #fdf2f4;
}

.mock-submenu-item.mock-menu-expanded svg {
    color: #B51846;
    opacity: 0.7;
}

.mock-submenu-highlight {
    color: #B51846;
    font-weight: 700;
    background: #fdf2f4;
}

/* --- Mock Sub-Submenu --- */
.mock-sub-submenu {
    background: #f5f5f5;
    border-left: 3px solid #d0d0d0;
    margin-left: 16px;
}

.mock-sub-submenu-item {
    padding: 10px 20px;
    font-size: 0.68rem;
    color: #666;
    border-bottom: 1px solid #ebebeb;
    cursor: default;
}

.mock-sub-submenu-item.mock-submenu-highlight {
    color: #B51846;
    font-weight: 700;
    background: #fdf2f4;
}

/* --- Mock Breadcrumb & Page Title --- */
.mock-breadcrumb {
    font-size: 0.55rem;
    color: #999;
    padding: 12px 16px 0;
}

.mock-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    padding: 8px 16px 12px;
}

/* --- Success Badge --- */
.screen-success-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px;
    padding: 12px 16px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: successPulse 0.6s ease;
}

.screen-success-badge svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@keyframes successPulse {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Tap Target Highlights --- */
#tap-1, #tap-2, #tap-3, #tap-4, #tap-compass {
    position: relative;
}

.screen-active #tap-1,
.screen-active #tap-2,
.screen-active #tap-3,
.screen-active #tap-4,
.screen-active #tap-compass {
    animation: tapGlow 1.8s ease-in-out infinite;
    box-shadow: 0 0 0 3px rgba(221, 110, 66, 0.4);
    border-radius: 6px;
    z-index: 5;
}

.screen-active #tap-1 {
    border-radius: 4px;
}

.screen-active #tap-1::after,
.screen-active #tap-2::after,
.screen-active #tap-3::after,
.screen-active #tap-4::after,
.screen-active #tap-compass::after {
    content: attr(data-tap);
    background: var(--terracotta);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 10;
}

/* Hamburger: pill floats to the right */
.screen-active #tap-1::after {
    position: absolute;
    right: -56px;
    top: 50%;
    transform: translateY(-50%);
}

/* Menu items: pill positioned inside on the right */
.screen-active #tap-2::after,
.screen-active #tap-3::after,
.screen-active #tap-4::after {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
}

/* Compass link: pill sits inline */
.screen-active #tap-compass::after {
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
}

@keyframes tapGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(221, 110, 66, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(221, 110, 66, 0.2); }
}

/* --- Tour Panel --- */
.tour-panel {
    max-width: 380px;
    flex: 1;
}

.tour-step {
    display: none;
    padding: 32px;
    background: var(--white);
    border: 1px solid rgba(192, 214, 223, 0.5);
    border-radius: 16px;
    margin-bottom: 24px;
}

.tour-step.tour-step-active {
    display: block;
    animation: fadeSlideIn 0.4s ease;
}

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

.tour-step-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    background: var(--terracotta);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.tour-step-badge-done {
    background: #2e7d32;
}

.tour-step-badge-compass {
    background: var(--slate);
}

.tour-cta-inline {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.tour-step h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 8px;
}

.tour-step p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Tour Controls --- */
.tour-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.tour-btn {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.tour-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.tour-progress {
    display: flex;
    gap: 8px;
}

.tour-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    transition: all 0.3s ease;
}

.tour-dot.active {
    background: var(--terracotta);
    transform: scale(1.2);
}

.tour-cta {
    width: 100%;
    text-align: center;
}

/* --- Compass Mock Page --- */
.compass-page {
    min-height: 100%;
    background: linear-gradient(180deg, #f7f0e8 0%, #fff 40%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px 24px;
}

.compass-profile {
    text-align: center;
    margin-bottom: 24px;
}

.compass-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #B51846;
    border: 2px solid #e0d5c7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.compass-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.compass-desc {
    font-size: 0.62rem;
    color: #888;
}

.compass-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.compass-link {
    display: block;
    text-align: center;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px solid #e0d5c7;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: default;
}

.compass-link-highlight {
    background: #fdf2f4;
    border-color: #B51846;
    color: #B51846;
    position: relative;
}

.compass-social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.compass-social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-social-icon svg {
    width: 18px;
    height: 18px;
}

/* --- Mobile VS Section --- */
.mobile-vs {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.vs-label-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 320px;
    margin: 40px 0 16px;
}

.vs-line {
    flex: 1;
    height: 1px;
    background: var(--powder);
}

.vs-label {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--terracotta);
    letter-spacing: 0.05em;
}

.vs-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 24px;
    text-align: center;
}

.vs-subtitle strong {
    color: var(--slate);
}

.phone-frame-compass {
    position: relative;
}

.mobile-cta {
    margin-top: 32px;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .demo-layout {
        flex-direction: column;
        align-items: center;
    }

    .tour-panel {
        display: none;
    }

    .mobile-vs {
        display: flex;
    }

    .phone-frame {
        width: 320px;
        height: 660px;
    }
}

@media (max-width: 400px) {
    .phone-frame {
        width: 280px;
        height: 580px;
        border-radius: 32px;
    }

    .phone-screen {
        border-radius: 22px;
    }

    .phone-notch {
        width: 80px;
        height: 20px;
    }
}
