@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body { 
    font-family: 'Poppins', sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

/* Ẩn Scrollbar nhưng vẫn cuộn được */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Custom Inputs */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}
.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

[x-cloak] { display: none !important; }

/* Tỉ lệ khung ảnh 16:9 chuẩn */
.aspect-w-16 { position: relative; padding-bottom: 56.25%; }
.aspect-w-16 > img { position: absolute; height: 100%; width: 100%; top: 0; left: 0; right: 0; bottom: 0; object-fit: cover; }

/* Cắt dòng văn bản */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* --- ANIMATION MỚI --- */

/* 1. Fade In Up (Dùng cho chuyển trang mượt mà) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* 2. Hiệu ứng nảy khi thêm vào giỏ hàng */
@keyframes cartBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.cart-anim {
    animation: cartBounce 0.5s ease-in-out;
}

/* 3. Toast Notification Chuyên nghiệp (Trượt từ phải sang) */
.toast-enter {
    transform: translateX(100%);
    opacity: 0;
}
.toast-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.toast-leave {
    transform: translateX(0);
    opacity: 1;
}
.toast-leave-active {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Scrollbar đẹp cho danh sách đơn hàng/giỏ hàng */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* Footer Code Block Styles */
.code-block-footer {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid #e5e5e5;
}

.window-controls-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -16px -16px 12px -16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #e5e5e5;
}

.control-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.control-dot:nth-child(1) { background: #ff5f56; }
.control-dot:nth-child(2) { background: #ffbd2e; }
.control-dot:nth-child(3) { background: #27c93f; }

.language-tag-footer {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 5px;
    color: #555;
    background: #e9ecef;
    font-weight: 600;
}

.code-content-footer {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    min-height: 150px;
    height: 150px;
    overflow: hidden;
}

/* Syntax colors for footer */
.keyword-footer { color: #0066cc; }
.string-footer { color: #c7254e; }
.comment-footer { color: #6a9955; }
.highlight-footer { color: #27c93f; font-weight: 700; }

.cursor-footer {
    display: inline-block;
    width: 7px;
    height: 16px;
    background: #333333;
    margin-left: 2px;
    animation: blink-footer .8s infinite;
}

@keyframes blink-footer {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}



/* --- PRODUCT DESCRIPTION STYLES (UPDATED) --- */
.product-content {
    /* XÓA DÒNG white-space: pre-wrap; ĐI */
    
    /* Chỉ giữ lại các thuộc tính bẻ dòng để xử lý URL dài */
    word-break: break-word; 
    overflow-wrap: break-word;
    
    /* Đảm bảo nội dung không bao giờ tràn ra ngoài khung */
    width: 100%;
    max-width: 100%;
}

/* Các style bên dưới giữ nguyên để HTML đẹp */
.product-content ul { list-style-type: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.product-content ol { list-style-type: decimal; padding-left: 1.25rem; margin-bottom: 1rem; }
.product-content li { margin-bottom: 0.25rem; }
.product-content p { margin-bottom: 0.75rem; }
.product-content h3 { font-weight: 700; font-size: 1.1em; margin-top: 1.5rem; margin-bottom: 0.5rem; color: #1f2937; }
.product-content a { color: #2563eb; text-decoration: underline; }

/* --- BỔ SUNG: ẨN THANH CUỘN TOÀN TRANG (SAFE MODE) --- */

/* 1. Ẩn thanh cuộn cho Chrome, Safari và Opera */
html::-webkit-scrollbar, 
body::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
}

/* 2. Ẩn thanh cuộn cho IE, Edge và Firefox */
html, body, .no-scrollbar {
    -ms-overflow-style: none !important;  /* IE và Edge cũ */
    scrollbar-width: none !important;  /* Firefox */
}

/* 3. Đảm bảo hành vi cuộn vẫn mượt mà */
html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Chặn cuộn ngang để tránh vỡ layout */
}