/* basau bags - main design system - editorial luxury & modern fashion retail */

:root {
    --bg-page: #fafafa;
    --bg-surface: #ffffff;
    --color-text: #18181b;
    --color-muted: #71717a;
    --color-border: #e4e4e7;
    --color-border-hover: #18181b;
    --color-sale: #b91c1c;
    --color-dark: #121214;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Josefin Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
}

::selection {
    background-color: var(--color-dark);
    color: #ffffff;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f4f4f5;
}

::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

:focus-visible {
    outline: 2px solid var(--color-dark);
    outline-offset: 2px;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.text-secondary,
.text-muted {
    color: #52525b !important;
}

.text-success {
    color: #15803d !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    line-height: 1.5 !important;
}

.oswald-font {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    line-height: 1.5;
}

/* product cards */

.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    background: var(--bg-surface);
    border: 1px solid var(--color-border) !important;
    border-radius: 12px;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-hover) !important;
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.08);
}

.product-card img {
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.04);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
}

.badge-sale {
    background-color: var(--color-sale);
    color: #ffffff;
}

.badge-bestseller {
    background-color: var(--color-dark);
    color: #ffffff;
}

/* flash sale banner */

.flash-sale-banner {
    background-color: #09090b !important;
    border: 1px solid #27272a;
    box-shadow: none;
}

.countdown-box {
    background-color: #18181b;
    color: #ffffff;
    border: 1px solid #27272a;
    padding: 12px 6px;
    border-radius: 8px;
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
    max-width: 84px;
}

.countdown-box .count-num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
}

.countdown-box .count-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a1a1aa;
    margin-top: 4px;
    display: block;
}

/* 3D Rotating Handbag Showcase in Flash Sale Banner */

.btn-sale-cta {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-sale-cta:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.35) !important;
}

.bag-3d-stage {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 1rem 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

/* Ambient halo glow behind the bag */
.bag-halo-light {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 320px;
    transform: translate(-50%, -55%);
    background: radial-gradient(circle, rgba(234, 179, 8, 0.16) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(8px);
    animation: haloPulse 6s ease-in-out infinite alternate;
}

@keyframes haloPulse {
    0% { transform: translate(-50%, -55%) scale(0.92); opacity: 0.7; }
    100% { transform: translate(-50%, -55%) scale(1.1); opacity: 1; }
}

/* 360 degree interactive badge */
.badge-360-rotate {
    position: absolute;
    top: 0;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(24, 24, 27, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #f4f4f5;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    z-index: 10;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.badge-360-rotate:hover {
    background: #ffffff;
    color: #09090b;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.25);
}

.badge-360-rotate.is-active .spin-icon {
    animation: spinClockwise 3s linear infinite;
}

@keyframes spinClockwise {
    100% { transform: rotate(360deg); }
}

/* Khung xem túi xoay 360° (chuỗi ảnh vẽ lên canvas, kéo để xoay) */
.bag-360-viewport {
    position: relative;
    width: 100%;
    height: clamp(300px, 28vw, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: pan-y;
    z-index: 2;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.bag-360-viewport.is-dragging {
    cursor: grabbing;
}

.bag-360-viewport:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 4px;
    border-radius: 16px;
}

.bag-360-canvas {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(100% - 40px);
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.65));
    will-change: transform;
}

.bag-360-viewport.is-sway .bag-360-canvas {
    transform-origin: 50% 60%;
}

.bag-360-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 0.4px;
    color: #a1a1aa;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.4s ease;
}

.bag-360-viewport.is-ready .bag-360-loading {
    opacity: 0;
}

/* Bóng đổ trên sàn (JS co giãn theo góc xoay) */
.bag-ground-shadow {
    position: absolute;
    bottom: 8px;
    width: 220px;
    height: 24px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 45%, transparent 75%);
    border-radius: 50%;
    filter: blur(4px);
    transition: transform 0.12s linear;
    pointer-events: none;
    z-index: 1;
}

/* Thanh điều khiển: thanh trượt góc xoay và gợi ý */
.bag-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
}

.bag-controls-bar.is-no-scrubber .bag-scrubber {
    visibility: hidden;
}

.bag-scrubber {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    max-width: 55%;
    height: 4px;
    border-radius: 999px;
    background: #27272a;
    outline: none;
    cursor: pointer;
}

.bag-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    border: none;
}

.bag-scrubber::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    border: none;
}

.bag-scrubber:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 4px;
}

.bag-drag-hint {
    transition: opacity 0.5s ease;
    white-space: nowrap;
    font-size: 12px;
    color: #a1a1aa;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
}

/* Mô hình 3D thật (.glb) bằng model-viewer */
.bag-glb-viewer {
    display: block;
    position: relative;
    z-index: 2;
    width: 100%;
    height: clamp(300px, 28vw, 400px);
    background: transparent;
    --poster-color: transparent;
    --progress-bar-color: rgba(255, 255, 255, 0.6);
    outline: none;
    cursor: grab;
}

.bag-glb-viewer:active {
    cursor: grabbing;
}

.bag-glb-viewer:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 4px;
    border-radius: 16px;
}

.bag-glb-poster {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bag-drag-hint.is-hidden {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .bag-halo-light,
    .badge-360-rotate.is-active .spin-icon {
        animation: none;
    }
}

/* Tinh chỉnh banner: tiêu đề, trạng thái tải mô hình 3D, focus bàn phím, cảm ứng, màn hình rộng/hẹp */
.flash-sale-banner h2 {
    text-wrap: balance;
}

@media (min-width: 1200px) {
    .bag-3d-stage {
        max-width: 520px;
    }
}

.bag-glb-wrap {
    position: relative;
}

/* thanh tiến độ mặc định của model-viewer đè lên nút: thay bằng đường kẻ mảnh dưới mô hình */
.bag-glb-viewer::part(default-progress-bar) {
    display: none;
}

.bag-load {
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 10px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.5s ease 0.2s;
}

.bag-load > span {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease-out;
}

.bag-load.is-done {
    opacity: 0;
}

.badge-360-rotate:focus-visible,
.btn-sale-cta:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

@media (pointer: coarse) {
    .badge-360-rotate {
        min-height: 40px;
        padding: 8px 16px;
    }
}

@media (max-width: 575.98px) {
    .btn-sale-cta {
        width: 100%;
    }

    .countdown-box .count-num {
        font-size: 1.5rem;
    }
}

/* brand showcase cards */

.brand-card {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2.25rem 1.5rem;
    text-align: center;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-dark);
    box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.08);
}

.brand-card h3 {
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

/* Thương hiệu: sắc màu ấm như chất liệu da, ảnh vẫn là tâm điểm. */
.featured-brands {
    background: #f7f0e9;
    border-block: 1px solid #eadfd3;
}

.featured-brands-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.featured-brands-heading h2 {
    margin: 0;
    color: #211718;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: 0.035em;
}

.featured-brands-heading p {
    max-width: 31ch;
    margin: 0;
    color: #604b45;
    font-size: 0.98rem;
    line-height: 1.45;
}

.brand-highlight-card {
    --brand-panel: #e8d3ca;
    display: flex;
    flex-direction: column;
    max-width: 440px;
    margin-inline: auto;
    background: var(--brand-panel);
    color: #23191a;
    text-decoration: none;
    box-shadow: 0 12px 28px -18px rgba(58, 31, 23, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-brands .col:nth-child(5n + 2) .brand-highlight-card { --brand-panel: #e9d8bd; }
.featured-brands .col:nth-child(5n + 3) .brand-highlight-card { --brand-panel: #dbe2d3; }
.featured-brands .col:nth-child(5n + 4) .brand-highlight-card { --brand-panel: #e5d9df; }
.featured-brands .col:nth-child(5n + 5) .brand-highlight-card { --brand-panel: #ebc9b8; }

.brand-highlight-card:hover,
.brand-highlight-card:focus-visible {
    color: #23191a;
    transform: translateY(-5px);
    box-shadow: 0 20px 34px -18px rgba(58, 31, 23, 0.48);
}

.brand-highlight-card:focus-visible {
    outline: 3px solid #9f282e;
    outline-offset: 4px;
}

.brand-highlight-img-wrap {
    aspect-ratio: 4 / 5;
    width: 100%;
    overflow: hidden;
    background: #e9e3dd;
}

.brand-highlight-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.brand-highlight-card:hover .brand-highlight-img,
.brand-highlight-card:focus-visible .brand-highlight-img {
    transform: scale(1.035);
}

.brand-highlight-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 100px;
    padding: 18px 20px;
}

.brand-highlight-name {
    margin: 0 0 3px;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    line-height: 1.15;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.brand-highlight-tagline {
    margin: 0;
    color: #59443d;
    font-size: 0.9rem;
    line-height: 1.35;
}

.brand-highlight-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #6f3b38;
    color: #6f252b;
    font-size: 1.15rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.brand-highlight-card:hover .brand-highlight-arrow,
.brand-highlight-card:focus-visible .brand-highlight-arrow {
    background: #8f232b;
    color: #fff;
}

@media (max-width: 575.98px) {
    .featured-brands-heading {
        display: block;
    }

    .featured-brands-heading p {
        margin-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-highlight-card,
    .brand-highlight-img,
    .brand-highlight-arrow {
        transition: none;
    }
}

/* footer hiện đại cao cấp */
.site-footer {
    background-color: #18181b !important;
    width: 100%;
    overflow: hidden;
    margin-top: auto;
    border-top: 1px solid #27272a;
}

.footer-logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.footer-logo-text {
    color: #ffffff !important;
    font-size: 4rem;
    letter-spacing: 3px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.footer-logo-link:hover .footer-logo-text {
    text-shadow: 0 0 25px rgba(255, 65, 108, 0.6);
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .footer-logo-text {
        font-size: 2.5rem;
    }
}

/* dãy sản phẩm nổi bật tự chạy ngang (trang chủ). Không có JS hoặc người dùng tắt hiệu ứng: cuộn ngang bằng tay */
.hp-marquee {
    --hp-gap: 24px;
    position: relative;
    overflow-x: auto;
    padding: 14px 4px 22px;
    scrollbar-width: thin;
}

.hp-track {
    display: flex;
    gap: var(--hp-gap);
    width: max-content;
}

.hp-item {
    flex: 0 0 260px;
    width: 260px;
}

.hp-marquee.is-running {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.hp-marquee.is-running .hp-track {
    animation: hp-scroll var(--hp-duration, 60s) linear infinite;
    will-change: transform;
}

/* rê chuột hoặc đang thao tác trong dãy thì dừng để bấm cho dễ */
.hp-marquee.is-running:hover .hp-track,
.hp-marquee.is-running:focus-within .hp-track {
    animation-play-state: paused;
}

/* dãy được nhân đôi nên dịch đúng một nửa (cộng nửa khoảng cách) là khớp vòng lặp */
@keyframes hp-scroll {
    to { transform: translateX(calc(-50% - var(--hp-gap) / 2)); }
}

@media (max-width: 575.98px) {
    .hp-item {
        flex-basis: 220px;
        width: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-marquee.is-running .hp-track {
        animation: none;
    }
}

/* trang hồ sơ khách: giảm độ đậm chữ (700 xuống 600) cho bớt "mập"; phông Josefin Sans và Oswald đều có đủ mức 600 */
.profile-page .fw-bold,
.profile-page label,
.profile-page .btn,
.profile-page .badge,
.profile-page [style*="font-weight: bold"] {
    font-weight: 600 !important;
}

.profile-page h1,
.profile-page h3 {
    font-weight: 600 !important;
}

/* ===== nhãn sản phẩm (giảm giá, bán chạy, hàng mới, hết hàng, sắp hết): nhãn phẳng, góc vuông, chữ in hoa giãn chữ =====
   Dùng chung ở trang chủ, danh mục, flash sale, chi tiết qua partial Views/Shared/_ProductTags.cshtml.
   Nhãn xếp dọc ở góc trên trái của thẻ/ảnh sản phẩm; phần tử cha cần position: relative. */
.pt-stack {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.pt {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* giảm giá: đỏ đặc, nổi bật nhất, số phần trăm hơi lớn hơn */
.pt-sale {
    background: var(--color-sale, #b91c1c);
    border-color: var(--color-sale, #b91c1c);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.pt-best {
    background: #121214;
    border-color: #121214;
    color: #ffffff;
}

.pt-new {
    background: #ffffff;
    border-color: #121214;
    color: #121214;
}

/* nhãn tùy ý do admin đặt (Hot...): chỉ viền, không tranh với giảm giá */
.pt-hot {
    background: #ffffff;
    border-color: var(--color-sale, #b91c1c);
    color: var(--color-sale, #b91c1c);
}

.pt-low {
    background: #ffffff;
    border-color: #b45309;
    color: #b45309;
}

.pt-out {
    background: #71717a;
    border-color: #71717a;
    color: #ffffff;
}

/* nhãn nằm trong dòng chữ (cạnh giá ở trang chi tiết) */
.pt-lg {
    padding: 6px 12px;
    font-size: 14px;
}
