/* Pin Shack storefront — shared by home, archives, embeds */
:root {
    --ps-ink: #111;
    --ps-muted: #5c5c5c;
    --ps-paper: #f7f5f1;
    --ps-line: #e6e2db;
    --ps-orange: #e85d04;
    --ps-orange-hot: #d94f00;
    --ps-radius: 10px;
}

body.home .sidebar,
body.home .sidebar-primary { display: none !important; }
body.home .content, body.home .content-sidebar-wrap { width: 100% !important; max-width: 100%; float: none; }

body.home,
body.single-pin,
body.post-type-archive-pin,
body.tax-pin_group,
body.tax-pin_type,
.ps-wrap,
.ps-home {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ps-ink);
}

.ps-home { max-width: 1120px; margin: 0 auto; padding: 4px 16px 28px; }

/* Hero */
.ps-hero {
    background: var(--ps-paper);
    border: 1px solid var(--ps-line);
    border-radius: 16px;
    padding: 16px 18px;
    margin: 0 0 14px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: center;
}
.ps-hero-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ps-orange);
    margin: 0 0 8px;
}
.ps-hero h1 {
    font-size: clamp(1.7rem, 3.2vw, 2.45rem);
    line-height: 1.12;
    font-weight: 850;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    text-transform: none;
}
.ps-hero p {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--ps-muted);
    margin: 0 0 20px;
    max-width: 36rem;
}
.ps-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ps-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 18px; border-radius: 8px;
    font-weight: 800; font-size: 14px; letter-spacing: .02em;
    text-decoration: none !important; border: 2px solid transparent;
}
.ps-btn-primary { background: var(--ps-orange); color: #fff !important; }
.ps-btn-primary:hover { background: var(--ps-orange-hot); }
.ps-btn-ghost { background: #fff; color: var(--ps-ink) !important; border-color: #111; }
.ps-hero-aside {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--ps-line);
    padding: 16px;
}
.ps-hero-aside h3 { margin: 0 0 6px; font-size: 0.95rem; font-weight: 800; text-transform: uppercase; }
.ps-hero-aside p { margin: 0 0 12px; font-size: 0.92rem; color: var(--ps-muted); }
.ps-hero-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ps-hero-thumbs a { display: block; aspect-ratio: 1; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--ps-line); }
.ps-hero-thumbs img { width: 100%; height: 100%; object-fit: contain; }

/* Section heads */
.ps-section { margin: 0 0 18px; }
.ps-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 14px; padding-bottom: 8px;
    border-bottom: 3px solid var(--ps-orange);
}
.ps-section-head h2 {
    margin: 0; font-size: 1.15rem; font-weight: 850; letter-spacing: .04em;
    text-transform: uppercase;
}
.ps-section-head a { font-size: 13px; font-weight: 800; color: var(--ps-orange); text-decoration: none; }

/* Search — light, not a black slab */
.ps-filter-bar {
    background: #fff;
    border: 1px solid var(--ps-line);
    padding: 10px;
    border-radius: 12px;
    margin: 0 0 8px;
}
.ps-filter-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.ps-filter-bar input[type="text"],
.ps-filter-bar select {
    flex: 1 1 160px;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 650;
    font-size: 15px;
    color: #111;
    background: #fff;
}
.ps-filter-bar button,
.ps-reset-btn {
    height: 44px; padding: 0 16px; border: 0; border-radius: 8px;
    font-weight: 800; font-size: 13px; letter-spacing: .04em;
    text-transform: uppercase; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; text-decoration: none;
}
.ps-filter-bar button { background: var(--ps-orange); color: #fff; }
.ps-reset-btn { background: #222; color: #fff; min-width: 44px; }

/* Cards */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-items: stretch;
}
.ps-grid-groups { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ps-card {
    background: #fff;
    border: 1px solid var(--ps-line);
    padding: 8px 8px 10px;
    border-radius: var(--ps-radius);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    box-sizing: border-box;
}
.ps-card:hover { border-color: #ccc; box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.ps-img {
    height: 132px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.ps-img img { max-width: 100%; max-height: 132px; width: auto; height: auto; object-fit: contain; }
.ps-card h2,
.ps-card h3 {
    font-size: 14px;
    margin: 8px 0 4px;
    line-height: 1.3;
    font-weight: 750;
    text-align: center;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #111;
    text-transform: none;
    letter-spacing: 0;
}
.ps-price { color: #111; font-weight: 800; font-size: 15px; text-align: center; margin: 0 0 8px; }

/* One button size everywhere */
.ps-newsletter-embed { background: var(--ps-paper); border: 1px solid var(--ps-line); border-radius: 12px; padding: 16px; }
.ps-buy {
    margin-top: auto;
    width: 100%;
    min-height: 44px;
    overflow: visible;
}
.ps-buy iframe,
.ps-buy .shopify-buy-frame,
.shopify-buy-frame {
    max-width: 100% !important;
}
.ps-buy .shopify-buy__btn,
.shopify-buy__btn {
    width: 100% !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
}

.ps-wrap { max-width: 1180px; margin: 0 auto; padding: 10px 16px; }
.ps-header { border-bottom: 3px solid var(--ps-orange); margin-bottom: 16px; padding-bottom: 6px; }
.ps-header h1 { font-size: 1.35rem; font-weight: 850; margin: 0; color: #111; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 900px) {
    .ps-hero { grid-template-columns: 1fr; padding: 20px 16px; gap: 16px; }
    .ps-hero-actions { flex-direction: column; }
    .ps-hero-actions .ps-btn { width: 100%; }
    .ps-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ps-grid-groups { grid-template-columns: repeat(2, 1fr); }
    .ps-img { height: 110px; }
    .ps-img img { max-height: 110px; }
    .ps-card h2 { font-size: 13px; }
    .ps-filter-row { flex-direction: column; }
    .ps-filter-bar input[type="text"],
    .ps-filter-bar select,
    .ps-filter-bar button,
    .ps-reset-btn { width: 100%; flex: 1 1 auto; }
    .ps-card { padding: 8px; }
    .ps-card h2 { font-size: 11px; }
}


/* Pagination — clearer, not an afterthought */
.ps-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 28px 0 12px;
    padding: 8px 0;
}
.ps-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid var(--ps-line);
    transition: border-color .15s, background .15s, color .15s;
}
.ps-pagination .page-numbers:hover {
    border-color: var(--ps-orange);
    color: var(--ps-orange);
}
.ps-pagination .page-numbers.current {
    background: var(--ps-orange);
    border-color: var(--ps-orange);
    color: #fff;
}
.ps-pagination .page-numbers.prev,
.ps-pagination .page-numbers.next {
    min-width: 48px;
}

/* Footer split: newsletter | promo */
.ps-footer-split {
    margin-top: 8px;
}
.ps-footer-split--two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.ps-footer-col .ps-section-head {
    margin-bottom: 12px;
}
.ps-promo-embed {
    background: var(--ps-paper);
    border: 1px solid var(--ps-line);
    border-radius: 12px;
    padding: 12px;
    overflow: hidden;
}
.ps-promo-embed iframe,
.ps-promo-embed video {
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
}
.ps-promo-embed img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Shopify cart toggle — kill default lime/teal */
.shopify-buy-frame--toggle,
.shopify-buy__btn--cart-toggle,
iframe.shopify-buy-frame--toggle {
    /* frame itself; inner button styled via Buy Button options */
}
/* Fallback if options miss: orange the visible toggle host */
.shopify-buy-frame--toggle {
    filter: none;
}

@media (max-width: 780px) {
    .ps-footer-split--two {
        grid-template-columns: 1fr;
    }
    .ps-pagination .page-numbers {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
    }
}


/* Footer reverse: promo left, newsletter right (DOM order already flipped; this is backup) */
.ps-footer-split--reverse.ps-footer-split--two {
    direction: ltr; /* keep reading direction */
}

/* Low stock badge on cards */
.ps-card {
    position: relative;
}
.ps-low-qty {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}


.ps-price--sold-out {
    color: #999 !important;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: 13px;
}
.ps-low-qty.ps-sold-out {
    background: #666;
}
