﻿/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}

/* ==== Navbar trên ==== */
.navtop {
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    padding: 0.5rem 0;
}

    .navtop .navbar-brand span {
        color: #007bff;
        font-weight: 700;
        font-size: 1.2rem;
    }

    .navtop .account a {
        color: #333;
        margin-left: 5px;
        text-decoration: none;
    }

        .navtop .account a:hover {
            color: #007bff;
            text-decoration: underline;
        }

/* ==== Navbar dưới ==== */
.main-nav {
    font-weight: 500;
}

    .main-nav .nav-link {
        color: #333;
        margin-right: 15px;
    }

        .main-nav .nav-link:hover,
        .main-nav .dropdown-item:hover {
            color: #007bff;
        }

    .main-nav .dropdown-menu {
        min-width: 200px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }



/* ==== Footer ==== */
.footer-bookstore {
    background: #328451;
    color: #f2f2f2;
    font-family: "Segoe UI", Arial, sans-serif;
    margin-top: 50px;
    border-top: 3px solid #00b3ff;
}

    .footer-bookstore a {
        color: #cce6ff;
        text-decoration: none;
    }

        .footer-bookstore a:hover {
            color: #00bfff;
        }

/* Phần trên cùng - logo và địa chỉ */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

    .footer-top img {
        max-width: 160px;
    }

    .footer-top .slogan {
        font-size: 15px;
        font-weight: 500;
        margin-top: 5px;
        color: #d9e6ff;
    }

.footer-info p {
    margin: 3px 0;
    font-size: 14px;
    color: #d0d8f0;
}

/* Nội dung chính */
.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 30px 50px;
}

.footer-column {
    flex: 1;
    min-width: 230px;
    margin: 15px;
}

    .footer-column h5 {
        font-size: 16px;
        font-weight: 600;
        border-left: 4px solid #00b3ff;
        padding-left: 8px;
        margin-bottom: 15px;
    }

    .footer-column ul {
        list-style: none;
        padding: 0;
    }

    .footer-column li {
        margin-bottom: 8px;
        font-size: 14px;
    }

/* Mạng xã hội */
.social-icons a {
    display: inline-block;
    margin-right: 10px;
    font-size: 18px;
    color: #cce6ff;
    transition: color 0.3s;
}

    .social-icons a:hover {
        color: #00bfff;
    }

/* Link app */
.app-links img {
    width: 120px;
    margin-top: 10px;
    margin-right: 5px;
    border-radius: 8px;
}

/* Footer cuối */
.footer-bottom {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 13px;
    color: #b0c6e0;
}


/* ==== Responsive ==== */
@media (max-width: 768px) {
    .search-wrap .input-group {
        width: 100% !important;
    }

    .account {
        display: none;
    }
}


/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}

/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.header {
    background: #003366;
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .header .logo a {
        color: white;
        font-size: 20px;
        font-weight: bold;
        text-decoration: none;
    }

    .header .menu a {
        color: white;
        margin: 0 10px;
        text-decoration: none;
    }

    .header .search {
        margin-left: 20px;
    }

.txtSearch {
    padding: 5px;
}

.btnSearch {
    padding: 5px;
}

.account a {
    color: royalblue;
    margin-left: 10px;
    text-decoration: none;
}

.content {
    padding: 20px;
}


/* =============================
   BANNER CHÍNH
============================= */
.banner-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 420px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.banner-background {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* =============================
   HÌNH TĨNH HAI BÊN
============================= */
.side-img {
    flex: 0 0 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .side-img img {
        width: 150px;
        height: 230px;
        border-radius: 12px;
        object-fit: cover;
        transition: transform 0.3s;
    }

        .side-img img:hover {
            transform: scale(1.05);
        }

/* =============================
   CAROUSEL Ở GIỮA
============================= */
.carousel-wrapper {
    position: relative;
    flex: 1;
    height: 80%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

    .carousel-wrapper input {
        display: none;
    }

.carousel {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.8s ease;
    animation: slide 20s infinite;
}

.slide {
    width: 20%;
    flex-shrink: 0;
}

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* =============================
   HIỆU ỨNG TỰ ĐỘNG CHUYỂN ẢNH
============================= */
@keyframes slide {
    0%, 15% {
        transform: translateX(0);
    }

    20%, 35% {
        transform: translateX(-20%);
    }

    40%, 55% {
        transform: translateX(-40%);
    }

    60%, 75% {
        transform: translateX(-60%);
    }

    80%, 100% {
        transform: translateX(-80%);
    }
}

/* Khi người dùng chọn thủ công → dừng animation */
#banner1:checked ~ .carousel,
#banner2:checked ~ .carousel,
#banner3:checked ~ .carousel,
#banner4:checked ~ .carousel,
#banner5:checked ~ .carousel {
    animation: none;
}

/* =============================
   NÚT CHẤM TRÒN DƯỚI BANNER
============================= */
.nav-manual {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.manual-btn {
    width: 12px;
    height: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.4s ease;
}

    .manual-btn:hover {
        background: rgba(255,255,255,0.9);
        transform: scale(1.2);
    }

/* Nút đang hoạt động dài hơn */
#banner1:checked ~ .nav-manual label[for="banner1"],
#banner2:checked ~ .nav-manual label[for="banner2"],
#banner3:checked ~ .nav-manual label[for="banner3"],
#banner4:checked ~ .nav-manual label[for="banner4"],
#banner5:checked ~ .nav-manual label[for="banner5"] {
    width: 30px;
    background: #ffb703;
}

/* Khi chọn từng nút radio */
#banner1:checked ~ .carousel {
    transform: translateX(0);
}

#banner2:checked ~ .carousel {
    transform: translateX(-20%);
}

#banner3:checked ~ .carousel {
    transform: translateX(-40%);
}

#banner4:checked ~ .carousel {
    transform: translateX(-60%);
}

#banner5:checked ~ .carousel {
    transform: translateX(-80%);
}



/*css item sách*/
.book-item {
    display: inline-block;
    width: 200px;
    margin: 10px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    vertical-align: top;
}

    .book-item img {
        width: 120px;
        height: 160px;
        object-fit: cover;
    }

    .book-item h4 {
        font-size: 14px;
        margin: 5px 0;
    }

.price-old {
    text-decoration: line-through;
    color: #888;
    font-size: 13px;
}

.discount {
    color: green;
    font-size: 13px;
}

.price-new {
    color: red;
    font-weight: bold;
    margin-bottom: 8px;
}

.btn-cart, .btn-buy {
    padding: 5px 10px;
    margin: 3px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cart {
    background: #f0ad4e;
    color: #fff;
}

    .btn-cart:hover {
        background: #ec971f;
    }

.btn-buy {
    background: #d9534f;
    color: #fff;
}

    .btn-buy:hover {
        background: #c9302c;
    }


.footer {
    background: #003366;
    color: white;
    text-align: center;
    padding: 10px;
}
/*ĐĂNG NHẬP + ĐĂNG KÝ*/
.form-box {
    width: 300px;
    margin: 80px auto;
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    background: #f9f9f9;
}

    .form-box h2 {
        margin-bottom: 20px;
    }

    .form-box input[type=text],
    .form-box input[type=password] {
        width: 90%;
        padding: 8px;
        margin: 6px 0;
    }

    .form-box input[type=checkbox] {
        margin-top: 10px;
    }


.btn {
    padding: 8px 15px;
    background: #003366;
    color: white;
    border: none;
    cursor: pointer;
}

    .btn:hover {
        background: #0055aa;
    }

/*CHI TIẾT SÁCH*/
.book-detail {
    display: flex;
    margin: 20px;
}

.book-detail-img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    margin-right: 20px;
    border: 1px solid #ccc;
    padding: 5px;
}

.book-info {
    max-width: 600px;
}

    .book-info h2 {
        margin-top: 0;
    }

/*CART + CHECKOUT*/
.table img {
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-outline-primary:hover,
.btn-outline-danger:hover {
    color: #fff !important;
}

/*CHI TIẾT ĐƠN HÀNG*/
.container {
    max-width: 900px;
    margin: 0 auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th, .table td {
        padding: 8px 10px;
        border: 1px solid #ddd;
    }

    .table th {
        background-color: #f5f5f5;
    }

.text-end {
    text-align: right;
}

.text-center {
    text-align: center;
}

/*ABOUT & CONTACT*/
h2 {
    color: #1e3a8a;
    font-weight: 700;
}

p {
    line-height: 1.8;
    font-size: 16px;
}

form .form-control {
    border-radius: 8px;
}

.btn-primary {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

    .btn-primary:hover {
        background-color: #0b1c61;
    }
