/* Global Styles */
:root {
    --primary-red: #d32f2f;
    /* Keeping the brand red */
    --text-dark: #1d1d1f;
    /* Apple's near-black */
    --text-grey: #86868b;
    /* Apple's grey */
    --bg-light: #f5f5f7;
    /* Apple's light grey background */
    --white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.08);
    /* Softer, more diffuse shadow */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* Prioritize system fonts */
    color: var(--text-dark);
    background-color: var(--white);
    /* White base for sections */
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Critical for Apple look */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1080px;
    /* Slightly tighter container for focus */
    margin: 0 auto;
    padding: 0 40px;
}

.container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography - Apple Style */
h1 {
    font-size: 64px;
    line-height: 1.05;
    font-weight: 600;
    /* Not too bold */
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

h2 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

p.description {
    font-size: 21px;
    /* Larger body text */
    line-height: 1.4;
    color: var(--text-grey);
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 30px;
}

.sub-headline {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 19px;
    margin-bottom: 12px;
    display: block;
}

/* Header - Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 980px;
    /* Standard Apple nav width */
    margin: 0 auto;
    padding: 0 20px;
}

.logo-text span {
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.02em;
}

nav ul {
    display: flex;
    gap: 32px;
}

nav a {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.8);
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-red);
}

/* Hero Section */
.hero {
    padding: 100px 0 140px;
    /* More breathing room */
    text-align: center;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-content {
    margin: 0 auto 60px;
    max-width: 700px;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.hero-visual {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

.main-product-img {
    width: 100%;
    max-width: 900px;
    /* Huge image */
    height: auto;
    object-fit: contain;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-visual:hover .main-product-img {
    transform: scale(1.03);
}

/* Floating Elements (Badges) */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 12px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
    animation: float 5s ease-in-out infinite;
}

.badge-pos-1 {
    top: 10%;
    right: 15%;
    animation-delay: 0s;
}

.badge-pos-2 {
    bottom: 10%;
    left: 15%;
    animation-delay: 1.5s;
}

/* Buttons & CTAs */
.cta-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: #0071e3;
    /* iOS Blue */
    background: var(--primary-red);
    /* Or stick to brand color */
    color: white;
    padding: 12px 26px;
    border-radius: 980px;
    /* Pill shape */
    font-size: 17px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #b71c1c;
    transform: scale(1.02);
}

.link-arrow {
    font-size: 19px;
    color: #0066cc;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.link-arrow:hover {
    text-decoration: underline;
}

/* Modern Grid Section (Bento Box Style) */
.products {
    background: var(--bg-light);
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.product-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 500px 500px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bento-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 40px 0;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.bento-card:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-card);
}

.bento-card.large {
    grid-column: span 2;
    /* Full width card */
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 0;
}

.bento-card.large .bento-text {
    flex: 0 0 40%;
    padding: 60px;
    z-index: 2;
}

.bento-card.large .bento-img-container {
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.bento-text h3 {
    font-size: 32px;
    margin-bottom: 12px;
}

.bento-text p {
    font-size: 19px;
    color: var(--text-grey);
    margin-bottom: 20px;
}

.card-img {
    margin-top: auto;
    width: 80%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    transition: transform 0.5s ease;
}

.bento-card:hover .card-img {
    transform: translateY(-10px) scale(1.05);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Responsive */
@media (max-width: 900px) {
    h1 {
        font-size: 48px;
    }

    p.description {
        font-size: 18px;
    }

    .product-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-card.large {
        flex-direction: column;
        text-align: center;
    }

    .bento-card.large .bento-text {
        padding: 40px 20px 0;
    }

    .bento-card {
        height: 500px;
    }

    .hero-visual {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 40px;
        margin-top: 20px;
    }

    .hero {
        padding: 60px 0;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .cta-links {
        flex-direction: column;
    }

    .bento-card {
        height: 450px;
    }
}
/* Additions to existing styles.css */

.price-tag-hero {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 20px 0;
}

.price-tag-card {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

/* Adjustments for dynamic content */
.bento-card {
    justify-content: space-between; /* Ensures content is spaced out even with differing text lengths */
}

/* Ensure images in grid fit nicely */
.card-img {
    max-height: 250px;
    width: auto;
    object-fit: contain;
    margin-bottom: 30px;
}

.bento-card.large .bento-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =============================================
   AI CHAT WIDGET
   ============================================= */

#chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, sans-serif;
}

.chat-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0071e3;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.4);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.chat-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 113, 227, 0.5);
}

.chat-toggle-btn.active {
    background: #1d1d1f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Green dot = online */
.chat-toggle-btn::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #34c759;
    border-radius: 50%;
    top: 2px;
    right: 2px;
    border: 2px solid white;
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    height: 520px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.chat-header {
    background: #1d1d1f;
    padding: 16px 20px;
    flex-shrink: 0;
}

.chat-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    width: 36px;
    height: 36px;
    background: #0071e3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.agent-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.agent-status {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #34c759;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f5f5f7;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #d0d0d5; border-radius: 4px; }

.chat-msg {
    display: flex;
    max-width: 85%;
    animation: msgFadeIn 0.2s ease both;
}

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

.chat-msg-bot  { align-self: flex-start; }
.chat-msg-user { align-self: flex-end; }

.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-bot .chat-bubble {
    background: white;
    color: #1d1d1f;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chat-msg-user .chat-bubble {
    background: #0071e3;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
}

.chat-typing-indicator span {
    width: 7px;
    height: 7px;
    background: #86868b;
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite;
}

.chat-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
}

.chat-quick-btn {
    background: white;
    color: #0071e3;
    border: 1px solid #0071e3;
    border-radius: 980px;
    padding: 6px 14px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.chat-quick-btn:hover {
    background: #0071e3;
    color: white;
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

#chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1d1d1f;
    outline: none;
    transition: border-color 0.2s;
    background: #f5f5f7;
}

#chat-input:focus {
    border-color: #0071e3;
    background: white;
}

#chat-input::placeholder { color: #86868b; }

.chat-send-btn {
    width: 34px;
    height: 34px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.chat-send-btn:hover  { background: #0062cc; transform: scale(1.05); }
.chat-send-btn:disabled { background: #c0c0c5; cursor: not-allowed; transform: none; }

@media (max-width: 480px) {
    #chat-widget { bottom: 16px; right: 16px; left: 16px; }
    .chat-window { width: 100%; height: 70vh; bottom: 68px; right: 0; }
}
