/**
 * SunMate.IO – main.css
 * All global styles extracted from includes/head.php
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #1A1AFF;
    --primary-dark: #1414CC;
    --accent: #14B082;
    --accent-light: #E6F9F3;
    --dark: #02021E;
    --text: #4E4E62;
    --text-light: #7A7A8E;
    --bg: #FFFFFF;
    --bg-alt: #F7F8FC;
    --bg-dark: #0A0A2E;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.10);
    --max-width: 1200px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text); background: var(--bg); line-height: 1.7; font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { color: var(--dark); line-height: 1.2; font-weight: 700; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border-radius: 50px; font-weight: 600;
    font-size: 16px; border: none; cursor: pointer;
    transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,26,255,0.3); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0f9970; color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.section-label {
    display: inline-block; background: var(--accent-light); color: var(--accent);
    padding: 6px 16px; border-radius: 50px; font-size: 14px; font-weight: 600; margin-bottom: 16px;
}
.section-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.section-subtitle { font-size: 17px; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* ===== Header ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--dark); }
.logo:hover { color: var(--dark); }
.logo img { height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text); font-weight: 500; font-size: 14px; position: relative; white-space: nowrap; }
.nav a:hover { color: var(--primary); }
.nav a.active { color: var(--primary); }
.nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer;
    background: none; border: none; font-family: inherit; display: flex; align-items: center; gap: 4px;
    padding: 0; white-space: nowrap; transition: color 0.2s;
}
.nav-dropdown-toggle:hover { color: var(--primary); }
.nav-dropdown-toggle.active { color: var(--primary); }
.nav-dropdown-toggle svg { width: 12px; height: 12px; transition: transform 0.25s ease; }
.nav-dropdown:hover .nav-dropdown-toggle svg { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px);
    background: rgba(255,255,255,0.98); backdrop-filter: blur(16px);
    border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.12); border: 1px solid rgba(0,0,0,0.06);
    min-width: 200px; padding: 8px; opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-menu a {
    display: block; padding: 10px 16px; border-radius: 8px; font-size: 14px;
    color: var(--text); font-weight: 500; transition: background 0.15s;
}
.nav-dropdown-menu a:hover { background: var(--bg-alt); color: var(--primary); }
.nav-dropdown-menu a::after { display: none; }

/* Mobile dropdown */
.mobile-dropdown-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 12px 16px; color: var(--text); font-weight: 600; font-size: 15px;
    background: none; border: none; font-family: inherit; cursor: pointer;
    border-radius: 8px; transition: background 0.2s;
}
.mobile-dropdown-toggle:hover { background: var(--bg-alt); }
.mobile-dropdown-toggle svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.mobile-dropdown-toggle.open svg { transform: rotate(180deg); }
.mobile-dropdown-items {
    display: none; padding-left: 16px;
}
.mobile-dropdown-items.open { display: flex; flex-direction: column; gap: 2px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.mobile-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; position: relative; padding: 0;
}
.mobile-toggle span {
    display: block; width: 22px; height: 2px; background: var(--dark);
    position: absolute; left: 11px; border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-toggle span:nth-child(1) { top: 13px; }
.mobile-toggle span:nth-child(2) { top: 21px; }
.mobile-toggle span:nth-child(3) { top: 29px; }
.mobile-toggle.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(-6px); }
.mobile-toggle.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.mobile-menu {
    position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
    padding: 16px 24px; box-shadow: var(--shadow-lg); z-index: 999;
    display: flex; flex-direction: column; gap: 4px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a {
    display: block; padding: 12px 16px; color: var(--text); font-weight: 500;
    border-radius: 8px; transition: background 0.2s ease, transform 0.2s ease;
}
.mobile-menu a:hover { background: var(--bg-alt); transform: translateX(4px); }

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark); border-top: 1px solid rgba(255,255,255,0.06);
    padding: 60px 0 0; color: rgba(255,255,255,0.7);
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px; padding-bottom: 48px;
}
.footer-brand p {
    font-size: 14px; margin-top: 16px; line-height: 1.7; max-width: 320px;
}
.footer-logo { font-size: 22px; font-weight: 800; color: #fff; }
.footer-logo span { color: var(--accent); }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 20px; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 14px; transition: color var(--transition); }
.footer ul a:hover { color: #fff; }
.footer-contact li {
    display: flex; gap: 10px; align-items: flex-start; font-size: 14px;
}
.footer-contact li svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.footer-newsletter p { font-size: 14px; margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
    flex: 1; padding: 12px 16px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06); color: #fff;
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
    padding: 12px 20px; border-radius: 8px; border: none;
    background: var(--accent); color: #fff; font-weight: 600;
    font-size: 14px; cursor: pointer; transition: background var(--transition); font-family: inherit;
}
.newsletter-form button:hover { background: #0f9970; }
.footer-privacy { margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 14px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
    transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-social a svg { width: 18px; height: 18px; }

/* ===== Global Animations ===== */
.animate {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate.visible { opacity: 1; transform: translateY(0); }
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }

/* ===== Image Showcase (responsive phone frame) ===== */
.phone-frame {
    position: relative; display: inline-block;
    border-radius: 32px; overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
    max-width: 320px; width: 100%;
}
.phone-frame img { width: 100%; height: auto; display: block; border-radius: 32px; }

.img-showcase {
    position: relative; display: flex; justify-content: center; align-items: center;
}
.img-showcase .glow {
    position: absolute; width: 300px; height: 300px; border-radius: 50%; filter: blur(80px);
    opacity: 0.25; pointer-events: none; z-index: 0;
}
.img-showcase .glow-primary { background: var(--primary); top: 20%; left: 10%; }
.img-showcase .glow-accent { background: var(--accent); bottom: 10%; right: 10%; }

/* ===== Full-width Image Banner ===== */
.image-banner {
    width: 100%; overflow: hidden; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); position: relative;
}
.image-banner img { width: 100%; height: auto; display: block; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .footer-bottom { justify-content: center; text-align: center; }
    .phone-frame { max-width: 260px; }
}
@media (max-width: 480px) {
    .newsletter-form { flex-direction: column; }
    .phone-frame { max-width: 220px; border-radius: 24px; }
    .phone-frame img { border-radius: 24px; }
    body { font-size: 15px; }
    .container { padding: 0 16px; }
    .section-label { font-size: 13px; padding: 5px 14px; }
}

/* ===== Cart Icon & Panel ===== */
.cart-toggle {
    position: relative; background: none; border: none; cursor: pointer;
    color: var(--dark); padding: 6px; display: flex; align-items: center;
    transition: color var(--transition);
}
.cart-toggle:hover { color: var(--primary); }
.cart-count {
    position: absolute; top: -2px; right: -6px; background: var(--accent);
    color: #fff; font-size: 11px; font-weight: 700; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    pointer-events: none; transition: transform 0.2s;
}
.cart-count.bump { animation: cartBump 0.35s ease; }
@keyframes cartBump { 0%{transform:scale(1)} 50%{transform:scale(1.4)} 100%{transform:scale(1)} }
.cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 2000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 90vw;
    background: #fff; z-index: 2001; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
}
.cart-panel.open { transform: translateX(0); }
.cart-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cart-panel-header h3 { font-size: 18px; margin: 0; }
.cart-close {
    background: none; border: none; font-size: 28px; cursor: pointer;
    color: var(--text); line-height: 1; padding: 0 4px;
}
.cart-panel-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; color: var(--text-light); padding: 40px 0; }
.cart-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 15px; color: var(--dark); }
.cart-item-detail { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.cart-item-price { font-weight: 700; font-size: 15px; color: var(--dark); white-space: nowrap; margin-left: 16px; }
.cart-item-remove {
    background: none; border: none; color: var(--text-light); cursor: pointer;
    font-size: 18px; padding: 0 0 0 12px; line-height: 1;
}
.cart-item-remove:hover { color: #e53e3e; }
.cart-panel-footer { padding: 16px 24px; border-top: 1px solid rgba(0,0,0,0.06); }
.cart-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 16px;
}

/* ===== Product Selector (pricing cards) ===== */
.product-selector { margin-top: auto; padding-top: 20px; }
.product-selector label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.product-selector select {
    width: 100%; padding: 10px 12px; border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--dark);
    background: #fff; cursor: pointer; margin-bottom: 12px; appearance: auto;
}
.product-selector .addon-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.addon-item {
    display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text);
}
.addon-item input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0;
}
.addon-item .addon-price { margin-left: auto; font-weight: 600; color: var(--dark); white-space: nowrap; }
.addon-item.included { color: var(--accent); font-weight: 500; }
.addon-item.included::before { content: '✓'; margin-right: 2px; }
