/* Đường dẫn: web/css/home-custom.css */
.hero-banner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 80px 20px; background: linear-gradient(135px, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 40px; margin-top: 30px;
}
.hero-banner h1 { font-size: 3.5rem; font-weight: 900; line-height: 1.1; color: #1e293b; }

.service-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px;
}
.service-item {
    text-align: center; padding: 30px; background: #fff; border-radius: 24px;
    border: 1px solid #e2e8f0; transition: 0.3s;
}

.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px;
}
.category-card {
    background: #f8fafc; border-radius: 28px; padding: 30px 20px;
    text-align: center; transition: 0.3s; text-decoration: none !important;
}

/* Ép phần Đăng nhập thành Modal ẩn */
.modal-overlay, #authModal {
    position: fixed !important;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Nền mờ */
    z-index: 9999;
    display: none; /* Ẩn đi, chỉ hiện khi click */
    align-items: center;
    justify-content: center;
}

/* Khi có class active thì mới hiện */
.modal-overlay.active {
    display: flex !important;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Sửa Layout Footer */
footer .footer-content {
    display: flex !important;
    justify-content: space-between; /* Đẩy các cột ra xa nhau */
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

footer .footer-col {
    flex: 1; /* Chia đều không gian cho mỗi cột */
    text-align: left;
}

footer .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Khắc phục khoảng trắng lớn đầu trang của trang Tất cả sách (Shop Index) */
.catalog-category-view .page-main,
.bookstore-shop-index-index .page-main,
.shop-index-index .page-main {
    padding-top: 0 !important;
    margin-top: 10px !important;
}

.cms-index-index .login-required-tooltip {
    position: relative;
    display: block;
    width: 100%;
}

.cms-index-index .login-required-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: max-content;
    max-width: min(280px, 90vw);
    padding: 8px 10px;
    border-radius: 6px;
    background: #1e293b;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: 20;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cms-index-index .login-required-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.cms-index-index .action.tocart.is-login-required,
.cms-index-index .action.tocart.is-login-required:hover {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    border-color: #cbd5e1 !important;
}
