/* ── Jouyous Store — Pink Design System ──────────────────────────────────── */

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --pink:        #f06292;
    --pink-dark:   #e91e8c;
    --pink-light:  #fce4ec;
    --pink-mid:    #f8bbd0;
    --text:        #2d2d2d;
    --muted:       #888;
    --border:      #f0d0db;
    --bg:          #fff;
    --bg-soft:     #fff8f9;
    --radius:      12px;
    --radius-sm:   8px;
    --radius-lg:   20px;
    --shadow:      0 4px 20px rgba(240,98,146,.12);
    --shadow-lg:   0 8px 40px rgba(240,98,146,.18);
    --transition:  all .25s ease;
    --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    margin: 0;
    overflow-x: hidden;
    min-width: 0;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

/* Remove number spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ─── Typography ────────────────────────────────────────────────────────── */
.text-pink   { color: var(--pink); }
.text-muted  { color: var(--muted); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font);
    text-decoration: none;
}
.btn-pink {
    background: var(--pink);
    color: #fff;
}
.btn-pink:hover {
    background: var(--pink-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(240,98,146,.35);
}
.btn-outline {
    background: transparent;
    color: var(--pink);
    border: 2px solid var(--pink);
}
.btn-outline:hover {
    background: var(--pink-light);
}
.btn-dark {
    background: var(--text);
    color: #fff;
}
.btn-dark:hover {
    background: #111;
    transform: translateY(-1px);
}
.btn-sm { padding: 7px 16px; font-size: .78rem; white-space: nowrap; }
.btn-lg { padding: 13px 30px; font-size: .95rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ─── Badges / Labels ───────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.4;
}
.badge-pink   { background: var(--pink-light); color: var(--pink-dark); }
.badge-sale   { background: #ffe0e6; color: #c62828; }
.badge-new    { background: #e8f5e9; color: #2e7d32; }
.badge-hot    { background: #fff3e0; color: #e65100; }
.badge-dark   { background: var(--text); color: #fff; }
.badge-muted  { background: #f5f5f5; color: var(--muted); }

/* ─── Form inputs ───────────────────────────────────────────────────────── */
input, select, textarea { min-width: 0; box-sizing: border-box; }
.form-control {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    transition: border-color .2s;
    outline: none;
    box-sizing: border-box;
}
.form-control:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(240,98,146,.12);
}
.form-control::placeholder { color: #bbb; }
.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}
.form-group { margin-bottom: 16px; min-width: 0; max-width: 100%; }

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    max-width: 100%;
    box-sizing: border-box;
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 16px; }

/* ─── Product Card ──────────────────────────────────────────────────────── */
.product-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.product-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
}
/* Full-area transparent link — makes entire image clickable */
.product-card__img-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
/* Wishlist, overlay, badges sit above the full-area link */
.product-card__wish,
.product-card__overlay,
.product-card__badges { z-index: 2; }
.product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-card__img img {
    transform: scale(1.06);
}
.product-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(240,98,146,.08);
    opacity: 0;
    transition: opacity .3s;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    gap: 8px;
}
.product-card:hover .product-card__overlay { opacity: 1; }
.product-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-card__wish {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: var(--transition);
    color: var(--muted);
}
.product-card__wish:hover { color: var(--pink); transform: scale(1.1); }
.product-card__wish.active { background: var(--pink); color: #fff; }
.product-card__wish.active:hover { background: var(--pink-dark); color: #fff; }
.product-card__body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.card-cart-action { margin-top: auto; padding-top: 10px; }
.product-card__name {
    font-weight: 600;
    font-size: .88rem;
    color: var(--text);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.product-card__price {
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-card__price .current {
    font-weight: 700;
    font-size: .95rem;
    color: var(--pink-dark);
}
.product-card__price .original {
    font-size: .78rem;
    color: var(--muted);
    text-decoration: line-through;
}
.product-card__colors {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}
.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,.12);
    cursor: pointer;
}

/* ─── Section headers ───────────────────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 36px;
}
.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.section-header p {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
}
.section-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--pink), var(--pink-dark));
    border-radius: 3px;
    margin: 10px auto 0;
}

/* ─── Progress steps ────────────────────────────────────────────────────── */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}
.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    border: 2px solid var(--border);
    color: var(--muted);
    background: #fff;
    z-index: 1;
    transition: var(--transition);
}
.step.active .step-circle {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
    box-shadow: 0 4px 12px rgba(240,98,146,.3);
}
.step.done .step-circle {
    background: var(--pink-light);
    border-color: var(--pink);
    color: var(--pink-dark);
}
.step-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.step.active .step-label { color: var(--pink-dark); }
.step-line {
    height: 2px;
    width: 60px;
    background: var(--border);
    margin-top: -18px; /* vertically align with circle center */
}
.step-line.done { background: var(--pink); }
.step.done[onclick]:hover .step-circle { background: var(--pink-dark); transform: scale(1.1); }
.step.done[onclick] .step-circle { transition: background .2s, transform .2s; }

/* ─── Nav ───────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1.5px solid var(--border);
    box-shadow: 0 2px 12px rgba(240,98,146,.06);
}
.site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-header__logo img { height: 28px; width: auto; }

.site-nav {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}
.site-nav a, .site-nav .nav-btn {
    padding: 7px 14px;
    border-radius: 50px;
    font-size: .83rem;
    font-weight: 600;
    color: var(--muted);
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font);
    position: relative;
}
.site-nav a:hover, .site-nav .nav-btn:hover,
.site-nav a.active { color: var(--pink-dark); background: var(--pink-light); }

/* Search bar */
.nav-search {
    display: none;
    flex: 1;
    max-width: 380px;
    position: relative;
}
.nav-search input {
    width: 100%;
    padding: 9px 16px 9px 42px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-size: .84rem;
    font-family: var(--font);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    color: var(--text);
    background: var(--bg-soft);
}
.nav-search input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(240,98,146,.1);
    background: #fff;
}
.nav-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    width: 16px;
    height: 16px;
}

/* Search dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    z-index: 500;
}
.search-dropdown.open { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    transition: background .15s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}
.search-result-item:hover { background: var(--bg-soft); }
.search-result-item img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.search-result-item .name { font-size: .85rem; font-weight: 600; }
.search-result-item .price { font-size: .78rem; color: var(--pink-dark); font-weight: 700; }
.search-no-result { padding: 20px; text-align: center; color: var(--muted); font-size: .85rem; }
.search-see-all { display:block; padding:10px 16px; text-align:center; font-size:.82rem; color:var(--pink-dark); border-top:1px solid var(--border); text-decoration:none; background:#fafafa; }
.search-see-all:hover { background:var(--pink-light); }

/* ── Notification panel ───────────────────────────────────────────────────── */
#notifList { padding: 0; }
.notif-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 13px 16px !important;
    border-bottom: 1px solid var(--border) !important;
    cursor: pointer;
    transition: background .15s;
    background: #fff;
    text-decoration: none;
    color: var(--text);
}
.notif-item:last-child { border-bottom: none !important; }
.notif-item:hover { background: var(--bg-soft) !important; }
.notif-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #f06292, #e91e8c);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: .9rem; color: #fff;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-msg { font-size: .85rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.notif-item-time { font-size: .72rem; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.notif-dismiss {
    width: 24px; height: 24px; border-radius: 50%;
    background: transparent; border: 1px solid var(--border);
    cursor: pointer; color: var(--muted); font-size: .65rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
    opacity: 0; transition: opacity .15s, background .15s;
}
.notif-item:hover .notif-dismiss { opacity: 1; }
.notif-dismiss:hover { background: #fce4ec; border-color: var(--pink); color: var(--pink); }
.notif-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: .85rem; }
.notif-empty-icon { font-size: 2.2rem; opacity: .25; margin-bottom: 10px; display: block; }
@keyframes notifSlideIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Nav right icons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}
.nav-icon-btn:hover { background: var(--pink-light); border-color: var(--pink); color: var(--pink-dark); }
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--pink);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Cart drawer */
.cart-drawer {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    display: none;
    overflow: hidden;
}
.cart-drawer.open { display: block; }
.cart-drawer__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-drawer__header h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.cart-drawer__items { max-height: 300px; overflow-y: auto; padding: 12px 16px; }
.cart-drawer__item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-soft);
}
.cart-drawer__item:last-child { border-bottom: none; }
.cart-drawer__item img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.cart-drawer__footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}
.cart-drawer__total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 12px;
}

/* User dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 500;
    overflow: hidden;
    display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown a, .user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    width: 100%;
    text-align: left;
    font-size: .83rem;
    font-weight: 500;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
    font-family: var(--font);
    text-decoration: none;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg-soft); }
.user-dropdown__header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
}
.user-dropdown__name { font-weight: 700; font-size: .88rem; }
.user-dropdown__email { font-size: .75rem; color: var(--muted); }

/* Mobile menu */
.mobile-menu {
    display: none;
    background: #fff;
    border-bottom: 1.5px solid var(--border);
    padding: 16px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 10px 0;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 1px solid var(--bg-soft);
    transition: color .2s;
}
.mobile-menu a:hover { color: var(--pink-dark); }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(135deg, #2d1832 0%, #4a1942 100%);
    color: rgba(255,255,255,.85);
    padding: 56px 24px 24px;
    margin-top: 64px;
}
.site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
}
.site-footer__brand p {
    font-size: .83rem;
    line-height: 1.7;
    color: rgba(255,255,255,.6);
    margin-top: 12px;
}
.site-footer__social { display: flex; gap: 10px; margin-top: 16px; }
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.8);
    transition: var(--transition);
    text-decoration: none;
}
.social-icon:hover { background: var(--pink); color: #fff; }
.site-footer__col h4 {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    margin: 0 0 16px;
}
.site-footer__col a {
    display: block;
    font-size: .82rem;
    color: rgba(255,255,255,.6);
    margin-bottom: 9px;
    transition: color .2s;
    text-decoration: none;
}
.site-footer__col a:hover { color: var(--pink); }
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .75rem;
    color: rgba(255,255,255,.4);
    flex-wrap: wrap;
    gap: 8px;
}
.footer-newsletter { display: flex; }
.footer-newsletter input {
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50px 0 0 50px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: .82rem;
    outline: none;
    width: 170px;
    font-family: var(--font);
}
.footer-newsletter input::placeholder { color: rgba(255,255,255,.35); }
.footer-newsletter button {
    padding: 9px 16px;
    background: var(--pink);
    color: #fff;
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    font-family: var(--font);
}
.footer-newsletter button:hover { background: var(--pink-dark); }

/* ─── Toast ─────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
    max-width: 360px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    display: none;
}
.toast.show {
    display: flex;
    gap: 12px;
    animation: toastIn .3s ease;
}
.toast.hide { animation: toastOut .3s ease forwards; }
.toast__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pink-light);
    color: var(--pink-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.toast__icon.success { background: #e8f5e9; color: #2e7d32; }
.toast__icon.error   { background: #ffebee; color: #c62828; }
.toast__body { flex: 1; }
.toast__title { font-size: .88rem; font-weight: 700; margin: 0 0 2px; }
.toast__desc  { font-size: .78rem; color: var(--muted); margin: 0; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* Legacy toast support */
#toast.show { display: block !important; animation: slideIn .3s ease forwards; }
#toast.hide { animation: slideOut .3s ease forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-12px); } }

/* ─── Alert banners ─────────────────────────────────────────────────────── */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    overflow: hidden;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}
.alert-success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }
.alert-error   { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }
.alert-info    { background: #e3f2fd; border: 1px solid #90caf9; color: #1565c0; }
.alert-warning { background: #fff8e1; border: 1px solid #ffe082; color: #e65100; }

/* ─── Skeleton loader ───────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f8e6ec 25%, #f3d0de 50%, #f8e6ec 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Utility classes ───────────────────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    width: 100%;
}
.section { padding-top: 36px; padding-bottom: 36px; }
.section-sm { padding-top: 24px; padding-bottom: 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-5 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }

.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }

.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ─── Divider ───────────────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ─── Quantity control ──────────────────────────────────────────────────── */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}
.qty-control button {
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
}
.qty-control button:hover { background: var(--pink-light); color: var(--pink-dark); }
.qty-control span {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: .88rem;
}

/* Card qty remove button hover */
.card-qty-wrap button[onclick^="cardRemove"]:hover {
    background: var(--pink-dark) !important;
    color: #fff !important;
    border-color: var(--pink-dark) !important;
}

/* ─── Size buttons ──────────────────────────────────────────────────────── */
.size-btn {
    min-width: 42px;
    height: 36px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 10px;
    font-family: var(--font);
    color: var(--text);
}
.size-btn:hover, .size-btn.active {
    border-color: var(--pink);
    background: var(--pink-light);
    color: var(--pink-dark);
}

/* ─── Tabs ──────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    font-family: var(--font);
}
.tab-btn.active { color: var(--pink-dark); border-bottom-color: var(--pink); }
.tab-btn:hover  { color: var(--pink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
.overflow-y-auto::-webkit-scrollbar,
.cart-drawer__items::-webkit-scrollbar { width: 4px; }
.overflow-y-auto::-webkit-scrollbar-track,
.cart-drawer__items::-webkit-scrollbar-track { background: transparent; }
.overflow-y-auto::-webkit-scrollbar-thumb,
.cart-drawer__items::-webkit-scrollbar-thumb { background: var(--pink-mid); border-radius: 4px; }

/* ─── Page-level hero ───────────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--pink-light) 0%, #fff 100%);
    padding: 28px 16px;
    text-align: center;
    border-bottom: 1.5px solid var(--border);
}
.page-hero h1 { font-size: 1.35rem; font-weight: 700; margin: 0 0 6px; }
.page-hero p  { color: var(--muted); font-size: .85rem; margin: 0; }

/* ─── Breadcrumb ────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--muted);
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--pink-dark); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--pink-dark); font-weight: 600; }

/* ─── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-state svg { margin: 0 auto 16px; opacity: .35; }
.empty-state h3 { font-size: 1.1rem; margin: 0 0 6px; color: var(--text); }
.empty-state p  { font-size: .85rem; margin: 0 0 20px; }

/* ─── Reusable layout classes — mobile-first base ───────────────────────── */

/* Shop: sidebar + products — stacked on mobile */
.shop-layout { display:grid; grid-template-columns:1fr; gap:20px; align-items:start; }
.shop-grid   { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }

/* Cart: items + summary — stacked on mobile */
.cart-layout { display:grid; grid-template-columns:1fr; gap:20px; align-items:start; }
.cart-items-header { display:none; }
.cart-item-row {
    display:grid; grid-template-columns:1fr minmax(80px,auto);
    grid-template-rows: auto auto;
    gap:10px; padding:16px 0; border-bottom:1px solid var(--border); align-items:center;
}
.cart-item-row .cart-col-info  { grid-column: 1; grid-row: 1; }
.cart-item-row .cart-col-qty   { grid-column: 2; grid-row: 1; align-self:center; }
.cart-item-row .cart-col-price { grid-column: 1; grid-row: 2; }
.cart-item-row .cart-col-del   { grid-column: 2; grid-row: 2; text-align:right; }

/* Product detail — stacked on mobile */
.product-detail-grid { display:grid; grid-template-columns:1fr; gap:24px; margin-bottom:32px; }
.related-grid        { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.detail-perks-grid   { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:20px; }

/* Home sections — stacked on mobile */
.perks-strip-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; text-align:center; }
.banner-grid      { display:grid; grid-template-columns:1fr; gap:24px; align-items:center; }
.banner-grid > div:last-child { order:-1; max-height:260px; overflow:hidden; }

/* Step line — shorter on mobile */
.step-line { height:2px; flex:1; min-width:4px; background:var(--border); margin-top:-18px; }
.step-line.done { background:var(--pink); }
/* Step label — wrap on mobile so steps don't overflow */
.step-label { white-space:normal; text-align:center; max-width:48px; line-height:1.3; font-size:.65rem; }
/* Progress steps — contained, no overflow */
.progress-steps { overflow:hidden; width:100%; box-sizing:border-box; }
.progress-steps .step-circle { width:28px; height:28px; font-size:.72rem; }
.progress-steps .step-circle i { font-size:.65rem; }

/* Mobile search button visible by default */
.mobile-search-btn { display: flex !important; }
/* Hamburger visible by default on mobile */
.hamburger-btn { display: flex !important; }
/* Sign-in button hidden by default on mobile */
.btn-mobile-hide { display: none !important; }
/* Wishlist always visible in nav bar */
.nav-wishlist-desktop { display: flex !important; }

/* Smaller icons on mobile to fit all items */
.nav-icon-btn { width: 36px; height: 36px; }

/* Account dropdown hidden on mobile — accessible via hamburger menu */
#user-wrap { display: none !important; }
.nav-account-btn { border-radius:50%; }
.nav-account-name { display: none; }
.nav-account-chevron { display: none; }

/* ─── Responsive — min-width (mobile-first) ─────────────────────────────── */

/* ── sm: 480px ─── */
@media (min-width: 480px) {
    .shop-grid { gap: 12px; }
}

/* ── md: 768px ─── */
@media (min-width: 768px) {
    /* Nav */
    .site-nav          { display: flex; }
    .nav-search        { display: flex; }
    .btn-mobile-hide   { display: inline-flex !important; }
    .mobile-search-btn { display: none !important; }
    .hamburger-btn     { display: none !important; }
    .nav-wishlist-desktop { display: flex !important; }
    #user-wrap         { display: block !important; }
    .nav-icon-btn      { width: 40px; height: 40px; }
    .nav-actions       { gap: 6px; }
    .site-header__inner { padding: 0 24px; height: 68px; gap: 20px; }

    /* Logo full size on desktop */
    .site-header__logo img { height: 44px; }

    /* Account button: full pill with name on desktop */
    .nav-account-btn   { width: auto; border-radius: 50px; padding: 0 12px; gap: 6px; }
    .nav-account-name  { display: inline; font-size: .8rem; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-account-chevron { display: inline; }

    /* Spacing */
    .container  { padding: 0 24px; }
    .section    { padding-top: 56px; padding-bottom: 56px; }
    .section-sm { padding-top: 32px; padding-bottom: 32px; }

    /* Page hero */
    .page-hero   { padding: 40px 24px; }
    .page-hero h1 { font-size: 1.8rem; }

    /* Section header */
    .section-header h2 { font-size: 1.8rem; }

    /* Footer */
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }

    /* Grids */
    .grid-2 { gap: 20px; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .grid-4 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .grid-5 { grid-template-columns: repeat(3, 1fr); gap: 20px; }

    /* Shop */
    .shop-layout { grid-template-columns: 220px 1fr; gap: 28px; }
    .shop-grid   { grid-template-columns: repeat(2,1fr); gap: 16px; }

    /* Cart */
    .cart-layout { grid-template-columns: 1fr 360px; gap: 28px; }
    .cart-items-header {
        display:grid; grid-template-columns:1fr auto auto auto;
        gap:16px; padding:12px 0; border-bottom:2px solid var(--border);
        font-size:.75rem; font-weight:700; text-transform:uppercase;
        letter-spacing:.07em; color:var(--muted); align-items:center;
    }
    .cart-item-row {
        grid-template-columns: 1fr auto auto auto;
        grid-template-rows: auto;
        gap:16px; padding:20px 0;
    }
    .cart-item-row .cart-col-info  { grid-column: auto; grid-row: auto; }
    .cart-item-row .cart-col-qty   { grid-column: auto; grid-row: auto; align-self: center; }
    .cart-item-row .cart-col-price { grid-column: auto; grid-row: auto; }
    .cart-item-row .cart-col-del   { grid-column: auto; grid-row: auto; text-align: right; }

    /* Product detail */
    .product-detail-grid { grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom:56px; }
    .related-grid        { grid-template-columns: repeat(3,1fr); gap:20px; }
    .detail-perks-grid   { grid-template-columns: 1fr 1fr; gap: 10px; margin-top:24px; }

    /* Home */
    .perks-strip-grid { grid-template-columns: repeat(4,1fr); gap: 16px; }
    .banner-grid      { grid-template-columns: 1fr 1fr; gap: 40px; }
    .banner-grid > div:last-child { order: 0; max-height: none; overflow: visible; }

    /* Step line */
    .step-line { width: 60px; }

    /* Cart drawer */
    .cart-drawer { width: 360px; }
}

/* ── lg: 1024px ─── */
@media (min-width: 1024px) {
    .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-5 { grid-template-columns: repeat(5, 1fr); }
    .shop-layout { grid-template-columns: 240px 1fr; gap: 32px; }
    .shop-grid   { grid-template-columns: repeat(3,1fr); gap: 20px; }
    .cart-layout { grid-template-columns: 1fr 380px; gap: 32px; }
    .product-detail-grid { gap: 48px; margin-bottom:64px; }
    .related-grid { grid-template-columns: repeat(4,1fr); }
}

/* ── Carousel nav buttons ── */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background .2s;
}
.carousel-prev-btn { left: 10px; }
.carousel-next-btn { right: 10px; }

/* Carousel slide content padding — clear of buttons on mobile */
.hero-slide-content { padding: 0 56px 0 56px; }

@media (min-width: 768px) {
    .carousel-nav-btn  { width: 46px; height: 46px; }
    .carousel-prev-btn { left: 20px; }
    .carousel-next-btn { right: 20px; }
    .hero-slide-content { padding: 0 8%; }
}

/* ── Perks strip: hide sub description on small screens ── */
@media (max-width: 479px) {
    .perk-item .perk-sub { display: none; }
}

/* ── Hero height on small screens ── */
@media (max-width: 480px) {
    .hero-slide { height: 55vh !important; min-height: 300px; }
}

/* ── Cart drawer: fixed to viewport on mobile ── */
@media (max-width: 767px) {
    .cart-drawer {
        position: fixed;
        top: 60px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}
