/* ==========================================================================
   FlowerStore – Main stylesheet
   Modern Florist & Nature 2025–2026
   Heading: Playfair Display | Body: Inter
   ========================================================================== */

:root {
    --color-heading: #2B2B2B;
    --color-text: #555555;
    --color-link: #c84567;
    --color-link-hover: #9c3450;
    --color-bg: #FFFFFF;
    --color-soft: #FDF5F7;
    --color-border: #F1DDE3;
    --color-cta: #c84567;
    --color-cta-hover: #9c3450;
    --color-accent: #f8c8d4;

    --font-heading: "Playfair Display", "Cormorant Garamond", Georgia, serif;
    --font-body: "Inter", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --radius: 8px;
    --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.06);
    --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    letter-spacing: 0;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 0 0 .6em;
}

h1 { font-size: clamp(32px, 5vw, 60px); }
h2 { font-size: clamp(26px, 4vw, 42px); }
h3 { font-size: clamp(22px, 3vw, 32px); }
h4 { font-size: clamp(20px, 2.4vw, 24px); }
p  { font-size: clamp(16px, 1.1vw, 18px); margin: 0 0 1em; }
small, .caption { font-size: 14px; }

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--color-link-hover); }

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

/* Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.section-title {
    text-align: center;
    margin-bottom: 48px;
}
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--color-text); max-width: 640px; margin: 0 auto; }

/* CTA button */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .3px;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: var(--radius);
    background: var(--color-cta);
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
    box-shadow: var(--shadow-soft);
}
.btn:hover { background: var(--color-cta-hover); transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    color: var(--color-cta) !important;
    border: 2px solid var(--color-cta);
    box-shadow: none;
}
.btn-ghost:hover { background: var(--color-cta); color: #fff !important; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    position: relative;
}
.site-logo a {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
}
.site-logo img,
.site-logo-img { max-height: 56px; width: auto; display: block; }

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 28px;
}
.primary-menu a {
    color: var(--color-heading);
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.primary-menu a:hover { color: var(--color-link); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-hotline {
    font-weight: 600;
    color: var(--color-heading);
    font-size: 15px;
}
.header-hotline span { color: var(--color-link); }

/* Tap-to-call icon button — visible only on mobile */
.header-call {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 999px;
    background: #FDF5F7;
    color: var(--color-cta);
    border: 1.5px solid #F1DDE3;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.header-call:hover { background: var(--color-cta); color: #fff !important; border-color: var(--color-cta); }
.header-call:active { transform: scale(.95); }

.header-cta-short { display: none; }

/* Animated hamburger – flexbox-centered for pixel-perfect alignment */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color .2s ease;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
}
.menu-toggle:hover { border-color: var(--color-cta); }
.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-heading);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
    transform-origin: center;
}
.menu-toggle.open { border-color: var(--color-cta); }
.menu-toggle.open span { background: var(--color-cta); }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   BANNER
   ========================================================================== */
.banner {
    position: relative;
    min-height: 580px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #FDF5F7 0%, #F8C8D4 100%);
    overflow: hidden;
}
.banner::before {
    content: "";
    position: absolute; inset: 0;
    background-image: var(--banner-bg);
    background-size: cover;
    background-position: center;
    opacity: .55;
}
/* Ảnh custom được upload → hiện đậm hơn, có overlay tăng contrast cho chữ */
.banner.banner-has-custom::before { opacity: 1; }
.banner.banner-has-custom::after {
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
}
.banner.banner-overlay-light::after { background: rgba(253, 245, 247, 0.6); }
.banner.banner-overlay-dark::after  { background: rgba(0, 0, 0, 0.45); }
.banner.banner-overlay-none::after  { display: none; }

.banner.banner-overlay-dark h1,
.banner.banner-overlay-dark .banner-offer { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.4); }

.banner-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 20px;
}
.banner h1 {
    color: var(--color-heading);
    margin-bottom: 16px;
}
.banner .banner-offer {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 28px;
    color: var(--color-heading);
}

/* ==========================================================================
   CATEGORIES (as filter buttons)
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1 / 1.1;
    box-shadow: var(--shadow-card);
    transition: transform .3s ease, box-shadow .3s ease;
    /* button reset */
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    display: block;
    width: 100%;
}
.category-card:hover { transform: translateY(-4px); }
.category-card img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.category-card:hover img { transform: scale(1.05); }
.category-card .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    transition: background .25s ease;
}
.category-card h3 {
    color: #fff;
    margin: 0;
    font-size: 22px;
}
.category-card.active {
    outline: 3px solid var(--color-cta);
    outline-offset: 3px;
    transform: translateY(-3px);
}
.category-card.active .overlay {
    background: linear-gradient(180deg, rgba(200,69,103,.15) 0%, rgba(200,69,103,.85) 100%);
}

/* Filter info bar */
.flower-filter-info,
.flower-grid {
    scroll-margin-top: 100px; /* tránh bị sticky header che khi scrollIntoView */
}

.flower-filter-info {
    margin: 36px 0 8px;
    padding: 14px 20px;
    background: var(--color-soft);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 15px;
    color: var(--color-heading);
    flex-wrap: wrap;
}
.flower-filter-info strong { color: var(--color-cta); font-weight: 700; }
.flower-filter-clear {
    background: transparent;
    border: 1.5px solid transparent;
    color: var(--color-cta);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    font-family: inherit;
}
.flower-filter-clear:hover {
    background: var(--color-cta);
    color: #fff;
    border-color: var(--color-cta);
}

/* Product grid */
.flower-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.flower-product {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease;
    animation: fs-fade-in .3s ease;
}
.flower-product:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.flower-product-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-soft);
}
.flower-product-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.flower-product:hover .flower-product-thumb img { transform: scale(1.06); }
.flower-product-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.flower-product-title {
    font-size: 19px;
    margin: 0;
    line-height: 1.3;
}
.flower-product-desc {
    color: var(--color-text);
    font-size: 14px;
    margin: 0;
    flex: 1;
    line-height: 1.55;
}
.flower-product-price {
    font-weight: 700;
    font-size: 20px;
    color: var(--color-cta);
    font-family: var(--font-heading);
    letter-spacing: -0.3px;
}
.flower-product-cta {
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
    padding: 10px 14px;
}
.flower-empty {
    text-align: center;
    padding: 32px;
    color: var(--color-text);
    margin-top: 16px;
    background: var(--color-soft);
    border-radius: var(--radius);
}

@keyframes fs-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pagination */
.flower-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.flower-page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.flower-page-btn,
.flower-page-num {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--color-border);
    background: #fff;
    color: var(--color-heading);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.flower-page-btn:hover:not(:disabled),
.flower-page-num:hover:not(.active) {
    background: var(--color-soft);
    border-color: var(--color-cta);
    color: var(--color-cta);
}
.flower-page-btn:active,
.flower-page-num:active { transform: scale(.96); }
.flower-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.flower-page-num.active {
    background: var(--color-cta);
    border-color: var(--color-cta);
    color: #fff;
    cursor: default;
}
.flower-page-ellipsis {
    color: var(--color-text);
    padding: 0 4px;
    user-select: none;
}
.flower-page-btn {
    font-size: 22px;
    line-height: 1;
    padding: 0;
    font-weight: 400;
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

/* ==========================================================================
   BLOG
   ========================================================================== */
.section-blog { background: var(--color-soft); }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.blog-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.blog-card img { aspect-ratio: 16/10; object-fit: cover; }
.blog-card .body { padding: 22px; }
.blog-card h3 { font-size: 22px; margin-bottom: 8px; }
.blog-card h3 a { color: var(--color-heading); }
.blog-card h3 a:hover { color: var(--color-link); }
.blog-card .meta { font-size: 13px; color: #888; margin-bottom: 8px; }
.blog-card p { font-size: 15px; margin: 0; }
.blog-card-cta {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 18px;
    font-size: 14px;
}

/* Nút "Xem tất cả bài viết" trên trang chủ */
.blog-see-more {
    text-align: center;
    margin-top: 40px;
}
.blog-see-more .btn { font-size: 15px; }

/* Pagination dùng cho page-blog.php (paginate_links() từ WP core) */
.flower-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--color-border);
    background: #fff;
    color: var(--color-heading);
    font-size: 15px;
    font-weight: 500;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.flower-pagination .page-numbers:hover {
    background: var(--color-soft);
    border-color: var(--color-cta);
    color: var(--color-cta);
}
.flower-pagination .page-numbers.current {
    background: var(--color-cta);
    border-color: var(--color-cta);
    color: #fff;
}
.flower-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--color-text);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.contact-info li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 16px;
}
.contact-info li strong { color: var(--color-heading); margin-right: 8px; }
.contact-form {
    background: var(--color-soft);
    padding: 32px;
    border-radius: var(--radius);
}
.contact-form label { display: block; font-weight: 500; color: var(--color-heading); margin: 12px 0 6px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 15px;
    background: #fff;
    transition: border-color .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-cta);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button { width: 100%; margin-top: 18px; }

.fs-notice {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 15px;
    border: 1.5px solid transparent;
}
.fs-notice-ok  { background: #E8F5E9; color: #1B5E20; border-color: #A5D6A7; }
.fs-notice-err { background: #FDE8EC; color: #9c3450; border-color: #F1C3CD; }

/* ==========================================================================
   FLOATING ACTIONS (góc trái dưới: Gọi, Zalo, Facebook)
   ========================================================================== */
.fs-floating-actions {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.fs-fab {
    position: relative;
    width: 54px; height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fs-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    color: #fff !important;
}
.fs-fab:active { transform: scale(.96); }
.fs-fab svg {
    width: 26px;
    height: 26px;
    display: block;
}
.fs-fab-zalo svg     { width: 40px; height: 40px; }
.fs-fab-facebook svg { width: 30px; height: 30px; }

.fs-fab-call     { background: #c84567; }
.fs-fab-zalo     { background: #0068FF; }
.fs-fab-facebook { background: #1877F2; }

/* Hiệu ứng nhịp đập trên nút Gọi */
.fs-fab-call::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #c84567;
    z-index: -1;
    animation: fs-fab-pulse 2s ease-out infinite;
}
@keyframes fs-fab-pulse {
    0%   { transform: scale(1);   opacity: .55; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* Tooltip ở phải nút */
.fs-fab::after {
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: #2B2B2B;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.fs-fab:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
    .fs-floating-actions { bottom: 16px; left: 14px; gap: 10px; }
    .fs-fab { width: 48px; height: 48px; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
    .fs-fab svg { width: 22px; height: 22px; }
    .fs-fab-zalo svg     { width: 34px; height: 34px; }
    .fs-fab-facebook svg { width: 26px; height: 26px; }
    .fs-fab::after { display: none; }
}

.map-embed {
    margin-top: 24px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--color-border);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #2B2B2B;
    color: #cfcfcf;
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.site-footer h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 18px;
}
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 6px 0; font-size: 15px; }
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #999;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .flower-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }

    /* Header layout */
    .header-inner { padding: 10px 0; gap: 8px; }
    .container { padding: 0 16px; }
    .site-logo a { font-size: 22px; }
    .site-logo img,
    .site-logo-img { max-height: 42px; }

    .header-hotline { display: none; }
    .header-call    { display: inline-flex; }

    .header-actions { gap: 8px; }
    .header-cta {
        padding: 10px 16px;
        font-size: 13px;
        letter-spacing: .2px;
    }
    .menu-toggle { display: inline-flex; }

    /* Slide-down mobile menu */
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
        z-index: 99;
    }
    .primary-nav.open { max-height: 80vh; overflow-y: auto; }
    .primary-menu {
        flex-direction: column;
        gap: 0;
        padding: 8px 20px 16px;
    }
    .primary-menu li {
        padding: 0;
        border-bottom: 1px solid var(--color-border);
    }
    .primary-menu li:last-child { border-bottom: 0; }
    .primary-menu a {
        display: block;
        padding: 14px 0;
        font-size: 15px;
    }

    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .flower-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .flower-filter-info,
    .flower-grid { scroll-margin-top: 76px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: 1fr; }
    .flower-product-body { padding: 14px; }
    .flower-product-title { font-size: 16px; }
    .flower-product-price { font-size: 17px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .banner { min-height: 460px; }
}

@media (max-width: 420px) {
    .header-cta-full { display: none; }
    .header-cta-short { display: inline; }
    .header-cta { padding: 10px 12px; }
    .header-actions { gap: 6px; }
    .site-logo a { font-size: 20px; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
