/* ==============================================================
   BLOOMSHOP - HỆ THỐNG GIAO DIỆN & TỐI ƯU RESPONSIVE MỌI THIẾT BỊ
   Hỗ trợ: Điện thoại (< 576px), Tablet (576px - 991px), Desktop (>= 992px)
============================================================== */

:root {
    --bloom-primary: #a87768;
    --bloom-hover: #81594e;
    --bloom-dark: #604b41;
    --bloom-light: #faf7f5;
    --bloom-cream: #f5efe8;
    --bloom-accent: #c98d8d;
    --bloom-border: #ebdcd5;
}

/* 1. CSS CHUNG & SMOOTH SCROLL */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bloom-light);
    color: #4a3e3d;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--bloom-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--bloom-hover);
}

/* Tối ưu thanh cuộn trên cảm ứng cho bảng dữ liệu */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* 2. TOP BAR */
.top-bar {
    background-color: var(--bloom-cream);
    color: #71594a;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 3. NAVBAR */
.navbar {
    padding: 12px 0;
    border-bottom: 1px solid var(--bloom-border);
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.navbar-brand {
    font-size: 26px;
    font-weight: 800;
    color: var(--bloom-dark);
    letter-spacing: 0.5px;
}
.navbar-brand span {
    color: var(--bloom-accent);
}
.navbar-nav {
    gap: 8px;
}
.navbar-nav .nav-link {
    color: var(--bloom-dark);
    font-size: 15px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--bloom-primary);
    background-color: #fcf8f6;
}

/* Search bar header */
.header-search-form {
    max-width: 380px;
    width: 100%;
}

/* 4. BUTTONS & CONTROLS */
.hero-button, .btn-bloom {
    background-color: var(--bloom-primary);
    border-color: var(--bloom-primary);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.hero-button:hover, .btn-bloom:hover {
    background-color: var(--bloom-hover);
    border-color: var(--bloom-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(168, 119, 104, 0.25);
}
.btn-bloom-outline {
    border: 1px solid var(--bloom-primary);
    color: var(--bloom-primary);
    background: transparent;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.btn-bloom-outline:hover {
    background: var(--bloom-primary);
    color: #ffffff;
}

/* 5. HERO SECTION */
.hero-section {
    background-color: #f9f2ec;
    padding: 55px 0;
    border-bottom: 1px solid #eee4dc;
}
.hero-content {
    padding-right: 25px;
}
.hero-subtitle {
    color: #bd8a78;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 12px;
}
.hero-title {
    color: var(--bloom-dark);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
}
.hero-description {
    color: #777777;
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.7;
    margin-bottom: 25px;
}
.hero-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(100, 70, 60, 0.12);
}

/* 6. CARD SẢN PHẨM */
.product-card {
    transition: all 0.25s ease-in-out;
    border: 1px solid var(--bloom-border) !important;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(100, 70, 60, 0.12) !important;
    border-color: #d6b8ac !important;
}
.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.product-card:hover .product-image {
    transform: scale(1.03);
}
.product-title-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    font-size: 15px;
    line-height: 1.4;
}
.price-text {
    color: var(--bloom-primary);
    font-size: 16px;
    font-weight: 700;
}
.old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}
.badge-sale {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e63946;
    color: #fff;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
}

/* 7. TIẾN TRÌNH GIAO HÀNG (TIMELINE TRACKING) */
.tracking-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0;
    padding: 0;
}
.tracking-stepper::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #e2d9d2;
    z-index: 1;
}
.tracking-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.tracking-step .step-icon {
    width: 46px;
    height: 46px;
    line-height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #e2d9d2;
    color: #999;
    font-size: 18px;
    margin: 0 auto 10px;
    transition: 0.3s;
}
.tracking-step.active .step-icon {
    border-color: var(--bloom-primary);
    background: var(--bloom-primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(168, 119, 104, 0.2);
}
.tracking-step.completed .step-icon {
    border-color: #28a745;
    background: #28a745;
    color: #ffffff;
}
.tracking-step .step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--bloom-dark);
}

/* 8. HUY HIỆU KHÁCH HÀNG (TIER BADGES) */
.badge-tier {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-silver {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}
.badge-gold {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}
.badge-diamond {
    background: #e2f0fe;
    color: #0d6efd;
    border: 1px solid #b6d4fe;
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.25);
}

/* 9. ĐÁNH GIÁ SAO */
.star-rating {
    color: #f1b44c;
    font-size: 18px;
}
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
}
.rating-input input {
    display: none;
}
.rating-input label {
    font-size: 26px;
    color: #ccc;
    cursor: pointer;
    transition: 0.2s;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #f1b44c;
}

/* 10. THỐNG KÊ DOANH THU BIỂU ĐỒ THUẦN CSS */
.chart-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
.chart-bar-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 220px;
    padding-top: 25px;
    border-bottom: 2px solid #ddd;
    min-width: 520px;
}
.chart-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.chart-bar-fill {
    width: 100%;
    max-width: 45px;
    background: linear-gradient(180deg, #c98d8d 0%, var(--bloom-primary) 100%);
    border-radius: 5px 5px 0 0;
    transition: height 0.5s ease;
    position: relative;
}
.chart-bar-fill:hover {
    background: linear-gradient(180deg, #b06e6e 0%, var(--bloom-hover) 100%);
}
.chart-bar-label {
    font-size: 11px;
    margin-top: 8px;
    text-align: center;
    color: #666;
}
.chart-bar-val {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: bold;
    color: var(--bloom-dark);
    white-space: nowrap;
}

/* 11. FORM & FOOTER */
.auth-form, .form-page {
    max-width: 650px;
}
.site-footer {
    background-color: var(--bloom-cream);
    color: #71594a;
    border-top: 1px solid var(--bloom-border);
}

/* 12. BANNER CHUYỂN ĐỘNG TINH GỌN & CHUYÊN NGHIỆP (STUDIO HERO & MIDDLE CAROUSEL) */
.text-bloom-dark {
    color: var(--bloom-dark) !important;
}

/* Khung Hero Banner Tinh Gọn Cao Cấp */
.hero-banner-section {
    background-color: var(--bloom-light);
}
.hero-card-container {
    border-radius: 24px;
    border: 1px solid #ebdcd5;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(168, 119, 104, 0.08);
}
.hero-slide-wrapper {
    min-height: 440px;
    display: flex;
    align-items: center;
}
.slide-bg-rose {
    background: linear-gradient(135deg, #fdf8f6 0%, #fbf1ec 60%, #f7e6de 100%);
}
.slide-bg-tulip {
    background: linear-gradient(135deg, #fffdf8 0%, #fff7ea 60%, #fcedd8 100%);
}
.slide-bg-mixed {
    background: linear-gradient(135deg, #fcfafc 0%, #f7f1f7 60%, #eddfee 100%);
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #eccbc2;
    color: var(--bloom-primary);
    box-shadow: 0 2px 6px rgba(168, 119, 104, 0.08);
}
.hero-pill-badge.badge-tulip {
    border-color: #f7d794;
    color: #d35400;
}
.hero-pill-badge.badge-mixed {
    border-color: #d1b8dc;
    color: #6c3483;
}

.hero-display-title {
    font-size: clamp(26px, 3.8vw, 42px);
    font-weight: 800;
    line-height: 1.22;
    color: #43322b;
    margin-bottom: 14px;
}
.hero-gradient-text {
    background: linear-gradient(120deg, #a87768, #c98d8d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-gradient-text-orange {
    background: linear-gradient(120deg, #d35400, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-gradient-text-purple {
    background: linear-gradient(120deg, #6c3483, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead-desc {
    font-size: 14.5px;
    line-height: 1.65;
    color: #6a5a54;
    margin-bottom: 20px;
    max-width: 520px;
}
.highlight-item {
    font-size: 13px;
    font-weight: 600;
    color: #53433e;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-action-btn {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(168, 119, 104, 0.22);
}
.hero-action-btn:hover {
    transform: translateY(-2px);
}
.hero-outline-btn {
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13.5px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #d5c4bc;
    color: #43322b;
    transition: all 0.25s ease;
}
.hero-outline-btn:hover {
    background: #ffffff;
    border-color: #43322b;
    transform: translateY(-2px);
}

/* Thẻ hình ảnh hoa nghệ thuật & Floating Glass Tag */
.hero-media-card {
    position: relative;
    display: inline-block;
    max-width: 440px;
    width: 100%;
}
.hero-banner-photo {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(80, 45, 35, 0.12);
}
.glass-product-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.glass-tag-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #faf2ec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--bloom-primary);
    flex-shrink: 0;
}
.glass-tag-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #382924;
    line-height: 1.2;
}
.glass-tag-meta {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.glass-tag-price {
    font-weight: 700;
    color: var(--bloom-primary);
}
.glass-tag-rating {
    color: #7a6a64;
    font-size: 11.5px;
}

/* Nút điều hướng Carousel tinh gọn & thanh lịch */
.hero-carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    user-select: none;
}
.hero-arrow-btn {
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #43322b;
    font-size: 14px;
    transition: all 0.25s ease;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    outline: none;
}
.hero-arrow-btn i {
    pointer-events: none;
    transition: transform 0.2s ease;
}
.hero-arrow-btn:hover {
    background: var(--bloom-primary);
    color: #ffffff;
    transform: scale(1.08);
}
.hero-arrow-btn:active {
    transform: scale(0.92);
}
.hero-dash-indicators {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
}
.hero-dash-indicators button {
    width: 20px;
    height: 6px;
    border-radius: 6px;
    background: #d5c4bc;
    border: none;
    opacity: 0.65;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0;
    margin: 0;
    position: relative;
    outline: none;
}
/* Mở rộng vùng chạm / click để người dùng bấm vào thanh chuyển cực nhạy và chuẩn xác */
.hero-dash-indicators button::after {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -4px;
    right: -4px;
}
.hero-dash-indicators button:hover:not(.active) {
    opacity: 0.9;
    background: #b8a69e;
}
.hero-dash-indicators button.active {
    width: 38px;
    background: var(--bloom-primary);
    opacity: 1;
}

/* Banner Chuyển Động Giữa Các Hoa (Middle Moving Banner Slider) */
.middle-promo-slider {
    border-radius: 20px;
    border: 1px solid #ebdcd5;
}
.middle-slide-box {
    min-height: 200px;
}
.middle-gradient-ruby {
    background: linear-gradient(135deg, #a8473d 0%, #c46258 50%, #d35400 100%);
}
.middle-gradient-violet {
    background: linear-gradient(135deg, #6c3483 0%, #8e44ad 50%, #d35400 100%);
}
.middle-gradient-emerald {
    background: linear-gradient(135deg, #16a085 0%, #2c3e50 100%);
}
.middle-img-card {
    width: 100%;
    max-width: 220px;
    height: 150px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4757;
    display: inline-block;
    box-shadow: 0 0 6px #ff4757;
}

/* ==============================================================
   RESPONSIVE MEDIA QUERIES (TABLET & MOBILE)
============================================================== */

/* Màn hình Tablet & Dưới (<= 991px) */
@media (max-width: 991px) {
    .hero-slide-wrapper {
        min-height: auto;
    }
    .hero-slide-text {
        text-align: center;
    }
    .hero-highlights {
        justify-content: center;
    }
    .hero-slide-text .d-flex {
        justify-content: center;
    }
    .hero-banner-photo {
        height: 280px;
    }
    .hero-carousel-controls {
        position: static;
        transform: none;
        margin: 15px auto 5px;
        width: fit-content;
    }
    .middle-img-card {
        max-width: 160px;
        height: 120px;
    }
    .header-search-form {
        max-width: 100%;
        margin: 12px 0 !important;
    }
    .navbar-nav {
        padding-top: 10px;
    }
    .navbar-nav .nav-link {
        padding: 8px 12px;
    }
    .sticky-top {
        position: static !important;
    }
}

/* Màn hình Điện thoại (<= 767px) */
@media (max-width: 767px) {
    .hero-section {
        padding: 35px 0;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 25px;
        text-align: center;
    }
    .hero-image img, .hero-slide-img {
        height: 240px;
    }
    .middle-slide-1, .middle-slide-2, .middle-slide-3 {
        min-height: 180px;
    }
    .tracking-stepper::before {
        display: none;
    }
    .tracking-stepper {
        flex-direction: column;
        gap: 15px;
    }
    .tracking-step {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
    }
    .tracking-step .step-icon {
        margin: 0;
        flex-shrink: 0;
    }

    /* Đổi hiển thị card sản phẩm trên mobile */
    .product-image {
        height: 165px;
    }
    .product-title-link {
        font-size: 13px;
        min-height: 36px;
    }
    .price-text {
        font-size: 14px;
    }
}

/* Màn hình Điện thoại nhỏ (<= 576px) */
@media (max-width: 576px) {
    .top-bar {
        font-size: 11px;
        padding: 6px 8px;
        justify-content: center !important;
        text-align: center;
        gap: 4px;
    }
    .top-bar span {
        width: 100%;
        text-align: center;
    }
    .navbar-brand {
        font-size: 22px;
    }
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .card {
        border-radius: 10px;
    }
}

/* ===== FIX FOOTER BLOOMSHOP ===== */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nội dung chính chiếm khoảng trống còn lại */
.site-main {
    flex: 1 0 auto;
    width: 100%;
}

/* Footer luôn ở cuối trang */
.site-footer {
    flex-shrink: 0;
    margin-top: auto !important;
}


/* ===== BLOOMSHOP FOOTER ===== */

.bloom-footer {
    background: #f5eee9;
    color: #604b41;
    border-top: 1px solid #e8d8d0;
    font-size: 14px;
}

.footer-brand {
    font-size: 27px;
    font-weight: 800;
    color: #604b41;
}

.footer-brand span {
    color: #c98d8d;
}

.footer-description {
    line-height: 1.8;
    color: #78665f;
}

.footer-heading {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 22px;
    color: #604b41;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 13px;
}

.footer-links a,
.footer-contact-item a {
    color: #78665f;
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact-item a:hover,
.footer-map-link:hover {
    color: #a87768;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #a87768;
    border: 1px solid #e8d8d0;
    border-radius: 50%;
    font-size: 18px;
    transition: 0.2s;
}

.footer-social a:hover {
    background: #a87768;
    color: #fff;
    transform: translateY(-3px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: #78665f;
    overflow-wrap: anywhere;
}

.footer-contact-item i {
    color: #a87768;
    font-size: 17px;
}

.footer-map {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8d8d0;
    background: #fff;
}

.footer-map iframe {
    display: block;
    width: 100%;
}

.footer-map-link {
    display: inline-block;
    margin-top: 12px;
    color: #a87768;
    font-weight: 600;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #e4d5cc;
    color: #78665f;
}

@media (max-width: 767px) {
    .bloom-footer .row {
        row-gap: 28px;
    }

    .footer-heading {
        margin-bottom: 14px;
    }

    .footer-map iframe {
        height: 200px;
    }
}
/* Nhãn nhỏ phía trên banner khuyến mãi */
.middle-promo-slider .promo-label {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}
