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

.bfp-product-card {
 list-style: none !important;
 background: #ffffff !important;
 border: 1px solid #ebebeb !important;
 border-radius: 18px !important;
 overflow: hidden !important;
 display: flex !important;
 flex-direction: column !important;
 transition: transform 0.25s ease, box-shadow 0.25s ease !important;
 box-sizing: border-box !important;
 margin: 0 !important;
 width: 100% !important;
}

.bfp-product-card:hover {
 transform: translateY(-4px) !important;
 box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08) !important;
}

.bfp-product-card__inner {
 display: flex !important;
 flex-direction: column !important;
 height: 100% !important;
 width: 100% !important;
}

.bfp-product-card__media {
 position: relative !important;
 width: 100% !important;
 height: 220px !important; /* match home/related card image height (was square 1:1) */
 overflow: hidden !important;
 background-color: #f7f7f7 !important;
}

.bfp-product-card__image {
 display: block !important;
 width: 100% !important;
 height: 100% !important;
}

.bfp-product-card__image img,
.bfp-card-image {
 width: 100% !important;
 height: 100% !important;
 object-fit: cover !important;
 display: block !important;
 transition: transform 0.4s ease !important;
}

.bfp-product-card:hover .bfp-card-image {
 transform: scale(1.04) !important;
}

.bfp-product-card .bfp-product-badge,
.bfp-product-card .bfp-product-quick-view {
 display: none !important;
}

.bfp-product-card__content {
 padding: 16px 14px 0 14px !important;
 text-align: center !important;
 display: flex !important;
 flex-direction: column !important;
 align-items: center !important;
 flex-grow: 1 !important;
}

.bfp-product-category {
 margin-bottom: 6px !important;
}

.bfp-product-category a,
.bfp-product-brand {
 font-size: 11px !important;
 font-weight: 600 !important;
 text-transform: uppercase !important;
 letter-spacing: 0.8px !important;
 color: #8c8c8c !important;
 text-decoration: none !important;
}

.bfp-product-title,
h2.woocommerce-loop-product__title {
 font-size: 15px !important;
 font-weight: 700 !important;
 line-height: 1.35 !important;
 margin: 0 0 6px 0 !important;
 color: #1a1a1a !important;
}

.bfp-product-title a,
h2.woocommerce-loop-product__title a {
 color: #1a1a1a !important;
 text-decoration: none !important;
}

.bfp-product-sku {
 display: flex !important;
 align-items: center !important;
 justify-content: center !important;
 gap: 5px !important;
 font-size: 12.5px !important;
 margin-bottom: 8px !important;
}

.bfp-product-sku span {
 color: #888888 !important;
 font-weight: 400 !important;
}

.bfp-product-sku strong {
 color: #333333 !important;
 font-weight: 600 !important;
}

.bfp-product-price {
 font-size: 17px !important;
 font-weight: 800 !important;
 color: #111111 !important;
 margin-bottom: 6px !important;
 display: flex !important;
 align-items: center !important;
 justify-content: center !important;
 gap: 6px !important;
}

.bfp-product-price del {
 color: #999999 !important;
 font-weight: 400 !important;
 font-size: 14px !important;
}

.bfp-product-price ins {
 text-decoration: none !important;
 color: #111111 !important;
}

.bfp-product-rating {
 display: flex !important;
 align-items: center !important;
 justify-content: center !important;
 gap: 6px !important;
 margin-bottom: 16px !important;
}

.bfp-product-stars {
 color: #e5a93b !important;
 letter-spacing: 2px !important;
 font-size: 13px !important;
}

.bfp-product-rating-text {
 font-size: 12px !important;
 color: #888888 !important;
}

.bfp-product-card__actions {
 display: flex !important;
 width: calc(100% + 28px) !important;
 margin: auto -14px 0 -14px !important;
 padding: 0 !important;
}

.bfp-product-action {
 flex: 1 1 50% !important;
 display: flex !important;
 align-items: center !important;
 justify-content: center !important;
 gap: 6px !important;
 padding: 13px 6px !important;
 text-decoration: none !important;
 font-size: 12px !important;
 font-weight: 700 !important;
 text-transform: uppercase !important;
 letter-spacing: 0.5px !important;
 color: #ffffff !important;
 border: none !important;
 line-height: 1 !important;
 cursor: pointer !important;
 transition: background-color 0.2s ease !important;
}

.bfp-product-action--cart {
 background-color: #ff471a !important;
}

.bfp-product-action--cart:hover {
 background-color: #e6390e !important;
}

.bfp-product-action--order {
 background-color: #191c1f !important;
}

.bfp-product-action--order:hover {
 background-color: #0c0e10 !important;
}

.bfp-action-icon {
 font-size: 13px !important;
 font-weight: bold !important;
}

@media (max-width: 1024px) {
 .woocommerce.main-products .products {
   grid-template-columns: repeat(3, 1fr) !important;
   gap: 15px !important;
 }
}

@media (max-width: 768px) {
 .woocommerce.main-products .products {
   grid-template-columns: repeat(2, 1fr) !important;
   gap: 12px !important;
 }

 .bfp-product-card {
   border-radius: 14px !important;
 }

 .bfp-product-card__content {
   padding: 12px 10px 0 10px !important;
 }

 .bfp-product-card__actions {
   width: calc(100% + 20px) !important;
   margin: auto -10px 0 -10px !important;
 }

 .bfp-product-title,
 h2.woocommerce-loop-product__title {
   font-size: 13px !important;
 }

 .bfp-product-sku {
   font-size: 11px !important;
 }

 .bfp-product-price {
   font-size: 15px !important;
 }

 .bfp-product-action {
   padding: 11px 4px !important;
   font-size: 10.5px !important;
   gap: 3px !important;
 }

 .bfp-product-rating-text {
   display: none !important;
 }
}

@media (max-width: 480px) {
 .woocommerce.main-products .products {
   grid-template-columns: repeat(2, 1fr) !important;
   gap: 8px !important;
 }

 .bfp-product-action {
   font-size: 9.5px !important;
   padding: 10px 2px !important;
 }
}


/* =========================================================
   BFP — Shared archive and single-product container
   Uses the same centered width as the BFP shop layout.
   ========================================================= */

.bfp-shop-archive,
.bfp-single-product-container {
    width: 100%;
    max-width: 1450px;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

.bfp-shop-archive {
    padding: 30px 0 50px;
}

.bfp-shop-archive .bfp-shop-container {
    width: calc(100% - 60px);
    max-width: 1450px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.bfp-archive-header {
    margin: 0 0 26px;
}

.bfp-archive-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #ff471a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.bfp-archive-title {
    margin: 0 0 12px;
    color: #171717;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}

.bfp-archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 22px;
}

.bfp-archive-count {
    color: #777;
    font-size: 13px;
}

.bfp-archive-sorting select {
    min-height: 40px;
    padding: 7px 30px 7px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    background: #fff;
}

/* Grid matches the shop page and reuses content-product.php. */
.bfp-shop-archive ul.bfp-products-grid,
.single-product .related.products ul.products,
.single-product .up-sells ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.bfp-shop-archive ul.bfp-products-grid::before,
.bfp-shop-archive ul.bfp-products-grid::after,
.single-product .related.products ul.products::before,
.single-product .related.products ul.products::after,
.single-product .up-sells ul.products::before,
.single-product .up-sells ul.products::after {
    display: none !important;
    content: none !important;
}

.bfp-shop-archive ul.bfp-products-grid > li,
.single-product .related.products ul.products > li,
.single-product .up-sells ul.products > li {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Keep single product and its related products in the same page width. */
.bfp-single-product-container {
    width: calc(100% - 60px);
    max-width: 1450px;
    margin: 0 auto;
    box-sizing: border-box;
}

.bfp-single-product-container .product,
.bfp-single-product-container .related.products,
.bfp-single-product-container .up-sells.upsells {
    max-width: 100%;
    box-sizing: border-box;
}

.bfp-single-product-container .related.products,
.bfp-single-product-container .up-sells.upsells {
    clear: both;
    margin-top: 42px;
}

@media (max-width: 1024px) {
    .bfp-shop-archive ul.bfp-products-grid,
    .single-product .related.products ul.products,
    .single-product .up-sells ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 15px !important;
    }

    .bfp-shop-archive .bfp-shop-container,
    .bfp-single-product-container {
        width: calc(100% - 40px);
    }
}

@media (max-width: 767px) {
    .bfp-shop-archive {
        padding: 22px 0 35px;
    }

    .bfp-archive-title {
        font-size: 26px;
    }

    .bfp-archive-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .bfp-shop-archive ul.bfp-products-grid,
    .single-product .related.products ul.products,
    .single-product .up-sells ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .bfp-shop-archive .bfp-shop-container,
    .bfp-single-product-container {
        width: calc(100% - 28px);
    }
}

/* Shop card image heights — match home/related cards (bf-product-card) */
@media (max-width: 800px) {
 .bfp-product-card__media { height: 190px !important; }
}
@media (max-width: 540px) {
 .bfp-product-card__media { height: 155px !important; }
}


/* =========================================================
   Shop product-card actions: stack vertically on mobile
   (matches the Home page product-card buttons)
   ========================================================= */
@media (max-width: 540px) {
 .bfp-product-card__actions {
   display: grid !important;
   grid-template-columns: minmax(0, 1fr) !important;
   gap: 0 !important;
 }
 .bfp-product-action {
   flex: none !important;
   width: 100% !important;
   min-width: 0 !important;
   min-height: 40px !important;
   padding: 11px 8px !important;
   gap: 7px !important;
   justify-content: center !important;
   font-size: 10px !important;
   line-height: 1.2 !important;
   white-space: nowrap !important;
   box-sizing: border-box !important;
 }
 .bfp-product-action--cart {
   border-right: 0 !important;
   border-bottom: 1px solid rgba(255,255,255,.25) !important;
 }
}


/* =========================================================
   Fix: actions bar reaches the card bottom on every card
   (inner/content stretch to fill the equal-height grid card)
   ========================================================= */
.bfp-product-card__inner {
 flex: 1 1 auto !important;
 min-height: 100% !important;
}
.bfp-product-card__content {
 flex: 1 1 auto !important;
}
.bfp-product-card__actions {
 margin-top: auto !important;
}
