﻿/* ===============================
   THEME CHUNG – MARKETPLACE STYLE
=============================== */

:root {
    --primary: #0d6efd;
    --primary-soft: #e7f0ff;
    --accent: #ff5722;
    --bg-main: #f5f7fb;
    --text-main: #222;
    --text-muted: #6c757d;
    --border-soft: #e5e7eb;
    --radius-card: 14px;
}

/* ===============================
   GLOBAL LAYOUT – STICKY FOOTER
=============================== */

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* wrapper của @RenderBody trong _Layout */
.main-content {
    flex: 1; /* chiếm hết khoảng trống giữa header & footer */
    display: flex; /* để căn giữa nội dung con (auth-wrapper) nếu cần */
    flex-direction: column;
}

/* ===============================
   LINK
=============================== */

a {
    color: var(--primary);
    text-decoration: none;
}

    a:hover {
        color: #0b5ed7;
        text-decoration: underline;
    }

/* ===============================
   NAVBAR / HEADER
=============================== */

.main-header {
    position: relative;
    z-index: 1020;
}

.navbar {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    background: #ffffff !important;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding-inline: 1rem;
    color: var(--text-main);
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: var(--primary) !important;
    }

/* Search box trong header */
.search-form input {
    min-width: 180px;
}

/* ===============================
   LAYOUT CHUNG
=============================== */

/* Giữ max-width riêng, không phá margin/padding của Bootstrap */


h2,
h3,
h4,
h5 {
    font-weight: 600;
}

/* ===============================
   CATEGORY SIDEBAR – DANH MỤC
=============================== */

.category-list {
    max-height: 420px;
    overflow-y: auto;
}

    .category-list::-webkit-scrollbar {
        width: 6px;
    }

    .category-list::-webkit-scrollbar-thumb {
        background-color: #d0d0d0;
        border-radius: 999px;
    }

.category-item {
    text-decoration: none;
    font-weight: 500;
    color: #333;
    display: block;
    padding: 4px 0;
    transition: all 0.15s ease-in-out;
    font-size: 0.95rem;
}

    .category-item:hover {
        color: var(--primary);
        transform: translateX(4px);
    }

.category-list .list-group-item {
    border: none;
    border-bottom: 1px solid #f1f1f1;
    background-color: transparent;
}

.card-header.bg-primary {
    background: linear-gradient(90deg, #0d6efd, #17a2ff) !important;
}

/* ===============================
   PRODUCT LIST / SLIDER
=============================== */

.product-page {
    min-height: 60vh;
}

    .product-page h2 {
        font-size: 1.4rem;
    }

    /* cột danh sách sản phẩm – cho sát lề trái hơn */
    .product-page .col-lg-9 {
        padding-left: 0;
    }

/* nếu dùng class riêng cho cột, có thể xài:
.product-page .product-col {
    padding-left: 0;
}
*/

#productSlider {
    scroll-behavior: smooth;
    white-space: nowrap;
    padding-bottom: 0.3rem;
    text-align: left; /* đảm bảo card canh trái */
}

    #productSlider .card {
        display: inline-block;
        vertical-align: top;
        width: 220px;
        border-radius: var(--radius-card);
        border: 1px solid var(--border-soft);
        transition: all 0.18s ease-in-out;
        background: #ffffff;
        margin-right: 1rem;
        cursor: pointer;
    }

        #productSlider .card:last-child {
            margin-right: 0;
        }

        #productSlider .card:hover {
            transform: translateY(-6px);
            box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
            border-color: rgba(13, 110, 253, 0.35);
        }

    #productSlider img {
        border-top-left-radius: var(--radius-card);
        border-top-right-radius: var(--radius-card);
        background: #f3f4f6;
    }

/* Tên sản phẩm + giá */

.card-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.card-body p.text-danger {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

/* Slider buttons */

.slider-prev,
.slider-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.16s ease-in-out;
    cursor: pointer;
}

    .slider-prev:hover,
    .slider-next:hover {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
    }

/* Nút trong card slider */
#productSlider .card .btn {
    border-radius: 999px;
}

/* ===============================
   PRODUCT DETAIL PAGE
=============================== */

.product-detail-image {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 10px;
}

.product-detail-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

/* ===============================
   BUTTONS
=============================== */

.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #008cff);
    border: none;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background: linear-gradient(135deg, #0b5ed7, #0076d1);
    }

    .btn-primary:focus-visible {
        box-shadow: 0 0 0 0.16rem rgba(13, 110, 253, 0.4);
        outline: none;
    }

.btn-outline-primary {
    border-radius: 999px;
    border-color: var(--primary);
    color: var(--primary);
}

    .btn-outline-primary:hover {
        background-color: var(--primary-soft);
        color: var(--primary);
    }

/* ===============================
   AUTH PAGES (LOGIN / REGISTER)
=============================== */

.auth-wrapper {
    flex: 1; /* cho auth-wrapper tự kéo full chiều cao trong main-content */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.auth-card {
    max-width: 420px;
    width: 100%;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

    .auth-card h2 {
        font-size: 1.5rem;
    }

.auth-input {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    transition: all 0.15s ease-in-out;
    font-size: 0.95rem;
}

    .auth-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.16rem rgba(13, 110, 253, 0.15);
    }

.auth-btn {
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===============================
   TABLES (ADMIN / ORDER)
=============================== */

.table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

    .table thead {
        background: #f3f4f6;
    }

        .table thead th {
            font-size: 0.9rem;
            font-weight: 600;
            color: #4b5563;
            border-bottom-width: 0;
        }

    .table tbody td {
        vertical-align: middle;
        font-size: 0.9rem;
    }

/* ===============================
   FOOTER
=============================== */

.footer {
    background: #ffffff;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-soft);
}

/* ===============================
   UTILITIES
=============================== */

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 576px) {
    .navbar-nav .nav-link {
        padding-inline: 0.5rem;
    }

    #productSlider .card {
        width: 180px;
    }

    .auth-wrapper {
        min-height: auto;
        padding: 2rem 1rem;
    }

    .auth-card {
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
    }
}
