/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
    --brand: #ab7870;
    --brand-dk: #7a4f48;
    --brand-lt: #f5ede9;
    --text: #1a0f0c;
    --muted: #9c8070;
    --white: #ffffff;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
* {
    overflow-x: hidden;
    font-family: nos;
    box-sizing: border-box;
}

@font-face {
    src: url(font/Quicksand-Regular.ttf);
    font-family: nos;
}

html,
body {
    padding: 0;
    margin: 0;
}

a,
a:visited,
a:active {
    box-shadow: none;
    text-decoration: none;
    color: var(--text);
}

/* ── Announcement bar ────────────────────────────────────────────────────── */
.scroll-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--brand-dk), var(--brand), var(--brand-dk));
    background-size: 200% 100%;
    animation: bar 6s linear infinite;
    color: #fff;
    padding: 9px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes bar {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

.scroll-text {
    animation: scroll-left 22s linear infinite;
    display: inline-block;
    padding-left: 100%;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ── Loader ──────────────────────────────────────────────────────────────── */
#pageLoader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#pageLoader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-ring {
    width: 44px;
    height: 44px;
    border: 3px solid var(--brand-lt);
    border-top: 3px solid var(--brand);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 16px rgba(171, 120, 112, .1);
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 32px;
    height: 90px;
    border-bottom: 2px solid var(--brand-lt);
}

.top-logo-wrap {
    display: flex;
    justify-content: center;
}

.logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.top-side {
    display: flex;
    align-items: center;
}

.top-actions {
    justify-content: flex-end;
    gap: 16px;
    overflow: visible;
}

/* ── Icon buttons ────────────────────────────────────────────────────────── */
.nav-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border: 1.5px solid #ecddd7;
    background: #fff;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

.nav-icon-btn:hover {
    background: var(--brand-lt);
    color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(171, 120, 112, .2);
}

.nav-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Cart badge ──────────────────────────────────────────────────────────── */
#cartItemCount {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(171, 120, 112, .4);
}

/* ── Toggle button (mobile) ──────────────────────────────────────────────── */
#toggleNav {
    display: none;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid var(--brand-lt);
    cursor: pointer;
    gap: 5px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--brand-dk);
    margin: 0;
    height: auto;
}

#toggleNav::before,
#toggleNav:hover::before {
    display: none;
}

#toggleNav:hover {
    background: var(--brand-lt);
    color: var(--brand-dk);
}

.toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

#toggleNav.open .toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#toggleNav.open .toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#toggleNav.open .toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    padding: 0 16px;
    border-bottom: 1px solid var(--brand-lt);
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 14px 18px;
    font-size: clamp(10px, 1vw, 13px);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transition: width 0.25s ease;
}

.nav a:hover {
    color: var(--brand-dk);
}

.nav a:hover::after {
    width: 60%;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.first {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-container {
    width: 100%;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.image-container:hover img {
    transform: scale(1.02);
}

.text {
    margin: 12px 0;
    text-align: center;
    font-size: 6vw;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ── Category grids ──────────────────────────────────────────────────────── */
.second {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
}

.third {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
    border-bottom: 3px solid var(--brand);
    margin-bottom: 30px;
}

.overlay-container {
    display: block;
    position: relative;
}

.second .container,
.third .container {
    position: relative;
    overflow: hidden;
}

.second .container img,
.third .container img {
    width: 100%;
    height: 55vh;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.third .container img {
    height: 45vh;
}

.second .container:hover img,
.third .container:hover img {
    transform: scale(1.04);
}

.second .container .text,
.third .container .text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 48px 16px 16px;
    font-size: clamp(14px, 2.5vw, 32px);
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.empty-collection {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--brand-light, #f5ede9);
    border-radius: 16px;
    border: 2px dashed var(--brand, #ab7870);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.empty-illustration {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
    height: 80px;
    width: 120px;
}

.accessory {
    font-size: 3.5rem;
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: sparklePop 2.5s ease-in-out infinite;
    z-index: 2;
}

.sparkle,
.sparkle-2 {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
    animation: twinkle 2s ease-in-out infinite;
}

.sparkle {
    left: 5px;
    top: 10px;
    animation-delay: 0.3s;
}

.sparkle-2 {
    right: 5px;
    bottom: 10px;
    animation-delay: 0.8s;
}

@keyframes sparklePop {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.2) rotate(20deg);
    }
}

.empty-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-dark, #7a4f48);
    margin-bottom: 8px;
    font-family: inherit;
}

.empty-subtitle {
    font-size: 1rem;
    color: var(--muted-text, #9c8070);
    margin-bottom: 32px;
    line-height: 1.5;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #ecddd7;
    border-radius: 10px;
    margin: 0 auto 16px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 60%;
    background: linear-gradient(90deg, var(--brand, #ab7870), var(--brand-dark, #7a4f48));
    border-radius: 10px;
    animation: loading 2s ease-in-out infinite;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes loading {
    0% {
        width: 0%;
        left: 0;
    }

    50% {
        width: 70%;
        left: 15%;
    }

    100% {
        width: 0%;
        left: 100%;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.empty-hint {
    font-size: 0.9rem;
    color: var(--brand, #ab7870);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    color: #212121;
    background: #e8e8e8;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: 12px;
    background: var(--brand);
    z-index: -1;
    transition: width 0.25s ease;
}

button:hover {
    color: #fff;
}

button:hover::before {
    width: 100%;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.pagination .page-item {
    display: inline-flex;
}

.pagination .page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #444;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--brand-lt);
    color: var(--brand);
    border-color: var(--brand);
}

.pagination .page-item.active .page-link {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.pagination .page-item.disabled .page-link {
    background: #f9fafb;
    color: #aaa;
    border-color: #eee;
    cursor: not-allowed;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media screen and (max-width: 1024px) {
    .top {
        padding: 0 20px;
        height: 80px;
    }

    .logo {
        height: 60px;
    }

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

    .third .container img {
        height: 38vh;
    }

    .second .container img {
        height: 42vh;
    }

    .nav a {
        padding: 12px 12px;
        font-size: clamp(9px, 1.1vw, 12px);
    }
}

@media screen and (max-width: 768px) {
    .top {
        height: 70px;
        padding: 0 16px;
    }

    .logo {
        height: 52px;
    }

    .nav-icon-btn {
        width: 38px;
        height: 38px;
    }

    .nav-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Collapse nav */
    .nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        padding: 12px 24px;
        font-size: 13px;
        letter-spacing: 0.05em;
        border-bottom: 1px solid #fdf6f4;
    }

    .nav a::after {
        display: none;
    }

    #toggleNav {
        display: flex;
    }

    .second {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 4px;
    }

    .second .container img {
        height: 26vh;
    }

    .third {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        padding: 4px;
    }

    .third .container img {
        height: 26vh;
    }

    .text {
        font-size: 8vw;
    }
}

@media screen and (max-width: 480px) {
    .top {
        height: 60px;
        padding: 0 12px;
    }

    .logo {
        height: 44px;
    }

    .nav-icon-btn {
        width: 34px;
        height: 34px;
    }

    .nav-icon-btn svg {
        width: 16px;
        height: 16px;
    }

    #cartItemCount {
        min-width: 14px;
        height: 14px;
        font-size: 8px;
    }

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

    .second .container img {
        height: 40vw;
    }

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

    .third .container img {
        height: 30vw;
    }

    .second .container .text,
    .third .container .text {
        font-size: 5vw;
        padding: 24px 10px 10px;
    }

    .text {
        font-size: 10vw;
    }

    .pagination .page-link {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .pagination .page-item:not(.active):not(:first-child):not(:last-child) {
        display: none;
    }
}