* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: #222;
    background: #f6f7f4;
    /* font-family: "Playwrite AU TAS", cursive; */
    font-family: "Space Grotesk", sans-serif;
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    gap: 18px;
    color: #2C3E50;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.is-page-loading .page-loading-overlay {
    opacity: 1;
    pointer-events: auto;
}

.page-loading-overlay__mark {
    font-family: "Lilita One", sans-serif;
    font-size: 34px;
    letter-spacing: 2px;
}

.page-loading-overlay__bar {
    width: min(220px, 54vw);
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5ebe8;
}

.page-loading-overlay__bar span {
    width: 42%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #b4553c;
    animation: pageLoadingBar 0.9s ease-in-out infinite;
}

@keyframes pageLoadingBar {
    from {
        transform: translateX(-110%);
    }

    to {
        transform: translateX(250%);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

.container {
    width: 92%;
    max-width: 1240px;
    margin: auto;
}

.site-header--shop {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 190px minmax(240px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 11px 3%;
    border-bottom: 1px solid #dde2dc;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.brand-logo {
    font-family: "Lilita One", sans-serif;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #2C3E50;
}

.site-header .brand-logo,
.site-header .brand-logo:visited,
.site-header .brand-logo:hover {
    color: #2C3E50;
}

.site-header__account[hidden],
.site-header .auth-button[hidden] {
    display: none !important;
}

.has-auth-session .site-header__account,
.has-auth-session .site-header__actions > .auth-button {
    display: none !important;
}

.site-header__search {
    width: min(100%, 360px);
    max-width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    border: 1px solid #cfd8d3;
    border-radius: 999px;
    background: white;
    overflow: hidden;
    justify-self: center;
    box-shadow: 0 6px 18px rgba(44, 62, 80, 0.05);
    transition:
        width 0.28s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.site-header__search:hover,
.site-header__search:focus-within {
    width: min(100%, 520px);
    border-color: #2C3E50;
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.12);
}

.site-header__search-submit {
    width: 44px;
    flex: 0 0 44px;
    height: 38px;
    border: 0;
    color: #2C3E50;
    background: transparent;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.site-header__search:hover .site-header__search-submit,
.site-header__search:focus-within .site-header__search-submit {
    color: white;
    background: #2C3E50;
}

.site-header__search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 16px 0 2px;
    color: #25323b;
    background: transparent;
    opacity: 0.74;
    transition: opacity 0.2s ease;
}

.site-header__search-input::placeholder {
    color: #7b898f;
}

.site-header__search:focus-within .site-header__search-input {
    opacity: 1;
}

.site-header__actions {
    justify-self: end;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.site-header__account,
.site-header__cart {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #cfd8d3;
    border-radius: 4px;
    padding: 8px 12px;
    color: #2C3E50;
    background: white;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.site-header__account {
    border-color: #2C3E50;
    background: #2C3E50;
    color: #fff;
}

.site-header__account:hover {
    transform: translateY(-1px);
    border-color: #1f2d3a;
    color: #fff;
    background: #1f2d3a;
}

.site-header__cart:hover {
    transform: translateY(-1px);
    border-color: #2C3E50;
    background: #f7faf8;
}

.site-header__account-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-header__account-avatar {
    width: 28px;
    height: 28px;
    display: none;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: #2C3E50;
    font-family: "Lilita One", sans-serif;
    font-size: 17px;
    letter-spacing: 0;
}

.site-header__account.is-logged-in {
    width: 42px;
    padding: 0;
}

.site-header__account.is-logged-in .site-header__account-label {
    display: none;
}

.site-header__account.is-logged-in .site-header__account-avatar {
    display: grid;
}

.site-header__cart {
    position: relative;
    width: 42px;
    padding: 0;
    border: none;
}

.site-header__cart-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: #b4553c;
    font-size: 12px;
    line-height: 1;
    font-family: "Space Grotesk", sans-serif;
}

.shop-page {
    min-height: calc(100vh - 73px);
}

.shop-hero {
    color: white;
    background:
        linear-gradient(90deg, rgba(44, 62, 80, 0.92), rgba(44, 62, 80, 0.55)),
        url("../images/postcard4.jpg") center / cover;
}

.shop-hero__inner {
    font-family: "Playwrite AU TAS", cursive;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 42px 0;
}

.shop-hero__eyebrow,
.catalog-toolbar__eyebrow,
.product-card__category {
    color: #6a7a83;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.shop-hero__eyebrow {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 10px;
}

.shop-hero h1 {
    max-width: 720px;
    font-size: 42px;
    line-height: 1.2;
}

.shop-hero__action {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 4px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.catalog-section {
    padding: 34px 0 70px;
    background:
        linear-gradient(rgba(255,255,255,0.87), rgba(255,255,255,0.95)),
        url("../images/postcard5.jpg") center / cover;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.catalog-filter {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 24px;
    border: 1px solid #dde2dc;
    border-radius: 6px;
    padding: 22px;
    background: white;
}

.catalog-filter__group {
    display: grid;
    gap: 12px;
}

.catalog-filter h2 {
    color: #2C3E50;
    font-size: 20px;
}

.catalog-filter label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #41515b;
    font-size: 14px;
    line-height: 1.6;
}

.catalog-filter input {
    margin-top: 5px;
    accent-color: #2C3E50;
}

.catalog-main {
    min-width: 0;
}

.catalog-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.catalog-toolbar h2 {
    color: #2C3E50;
    font-size: 30px;
}

.catalog-toolbar__controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
}

.catalog-select {
    display: grid;
    gap: 6px;
    color: #5b6870;
    font-size: 13px;
    font-weight: 800;
}

.catalog-toolbar__sort,
.catalog-toolbar__page-size {
    min-height: 42px;
    border: 1px solid #cfd8d3;
    border-radius: 4px;
    padding: 0 12px;
    color: #2C3E50;
    background: white;
    font-weight: 700;
}

.catalog-toolbar__page-size {
    min-width: 92px;
}

.catalog-result-summary {
    margin: -4px 0 18px;
    color: #596871;
    font-size: 14px;
    line-height: 1.5;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.catalog-empty-state {
    grid-column: 1 / -1;
    border: 1px solid #dde2dc;
    border-radius: 6px;
    padding: 28px;
    color: #596871;
    background: white;
    text-align: center;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid #dde2dc;
    border-radius: 6px;
    background: white;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.product-card--loading {
    pointer-events: none;
}

.product-card__media--skeleton {
    min-height: 250px;
    background:
        linear-gradient(100deg, #eef1ef 20%, #f8faf8 42%, #eef1ef 64%);
    background-size: 220% 100%;
    animation: productSkeleton 1.15s ease-in-out infinite;
}

.product-skeleton {
    display: block;
    height: 14px;
    border-radius: 999px;
    background:
        linear-gradient(100deg, #e6ebe8 20%, #f7faf8 42%, #e6ebe8 64%);
    background-size: 220% 100%;
    animation: productSkeleton 1.15s ease-in-out infinite;
}

.product-skeleton--category {
    width: 34%;
    height: 11px;
}

.product-skeleton--title {
    width: 78%;
    height: 22px;
    border-radius: 6px;
}

.product-skeleton--text {
    width: 100%;
}

.product-skeleton--short {
    width: 66%;
}

.product-skeleton--price {
    width: 92px;
    height: 20px;
}

.product-skeleton--button {
    width: 80px;
    height: 38px;
    border-radius: 4px;
}

@keyframes productSkeleton {
    from {
        background-position: 120% 0;
    }

    to {
        background-position: -120% 0;
    }
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(44, 62, 80, 0.12);
}

.product-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #e8ece8;
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.product-card:hover .product-card__media img {
    transform: scale(1.04);
}

.product-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    padding: 6px 11px;
    color: #f8fbfb;
    background: rgba(32, 43, 50, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.product-card__tag--best-seller {
    border-color: rgba(255, 213, 191, 0.7);
    background: linear-gradient(135deg, rgba(168, 83, 58, 0.82), rgba(89, 57, 47, 0.68));
}

.product-card__tag--new {
    border-color: rgba(190, 229, 214, 0.7);
    background: linear-gradient(135deg, rgba(63, 130, 99, 0.82), rgba(42, 78, 69, 0.68));
}

.product-card__tag--combo {
    border-color: rgba(247, 225, 167, 0.78);
    color: #fff9ea;
    background: linear-gradient(135deg, rgba(154, 119, 45, 0.84), rgba(71, 62, 45, 0.68));
}

.product-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.product-card h3 {
    color: #22313a;
    font-size: 20px;
    line-height: 1.35;
}

.product-card__desc {
    flex: 1;
    color: #5a6870;
    font-size: 14px;
    line-height: 1.7;
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.product-card__footer strong {
    color: #2C3E50;
    font-size: 18px;
}

.product-card__footer button {
    min-width: 80px;
    min-height: 38px;
    border: 1px solid #2C3E50;
    border-radius: 4px;
    color: white;
    background: #2C3E50;
    font-weight: 800;
}

.product-card__footer button:hover {
    background: #1f2d3a;
}

.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 26px;
}

.catalog-pagination[hidden] {
    display: none;
}

.catalog-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.catalog-pagination__button,
.catalog-pagination__page {
    min-height: 40px;
    border: 1px solid #cfd8d3;
    border-radius: 4px;
    color: #2C3E50;
    background: white;
    font-weight: 800;
}

.catalog-pagination__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
}

.catalog-pagination__page {
    min-width: 40px;
    padding: 0 12px;
}

.catalog-pagination__page.is-active {
    border-color: #2C3E50;
    color: white;
    background: #2C3E50;
}

.catalog-pagination__button:disabled,
.catalog-pagination__page:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.catalog-pagination__button:not(:disabled):hover,
.catalog-pagination__page:not(.is-active):hover {
    border-color: #2C3E50;
    background: #f7faf8;
}

@media (max-width: 1024px) {
    .site-header--shop {
        grid-template-columns: 170px minmax(220px, 1fr) auto;
        gap: 12px;
    }

    .site-header__search {
        width: min(100%, 300px);
    }

    .site-header__search:hover,
    .site-header__search:focus-within {
        width: min(100%, 420px);
    }

    .site-header__account-label span {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-header--shop {
        grid-template-columns: 1fr auto;
        padding: 12px 4%;
    }

    .site-header__search {
        grid-column: 1 / -1;
        order: 3;
        width: 100%;
        justify-self: stretch;
        border-radius: 4px;
    }

    .site-header__search:hover,
    .site-header__search:focus-within {
        width: 100%;
    }

    .brand-logo {
        font-size: 26px;
    }

    .site-header__actions {
        gap: 8px;
    }

    .site-header__account,
    .site-header__cart {
        width: 40px;
        min-height: 38px;
        padding: 0;
    }

    .shop-hero__inner {
        min-height: 220px;
        align-items: flex-start;
        flex-direction: column;
    }

    .shop-hero h1 {
        font-size: 30px;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-filter {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-toolbar__controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .catalog-select select {
        width: 100%;
    }

    .catalog-pagination {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 10px;
    }

    .catalog-pagination__pages {
        grid-column: 1 / -1;
        order: -1;
        flex-wrap: wrap;
    }

    .catalog-pagination__button {
        justify-content: center;
        width: 100%;
        min-width: 0;
    }

    .catalog-filter {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}



/* DucVM 07072026: thêm CSS block Users trên header*/

.auth-user-menu {
    position: relative;
    flex: 0 0 auto;
    font-family: inherit;
}

.auth-user-menu__button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d4ddd8;
    border-radius: 6px;
    padding: 4px 10px 4px 5px;
    color: #2C3E50;
    background: rgba(255, 255, 255, 0.94);
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.06);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.auth-user-menu__button:hover,
.auth-user-menu.is-open .auth-user-menu__button {
    background: #fff;
    box-shadow: 0 6px 12px rgba(44, 62, 80, 0.12);
    transform: translateY(-1px);
}

.auth-user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 30px;
    border-radius: 999px;
    color: #fff;
    font-family: "Lilita One", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

.auth-user-avatar__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-user-menu__name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.auth-user-menu__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1200;
    min-width: 224px;
    display: none;
    border: 1px solid #dde5df;
    border-radius: 8px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 44px rgba(34, 49, 58, 0.16);
    backdrop-filter: blur(10px);
}

.auth-user-menu__dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 10px;
    height: 10px;
    border-top: 1px solid #dde5df;
    border-left: 1px solid #dde5df;
    background: inherit;
    transform: rotate(45deg);
}

.auth-user-menu.is-open .auth-user-menu__dropdown {
    display: grid;
    gap: 2px;
}

.auth-user-menu__dropdown a,
.auth-user-menu__dropdown button {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    padding: 9px 11px;
    color: #2C3E50;
    background: transparent;
    font: inherit;
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.auth-user-menu__dropdown a:hover,
.auth-user-menu__dropdown button:hover {
    color: #1f2d3a;
    background: #eef3ef;
    transform: translateX(2px);
}

.site-header--shop .auth-user-menu__button {
    min-height: 38px;
    border-radius: 4px;
    box-shadow: none;
}

.site-header--shop .auth-user-menu__name {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 14px;
}

@media (max-width: 768px) {
    .auth-user-menu__button {
        min-height: 38px;
        padding-right: 7px;
    }

    .auth-user-menu__name {
        display: none;
    }

    .auth-user-menu__dropdown {
        right: -44px;
        min-width: 220px;
    }

    .auth-user-menu__dropdown::before {
        right: 56px;
    }
}
