/* ci-shop archive — rebuilt to the OLD Breakdance build's measured values
   (reference: docs/_inbox/parity-reference-values.md Item 1, captured live on
   ci-master.test at 1440x1000 and 390x844). Cascade on this page: ci-core tokens
   -> base.css -> archive.css (this file loads last, so it wins on equal specificity).

   Layout model (matches old): full-bleed hero with h1 aligned to the grid gutter;
   a 1366px-wide 4-col grid (37px viewport gutters at 1440); cards with a 6px orange
   top accent, full-bleed image directly under it, and inset body/footer text. */

/* Old archive sits on a near-white page (#fcfcfc), not the grey funnel bg */
body.ci-shop.post-type-archive-product,
body.ci-shop.tax-product_cat { background: rgb(252, 252, 252); }

/* Widen the shop container for the archive only: 1366px content at 1440 (37px
   gutters) via a 1440 max-width + 37px side padding. base.css caps it at 1180. */
body.ci-shop.post-type-archive-product .shop-main,
body.ci-shop.tax-product_cat .shop-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 37px var(--hss-l, 2.5rem);
}

/* -- Hero ---------------------------------------------------------------- */

.shop-hero {
    background: linear-gradient(90deg, rgb(232, 114, 23) 24.6154%, rgb(204, 54, 19) 100%);
    /* Break out of the .shop-main content box to the full viewport width */
    margin: 0 calc(50% - 50vw);
}
.shop-hero__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 37px;
    min-height: 201px;
    display: flex;
    align-items: center;
}
.shop-hero__inner h1 {
    margin: 0;
    color: #fff;
    font-size: 57px;
    font-weight: 700;
    line-height: 69.24px;
}

.shop-toolbar { display: flex; justify-content: flex-end; margin: 1.25rem 0; }

/* -- Grid ---------------------------------------------------------------- */

body.ci-shop ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 33.8864px;
    list-style: none;
    margin: 0;
    padding: 0;
}
/* Neutralise WooCommerce's clearfix pseudo-elements — they become stray grid items */
body.ci-shop ul.products::before,
body.ci-shop ul.products::after {
    content: none;
    display: none;
}
/* WC targets ul.products[class*="columns-"] li.product (higher specificity than
   plain class chains) — mirror the attribute selector to actually win */
body.ci-shop ul.products li.product,
body.ci-shop ul.products[class*="columns-"] li.product {
    float: none;
    width: auto;
    margin: 0;
}

/* -- Card ---------------------------------------------------------------- */

.shop-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgb(224, 224, 224);
    border-top: 6px solid rgb(232, 114, 23);
    border-radius: 0;
    box-shadow: rgba(0, 0, 0, 0.06) 2px 4px 20px 0px;
    padding: 0;
}

/* Image: full-bleed, directly under the accent bar, no side/top padding */
.shop-product-card__media {
    display: block;
    padding: 0;
    margin: 0 0 30.94px;
}
body.ci-shop ul.products li.product .shop-product-card__media img {
    display: block;
    width: 100%;
    height: 158px;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
}

/* Whole-content link (old-build technique): ONE anchor wraps image + body so
   the full media/text region is clickable; the footer button is a separate
   sibling link and keeps its own hover/click. Colour is inherited so the
   global orange link rules don't tint the card copy; only the title tints
   on hover. Inner media/body/price/desc are spans (valid inside <a>) and
   need explicit block display. */
body.ci-shop .shop-product-card__link,
body.ci-shop .shop-product-card__link:hover { display: block; color: inherit; }
.shop-product-card__body,
.shop-product-card__price,
.shop-product-card__desc { display: block; }

/* Body: text is inset 18px each side (image stays full-bleed above) */
.shop-product-card__body {
    padding: 0 18px;
}
.shop-product-card__title {
    font-size: 22.5px;
    font-weight: 500;
    line-height: 27px;
    margin: 0 0 8px;
    color: rgb(32, 32, 32);
    text-align: left;
}
body.ci-shop .shop-product-card__link:hover .shop-product-card__title { color: var(--shop-accent, #e87217); }

.shop-product-card__price,
body.ci-shop .shop-product-card__price .ci-price,
body.ci-shop .shop-product-card__price .woocommerce-Price-amount {
    font-size: 28.125px;
    font-weight: 600;
    line-height: 33.75px;
    color: rgb(32, 32, 32);
}
.shop-product-card__price { margin: 0 0 12.944px; }

.shop-product-card__desc {
    font-size: 16px;
    line-height: 23.7516px;
    color: rgb(100, 100, 100);
    text-align: left;
    margin: 0 0 12.944px;
}
.shop-product-card__desc p { margin: 0 0 16px; }
.shop-product-card__desc p:last-child { margin-bottom: 0; }

/* Footer: pushed to the card bottom; 18px pad; full-width outlined orange button */
.shop-product-card__footer {
    margin-top: auto;
    padding: 18px;
}
body.ci-shop .shop-product-card__footer .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 10px;
    font-size: 18px;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
    text-transform: capitalize;
    background: transparent;
    color: rgb(232, 114, 23);
    border: 1px solid rgb(232, 114, 23);
    border-radius: 3px;
}
body.ci-shop .shop-product-card__footer .button:hover {
    background: rgb(232, 114, 23);
    color: #fff;
}

/* -- Responsive ---------------------------------------------------------- */

@media (max-width: 1024px) {
    body.ci-shop ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    body.ci-shop.post-type-archive-product .shop-main,
    body.ci-shop.tax-product_cat .shop-main { padding: 0 20px var(--hss-l, 2rem); }

    .shop-hero__inner { padding: 0 20px; min-height: 147px; }
    .shop-hero__inner h1 { font-size: 39px; line-height: 49.27px; }

    body.ci-shop ul.products { grid-template-columns: 1fr; }

    .shop-product-card__media { margin-bottom: 26px; }
    body.ci-shop ul.products li.product .shop-product-card__media img { height: 174px; }

    .shop-product-card__body { padding: 0 13px; }
    .shop-product-card__title { font-size: 20px; line-height: 24px; }
    .shop-product-card__price,
    body.ci-shop .shop-product-card__price .ci-price,
    body.ci-shop .shop-product-card__price .woocommerce-Price-amount {
        font-size: 25px; line-height: 30px;
    }
    .shop-product-card__footer { padding: 13px; }
    body.ci-shop .shop-product-card__footer .button { font-size: 16px; }
}
