/* CSS Variables & Setup */
:root {
    --primary-color: #02b7e6; /* Màu xanh pastel được yêu cầu */
    --primary-light: #e6f8fc;
    --text-color: #111827;
    --text-light: #4b5563;
    --bg-light: #fdfdfd;
    --bg-white: #ffffff;
    --bg-dark: #1f2937;
    --border-color: #e5e7eb;
}

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

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }
.bg-light-blue { background-color: var(--primary-light); }
.bg-dark { background-color: var(--bg-dark); }
.text-white { color: var(--bg-white); }
.section-padding { padding: 2.5rem 0; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #02a3cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 183, 230, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--text-color);
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    width: 100%;
    text-align: center;
}

/* Top Bar */
.top-bar {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 100;
}

.nav-left, .nav-right {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-left a:hover, .nav-right a:hover {
    color: var(--primary-color);
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-transform: uppercase;
}

/* Split Section (Hero, Solution, Offer) */
.split-section {
    display: flex;
    min-height: 80vh;
}

.split-image, .split-content {
    flex: 1;
}

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

.split-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    max-width: 650px;
}

.subtitle {
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Problem Section */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.problem-card {
    padding: 2rem;
    background-color: var(--primary-light);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-5px);
}

.problem-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.problem-conclusion {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.benefit-item {
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.benefit-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.full-width-card {
    grid-column: 1 / -1;
    border: none;
}

/* Offer Section */
.offer-box {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border-top: 4px solid var(--primary-color);
}

.offer-box h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.offer-box ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

.offer-box li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.offer-box .note {
    font-size: 0.85rem;
    font-style: italic;
    color: #9ca3af;
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Best Sellers Section */
.bestsellers-section {
    background-color: #fdfdfd;
}

.bestsellers-container {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 3rem;
}

.bestsellers-header {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bestsellers-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.bestsellers-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.product-card {
    flex: 0 0 300px;
    background-color: var(--bg-white);
    scroll-snap-align: start;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-img-wrapper {
    height: 300px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
}

.add-to-cart {
    background: #f4f4f5;
    color: var(--text-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-to-cart:hover {
    background: var(--primary-color);
    color: white;
}

/* Philosophy Section */
.philosophy-section {
    position: relative;
    width: 100%;
}

.philosophy-bg {
    width: 100%;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.philosophy-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.4);
}

.philosophy-box {
    background: white;
    padding: 4rem 3rem;
    max-width: 650px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.philosophy-title {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.philosophy-title strong {
    font-weight: 700;
}

.philosophy-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Marquee */
.marquee-container {
    background: #fafafa;
    padding: 1.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 25s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
}

.marquee-content span {
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
}

.marquee-separator {
    margin: 0 3rem !important;
    color: var(--primary-color) !important;
    font-size: 3.5rem !important;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Order Section */
.order-container {
    display: flex;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    overflow: hidden;
}

.order-info {
    flex: 1;
    padding: 3rem;
    background: var(--primary-light);
}

.order-benefits {
    list-style: none;
    margin-top: 2rem;
    padding: 0;
}

.order-benefits li {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--text-color);
}

.order-form-box {
    flex: 1;
    padding: 3rem;
    background: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background: #fafafa;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

/* -------------------------------------
   COCOON STYLE E-COMMERCE UPGRADE
--------------------------------------*/
/* Cocoon Product Detail */
.cocoon-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.product-slider-container {
    position: relative;
    background: #fdfdfd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-slider-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}
.slider-btn:hover { color: #000; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}
.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #444;
}
.badge-item .icon { font-size: 1.2rem; }

.btn-black {
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    padding: 1.2rem 2rem;
    font-weight: 600;
    transition: background-color 0.3s;
}
.btn-black:hover {
    background-color: #333;
    transform: none; /* remove primary btn hover effect */
    box-shadow: none;
}

/* Cart Drawer */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0; right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.05);
}
.cart-drawer.active {
    right: 0;
}
.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 { font-size: 1.1rem; }
.close-cart-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.empty-cart-msg {
    text-align: center;
    color: #666;
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    background: #f9f9f9;
}
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    width: fit-content;
    border-radius: 4px;
}
.cart-item-qty button {
    background: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 992px) {
    .split-section {
        flex-direction: column;
    }
    
    .split-image {
        min-height: 400px;
    }
    
    .solution.split-section {
        flex-direction: column-reverse;
    }
    
    .split-content {
        padding: 3rem 2rem;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .bestsellers-scroll {
        gap: 1rem;
    }
    
    .product-card {
        flex: 0 0 260px;
    }
    
    .marquee-content span, .marquee-separator {
        font-size: 2rem !important;
    }
    
    .philosophy-box {
        padding: 2.5rem 1.5rem;
    }
    
    .order-container {
        flex-direction: column;
        gap: 0;
    }
    
    .order-info, .order-form-box {
        padding: 2rem;
    }
    
    .product-detail-grid, .cocoon-product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery, .product-slider-container {
        position: relative;
        top: 0;
    }
    
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
    
    .bestsellers-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .bestsellers-header {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .nav-left, .nav-right {
        display: none; /* In a real app, you'd add a hamburger menu */
    }
    
    .logo {
        margin: 0 auto;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------
   PRELOADER & FLOATING CONTACT
--------------------------------------*/
#preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #faf8f5;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
}
.preloader-logo {
    width: 150px;
    margin-bottom: 25px;
    animation: pulse 1.5s infinite alternate;
}
.spinner {
    width: 35px;
    height: 35px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.05); }
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}

.floating-contact-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 10px;
    border-radius: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    z-index: 9998;
    transition: max-width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 300px;
    overflow: hidden;
}
.floating-contact-wrapper.collapsed {
    max-width: 60px;
}
.floating-contact-wrapper.collapsed .social-links {
    opacity: 0;
    pointer-events: none;
}
.social-links {
    display: flex;
    gap: 10px;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}
.contact-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}
.contact-item:hover { background: #e5e7eb; }
.toggle-btn { color: #555; }

/* -------------------------------------
   LOGIN MODAL
--------------------------------------*/
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.login-overlay.active {
    opacity: 1;
    visibility: visible;
}
.login-modal {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 8px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.login-overlay.active .login-modal {
    transform: translateY(0);
}
.close-login-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}
.login-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.login-subtitle {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.login-register-link {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}
.login-register-link a {
    color: #c98836;
    text-decoration: underline;
    font-weight: 500;
}
.login-input-group {
    margin-bottom: 1.2rem;
    position: relative;
}
.login-input-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: none;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
    background: transparent;
    transition: border-color 0.3s;
}
.login-input-group input:focus {
    outline: none;
    border-bottom-color: var(--text-color);
}
.login-input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
.login-forgot {
    text-align: right;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}
.login-forgot a {
    color: var(--text-light);
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.login-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}
.social-icons {
    display: flex;
    gap: 15px;
    font-size: 1.2rem;
}
.social-icons a {
    text-decoration: none;
}
