/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Theme Variables */
:root {
    /* Light Theme (Default) */
    --primary: #F7B32B;
    --primary-light: #FFF6E5;
    --primary-dark: #D5972B;
    --accent: #FC7A57;
    --dark: #253237;
    --dark-gray: #5C6B73;
    --light-gray: #F9F9FB;
    --white: #FFFFFF;
    --success: #43AA8B;
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --bg-color: #F9F9FB;
    --text-color: #253237;
    --card-bg: #FFFFFF;
    --footer-bg: #F9F9FB;
    --modal-bg: #FFFFFF;
    --border-color: rgba(0,0,0,0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --contact-text: #FFFFFF;
    --contact-text-secondary: rgba(255,255,255,0.7);
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #F7B32B;
    --primary-light: #3D3112;
    --primary-dark: #FFD475;
    --accent: #FC7A57;
    --dark: #EEEEEE;
    --dark-gray: #C0C0C0;
    --light-gray: #2A2A2A;
    --white: #1A1A1A;
    --bg-color: #121212;
    --text-color: #EEEEEE;
    --card-bg: #1A1A1A;
    --footer-bg: #1A1A1A;
    --modal-bg: #1A1A1A; 
    --border-color: rgba(255,255,255,0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --contact-text: #EEEEEE;
    --contact-text-secondary: rgba(238,238,238,0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Theme Switcher */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switch {
    width: 60px;
    height: 30px;
    background-color: var(--dark-gray);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.theme-switch::after {
    content: '☀️';
    position: absolute;
    width: 26px;
    height: 26px;
    top: 2px;
    left: 2px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.theme-switch.dark::after {
    content: '🌙';
    transform: translateX(30px);
}

/* Header */
.hero {
    background-color: var(--primary);
    position: relative;
    overflow: hidden;
    padding: 140px 0 180px;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--dark);
    letter-spacing: -1px;
}

.hero-title span {
    color: var(--white);
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 6px;
    background-color: var(--accent);
    bottom: 10px;
    left: 0;
    z-index: -1;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    position: relative;
}

.banana-image {
    position: relative;
    max-width: 100%;
    z-index: 3;
}

.circle-bg {
    position: absolute;
    width: 360px;
    height: 360px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    z-index: 2;
}

.hero-shape {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.hero-shape svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.hero-shape .shape-fill {
    fill: var(--bg-color);
}

/* Main content */
.main-content {
    position: relative;
    margin-top: -100px;
    padding-bottom: 80px;
}

.product-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 50px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    height: 3px;
    width: 60px;
    background-color: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-description {
    font-size: 1.1rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-card.selected {
    border-color: var(--primary);
}

.product-image {
    position: relative;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.flavor-image {
    font-size: 5rem;
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.taro-bg { background: linear-gradient(45deg, #E0B0FF 0%, #CF9FFF 100%); }
.chocolate-bg { background: linear-gradient(45deg, #D2B48C 0%, #A67B5B 100%); }
.matcha-bg { background: linear-gradient(45deg, #C9E4CA 0%, #87C38F 100%); }
.tiramisu-bg { background: linear-gradient(45deg, #D8C3A5 0%, #C4A484 100%); }
.strawberry-bg { background: linear-gradient(45deg, #FFD1DC 0%, #FFA6C9 100%); }

.peanut-bg { background: linear-gradient(45deg, #F5DEB3 0%, #DEB887 100%); }
.oreo-bg { background: linear-gradient(45deg, #E0E0E0 0%, #A9A9A9 100%); }
.cheese-bg { background: linear-gradient(45deg, #FFDB58 0%, #FFD700 100%); }
.redvelvet-bg { background: linear-gradient(45deg, #F5C0C0 0%, #DE6B6B 100%); }
.chocochips-bg { background: linear-gradient(45deg, #D2B48C 0%, #A67B5B 100%); }

.product-detail {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-color);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.product-type {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-top: auto;
}

.check-mark {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 3;
}

.product-card.selected .check-mark {
    opacity: 1;
    transform: scale(1);
}

/* Order Summary */
.order-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 50px;
    overflow: hidden;
}

.order-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: center;
}

.summary-box {
    background-color: var(--light-gray);
    border-radius: calc(var(--border-radius) - 6px);
    padding: 30px;
    margin-bottom: 30px;
}

.empty-selection {
    text-align: center;
    padding: 20px;
    color: var(--dark-gray);
    font-size: 1.1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.order-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.item-label {
    font-weight: 500;
    color: var(--text-color);
}

.item-price {
    font-weight: 700;
    color: var(--text-color);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-light);
    padding: 20px 30px;
    border-radius: calc(var(--border-radius) - 6px);
    margin-bottom: 30px;
    border-left: 5px solid var(--primary);
}

.total-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
}

.button-row {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 16px 26px;
    border-radius: calc(var(--border-radius) - 6px);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--dark);
    flex: 2;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(247, 179, 43, 0.3);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--text-color);
    flex: 1;
}

.btn-secondary:hover {
    background-color: #eaeaea;
    transform: translateY(-3px);
}

/* Contact Section */
.contact-section {
    background-color: var(--dark);
    color: var(--contact-text);
    padding: 100px 0;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

.contact-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.contact-header {
    text-align: center;
    margin-bottom: 70px;
    position: relative;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--contact-text);
}

.contact-description {
    color: var(--contact-text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    position: relative;
}

.contact-card {
    background-color: rgba(255,255,255,0.05);
    border-radius: var(--border-radius);
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255,255,255,0.1);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
}

.contact-label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--contact-text);
}

.contact-value {
    color: var(--contact-text-secondary);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    padding: 50px 0 30px;
    text-align: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.footer-logo span {
    color: var(--primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.social-link:hover {
    transform: translateY(-5px);
    background-color: var(--primary);
    color: var(--dark);
    box-shadow: 0 10px 20px rgba(247, 179, 43, 0.3);
}

.copyright {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* WhatsApp Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--modal-bg);
    max-width: 500px;
    width: 90%;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: #eaeaea;
}

.modal-title {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-weight: 700;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light-gray);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(247, 179, 43, 0.2);
}

.modal-actions {
    text-align: center;
}

/* Loading Screen */
.loading-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 30px;
}

.loading-text {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero {
        padding: 100px 0 150px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .product-container, .order-container {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* Perbaikan untuk mode dark */
[data-theme="dark"] {
    --primary: #F7B32B;
    --primary-light: #3D3112;
    --primary-dark: #FFD475;
    --accent: #FC7A57;
    --dark: #121212; /* Warna latar belakang lebih gelap */
    --dark-gray: #C0C0C0;
    --light-gray: #2A2A2A;
    --white: #EEEEEE; /* Ubah ke warna yang lebih terang untuk teks */
    --bg-color: #121212;
    --text-color: #FFFFFF; /* Pastikan teks utama jelas terlihat */
    --card-bg: #1E1E1E; /* Sedikit lebih terang dari latar belakang */
    --footer-bg: #1A1A1A;
    --modal-bg: #1A1A1A; 
    --border-color: rgba(255,255,255,0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --contact-text: #FFFFFF; /* Teks kontak yang lebih jelas */
    --contact-text-secondary: rgba(255,255,255,0.8); /* Tingkatkan kontras */
}

/* Tambahan untuk footer di mode dark */
[data-theme="dark"] .footer-logo {
    color: #FFFFFF;
}

[data-theme="dark"] .copyright {
    color: rgba(255,255,255,0.7);
}

[data-theme="dark"] .social-link {
    background-color: #2A2A2A;
    color: #FFFFFF;
}

/* Perbaikan untuk contact section */
.contact-section {
    background-color: #151515;
}

[data-theme="dark"] .contact-card {
    background-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .contact-card:hover {
    background-color: rgba(255,255,255,0.15);
}

/* Perbaikan tombol */
[data-theme="dark"] .btn-secondary {
    background-color: #2A2A2A;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: #3A3A3A;
}