/* Card sản phẩm chuẩn theo img_gia.png */
.medb-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.medb-product-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.medb-product-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 14px;
    background: #fafafa;
    border-radius: 6px;
}

.medb-product-thumb a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.medb-product-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.medb-product-card:hover .medb-product-img {
    transform: scale(1.05);
}

.medb-product-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.medb-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.medb-brand-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.medb-price-badge {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.medb-product-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.medb-product-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.medb-product-title a:hover {
    color: #e11d48;
}

.medb-product-action {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #f1f5f9;
}

.medb-view-more {
    font-size: 0.85rem;
    color: #475569;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.medb-view-more:hover {
    color: #e11d48;
}

/* Thorakao-style Section Headers */
.thorakao-section-header-center {
    text-align: center;
    margin-bottom: 28px;
}

.thorakao-title-center {
    font-size: 1.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0f172a;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.thorakao-title-center::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #dc2626;
    border-radius: 2px;
}

.thorakao-subtitle-center {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.thorakao-section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.thorakao-title-bar {
    font-size: 1.45rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #0f172a;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thorakao-bar-line {
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: #dc2626;
    border-radius: 2px;
}

.thorakao-subtitle-bar {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.thorakao-view-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: #dc2626;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s;
}

.thorakao-view-all:hover {
    transform: translateX(4px);
    color: #b91c1c;
}

/* 4-column Grid */
.medb-products-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .medb-products-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .medb-products-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Category cards grid */
.medb-categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .medb-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.medb-category-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.medb-category-card:hover {
    border-color: #fda4af;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(225, 29, 72, 0.08);
}

.medb-category-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fff1f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #e11d48;
    font-size: 1.5rem;
    transition: background 0.2s, transform 0.2s;
}

.medb-category-card:hover .medb-category-icon {
    background: #e11d48;
    color: #ffffff;
    transform: scale(1.1);
}

.medb-category-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Định dạng nội dung chi tiết mô tả sản phẩm */
.medb-product-description {
    font-size: 14.5px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 25px;
}

.medb-product-description strong,
.medb-product-description b {
    color: #0f172a;
    font-weight: 700;
}

.medb-product-description ol,
.medb-product-description ul {
    padding-left: 22px;
    margin: 10px 0 16px 0;
}

.medb-product-description li {
    margin-bottom: 6px;
    line-height: 1.65;
}

/* === FIX HEADER PHONE BUTTON COLOR === */
.header-nav .html_topbar_right a.button,
.header-nav .html_topbar_right a.button span,
.header-nav .html_topbar_right a.button i,
.header-nav a.header-phone-btn,
.header-nav a.header-phone-btn span,
.header-nav a.header-phone-btn i,
.header-nav li a.button.primary,
.header-nav li a.button.primary span,
.header-nav li a.button.primary i {
    color: #ffffff !important;
}

.header-nav a.header-phone-btn:hover,
.header-nav a.header-phone-btn:hover span,
.header-nav a.header-phone-btn:hover i,
.header-nav li a.button.primary:hover,
.header-nav li a.button.primary:hover span,
.header-nav li a.button.primary:hover i {
    color: #ffffff !important;
    background-color: #0f3974 !important;
}

/* === FIX SCROLL TO TOP BUTTON ALIGNMENT === */
button.medb-back-to-top-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 50% !important;
    background: #334155 !important;
    color: #ffffff !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
}

button.medb-back-to-top-btn:hover {
    background: #1e293b !important;
    color: #ffffff !important;
}

button.medb-back-to-top-btn i {
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    display: block !important;
    text-align: center !important;
}

