/* ============================================
   Madam Flowers - Modern Lightweight CSS
   SEO-optimized, Fast, Responsive
   ============================================ */

/* Reset & Variables */
:root {
    --primary: #1a1a1a;
    --primary-light: #333;
    --accent: #c7606a;
    --accent-dark: #a84d55;
    --accent-light: #e8949b;
    --gold: #b8860b;
    --gold-light: #d4a937;
    --dark: #111;
    --dark-2: #1e1e1e;
    --gray-100: #f9f9f9;
    --gray-200: #e8e8e8;
    --gray-300: #d0d0d0;
    --gray-400: #999;
    --gray-500: #666;
    --gray-600: #444;
    --white: #ffffff;
    --cream: #fdf8f4;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 20px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

/* ============================================
   Navigation
   ============================================ */
.mf-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    padding: 0.6rem 0;
    transition: var(--transition);
}

.mf-navbar.scrolled {
    background: rgba(0, 0, 0, 0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,.2);
    padding: 0.4rem 0;
}

.mf-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mf-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.mf-nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.mf-nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mf-nav-links a {
    color: rgba(255,255,255,.8);
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 400;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.mf-nav-links a:hover {
    color: var(--white);
    background: rgba(255,255,255,.1);
}

/* Dropdown */
.mf-dropdown {
    position: relative;
}

.mf-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    color: rgba(255,255,255,.8);
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 400;
    transition: var(--transition);
}

.mf-dropdown-toggle:hover {
    color: var(--white);
    background: rgba(255,255,255,.1);
}

.mf-dropdown-arrow {
    border: solid rgba(255,255,255,.6);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 2px;
    transform: rotate(45deg);
    transition: var(--transition);
}

.mf-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--dark-2);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,.3);
    z-index: 100;
}

.mf-dropdown:hover .mf-dropdown-menu {
    display: block;
}

.mf-dropdown:hover .mf-dropdown-arrow {
    transform: rotate(-135deg);
}

.mf-dropdown-menu a {
    display: block;
    padding: 0.5rem 1.2rem;
    color: rgba(255,255,255,.75);
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
    border-radius: 0;
}

.mf-dropdown-menu a:hover {
    background: rgba(255,255,255,.08);
    color: var(--white);
}

/* Nav CTA */
.mf-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    background: var(--accent);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.mf-nav-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* Mobile nav CTA (shown in mobile menu) */
.mf-nav-links-cta {
    display: none;
}

/* Mobile Toggle */
.mf-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mf-nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.mf-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mf-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mf-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Contact Bar (below navbar)
   ============================================ */
.mf-contact-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.6rem 0;
    margin-top: 52px;
}

.mf-contact-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}

.mf-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.mf-contact-item:hover {
    color: var(--accent);
}

.mf-contact-item svg {
    height: 18px;
    flex-shrink: 0;
}

.mf-contact-item .line-icon {
    fill: #06c755;
}

/* ============================================
   Page Content Area
   ============================================ */
.mf-content {
    min-height: 60vh;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* ============================================
   Footer
   ============================================ */
.mf-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 3.5rem 0 1.5rem;
    border-top: 3px solid var(--accent);
}

.mf-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.mf-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.mf-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mf-footer-brand-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
}

.mf-footer-brand-name img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mf-footer-brand p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

.mf-footer-socials {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.mf-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.mf-footer-social svg {
    height: 16px;
    fill: rgba(255,255,255,.7);
}

.mf-footer-social:hover {
    transform: translateY(-2px);
}

.mf-footer-social-line:hover {
    background: #06c755;
}

.mf-footer-social-line:hover svg {
    fill: var(--white);
}

.mf-footer-social-fb:hover {
    background: #1877f2;
}

.mf-footer-social-fb:hover svg {
    fill: var(--white);
}

.mf-footer-social-ig:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.mf-footer-social-ig:hover svg {
    fill: var(--white);
}

.mf-footer-links h4 {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.8rem;
    letter-spacing: 0.02em;
}

.mf-footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mf-footer-links a {
    display: block;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: var(--transition);
}

.mf-footer-links a:hover {
    color: var(--accent-light);
}

.mf-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mf-footer-bottom span {
    font-size: 0.82rem;
    color: rgba(255,255,255,.35);
}

.mf-footer-bottom-links {
    display: flex;
    gap: 1.2rem;
}

.mf-footer-bottom-links a {
    font-size: 0.82rem;
    color: rgba(255,255,255,.4);
    text-decoration: none;
    transition: var(--transition);
}

.mf-footer-bottom-links a:hover {
    color: rgba(255,255,255,.7);
}

/* ============================================
   Buttons (supplements Semantic UI)
   ============================================ */
.mf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}

.mf-btn-primary {
    background: var(--accent);
    color: var(--white);
}

.mf-btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 96, 106, .3);
}

.mf-btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--gray-300);
}

.mf-btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mf-btn-line {
    background: #06c755;
    color: var(--white);
}

.mf-btn-line:hover {
    background: #05b04b;
    transform: translateY(-2px);
}

/* ============================================
   Floating LINE Chat Button
   ============================================ */
.mf-float-line {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #06c755;
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(6, 199, 85, .35);
    transition: var(--transition);
    text-decoration: none;
    border: none;
    font-family: inherit;
    animation: mf-float-pulse 3s infinite;
}

.mf-float-line:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 25px rgba(6, 199, 85, .45);
}

.mf-float-line svg {
    height: 22px;
    fill: var(--white);
    flex-shrink: 0;
}

@keyframes mf-float-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(6, 199, 85, .35); }
    50% { box-shadow: 0 4px 30px rgba(6, 199, 85, .55); }
}

/* ============================================
   Info Box Enhancement (คำแนะนำ)
   ============================================ */
.mf-info-box {
    background: linear-gradient(135deg, #fdf8f4, #fff5f0);
    border: 1px solid #f0d4c8;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    position: relative;
    border-left: 4px solid var(--accent);
    color: #5a2a2a;
}

.mf-info-box b {
    color: var(--accent-dark);
    font-size: 1.05rem;
}

.mf-info-box ol, .mf-info-box ul {
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ============================================
   Product Card Enhancements
   ============================================ */
.ui.cards > .card,
.ui.card {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition) !important;
    border: 1px solid var(--gray-200) !important;
}

.ui.cards > .card:hover,
.ui.card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--accent-light) !important;
}

.ui.cards > .card > .content > .header,
.ui.card > .content > .header {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

.ui.cards > .card .ui.bottom.attached.button {
    background: var(--dark) !important;
    color: var(--white) !important;
    font-weight: 500 !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
    transition: var(--transition) !important;
    border: none !important;
}

.ui.cards > .card .ui.bottom.attached.button:hover {
    background: var(--accent) !important;
}

/* Category section titles */
h2.thai {
    position: relative;
    display: inline-block;
}

.ui.grid.container.center.aligned h2.thai::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent);
    margin: 0.4rem auto 0;
}

/* Featured product price styling */
.ui.five.stackable.cards .card .content span[style*="line-through"] {
    color: var(--gray-400) !important;
    font-size: 13px !important;
}

/* Green/Blue buttons in info box */
.ui.button.green {
    background: #06c755 !important;
    color: var(--white) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
}

.ui.button.green:hover {
    background: #05b04b !important;
    transform: translateY(-1px) !important;
}

.ui.button.blue {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
}

.ui.button.blue:hover {
    background: var(--primary-light) !important;
    transform: translateY(-1px) !important;
}

/* ============================================
   Category Navigation Pills
   ============================================ */
.mf-category-nav {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.mf-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.1rem;
    background: var(--white);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.mf-category-pill:hover,
.mf-category-pill.active {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

/* ============================================
   Section Enhancements
   ============================================ */
.mf-section-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
}

.mf-section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--accent);
    margin: 0.6rem auto 0;
}

/* ============================================
   FAQ Accordion
   ============================================ */
.ui.styled.fluid.accordion {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow) !important;
    border: 1px solid var(--gray-200) !important;
}

.ui.styled.accordion .title {
    padding: 1rem 1.25rem !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    color: var(--dark) !important;
    border-bottom: 1px solid var(--gray-200) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}

.ui.styled.accordion .title:hover {
    background: var(--gray-100) !important;
}

.ui.styled.accordion .title.active {
    background: var(--gray-100) !important;
    color: var(--accent) !important;
}

.ui.styled.accordion .title .dropdown.icon {
    transition: transform 0.2s ease !important;
}

.ui.styled.accordion .title.active .dropdown.icon {
    transform: rotate(90deg) !important;
}

.ui.styled.accordion .content {
    display: none;
    padding: 0.8rem 1.25rem 1rem !important;
    font-size: 0.92rem !important;
    line-height: 1.7 !important;
}

.ui.styled.accordion .content.active {
    display: block;
}

.ui.styled.accordion .content p {
    margin: 0;
}

.ui.styled.accordion .content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.ui.styled.accordion .content a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .mf-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* Navbar */
    .mf-nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.97);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.3rem;
        z-index: 999;
        padding: 1rem;
    }

    .mf-nav-links.active {
        display: flex;
    }

    .mf-nav-links a {
        font-size: 1.1rem;
        padding: 0.7rem 2rem;
    }

    .mf-nav-links-cta {
        display: list-item;
        list-style: none;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255,255,255,.15);
    }

    .mf-nav-links-cta .mf-nav-cta {
        padding: 0.7rem 2rem;
        font-size: 1rem;
    }

    /* Dropdown in mobile */
    .mf-dropdown-toggle {
        font-size: 1.1rem;
        padding: 0.7rem 2rem;
    }

    .mf-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(255,255,255,.05);
        border-radius: 8px;
        margin-top: 0.25rem;
    }

    .mf-dropdown.active .mf-dropdown-menu {
        display: block;
    }

    .mf-dropdown-menu a {
        padding: 0.4rem 2.5rem;
        font-size: 0.95rem;
    }

    .mf-nav-cta.desktop-only {
        display: none;
    }

    .mf-nav-toggle {
        display: flex;
        z-index: 1001;
    }

    /* Contact bar */
    .mf-contact-bar-inner {
        gap: 1.5rem;
    }

    .mf-contact-item {
        font-size: 0.85rem;
    }

    /* Footer */
    .mf-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mf-footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .mf-content {
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .mf-contact-bar-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
}
