/* ==================================================
   FIRST STOP — SHOP, ARCHIVE & SINGLE PRODUCT
   Layout parity with tirecare.co, built on the theme
   design tokens in css/style.css (no Elementor).
================================================== */

.fst-shop-head,
.fst-shop-filters,
.fst-shop-loop,
.fst-single-product {
    position: relative;
}

.fst-shop-head {
    padding: 26px 0 20px;
    background: transparent;
    border-bottom: 1px solid var(--line);
}

.fst-shop-head .fst-shop-title {
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--red);
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 800;
    color: var(--ink);
}

.fst-shop-head .fst-shop-intro {
    max-width: 760px;
    margin-top: 12px;
    color: var(--grey);
    font-size: 15.5px;
    line-height: 1.6;
}

.fst-shop-breadcrumb {
    margin-bottom: 10px;
    color: var(--grey);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fst-shop-breadcrumb a:hover {
    color: var(--red);
}

/* ---------- Filters band ---------- */

.fst-shop-filters {
    padding: 40px 0 0;
}

.fst-shop-filters .fst-filters-head {
    margin-bottom: 20px;
}

.fst-shop-filters .fst-filters-title {
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 800;
    color: var(--ink);
}

/* ---------- Toolbar: count + sorting ---------- */

.fst-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;

    margin: 30px 0 22px;
    padding: 14px 18px;

    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper-2);
}

.fst-shop-toolbar .woocommerce-result-count {
    margin: 0;
    color: var(--charcoal);
    font-size: 15px;
    font-weight: 600;
}

.fst-shop-toolbar .woocommerce-ordering {
    margin: 0;
}

.fst-shop-toolbar select {
    height: 44px;
    padding: 0 14px;
    border: 1px solid #ccd5e2;
    border-radius: 8px;
    background: #fff;
    font-family: var(--body);
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Product grid ---------- */

.fst-shop-loop {
    padding: 0 0 80px;
}

.fst-shop-loop .prod-grid {
    margin-top: 6px;
}

.fst-shop-empty {
    padding: 42px 0 90px;
    color: var(--grey);
    font-size: 19px;
}

/* Card internals reuse .prod / .prod-media / .prod-body from css/style.css */

.prod .p-cat {
    display: block;
    margin-bottom: 8px;
    color: var(--grey);
    font-family: var(--body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.prod .p-price {
    margin: 4px 0 16px;
    font-family: var(--head);
    font-style: italic;
    font-size: 27px;
    font-weight: 800;
    color: var(--red);
}

.prod .p-price del {
    margin-left: 8px;
    color: var(--grey-2);
    font-size: 19px;
}

.prod .p-price .save {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--paper-3);
    color: var(--charcoal);
    font-family: var(--body);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.prod .p-stock {
    margin: 0 0 14px;
    font-family: var(--body);
    font-size: 13px;
    font-weight: 600;
}

.prod .p-stock.is-out {
    color: var(--grey);
}

.prod .p-stock.is-in {
    color: #1f7a3d;
}

.prod .p-cart {
    margin-top: auto;
    justify-content: center;
}

.prod .p-cart.loading {
    opacity: .7;
    pointer-events: none;
}

.prod .p-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;

    padding: 6px 11px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;

    font-family: var(--head);
    font-style: italic;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.prod-media img {
    width: 82%;
    height: 100%;
    object-fit: contain;
}

/* ---------- Pagination ---------- */

.fst-pagination {
    display: flex;
    justify-content: center;
    margin-top: 46px;
}

.fst-pagination .page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    border: 0;
}

.fst-pagination .page-numbers li {
    list-style: none;
}

.fst-pagination .page-numbers li .page-numbers,
.fst-pagination a.page-numbers,
.fst-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 46px;
    height: 46px;
    padding: 0 14px;

    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;

    color: var(--ink);
    font-family: var(--head);
    font-style: italic;
    font-size: 17px;
    font-weight: 700;
}

.fst-pagination .page-numbers li .page-numbers.current,
.fst-pagination span.page-numbers.current {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.fst-pagination .page-numbers li a:hover {
    border-color: var(--red);
    color: var(--red);
}

.fst-pagination .page-numbers li span.dots {
    border-color: transparent;
    background: transparent;
}

/* ==================================================
   SINGLE PRODUCT
================================================== */

.fst-single-product {
    padding: 40px 0 90px;
}

.fst-product-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.fst-product-gallery {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.fst-product-gallery .woocommerce-product-gallery {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.fst-product-gallery .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
}

.fst-product-gallery .flex-control-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.fst-product-gallery .flex-control-thumbs li {
    width: 84px;
    margin: 0;
    list-style: none;
}

.fst-product-gallery .flex-control-thumbs img {
    border: 1px solid var(--line);
    border-radius: 10px;
    opacity: .75;
}

.fst-product-gallery .flex-control-thumbs img.flex-active,
.fst-product-gallery .flex-control-thumbs img:hover {
    border-color: var(--red);
    opacity: 1;
}

.fst-product-summary .p-cat {
    display: block;
    margin-bottom: 12px;
    color: var(--grey);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.fst-product-summary .p-cat a:hover {
    color: var(--red);
}

.fst-product-title {
    font-size: clamp(32px, 3.6vw, 54px);
    font-weight: 800;
    color: var(--ink);
}

.fst-product-summary .p-rating {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 16px 0 0;
}

.fst-product-summary .stars {
    color: var(--red);
    font-size: 19px;
    letter-spacing: 2px;
}

.fst-product-summary .rcount {
    color: var(--grey);
    font-size: 14px;
}

.fst-product-price {
    margin: 18px 0 6px;
    font-family: var(--head);
    font-style: italic;
    font-size: clamp(34px, 3.4vw, 46px);
    font-weight: 800;
    color: var(--red);
}

.fst-product-price .woocommerce-Price-amount {
    color: var(--red);
}

.fst-product-price del {
    margin-left: 10px;
    color: var(--grey-2);
    font-size: 26px;
}

.fst-product-cart {
    margin-top: 20px;
}

.fst-product-cart p.stock {
    margin: 0 0 16px;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 700;
}

.fst-product-cart p.stock.in-stock {
    color: #1f7a3d;
}

.fst-product-cart p.stock.out-of-stock {
    color: var(--red-dark);
}

.fst-product-cart form.cart {
    display: flex;
    align-items: stretch;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0;
    border: 0;
}

.fst-product-cart .quantity input.qty {
    width: 96px;
    height: 62px;
    padding: 0 10px;

    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);

    font-family: var(--body);
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}

.fst-product-cart .single_add_to_cart_button {
    min-height: 62px;
    padding: 0 34px;
}

.fst-product-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;

    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.fst-product-facts li {
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);
    list-style: none;
}

.fst-product-facts span {
    display: block;
    color: var(--grey);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.fst-product-facts strong {
    color: var(--ink);
    font-size: 16px;
}

/* ---------- Specs + description ---------- */

.fst-product-section {
    margin-top: 70px;
}

.fst-section-title {
    margin-bottom: 24px;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 800;
    color: var(--ink);
}

.fst-product-description {
    max-width: 1000px;
    color: var(--charcoal);
    font-size: 18px;
    line-height: 1.7;
}

.fst-product-description p {
    margin-bottom: 14px;
}

/* ==================================================
   WOOCOMMERCE CHROME (buttons, notices, forms)
   Ported from the tirecare.co Additional CSS, with the
   Elementor kit variables replaced by theme tokens.
================================================== */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wp-element-button,
.woocommerce-button,
input[type="submit"],
button[type="submit"] {
    border: 0;
    border-radius: 12px;
    padding: 16px 28px;

    background: var(--red-dark);
    color: #fff;

    font-family: var(--head);
    font-size: 16.5px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.wp-element-button:hover,
.woocommerce-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background: var(--ink);
    color: #fff;
}

.woocommerce .button.disabled,
.woocommerce button.button:disabled,
.woocommerce a.button.disabled {
    background: var(--grey-2);
    color: #fff;
    cursor: not-allowed;
}

.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;

    margin: 22px 0;
    padding: 20px 28px;

    border: 3px solid var(--ink);
    border-top: 3px solid var(--ink);
    border-radius: 18px;
    background: #fff;
    color: var(--ink);

    font-family: var(--head);
    font-size: 19px;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    line-height: 1.3;
}

.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
    position: static;
    margin: 0;
    color: var(--red);
}

.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
    margin-left: auto;
    padding: 13px 22px;
    font-size: 15px;
}

.woocommerce .woocommerce-error li {
    list-style: none;
}

.woocommerce div.product form.cart {
    border: 0;
}

.woocommerce .amount,
.woocommerce-Price-amount {
    color: var(--red);
}

/* Account, cart & checkout tables */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    padding: 0;
    margin: 0;
    border: 2px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 18px 22px;
    font-family: var(--head);
    font-style: italic;
    font-size: 21px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--red);
    color: #fff;
}

.woocommerce table.shop_table {
    border: 1px solid var(--line);
    border-radius: 14px;
    border-collapse: separate;
}

.woocommerce table.shop_table th {
    font-family: var(--head);
    font-style: italic;
    text-transform: uppercase;
    color: var(--ink);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text {
    padding: 13px 15px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);
    font-family: var(--body);
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 1100px) {

    .fst-product-top {
        gap: 32px;
    }
}

@media (max-width: 900px) {

    .fst-product-top {
        grid-template-columns: 1fr;
    }

    .fst-shop-head {
        padding: 20px 0 16px;
    }

    .fst-product-section {
        margin-top: 48px;
    }
}

@media (max-width: 600px) {

    .fst-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .fst-product-cart form.cart {
        gap: 10px;
    }

    .fst-product-cart .single_add_to_cart_button {
        flex: 1 1 100%;
    }

    .woocommerce-error,
    .woocommerce-info,
    .woocommerce-message {
        padding: 18px 20px;
        font-size: 16px;
    }

    .woocommerce-message .button {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* Header search popup: full results link */

.rmr-search-all {
    display: block;
    margin-top: 10px;
    padding: 14px 16px;

    border: 1px dashed var(--line);
    border-radius: 12px;

    color: var(--red-dark);
    font-family: var(--head);
    font-size: 16px;
    font-style: italic;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.rmr-search-all:hover {
    border-color: var(--red);
    background: var(--paper-2);
}

/* ==================================================
   SINGLE PRODUCT — BUY BOX, CHIPS, PROMISES
================================================== */

.fst-single-product .fst-shop-breadcrumb {
    margin: 0 0 18px;
}

.fst-product-top {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
}

.fst-product-gallery-col {
    position: sticky;
    top: 108px;
}

.fst-product-summary .fst-product-title {
    margin-top: 6px;
}

.fst-product-subline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.fst-product-subline .p-rating {
    margin: 0;
}

.fst-product-sku {
    color: var(--grey);
    font-size: 13px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.fst-product-sku strong {
    color: var(--ink);
}

/* ---------- buy box ---------- */

.fst-product-buybox {
    margin-top: 24px;
    padding: 24px 26px 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper-2);
}

.fst-product-priceline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fst-product-priceline .fst-product-price {
    margin: 0;
}

.fst-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 13px;
    border-radius: 999px;

    font-family: var(--body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}

.fst-stock-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.fst-stock-pill.is-in {
    background: #e8f4ec;
    color: #14713a;
}

.fst-stock-pill.is-out {
    background: var(--paper-3);
    color: var(--grey);
}

/* ---------- key specs ---------- */

.fst-product-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 10px;

    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.fst-product-chips li {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    list-style: none;
}

.fst-product-chips span {
    display: block;
    color: var(--grey);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.fst-product-chips strong {
    display: block;
    margin-top: 3px;
    color: var(--ink);
    font-family: var(--head);
    font-style: italic;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.fst-product-cart {
    margin-top: 22px;
}

.fst-product-cart form.cart {
    align-items: center;
}

.fst-product-cart .single_add_to_cart_button {
    flex: 1 1 220px;
}

.fst-product-quote {
    display: inline-block;
    margin-top: 14px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-underline-offset: 4px;
}

.fst-product-quote:hover {
    color: var(--red);
}

/* ---------- service promises ---------- */

.fst-product-promises {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1px;

    margin: 26px 0 0;
    padding: 0;
    overflow: hidden;
    list-style: none;

    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--line);
}

.fst-product-promises li {
    padding: 15px 17px;
    background: #fff;
    color: var(--grey);
    font-size: 12.5px;
    line-height: 1.5;
    list-style: none;
}

.fst-product-promises strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
    font-family: var(--head);
    font-style: italic;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
}

/* ---------- specs beside description ---------- */

.fst-product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.fst-product-detail > div:only-child {
    grid-column: 1 / -1;
    max-width: 1000px;
}

.fst-section-head {
    margin-bottom: 22px;
}

.fst-section-head .fst-section-title {
    margin-bottom: 0;
}

.fst-related-products .prod-grid {
    margin-top: 4px;
}

@media (max-width: 1000px) {

    .fst-product-gallery-col {
        position: static;
    }

    .fst-product-detail {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {

    .fst-product-buybox {
        padding: 18px 18px 20px;
    }

    .fst-product-chips {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================================================
   PAGE SHELL — CART, CHECKOUT, MY ACCOUNT
   WooCommerce ships cart and checkout as blocks, which
   run edge to edge in a classic theme unless they are
   constrained to the site container.
================================================== */

.fst-page-head {
    padding: 26px 0 20px;
    background: transparent;
    border-bottom: 1px solid var(--line);
}

.fst-page-title {
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--red);
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 800;
    color: var(--ink);
}

.fst-page {
    padding: 34px 0 90px;
}

.fst-page .single-page > * {
    max-width: 100%;
}

.fst-page .alignwide,
.fst-page .alignfull,
.fst-page .wp-block-woocommerce-cart,
.fst-page .wp-block-woocommerce-checkout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
}

.fst-page .wc-block-cart,
.fst-page .wc-block-checkout {
    gap: 44px;
}

.fst-page .wc-block-components-title,
.fst-page .wc-block-components-checkout-step__title,
.fst-page .wc-block-cart-items__header {
    font-family: var(--head);
    font-style: italic;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink);
}

.fst-page .wc-block-components-sidebar,
.fst-page .wc-block-cart__sidebar,
.fst-page .wc-block-checkout__sidebar {
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper-2);
}

.fst-page .wc-block-components-totals-item__value,
.fst-page .wc-block-components-formatted-money-amount,
.fst-page .wc-block-components-product-price {
    color: var(--red);
    font-weight: 700;
}

.fst-page .wc-block-components-order-summary-item__description .wc-block-components-product-name,
.fst-page .wc-block-cart-item__wrap .wc-block-components-product-name {
    font-family: var(--head);
    font-style: italic;
    font-size: 19px;
    font-weight: 800;
    color: var(--ink);
    text-transform: none;
}

.fst-page .wc-block-components-button:not(.is-link),
.fst-page .wc-block-components-checkout-place-order-button,
.fst-page .wc-block-cart__submit-button {
    border-radius: 12px;
    background: var(--red-dark);
    color: #fff;

    font-family: var(--head);
    font-size: 16.5px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}

.fst-page .wc-block-components-button:not(.is-link):hover,
.fst-page .wc-block-components-checkout-place-order-button:hover,
.fst-page .wc-block-cart__submit-button:hover {
    background: var(--ink);
    color: #fff;
}

.fst-page .wc-block-components-text-input input,
.fst-page .wc-block-components-textarea,
.fst-page .wc-blocks-components-select__container {
    border-radius: 12px;
    border-color: var(--line);
    background: #fff;
}

.fst-page .wc-block-components-quantity-selector {
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.fst-page .wc-block-cart-items,
.fst-page .wc-block-checkout__order-summary {
    border-color: var(--line);
}

.fst-page .wc-block-cart-item__image img {
    border: 1px solid var(--line);
    border-radius: 10px;
}

.fst-page .wc-block-cart__empty-cart__title,
.fst-page .wc-block-components-notice-banner {
    font-family: var(--head);
    font-style: italic;
    text-transform: uppercase;
}

/* Classic (shortcode) cart and checkout, if the blocks are ever replaced. */

.fst-page .woocommerce table.shop_table,
.fst-page .woocommerce .cart-collaterals .cart_totals,
.fst-page #order_review {
    border-radius: 16px;
}

.fst-page .woocommerce .cart-collaterals .cart_totals,
.fst-page #order_review {
    padding: 20px 22px;
    border: 1px solid var(--line);
    background: var(--paper-2);
}

.fst-page .woocommerce-billing-fields h3,
.fst-page #order_review_heading,
.fst-page .cart_totals h2 {
    font-family: var(--head);
    font-style: italic;
    font-weight: 800;
    text-transform: uppercase;
}

.fst-page .woocommerce-MyAccount-navigation {
    margin-bottom: 26px;
}

@media (max-width: 900px) {

    .fst-page-head {
        padding: 20px 0 16px;
    }

    .fst-page {
        padding: 30px 0 70px;
    }
}

/* ==================================================
   SINGLE PRODUCT — WOOCOMMERCE DEFAULT LAYOUT, POLISHED
   The template now renders content-single-product.php, so
   these rules tidy WooCommerce's own markup: gallery and
   summary side by side, brand type, tabs, related grid.
   (The earlier custom buy-box rules above are unused.)
================================================== */

.fst-single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 26px 52px;
    align-items: start;
    margin: 0;
}

.fst-single-product div.product::before,
.fst-single-product div.product::after {
    content: none;
}

.fst-single-product div.product .woocommerce-product-gallery,
.fst-single-product div.product .summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.fst-single-product div.product .woocommerce-product-gallery {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.fst-single-product div.product .woocommerce-product-gallery__image img {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
}

.fst-single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.fst-single-product div.product .flex-control-thumbs li {
    width: 84px;
    float: none;
    margin: 0;
    list-style: none;
}

.fst-single-product div.product .flex-control-thumbs img {
    border: 1px solid var(--line);
    border-radius: 10px;
    opacity: .75;
}

.fst-single-product div.product .flex-control-thumbs img.flex-active,
.fst-single-product div.product .flex-control-thumbs img:hover {
    border-color: var(--red);
    opacity: 1;
}

/* Tabs, reviews and related run the full width under both columns. */

.fst-single-product div.product .woocommerce-tabs,
.fst-single-product div.product .related,
.fst-single-product div.product .up-sells,
.fst-single-product div.product .product_meta {
    grid-column: 1 / -1;
}

/* ---------- summary ---------- */

.fst-single-product .product_title {
    margin: 0 0 14px;
    font-size: clamp(30px, 3.2vw, 48px);
    font-weight: 800;
    color: var(--ink);
}

.fst-single-product div.product .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
}

.fst-single-product div.product p.price,
.fst-single-product div.product span.price {
    margin: 0 0 6px;
    color: var(--red);
    font-family: var(--head);
    font-style: italic;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.1;
}

.fst-single-product div.product p.price del {
    margin-left: 10px;
    color: var(--grey-2);
    font-size: 24px;
}

.fst-single-product div.product p.price ins {
    text-decoration: none;
}

.fst-single-product div.product .woocommerce-product-details__short-description {
    margin: 14px 0 0;
    color: var(--charcoal);
    font-size: 16px;
    line-height: 1.7;
}

.fst-single-product div.product p.stock {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin: 10px 0 18px;
    padding: 7px 13px;
    border-radius: 999px;

    font-family: var(--body);
    font-size: 13px;
    font-weight: 700;
}

.fst-single-product div.product p.stock::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.fst-single-product div.product p.stock.in-stock {
    background: #e8f4ec;
    color: #14713a;
}

.fst-single-product div.product p.stock.out-of-stock {
    background: var(--paper-3);
    color: var(--grey);
}

.fst-single-product div.product form.cart {
    display: flex;
    align-items: stretch;
    gap: 14px;
    flex-wrap: wrap;
    margin: 4px 0 22px;
    border: 0;
}

.fst-single-product div.product form.cart .quantity input.qty {
    width: 96px;
    height: 60px;
    padding: 0 10px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);
    font-family: var(--body);
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}

.fst-single-product div.product .single_add_to_cart_button {
    min-height: 60px;
    padding: 0 34px;
    flex: 1 1 220px;
}

.fst-single-product div.product .product_meta {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--grey);
    font-size: 13.5px;
}

.fst-single-product div.product .product_meta > span {
    display: block;
    margin-bottom: 6px;
}

.fst-single-product div.product .product_meta span.sku_wrapper,
.fst-single-product div.product .product_meta .posted_in,
.fst-single-product div.product .product_meta .tagged_as {
    letter-spacing: .02em;
}

.fst-single-product div.product .product_meta strong,
.fst-single-product div.product .product_meta a {
    color: var(--ink);
    font-weight: 600;
}

.fst-single-product div.product .product_meta a:hover {
    color: var(--red);
}

/* ---------- tabs ---------- */

.fst-single-product .woocommerce-tabs {
    margin-top: 58px;
    padding-top: 0;
}

.fst-single-product .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;

    margin: 0 0 24px;
    padding: 0;

    list-style: none;
}

.fst-single-product .woocommerce-tabs ul.tabs::before,
.fst-single-product .woocommerce-tabs ul.tabs::after,
.fst-single-product .woocommerce-tabs ul.tabs li::before,
.fst-single-product .woocommerce-tabs ul.tabs li::after {
    content: none;
    display: none;
}

.fst-single-product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--paper-2);
    box-shadow: none;
}

.fst-single-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 22px;

    color: var(--charcoal);
    font-family: var(--head);
    font-style: italic;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fst-single-product .woocommerce-tabs ul.tabs li.active {
    background: var(--ink);
}

.fst-single-product .woocommerce-tabs ul.tabs li.active a {
    color: #fff;
}

.fst-single-product .woocommerce-tabs ul.tabs li:hover:not(.active) {
    background: var(--paper-3);
}

.fst-single-product .woocommerce-Tabs-panel {
    max-width: 1000px;
    color: var(--charcoal);
    font-size: 16px;
    line-height: 1.75;
}

.fst-single-product .woocommerce-Tabs-panel > h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 800;
    color: var(--ink);
}

.fst-single-product .woocommerce-Tabs-panel p {
    margin-bottom: 14px;
}

.fst-single-product .woocommerce-Tabs-panel .rmr-product-specifications {
    max-width: 780px;
}

/* ---------- related / up-sells ---------- */

.fst-single-product .related > h2,
.fst-single-product .up-sells > h2 {
    margin: 0 0 24px;
    font-size: clamp(26px, 2.6vw, 40px);
    font-weight: 800;
    color: var(--ink);
}

.fst-single-product .related,
.fst-single-product .up-sells {
    margin-top: 62px;
}

/* ==================================================
   WOOCOMMERCE DEFAULT PRODUCT GRID (related, up-sells,
   shortcodes) styled like the theme cards.
================================================== */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none;
    display: none;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 20px;
    float: none !important;
    clear: none !important;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;

    transition: transform .35s, box-shadow .35s, border-color .35s;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow);
}

.woocommerce ul.products li.product a img {
    width: 82%;
    height: 230px;
    margin: 0 auto 14px;
    object-fit: contain;
    border-bottom: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 0 20px;
    font-family: var(--head);
    font-style: italic;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--ink);
    text-transform: uppercase;
}

.woocommerce ul.products li.product .price {
    padding: 0 20px;
    margin-top: 8px;
    color: var(--red);
    font-family: var(--head);
    font-style: italic;
    font-size: 24px;
    font-weight: 800;
}

.woocommerce ul.products li.product .star-rating {
    margin: 8px 20px 0;
}

.woocommerce ul.products li.product .button {
    margin: auto 20px 0;
    text-align: center;
}

@media (max-width: 1100px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px) {

    .fst-single-product div.product {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .fst-single-product .woocommerce-tabs {
        margin-top: 40px;
    }
}

/* ==================================================
   CART & CHECKOUT — TWO COLUMN LAYOUT
   WooCommerce ships these as blocks whose two column
   layout comes from block-theme layout styles, which a
   classic theme does not provide, so the totals ended up
   under the items with the right half of the page empty.

   After hydration the wrappers carry two class families
   (wp-block-woocommerce-* from the server, wc-block-*
   from the React app) and the nesting depth differs
   between cart and checkout, so the grid is attached to
   whichever element is the *direct* parent of the
   sidebar, via :has().
================================================== */

.fst-page .single-page.fst-page--commerce {
    max-width: 1280px;
    margin: 0 auto;
}

.fst-page .wp-block-woocommerce-empty-cart-block {
    max-width: 720px;
}

.fst-page .wc-block-cart-items {
    width: 100%;
}

.fst-page .wc-block-cart-item__total,
.fst-page .wc-block-cart-items th:last-child {
    text-align: right;
}

.fst-page .wc-block-components-totals-item {
    padding: 9px 0;
}

.fst-page .wc-block-components-totals-footer-item {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.fst-page .wc-block-components-checkout-step {
    padding-bottom: 24px;
}

.fst-page .wc-block-components-checkout-step:not(:last-child) {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.fst-page .wc-block-components-address-form,
.fst-page .wc-block-components-address-card,
.fst-page .wc-block-components-checkout-step__content {
    max-width: 780px;
}

.fst-page .wc-block-checkout__actions_row {
    margin-top: 20px;
}

/* The order summary is a card in both layouts. */

.fst-page .wc-block-cart__sidebar,
.fst-page .wc-block-checkout__sidebar,
.fst-page .wp-block-woocommerce-cart-totals-block,
.fst-page .wp-block-woocommerce-checkout-totals-block {
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper-2);
    box-sizing: border-box;
}

/* Two columns from 1001px up; below that WooCommerce's own
   single column order (summary first) is left alone. */

@media (min-width: 1001px) {

    .fst-page :is(
        .wc-block-cart,
        .wp-block-woocommerce-cart,
        .wp-block-woocommerce-filled-cart-block,
        .wc-block-checkout,
        .wp-block-woocommerce-checkout
    ):has(> :is(
        .wc-block-cart__sidebar,
        .wc-block-checkout__sidebar,
        .wp-block-woocommerce-cart-totals-block,
        .wp-block-woocommerce-checkout-totals-block
    )) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
        gap: 40px;
        align-items: start;
    }

    .fst-page .wc-block-cart__main,
    .fst-page .wc-block-checkout__main,
    .fst-page .wp-block-woocommerce-cart-items-block,
    .fst-page .wp-block-woocommerce-checkout-fields-block {
        grid-column: 1;
        order: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        float: none;
    }

    .fst-page .wc-block-cart__sidebar,
    .fst-page .wc-block-checkout__sidebar,
    .fst-page .wp-block-woocommerce-cart-totals-block,
    .fst-page .wp-block-woocommerce-checkout-totals-block {
        grid-column: 2;
        order: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        float: none;

        position: sticky;
        top: 108px;
    }

    /* Empty cart, express payment rows and notices stay full width. */

    .fst-page .wp-block-woocommerce-empty-cart-block,
    .fst-page .wc-block-components-notice-banner {
        grid-column: 1 / -1;
    }
}

/* Fallback for browsers without :has() — force the grid on the
   server-rendered parents, which is the nesting we know. */

@supports not selector(:has(*)) {

    @media (min-width: 1001px) {

        .fst-page .wp-block-woocommerce-filled-cart-block,
        .fst-page .wp-block-woocommerce-checkout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
            gap: 40px;
            align-items: start;
        }
    }
}
