/*
   SITE.CSS - CSS thuần còn lại của trang người dùng (giao diện trang đã dùng Tailwind hết):
   nội dung soạn bằng trình soạn thảo (.ck-content), thanh cuộn, báo lỗi form (validate),
   thẻ sản phẩm chèn trong bài viết (.product-shortcode-card - Helpers/ShortcodeHelper).
   Các phần này là HTML do admin nhập / do code sinh ra nên không gắn class Tailwind được.
*/

:root {
    --bg-card: #ffffff;
    --text-main: #1a202c;
    --border-color: #e2e8f0;
}


/* Container bọc nội dung CKEditor */
.ck-content {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    color: var(--text-main) !important;
    word-wrap: break-word !important;
}

/* Heading styles - Flat & Clean */
.ck-content h1 {
    font-size: 1.08rem !important;
    font-weight: 700 !important;
    margin: 0.4rem 0;
    color: #000 !important;
    letter-spacing: -0.3px !important;
}

.ck-content h2 {
    font-size: 1.02rem !important;
    font-weight: 600 !important;
    margin: 0.4rem 0;
    color: #000 !important;
    letter-spacing: -0.3px !important;
}

.ck-content h3 {
    font-size: 0.96rem !important;
    font-weight: 650 !important;
    margin: 0.35rem 0;
    letter-spacing: -0.3px !important;
}

.ck-content h4 {
    font-size: 0.9rem !important;
    font-weight: 650 !important;
    margin: 0.35rem 0;
    letter-spacing: -0.3px !important;
}

@media (min-width: 768px) {
    .ck-content h1 {
        font-size: 1.22rem !important;
        margin: 0.5rem 0;
    }

    .ck-content h2 {
        font-size: 1.12rem !important;
        margin: 0.45rem 0;
    }

    .ck-content h3 {
        font-size: 1.05rem !important;
        margin: 0.4rem 0;
    }

    .ck-content h4 {
        font-size: 0.98rem !important;
        margin: 0.35rem 0;
    }
}

/* Paragraphs */
.ck-content p {
    font-size: 15px !important;
    margin-bottom: 0.8rem !important;
    text-align: justify !important;
    letter-spacing: -0.2px !important;
}

/* Lists */
.ck-content ul,
.ck-content ol {
    margin-bottom: 1rem !important;
    padding-left: 1.5rem !important;
}

.ck-content ul {
    list-style-type: disc !important;
}

.ck-content ol {
    list-style-type: decimal !important;
}

.ck-content li,
.ck-content ol {
    font-size: 15px !important;
    margin-bottom: 0.2rem !important;
    letter-spacing: -0.2px !important;
}

/* Images - Flat with subtle border */
.ck-content .image {
    margin: 1.5rem 0 !important;
}

.ck-content .image img {
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Tables - Minimalist Grey Header */
.ck-content figure.table {
    width: 100% !important;
    margin: 1rem 0 !important;
}

.ck-content table {
    width: 100% !important;
    min-width: 100% !important;
    border-collapse: collapse !important;
    background-color: var(--bg-card) !important;
    margin-bottom: 10px;
}

.ck-content table td,
.ck-content table th {
    padding: 6px 10px !important;
    border: 1px solid var(--border-color) !important;
    font-size: 15.4px;
    letter-spacing: -0.2px !important;
}

.ck-content table th {
    background-color: #f1f5f9 !important;
    font-weight: 600 !important;
    text-align: left !important;
    color: #475569 !important;
}

/* Blockquotes - Soft Gray */
.ck-content blockquote {
    padding: 0.5rem !important;
    border-left: 3px solid #008da5 !important;
    background-color: #e3f2f8 !important;
    font-style: inherit !important;
    color: #2c2c2c !important;
}

/* Links */
.ck-content a {
    color: #008da5 !important;
}

.ck-content a:hover {
    color: #008da5 !important;
}

/* Custom Slim Scrollbar for Webkit Browsers (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

/* Firefox scrollbar support */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Custom Input Validation Error Styles */
.input-validation-error {
    border-bottom-color: #ef4444 !important;
}

.field-validation-error {
    font-size: 14px;
    color: #ef4444;
    display: block;
    margin-top: 4px;
}

/* ==========================================================
   PRODUCT SHORTCODE CARD OVERRIDES
   ========================================================== */
.ck-content .product-shortcode-card,
.product-shortcode-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: fit-content !important;
    max-width: 500px !important;
    margin: 1rem 0 !important;
    padding: 0 !important;
    border-radius: 5px !important;
    background-color: #ffffff !important;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgb(209, 213, 219) 0px 0px 0px 1px inset;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.ck-content .product-shortcode-card a,
.product-shortcode-card a {
    border-bottom: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.ck-content .product-shortcode-card .product-thumb-link,
.product-shortcode-card .product-thumb-link {
    width: 115px !important;
    min-width: 115px !important;
    max-width: 115px !important;
    min-height: 115px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: block !important;
    align-self: stretch !important;
}

.ck-content .product-shortcode-card .product-thumb-link img,
.product-shortcode-card .product-thumb-link img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.ck-content .product-shortcode-card .product-info-wrap,
.product-shortcode-card .product-info-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 4px !important;
}

.ck-content .product-shortcode-card a.product-title,
.product-shortcode-card a.product-title {
    color: #0f172a !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
}


.ck-content .product-shortcode-card .product-price-rating-wrap,
.product-shortcode-card .product-price-rating-wrap {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
}

.ck-content .product-shortcode-card .product-price-wrap,
.product-shortcode-card .product-price-wrap {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
}

.ck-content .product-shortcode-card .price-current,
.product-shortcode-card .price-current {
    color: #ee4d2d !important;
    font-weight: 700 !important;
    font-size: 17px !important;
}

.ck-content .product-shortcode-card .price-old,
.product-shortcode-card .price-old {
    color: #94a3b8 !important;
    font-size: 13px !important;
    text-decoration: line-through !important;
}

.ck-content .product-shortcode-card .product-rating-wrap,
.product-shortcode-card .product-rating-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.ck-content .product-shortcode-card .stars,
.product-shortcode-card .stars {
    color: #f59e0b !important;
    display: flex !important;
    gap: 2px !important;
    font-size: 12px !important;
}

.ck-content .product-shortcode-card .review-count,
.product-shortcode-card .review-count {
    color: #94a3b8 !important;
    font-size: 12px !important;
}

.ck-content .product-shortcode-card .product-action-wrap,
.product-shortcode-card .product-action-wrap {
    margin-top: 2px !important;
}

.ck-content .product-shortcode-card a.btn-buy-now,
.product-shortcode-card a.btn-buy-now {
    display: inline-block !important;
    background-color: #008da5 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    padding: 5px 18px !important;
    border-radius: 3px !important;
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
}

.ck-content .product-shortcode-card a.btn-buy-now:hover,
.product-shortcode-card a.btn-buy-now:hover {
    background-color: #008da5 !important;
    color: #ffffff !important;
}

