/* Three-column WooCommerce product and category grid */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 28px;
}

.woocommerce ul.products li.product {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

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

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

/* Remove Storefront clearing elements that create empty grid spaces */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

/* Keep product and category tiles aligned */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 32px 28px !important;
}

.woocommerce ul.products li.product,
.woocommerce ul.products li.product-category {
    width: auto !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

/* Remove duplicate Description heading on WooCommerce product pages */
.woocommerce-Tabs-panel--description > h2:first-child {
    display: none;
}


/* WooCommerce Sale Badge - Red with White Text */
.woocommerce span.onsale,
.woocommerce ul.products li.product .onsale {
    background-color: #e60023 !important;
    color: #ffffff !important;
    border-color: #e60023 !important;
}

/* WooCommerce Product Prices - Black */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
    color: #111111 !important;
}

/* Sale Price - Black */
.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins,
.woocommerce ul.products li.product .price ins {
    color: #111111 !important;
    text-decoration: none !important;
}

/* Original Price - Gray with Strikethrough */
.woocommerce div.product p.price del,
.woocommerce div.product span.price del,
.woocommerce ul.products li.product .price del {
    color: #777777 !important;
    opacity: 1 !important;
}

/* Make WooCommerce quantity box larger */
.woocommerce div.product form.cart .quantity .qty {
    width: 85px !important;
    height: 52px !important;
    font-size: 20px !important;
    text-align: center !important;
    padding: 8px !important;
    border: 1px solid #888 !important;
    border-radius: 5px !important;
}

/* Hide SKU and Brand on WooCommerce product pages */
.woocommerce div.product .product_meta .sku_wrapper,
.woocommerce div.product .product_meta .posted_in,
.woocommerce div.product .product_meta .tagged_as,
.woocommerce div.product .product_meta .brand,
.woocommerce div.product .product_meta .product_brand {
    display: none !important;
}


/* PRODUCT PAGE: ENLARGE MAIN PRODUCT IMAGE */
body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product div.images {
    width: 55% !important;
    max-width: 55% !important;
    float: left !important;
}

/* PRODUCT PAGE: ADJUST RIGHT-HAND INFORMATION */
body.single-product div.product .summary {
    width: 40% !important;
    max-width: 40% !important;
    float: right !important;
}

/* MAKE PRODUCT IMAGE FILL THE IMAGE AREA */
body.single-product div.product .woocommerce-product-gallery img,
body.single-product div.product div.images img {
    width: 100% !important;
    height: auto !important;
}

/* REDUCE SHORT DESCRIPTION FONT */
body.single-product .woocommerce-product-details__short-description,
body.single-product .woocommerce-product-details__short-description p,
body.single-product .woocommerce-product-details__short-description li {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* PRODUCT TITLE */
body.single-product div.product .product_title {
    font-size: 28px !important;
    line-height: 1.3 !important;
}

/* MOBILE */
@media (max-width: 767px) {
    body.single-product div.product .woocommerce-product-gallery,
    body.single-product div.product div.images,
    body.single-product div.product .summary {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
}


/* TIGHTEN SPACE ABOVE PRODUCT SHORT DESCRIPTION */
body.single-product .summary .woocommerce-product-details__short-description {
    margin-top: -25px !important;
    padding-top: 0 !important;
}

/* REMOVE EXTRA TOP SPACING FROM PAYMENT WIDGETS */
body.single-product .summary klarna-placement,
body.single-product .summary [class*="afterpay"],
body.single-product .summary [id*="afterpay"],
body.single-product .summary [class*="klarna"] {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* REDUCE SHORT DESCRIPTION PARAGRAPH SPACING */
body.single-product .summary .woocommerce-product-details__short-description p {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
}


/* WooCommerce product description headings */
body.single-product .woocommerce-Tabs-panel--description h1 {
    font-size: 30px !important;
    line-height: 1.3 !important;
}

body.single-product .woocommerce-Tabs-panel--description h2 {
    font-size: 25px !important;
    line-height: 1.4 !important;
}

body.single-product .woocommerce-Tabs-panel--description h3 {
    font-size: 21px !important;
    line-height: 1.4 !important;
}

/* Description body text */
body.single-product .woocommerce-Tabs-panel--description p,
body.single-product .woocommerce-Tabs-panel--description li {
    font-size: 16px !important;
    line-height: 1.7 !important;
}

/* Description tables */
body.single-product .woocommerce-Tabs-panel--description table {
    font-size: 15px !important;
}

/* Mobile description headings */
@media (max-width: 767px) {
    body.single-product .woocommerce-Tabs-panel--description h1 {
        font-size: 25px !important;
    }

    body.single-product .woocommerce-Tabs-panel--description h2 {
        font-size: 21px !important;
    }
}

/* FIX MOBILE PRODUCT GRID */
@media (max-width: 767px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

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

/* RESTORE CART ITEM NAME FONT */
body.woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-name,
body.woocommerce-cart .woocommerce-cart-form .product-name a {
    font-size: 19px !important;
    line-height: 1.5 !important;
}

/* CART PRICES */
body.woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-price__value,
body.woocommerce-cart .shop_table .amount {
    font-size: 17px !important;
}

/* CART QUANTITY */
body.woocommerce-cart .wc-block-components-quantity-selector input,
body.woocommerce-cart .quantity input.qty {
    font-size: 17px !important;
}

/* EMPTY CART MESSAGE */
body.woocommerce-cart .wc-block-cart__empty-cart__title {
    font-size: 22px !important;
}

/* EMPTY CART: NEW IN STORE PRODUCT NAMES */
body.woocommerce-cart .wc-block-grid__product-title,
body.woocommerce-cart .woocommerce-loop-product__title {
    font-size: 19px !important;
    line-height: 1.4 !important;
}

/* SHOP PAGE: RESTORE THREE-COLUMN MOBILE GRID */
@media (max-width: 480px) {
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px 8px !important;
    }
}

/* MOBILE SHOP PAGE: THREE PRODUCT COLUMNS */
@media screen and (max-width: 767px) {
    body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px 8px !important;
    }

    body.woocommerce-shop ul.products li.product,
    body.post-type-archive-product ul.products li.product,
    body.tax-product_cat ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }
}

/* ADD SPACE BETWEEN PAYMENT OPTIONS AND SHORT DESCRIPTION */
body.single-product .summary .woocommerce-product-details__short-description {
    margin-top: 8px !important;
    padding-top: 0 !important;
}