/* GoodwillCart Masonry Homepage — Pinterest-style 5-column feed */
.gwc-masonry-page {
    background: #f7f7f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* ---------- Header ---------- */
.gwc-mh-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}
.gwc-menu-button { display: none; }
.gwc-mh-header__top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    max-width: 1600px;
    margin: 0 auto;
}
.gwc-mh-logo img { height: 42px; width: auto; }
.gwc-mh-logo__tag { font-size: 11px; color: #666; display: block; margin-top: -4px; }
.gwc-mh-search { flex: 1; max-width: 640px; margin: 0 auto; position: relative; }
.gwc-mh-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #f5f5f6;
    font-size: 14px;
}
.gwc-mh-search button {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 16px; cursor: pointer; color: #666;
}
.gwc-mh-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.gwc-mh-actions a { color: #333; text-decoration: none; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.gwc-mh-badge {
    background: #e41e2b; color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 999px; min-width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ---------- Category nav ---------- */
.gwc-mh-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
}
.gwc-mh-nav__inner {
    display: flex; align-items: center; gap: 4px;
    max-width: 1600px; margin: 0 auto; padding: 0 20px;
    overflow-x: auto; scrollbar-width: none;
}
.gwc-mh-nav__inner::-webkit-scrollbar { display: none; }
.gwc-mh-nav a {
    padding: 12px 14px; font-size: 14px; color: #333; text-decoration: none;
    white-space: nowrap; border-bottom: 3px solid transparent;
}
.gwc-mh-nav a.active { color: #111; font-weight: 700; border-bottom-color: #e41e2b; }

/* ---------- Filter chips ---------- */
.gwc-mh-chips {
    max-width: 1600px; margin: 0 auto; padding: 14px 20px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.gwc-mh-chips::-webkit-scrollbar { display: none; }
.gwc-mh-chip {
    flex: 0 0 auto; padding: 8px 16px; border-radius: 999px;
    background: #fff; border: 1px solid #e5e5e5; font-size: 13px;
    cursor: pointer; color: #333; white-space: nowrap;
}
.gwc-mh-chip:hover { border-color: #111; }
.gwc-mh-chip.active { background: #111; color: #fff; border-color: #111; }

/* ---------- Masonry grid ---------- */
.gwc-mh-feed {
    max-width: 1600px; margin: 0 auto; padding: 6px 20px 30px;
    column-count: 5; column-gap: 16px;
}
@media (max-width: 1300px) { .gwc-mh-feed { column-count: 4; } }
@media (max-width: 1024px) { .gwc-mh-feed { column-count: 3; } }
@media (max-width: 700px)  { .gwc-mh-feed { column-count: 2; column-gap: 10px; padding: 6px 10px 20px; } }

.gwc-card {
    break-inside: avoid; margin-bottom: 16px;
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    position: relative;
}
.gwc-card__media { position: relative; display: block; }
.gwc-card__media img { width: 100%; height: auto; display: block; }
.gwc-card__badge {
    position: absolute; top: 10px; left: 10px;
    font-size: 11px; font-weight: 700; color: #fff;
    padding: 4px 10px; border-radius: 6px;
}
.gwc-card__badge--deal { background: #e41e2b; }
.gwc-card__badge--spring { background: #2e9e44; }
.gwc-card__badge--bestseller { background: #f5820b; }
.gwc-card__badge--sponsored { background: #7c3aed; }
.gwc-card__badge--recipe { background: #2e9e44; }
.gwc-card__badge--beauty { background: #a855f7; }
.gwc-card__badge--tech { background: #2563eb; }
.gwc-card__badge--home { background: #1d4ed8; }
.gwc-card__badge--health { background: #0d9488; }
.gwc-card__badge--news { background: #e41e2b; }
.gwc-card__badge--life { background: #e41e2b; }
.gwc-card__badge--kitchen { background: #f5820b; }
.gwc-card__badge--video { background: #e41e2b; }
.gwc-card__badge--food { background: #e41e2b; }
.gwc-card__wish {
    position: absolute; top: 8px; right: 8px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.92); border: none; cursor: pointer;
    font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.gwc-card__duration {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,.75); color: #fff; font-size: 11px; font-weight: 600;
    padding: 3px 8px; border-radius: 6px;
}
.gwc-card__play {
    position: absolute; inset: 0; margin: auto;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0,0,0,.55); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.gwc-card__play::after {
    content: ""; border-left: 18px solid #fff;
    border-top: 11px solid transparent; border-bottom: 11px solid transparent;
    margin-left: 4px;
}
.gwc-card__body { padding: 12px 14px; }
.gwc-card__title { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0 0 6px; }
.gwc-card__title a { color: #1a1a1a; text-decoration: none; }
.gwc-card__meta { font-size: 12px; color: #777; margin-bottom: 8px; }
.gwc-card__stars { color: #f5a623; font-size: 12px; }
.gwc-card__price { font-size: 16px; font-weight: 700; }
.gwc-card__price s { color: #999; font-weight: 400; font-size: 13px; margin-left: 6px; }
.gwc-card__off {
    background: #e41e2b; color: #fff; font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 5px; margin-left: 6px;
}
.gwc-card__prime { font-size: 11px; color: #00a8e1; font-weight: 700; font-style: italic; }
.gwc-card__add {
    display: block; width: 100%; margin-top: 10px;
    background: #e41e2b; color: #fff; border: none; border-radius: 999px;
    padding: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.gwc-card__add:hover { background: #c81623; }
.gwc-card__engage {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 14px; border-top: 1px solid #f0f0f0;
    font-size: 12px; color: #666;
}
.gwc-card__engage button {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 5px; font-size: 12px; color: #666; padding: 0;
}
.gwc-card__engage .spacer { flex: 1; }
.gwc-card__sponsored-by { font-size: 11px; color: #999; padding: 0 14px 10px; }
.gwc-card__cta {
    display: block; margin: 0 14px 12px; text-align: center;
    background: #111; color: #fff; border-radius: 999px; padding: 10px;
    font-size: 14px; font-weight: 600; text-decoration: none;
}
.gwc-card__close {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,.9); border: none; cursor: pointer; font-size: 13px;
}
.gwc-card--ad { background: #fafafa; border: 1px dashed #ddd; }
.gwc-card__ad-label { font-size: 11px; color: #999; padding: 8px 14px 0; display: flex; justify-content: space-between; }

/* ---------- Load more ---------- */
.gwc-mh-loadwrap { text-align: center; padding: 10px 0 40px; }
.gwc-mh-load {
    background: #fff; border: 1px solid #e2e2e2; border-radius: 999px;
    padding: 12px 34px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.gwc-mh-load:hover { border-color: #111; }
.gwc-mh-load:disabled { opacity: .55; cursor: default; }
.gwc-mh-sentinel { height: 1px; }

/* ---------- Footer ---------- */
.gwc-mh-footer { background: #fff; border-top: 1px solid #eee; margin-top: 10px; }
.gwc-mh-footer__grid {
    max-width: 1600px; margin: 0 auto; padding: 36px 20px 20px;
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1fr; gap: 24px;
}
.gwc-mh-footer h4 { font-size: 13px; margin: 0 0 10px; }
.gwc-mh-footer__grid a { display: block; font-size: 13px; color: #555; text-decoration: none; margin-bottom: 7px; }
.gwc-mh-footer__bottom {
    max-width: 1600px; margin: 0 auto; padding: 16px 20px 24px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: #888; border-top: 1px solid #f0f0f0;
}
@media (max-width: 900px) { .gwc-mh-footer__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Mobile: compact header + hamburger menu ---------- */
.gwc-mh-drawer, .gwc-mh-drawer__scrim { display: none; }

@media (max-width: 700px) {
    .gwc-masonry-page { background: #fff; }
    .gwc-mh-nav, .gwc-mh-chips, .gwc-mh-footer { display: none; }

    /* Compact header: hamburger | logo | icons, search below */
    .gwc-mh-header {
        position: sticky; top: 0; z-index: 150;
        background: #fff;
        box-shadow: 0 1px 8px rgba(0,0,0,.08);
    }
    .gwc-mh-header__top { flex-wrap: wrap; gap: 8px; padding: 10px 14px; align-items: center; }
    .gwc-menu-button {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 36px; height: 36px; padding: 7px;
        background: #f5f5f5; border: none; border-radius: 10px; cursor: pointer;
    }
    .gwc-menu-button span { display: block; height: 2.5px; background: #222; border-radius: 2px; }
    .gwc-mh-logo img { height: 32px; }
    .gwc-mh-logo__tag { display: none; }
    .gwc-mh-search { order: 10; flex: 1 1 100%; max-width: 100%; }
    .gwc-mh-search input {
        font-size: 14px; padding: 10px 16px 10px 40px;
        background: #f1f1f1; border: 1px solid #e4e4e4; border-radius: 24px;
    }
    .gwc-mh-search input:focus { background: #fff; border-color: #c00; outline: none; }
    .gwc-mh-search button { left: 14px; font-size: 16px; color: #888; }
    .gwc-mh-actions { margin-left: auto; gap: 16px; align-items: center; }
    .gwc-mh-actions a { font-size: 22px; text-decoration: none; position: relative; }
    .gwc-mh-actions .gwc-mh-badge {
        position: absolute; top: -6px; right: -8px;
        min-width: 17px; height: 17px; font-size: 10px; line-height: 17px;
    }
    .gwc-mh-actions a.gwc-mh-hide-mobile { display: none; }

    /* Slide-out drawer */
    .gwc-mh-drawer {
        display: block; position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
        width: 82vw; max-width: 330px; background: #fff;
        transform: translateX(-105%); transition: transform .28s cubic-bezier(.2,.8,.3,1);
        overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,.18);
        border-radius: 0 20px 20px 0;
    }
    .gwc-mh-drawer.open { transform: translateX(0); }
    .gwc-mh-drawer__scrim {
        display: block; position: fixed; inset: 0; z-index: 290;
        background: rgba(0,0,0,.45); opacity: 0; pointer-events: none;
        transition: opacity .25s ease;
    }
    .gwc-mh-drawer__scrim.open { opacity: 1; pointer-events: auto; }
    .gwc-mh-drawer__head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 16px 18px; border-bottom: 1px solid #f0f0f0;
        position: sticky; top: 0; background: #fff; z-index: 2;
    }
    .gwc-mh-drawer__close {
        background: #f5f5f5; border: none; border-radius: 50%;
        width: 34px; height: 34px; font-size: 16px; cursor: pointer; color: #333;
    }
    .gwc-mh-drawer__section {
        font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
        color: #999; padding: 16px 20px 6px;
    }
    .gwc-mh-drawer__nav a {
        display: flex; align-items: center; gap: 14px;
        padding: 11px 20px; font-size: 15px; font-weight: 500; color: #222;
        text-decoration: none;
    }
    .gwc-mh-drawer__nav a:active { background: #f7f7f7; }
    .gwc-mh-drawer__nav a .gwc-mh-drawer__ico {
        width: 36px; height: 36px; border-radius: 12px; background: #f4f4f4;
        display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
    }
    .gwc-mh-drawer__foot {
        padding: 16px 20px 30px; display: flex; flex-direction: column; gap: 4px;
        border-top: 1px solid #f0f0f0; margin-top: 8px;
    }
    .gwc-mh-drawer__foot a {
        display: flex; align-items: center; gap: 14px;
        font-size: 15px; font-weight: 500; color: #444; text-decoration: none;
        padding: 10px 0;
    }
    .gwc-mh-drawer__foot a .gwc-mh-drawer__ico {
        width: 36px; height: 36px; border-radius: 12px; background: #fef2f2;
        display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
    }

    /* Feed: pure pins */
    .gwc-mh-feed { column-count: 2; column-gap: 12px; padding: 12px 12px 30px; }
    .gwc-card { background: none; border-radius: 0; box-shadow: none; margin-bottom: 18px; overflow: visible; }
    .gwc-card__media img { border-radius: 18px; }
    .gwc-card__badge, .gwc-card__wish, .gwc-card__duration,
    .gwc-card__add, .gwc-card__engage, .gwc-card__stars,
    .gwc-card__off, .gwc-card__prime, .gwc-card__play { display: none; }
    .gwc-card__body { padding: 8px 4px 0; }
    .gwc-card__title {
        font-size: 13px; font-weight: 600; color: #111;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        overflow: hidden; margin-bottom: 2px;
    }
    .gwc-card__meta { display: none; }
    .gwc-card__price { font-size: 12px; font-weight: 400; color: #767676; }
    .gwc-card__price s { display: none; }
    .gwc-card__sponsored-by { display: none; }
}

/* Clamp titles to 2 lines everywhere for a tidy pin look */
.gwc-card__title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
