/* 🌊 Web Cá Cảnh — Light & Dark Mode UI */

/* ===== Cơ bản ===== */
html {
    font-size: 14px;
}
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: "Segoe UI", "Roboto", sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background: #f4f8fb; /* Light mode background */
    transition: all 0.5s ease-in-out;
}

/* ===== Dark Mode ===== */
body.dark-mode {
    background: #121212; /* Dark mode background */
    color: #eaeaea;
}
body.dark-mode .navbar {
    background: linear-gradient(90deg, #004d66, #00384d);
}
body.dark-mode .navbar-brand,
body.dark-mode .nav-link {
    color: #f1f1f1 !important;
}
body.dark-mode .product-card {
    background-color: #1e1e1e;
    color: #eaeaea;
}
body.dark-mode .table {
    background-color: #222;
    color: #eaeaea;
}
body.dark-mode footer {
    background: #000;
}

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(90deg, #008cba, #006b9a);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-brand {
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
}
.nav-link {
    color: #f8f9fa !important;
    font-weight: 500;
    transition: all 0.25s ease;
}
.nav-link:hover {
    color: #ffd166 !important;
    transform: scale(1.05);
}

/* ===== Card sản phẩm ===== */
.product-card {
    background-color: #ffffff; /* Light mode card */
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transition: all 0.3s ease-in-out;
    padding: 15px;
    text-align: center;
    margin-bottom: 25px;
}
body.dark-mode .product-card {
    background-color: #1e1e1e; /* Dark mode card */
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.4s ease-in-out;
    filter: brightness(0.95);
}
.product-card img:hover {
    transform: scale(1.08);
    filter: brightness(1.15);
}
.product-card h5 {
    margin-top: 12px;
    font-weight: 600;
    color: #005f8e;
}
.product-price {
    color: #e67e22;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 8px 0;
}
.btn-buy {
    background-color: #0077b6;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}
.btn-buy:hover {
    background-color: #ff9800;
    transform: scale(1.05);
}

/* ===== Giỏ hàng ===== */
.table {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
body.dark-mode .table {
    background-color: #222;
}
.table thead {
    background-color: #0077b6;
    color: #fff;
}
.table th,
.table td {
    vertical-align: middle !important;
    text-align: center;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 10px;
    transition: all 0.25s ease-in-out;
}
.btn:hover {
    transform: scale(1.03);
}
.btn-primary {
    background-color: #0077b6;
    border-color: #0077b6;
}
.btn-primary:hover {
    background-color: #ff9800;
    border-color: #ff9800;
}
.btn-danger {
    background-color: #dc3545;
    border: none;
}
.btn-danger:hover {
    background-color: #b82b38;
}

/* ===== Form ===== */
form {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    padding: 20px;
}
body.dark-mode form {
    background-color: #1e1e1e;
}
form input,
form textarea {
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 10px;
}
form input:focus,
form textarea:focus {
    border-color: #0077b6;
    box-shadow: 0 0 6px rgba(0,119,182,0.4);
}

/* ===== Footer ===== */
footer {
    background: #004466; /* Light mode */
    color: white;
    text-align: left;
    padding: 30px 15px;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.1);
    position: relative;
}
body.dark-mode footer {
    background: #000; /* Dark mode */
}
footer h5 {
    font-weight: 700;
    margin-bottom: 12px;
}
footer p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}
footer a {
    color: #ffd166;
    text-decoration: none;
    transition: color 0.3s;
}
footer a:hover {
    color: #ffb74d;
    text-decoration: underline;
}
footer .map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    margin-bottom: 10px;
}
footer .map-responsive iframe {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    border:0;
    border-radius: 8px;
}
footer .social-buttons a {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 6px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* ===== Dark Mode Toggle ===== */
.theme-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.theme-toggle:hover {
    transform: rotate(15deg) scale(1.2);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .product-card img { height: 150px; }
    .table th, .table td { font-size: 0.85rem; padding: 6px; }
}

/* Khi click vào input (active) */
.search-bar input:focus,
.search-bar:hover input {
    width: 250px;
    opacity: 1;
}

/* ====== 🔼 Nút cuộn lên đầu ====== */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: white;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#scrollTopBtn:hover {
    transform: scale(1.2);
    background: linear-gradient(135deg, #ff9800, #ffb703);
}

/* ====== ✨ Animation khi cuộn ====== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 119, 182, 0.15);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 14px;
}

.product-card:hover::after {
    opacity: 1;
}
.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-bar input {
    border: none;
    outline: none;
    padding: 6px 12px;
    width: 200px;
}

.search-bar .btn-search {
    background-color: #0077b6;
    color: white;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar .btn-search:hover {
    background-color: #ff9800;
}
