/*
 * Client - Common Styles
 * Scope: client / global component mappings (header, footer, buttons)
 */

body {
    /* Đẩy toàn bộ nội dung xuống để nhường chỗ cho Fixed Header */
    padding-top: 110px;
}

/* ─── HEADER ────────────────────────────────────────── */

.client-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.client-header.scrolled {
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    /* Bóng đổ rất nhẹ */
}

html.dark .client-header.scrolled {
    box-shadow: var(--shadow-soft);
}

.client-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 110px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    /* Thuở sơ khai rất to và thoáng */
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-header.scrolled .client-header__inner {
    height: 72px;
    /* Scroll xuống bóp lại còn 72px */
}

/* Logo */
.client-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--color-primary);
    flex-shrink: 0;
    text-decoration: none;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


.client-header.scrolled .client-header__logo {
    font-size: 1.55rem !important;
    /* Bóp text tên shop bé lại */
}

.client-header__logo img {
    height: 56px;
    width: 56px;
    object-fit: cover;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-header.scrolled .client-header__logo img {
    height: 40px;
    width: 40px;
}

/* Navigation */
.client-header__nav {
    display: flex;
    gap: 2.5rem;
}

.client-header__nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.client-header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.client-header__nav-link:hover,
.client-header__nav-link.active {
    color: var(--color-primary);
}

.client-header__nav-link:hover::after,
.client-header__nav-link.active::after {
    width: 100%;
}

/* Actions (Icons) */
.client-header__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.client-header__action-btn {
    background: transparent;
    color: var(--color-text);
    font-size: 1.25rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-header__action-btn:hover {
    color: var(--color-primary);
}

.client-header__menu-btn {
    display: none;
    /* Ẩn đi trên Desktop */
}

/* ─── MOBILE SIDEBAR ────────────────────────────────────── */

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 10001;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

html.dark .mobile-sidebar {
    border-left: 1px solid var(--color-border);
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.mobile-sidebar__close {
    background: transparent;
    font-size: 1.5rem;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.mobile-sidebar__close:hover {
    color: var(--color-primary);
}

.mobile-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-sidebar__nav a {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
}

.mobile-sidebar__nav a.active,
.mobile-sidebar__nav a:hover {
    color: var(--color-primary);
}

/* ─── FOOTER ────────────────────────────────────────── */

.client-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 64px 0 32px;
}

.client-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1.2fr 1.5fr;
    gap: 32px;
    margin-bottom: 48px;
}

.client-footer__about p {
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.client-footer__title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.client-footer__link-list {
    list-style: none;
}

.client-footer__link-list li {
    margin-bottom: 0.75rem;
}

.client-footer__link-list a {
    font-size: 0.95rem;
    opacity: 0.8;
}

.client-footer__link-list a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.client-footer__bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ─── MAIN BUTTON COMPONENT ───────────────────────────── */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: #FFFFFF;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

html.dark .btn-primary {
    color: #121212;
    /* Dark text on light copper bg for contrast */
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

/* ─── RESPONSIVE STYLES ─────────────────────────────────────── */

/* lg: 1200px */
@media (max-width: 1200px) {}

/* md: 1024px */
@media (max-width: 1024px) {
    .client-header__nav {
        display: none;
        /* Hide standard nav on tablet, would need hamburger menu */
    }

    .client-header__menu-btn {
        display: flex;
    }

    .client-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* sm: 768px */
@media (max-width: 768px) {
    .client-footer {
        padding: 40px 0 24px;
        margin-top: 40px;
    }

    .client-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}