@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background-color: #f8f9fa; color: #1f2937; }

/* Ghi đè màu cũ bằng màu Nông nghiệp hiện đại */
.bg-tgdd-yellow { background-color: #ffffff; }
.bg-tgdd-black { background-color: #ffffff; border-bottom: 1px solid #f3f4f6; }
.text-tgdd-red { color: #ef4444 !important; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* Ẩn mũi tên lên xuống của thẻ input number */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* --- PRODUCT CARD: Premium E-commerce --- */
.product-card { 
    background: #fff; 
    border: 1px solid #f0fdf4; 
    border-radius: 16px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.product-card:hover { 
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.1), 0 8px 10px -6px rgba(16, 185, 129, 0.05); 
    border-color: #6ee7b7; 
    z-index: 10; 
    transform: translateY(-4px); 
}

/* Hiệu ứng bay vào giỏ hàng */
.flying-img {
    position: fixed;
    z-index: 9999;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    pointer-events: none;
    object-fit: cover;
    transform-origin: center;
}

/* Label giảm giá bo góc, gradient */
.discount-label { 
    background: linear-gradient(135deg, #ef4444, #f97316); 
    color: #fff; 
    font-size: 11px; 
    padding: 3px 8px; 
    border-radius: 12px 0 12px 0; 
    display: inline-block; 
    font-weight: 800; 
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* --- SHIMMER BUTTON EFFECT (Shopee CTA) --- */
.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shimmer 2.5s infinite;
}
@keyframes shimmer { 0% { left: -100%; } 100% { left: 200%; } }

/* Menu ngang dạng Pills */
.menu-scroll { 
    overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; 
    padding: 12px 4px; display: flex; gap: 10px;
}
.menu-scroll a { 
    display: inline-flex; align-items: center; padding: 8px 18px; 
    background: #f3f4f6; color: #4b5563; font-size: 13px; font-weight: 700; 
    border-radius: 20px; text-decoration: none; transition: all 0.2s; border: 1px solid transparent;
}
.menu-scroll a:hover, .menu-scroll a:active { background: #ecfdf5; color: #059669; border-color: #34d399; }

/* Pulse quà tặng */
@keyframes pulse-gift { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.15) rotate(5deg); } }
.animate-pulse-gift { animation: pulse-gift 2s infinite ease-in-out; }

/* Marquee siêu mượt */
.marquee-container { overflow: hidden; white-space: nowrap; width: 100%; }
.marquee-content { display: inline-block; animation: marquee 25s linear infinite; padding-right: 100%; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* --- SOCIAL PROOF TOAST (Glassmorphism + Smooth Slide) --- */
.social-proof-toast {
    position: fixed; bottom: 90px; left: 16px; z-index: 45;
    width: calc(100vw - 90px); max-width: 340px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 100px !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    transform: translateY(150px) scale(0.9); opacity: 0; 
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    padding: 6px 16px 6px 6px !important;
}
.social-proof-toast.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.social-proof-toast img { border-radius: 50% !important; }
.social-proof-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    flex: 0 0 auto;
    transition: all 0.2s ease;
}
.social-proof-close:hover {
    color: #ef4444;
    background: #fff1f2;
    border-color: #fecdd3;
}
@media (min-width: 768px) { .social-proof-toast { bottom: 24px; left: 24px; width: 340px; } }

/* Rung giỏ hàng */
@keyframes shake-cart {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.2); color: #10b981 !important; }
    50% { transform: rotate(15deg) scale(1.2); color: #10b981 !important; }
    75% { transform: rotate(-15deg) scale(1.2); color: #10b981 !important; }
}
.animate-shake-cart { animation: shake-cart 0.5s ease-in-out; }

/* Blinking dot for live trust indicators */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.animate-blink { animation: blink 1.5s infinite ease-in-out; }

/* --- UI/UX refresh: VTNN storefront --- */
body {
    background:
        radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.08), transparent 28rem),
        linear-gradient(180deg, #f6fbf7 0%, #f8fafc 44%, #ffffff 100%);
}

header {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

#search-input {
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.06), 0 8px 20px rgba(16, 185, 129, 0.08);
}

#ui_main_banner_bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.22), transparent 14rem),
        linear-gradient(135deg, rgba(4, 120, 87, 0.15), rgba(20, 184, 166, 0.1));
    pointer-events: none;
}

.trust-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 185, 129, 0.14);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    color: #065f46;
    font-weight: 800;
    font-size: 13px;
}
.trust-card i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    font-size: 17px;
    flex: 0 0 auto;
}

.dynamic-trust-stats {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.dynamic-trust-stats.hidden { display: none; }
.dynamic-trust-stats div {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(16, 185, 129, 0.14);
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.dynamic-trust-stats strong {
    color: #047857;
    font-size: 19px;
    font-weight: 950;
}

.section-heading,
#top-selling-section > .flex,
#season-combo-section > .flex,
#blog-section > .flex {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.section-heading h2,
#top-selling-section h2,
#season-combo-section h2,
#blog-section h2,
#category-title {
    font-size: clamp(18px, 2vw, 24px);
    letter-spacing: 0;
    text-transform: none;
}

.product-filter-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(10px);
}
.product-filter-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    align-items: end;
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.filter-field span {
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.filter-field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    padding: 0 34px 0 12px;
    outline: none;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-field select:hover {
    border-color: #6ee7b7;
    background: #ffffff;
}
.filter-field select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    background: #ffffff;
}
.filter-field-sort select {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #047857;
}
.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
    transition: all 0.2s ease;
}
.filter-reset-btn:hover {
    color: #047857;
    border-color: #86efac;
    background: #f0fdf4;
}

@media (min-width: 1024px) {
    .product-filter-panel {
        position: sticky;
        top: 116px;
        z-index: 32;
    }
}

.product-card-v2 {
    border-radius: 18px;
    border-color: rgba(16, 185, 129, 0.13);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.product-card-v2:hover .product-image-wrap img {
    transform: scale(1.06);
}
.product-image-wrap {
    background:
        linear-gradient(180deg, #f8fafc 0%, #ffffff 72%),
        radial-gradient(circle at center, rgba(16, 185, 129, 0.08), transparent 70%);
}
.badge-hot,
.badge-new,
.badge-sale,
.badge-bio {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}
.badge-hot { background: linear-gradient(135deg, #ef4444, #f97316); }
.badge-new { background: linear-gradient(135deg, #059669, #14b8a6); }
.badge-sale { background: linear-gradient(135deg, #dc2626, #fb7185); animation: soft-pulse 2.4s infinite; }
.badge-bio { background: linear-gradient(135deg, #16a34a, #65a30d); }
@keyframes soft-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.mobile-nav-item {
    min-width: 20%;
    height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item:active {
    transform: translateY(1px);
    color: #059669;
}

.detail-proof-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2f7ec;
    background: #f7fefb;
    border-radius: 14px;
    padding: 10px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}
.detail-proof-card i {
    font-size: 15px;
    flex: 0 0 auto;
}
.detail-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.detail-accordion summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}
.detail-accordion summary::-webkit-details-marker { display: none; }
.detail-accordion summary span {
    display: flex;
    align-items: center;
    gap: 9px;
}
.detail-accordion summary i:first-child { color: #059669; }
.detail-accordion[open] summary .fa-chevron-down { transform: rotate(180deg); }
.detail-accordion-body {
    border-top: 1px solid #eef2f7;
    padding: 12px 14px 14px;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
}
.detail-accordion-body p + p { margin-top: 6px; }

@media (max-width: 767px) {
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    header .max-w-\[1200px\] {
        height: auto;
        min-height: 64px;
        padding-top: 8px;
        padding-bottom: 8px;
        align-items: center;
    }
    #search-input {
        height: 42px;
        font-size: 13px;
        padding-left: 14px;
    }
    .menu-scroll {
        padding: 8px 10px;
        gap: 8px;
    }
    .menu-scroll a {
        padding: 8px 12px;
        font-size: 12px;
    }
    .product-filter-panel {
        border-radius: 18px;
        padding: 12px;
    }
    .product-filter-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .filter-field-wide,
    .filter-field-sort {
        grid-column: 1 / -1;
    }
    .filter-field span {
        font-size: 10px;
    }
    .filter-field select {
        min-height: 40px;
        border-radius: 12px;
        font-size: 12px;
        padding-left: 10px;
    }
    .filter-reset-btn {
        min-height: 34px;
        padding: 0 10px;
        font-size: 11px;
    }
    #ui_main_banner_bg {
        border-radius: 20px;
        min-height: 240px;
        padding: 22px;
    }
    .trust-card {
        min-height: 62px;
        padding: 10px;
        border-radius: 16px;
        font-size: 12px;
    }
    .trust-card i {
        width: 32px;
        height: 32px;
        border-radius: 12px;
        font-size: 14px;
    }
    .dynamic-trust-stats {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .dynamic-trust-stats div {
        justify-content: flex-start;
        padding: 0 12px;
        min-height: 38px;
        font-size: 11px;
    }
    .dynamic-trust-stats strong { font-size: 17px; }
    .product-card {
        border-radius: 15px;
    }
    .product-card:hover {
        transform: none;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }
    .badge-hot,
    .badge-new,
    .badge-sale,
    .badge-bio {
        height: 19px;
        padding: 0 6px;
        font-size: 9px;
    }
    #product-detail-content {
        height: 94vh;
        border-radius: 24px 24px 0 0;
    }
    #product-detail-content > .p-4.border-t {
        position: sticky;
        bottom: 0;
        z-index: 5;
    }
    .detail-proof-card {
        align-items: flex-start;
        font-size: 11px;
        padding: 9px;
    }
}
