/* Odejiji - Simple Order Form Website */
:root {
    --background: #F5F2EB;
    --surface: #E8E3D9;
    --primary: #2C4C3B;
    --primary-hover: #3B614D;
    --secondary: #8B9D83;
    --accent: #C16E54;
    --text-main: #1C2B23;
    --text-muted: #4A5D52;
    --border: #D5CEBD;
    --white: #FFFFFF;
    --whatsapp: #25D366;
    --whatsapp-hover: #128C7E;
}

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

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Cormorant Garamond', serif; }

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

/* WhatsApp Header Button */
.whatsapp-header-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #25D366 !important;
    color: white !important;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.whatsapp-header-btn:hover {
    background: #128C7E !important;
    transform: scale(1.02);
}

.whatsapp-header-btn svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem;
    width: 100%;
}

.content-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Product Card */
.product-section { width: 100%; }

.product-card {
    background: var(--white);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-details { padding: 1rem; }

.product-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.product-subtitle {
    color: var(--secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.product-usage {
    background: var(--surface);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.5;
    border-left: 3px solid var(--primary);
}

.product-benefits {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.5rem;
    margin-bottom: 1rem;
}

.product-benefits li {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mobile-only { display: flex; }

/* Order Section */
.order-section { width: 100%; }

.order-card {
    background: var(--white);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.order-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.order-header h2 {
    font-size: 1.35rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.order-header p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Form Styles */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    font-size: 16px;
    font-family: inherit;
    background: var(--background);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 76, 59, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

/* Bundle Picker */
.bundle-picker {
    margin: 0.5rem 0 0.75rem;
}
.bundle-picker-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}
.bundles {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.bundle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.25rem 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    background: var(--white);
    border-radius: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.2s ease;
}
.bundle:hover {
    border-color: var(--secondary);
    transform: translateY(-1px);
}
.bundle.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(44,76,59,0.04) 0%, rgba(44,76,59,0.08) 100%);
    box-shadow: 0 4px 14px rgba(44,76,59,0.15);
}
.bundle.premium.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(193,110,84,0.06) 0%, rgba(193,110,84,0.12) 100%);
    box-shadow: 0 6px 18px rgba(193,110,84,0.2);
}
.bundle-top {
    grid-column: 1;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.bundle-title {
    font-weight: 700;
    font-size: 0.95rem;
}
.bundle-save {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    background: rgba(193,110,84,0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.bundle-price {
    grid-column: 2;
    grid-row: 1;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    white-space: nowrap;
}
.bundle.premium .bundle-price { color: var(--accent); }
.bundle-sub {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.bundle-badge {
    position: absolute;
    top: -8px;
    right: 10px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.55rem;
    border-radius: 9999px;
    color: white;
}
.bundle-badge.hot { background: #2C4C3B; }
.bundle-badge.best { background: #C16E54; }

.summary-row.bonus-row {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.78rem;
}

/* Order Summary */
.order-summary-box {
    background: var(--background);
    border-radius: 0.625rem;
    padding: 0.875rem;
    margin-top: 0.25rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(44, 76, 59, 0.3);
    margin-top: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(44, 76, 59, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    padding: 0 1rem;
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

/* WhatsApp Button */
.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #25D366 !important;
    color: white !important;
    border: none;
    border-radius: 9999px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.whatsapp-btn:hover {
    background: #128C7E !important;
    transform: translateY(-2px);
}

.whatsapp-btn svg {
    width: 20px;
    height: 20px;
}

.whatsapp-btn.small {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-top: 0.875rem;
}

/* Trust Text */
.trust-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--secondary);
    font-size: 0.7rem;
    text-align: center;
}

.trust-text svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.footer-contact a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
}

.footer p {
    color: var(--secondary);
    font-size: 0.65rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 0.75rem;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: 1.25rem;
    padding: 1.5rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: #22C55E;
    color: white;
}

.modal-icon svg {
    width: 35px;
    height: 35px;
}

.modal-content h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-info {
    background: var(--background);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: left;
}

.modal-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.modal-close-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.modal-close-btn:hover { background: var(--primary-hover); }

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(245, 242, 235, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 600;
}

.loading-overlay.active { display: flex; }

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 700;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error { background: var(--accent); }

/* Tablet & Desktop */
@media (min-width: 768px) {
    .header { padding: 1rem 2rem; }
    .logo-text { font-size: 1.6rem; }
    .main-content { padding: 2rem; }
    
    .content-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }
    
    .mobile-only { display: none !important; }
    
    .product-card {
        position: sticky;
        top: 90px;
    }
    
    .product-title { font-size: 1.6rem; }
    .product-price { font-size: 2rem; }
    .order-card { padding: 1.75rem; }
}

/* Small Mobile */
@media (max-width: 380px) {
    .header { padding: 0.5rem 0.75rem; }
    .logo-text { font-size: 1.2rem; }
    .whatsapp-header-btn { padding: 0.4rem 0.65rem; font-size: 0.7rem; }
    .main-content { padding: 0.625rem; }
    .product-title { font-size: 1.2rem; }
    .product-price { font-size: 1.5rem; }
    .order-card { padding: 1rem; }
}

@media (max-width: 340px) {
    .whatsapp-header-btn span { display: none; }
    .whatsapp-header-btn { padding: 0.45rem; border-radius: 50%; }
}

@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* AI Chat Widget */
.ai-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.75rem 1.1rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(44, 76, 59, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(44,76,59,0.5); }
.ai-fab:active { transform: translateY(0); }
.ai-fab svg { width: 20px; height: 20px; flex-shrink: 0; }
.ai-fab.hidden { display: none; }

@supports (padding: max(0px)) {
    .ai-fab { bottom: max(1rem, env(safe-area-inset-bottom)); }
}

body.ai-chat-open { overflow: hidden; }

.ai-chat {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: min(380px, calc(100vw - 2rem));
    height: min(560px, calc(100vh - 4rem));
    background: var(--white);
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 900;
    animation: chatIn 0.25s ease-out;
}
.ai-chat.open { display: flex; }
@keyframes chatIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Full-screen chat on small phones */
@media (max-width: 640px) {
    .ai-chat {
        right: 0;
        bottom: 0;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: 100%;
        border-radius: 0;
    }
}
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 0.85rem 1rem;
}
.ai-chat-title { display: flex; align-items: center; gap: 0.7rem; }
.ai-chat-title strong { display: block; font-size: 1rem; font-family: 'Cormorant Garamond', serif; font-weight: 700; }
.ai-chat-title small { display: block; opacity: 0.85; font-size: 0.7rem; }
.ai-chat-dot {
    width: 10px; height: 10px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,0.3);
}
.ai-chat-close {
    background: rgba(255,255,255,0.15);
    color: white;
    width: 30px; height: 30px;
    border: none; border-radius: 50%;
    font-size: 1.25rem; line-height: 1;
    cursor: pointer;
}
.ai-chat-close:hover { background: rgba(255,255,255,0.25); }
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--background);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.ai-msg {
    max-width: 85%;
    padding: 0.65rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    word-wrap: break-word;
}
.ai-msg.bot { background: var(--white); color: var(--text-main); align-self: flex-start; border-bottom-left-radius: 0.25rem; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.ai-msg.user { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 0.25rem; }
.ai-msg.typing { display: flex; gap: 4px; align-items: center; }
.ai-msg.typing span { width: 7px; height: 7px; background: var(--secondary); border-radius: 50%; animation: typingDot 1.2s infinite; }
.ai-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}
.ai-cta {
    align-self: stretch;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.25rem;
    box-shadow: 0 6px 14px rgba(44,76,59,0.3);
}
.ai-cta:hover { transform: translateY(-1px); }
.ai-chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
}
.ai-chat-input input {
    flex: 1;
    padding: 0.7rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-family: inherit;
    font-size: 16px;
    background: var(--background);
    color: var(--text-main);
    outline: none;
}
.ai-chat-input input:focus { border-color: var(--primary); }
.ai-chat-input button {
    width: 44px; height: 44px;
    background: var(--primary);
    color: white;
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.ai-chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-chat-input button svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
    .ai-fab-text { display: none; }
    .ai-fab { padding: 0.85rem; }
}
