/* =============================================
   Organio WooCommerce enhancements
   Uniform product images (grid / carousel)
   ============================================= */

/* Fixed 3:4 image frame so every card is the same height no matter
   the source image ratio (full-size uploads range from square to wide
   landscape). The image is absolutely positioned inside the frame and
   fitted with object-fit: contain, so nothing is cropped or zoomed and
   any leftover space stays inside the frame as blank background. That
   keeps the product name / price on the same baseline in every card,
   which is what the theme's `width: auto` rule broke. */
.woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-header,
.woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-image,
[class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-header,
[class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-image,
.ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-header,
.ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-image {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background-color: #ffffff;
}

/* Fallback for browsers without aspect-ratio (older Safari/Firefox). */
@supports not (aspect-ratio: 3 / 4) {
    .woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-header,
    .woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-image,
    [class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-header,
    [class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-image,
    .ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-header,
    .ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-image {
        height: 0;
        padding-top: 133.3333%;
    }
}

/* White letterbox: with object-fit: contain the unused part of a fixed
   frame shows the frame background. Keep it plain white everywhere so it
   never looks transparent, in any product layout (shop, related, upsells,
   grids, carousels, widgets). */
.woocommerce-product-inner .woocommerce-product-header,
.woocommerce-product-inner .woocommerce-product-image,
.woocommerce-product-inner .woocommerce-product-header > a,
.woocommerce-product-inner .woocommerce-product-image > a {
    background-color: #ffffff;
}

.woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-header > a,
.woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-image > a,
[class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-header > a,
[class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-image > a,
.ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-header > a,
.ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

.woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-header img,
.woocommerce ul.products:not(.ct-products-list) li.product .woocommerce-product-inner .woocommerce-product-image img,
[class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-header img,
[class*="ct-product-carousel"].woocommerce .woocommerce-product-inner .woocommerce-product-image img,
.ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-header img,
.ct-product-grid.woocommerce .woocommerce-product-inner .woocommerce-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.ct-slick-slider .woocommerce-product-inner .woocommerce-product-header {
    aspect-ratio: 3 / 4;
}
@supports not (aspect-ratio: 3 / 4) {
    .ct-slick-slider .woocommerce-product-inner .woocommerce-product-header {
        height: 0;
        padding-top: 133.3333%;
    }
}
.ct-slick-slider .woocommerce-product-inner .woocommerce-product-header > a {
    display: block;
    width: 100%;
    height: 100%;
}
.ct-slick-slider .woocommerce-product-inner .woocommerce-product-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Related Products & Upsells on Single Product */
.single-product .related.products,
.single-product .upsells.products {
    clear: both;
}
.single-product .related.products .woocommerce-product-inner .woocommerce-product-header,
.single-product .upsells.products .woocommerce-product-inner .woocommerce-product-header {
    aspect-ratio: 3 / 4;
}
@supports not (aspect-ratio: 3 / 4) {
    .single-product .related.products .woocommerce-product-inner .woocommerce-product-header,
    .single-product .upsells.products .woocommerce-product-inner .woocommerce-product-header {
        height: 0;
        padding-top: 133.3333%;
    }
}

/* Product Widgets */
.ct-recent-posts-widget .ct-recent-posts-image,
.ct-popular-posts-widget .ct-popular-posts-image,
.ct-post-grid-widget .ct-post-grid-image,
.ct-post-masonry-widget .ct-post-masonry-image,
.ct-post-carousel-widget .ct-post-carousel-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
@supports not (aspect-ratio: 16 / 9) {
    .ct-recent-posts-widget .ct-recent-posts-image,
    .ct-popular-posts-widget .ct-popular-posts-image,
    .ct-post-grid-widget .ct-post-grid-image,
    .ct-post-masonry-widget .ct-post-masonry-image,
    .ct-post-carousel-widget .ct-post-carousel-image {
        height: 0;
        padding-top: 56.25%;
    }
}

/* =============================================
   Sticky mobile add-to-cart bar
   ============================================= */
.ct-sticky-addtocart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -4px 24px rgba(0,0,0,.08);
    padding: 12px 0;
    display: none;
}
.ct-sac-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ct-sac-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}
.ct-sac-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ct-sac-meta {
    flex: 1;
    min-width: 0;
}
.ct-sac-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ct-sac-price {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #79b530;
}
.ct-sac-btn {
    flex: 0 0 auto;
    min-width: 140px;
    height: 44px;
    background: #79b530;
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background .2s;
}
.ct-sac-btn:hover {
    background: #639c28;
}
@media (min-width: 992px) {
    .ct-sticky-addtocart {
        display: none;
    }
}

body.admin-bar .ct-sticky-addtocart {
    padding-bottom: 12px;
}

/* =============================================
   Sticky checkout order review
   ============================================= */
.ct-checkout-order-review {
    position: -webkit-sticky;
    position: sticky;
    top: 30px;
}

@media (max-width: 767px) {
    .ct-checkout-order-review {
        position: static;
    }
}

/* =============================================
   Discount % sale badge
   ============================================= */
.woocommerce .woocommerce-product-inner span.onsale {
    display: inline-block;
    position: absolute;
    top: 10px;
    left: 15px;
    z-index: 3;
    height: auto;
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 4px 10px;
    line-height: 1.2;
    font-size: 14px;
    -webkit-border-radius: 3px;
    -khtml-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    border-radius: 3px;
}
.woocommerce .woocommerce-product-inner.style-2 .ct-onsale {
    left: 15px;
}
.woocommerce .onsale {
    font-weight: 700;
    line-height: 1;
}

/* =============================================
   WooCommerce 11 - Cart & Checkout blocks
   The Cart/Checkout pages created by WooCommerce
   use the block markup, not the legacy shortcodes.
   ============================================= */

/* Blocks must use the full width of the theme container */
.entry-content > .wp-block-woocommerce-cart,
.entry-content > .wp-block-woocommerce-checkout,
.entry-content > .wc-block-cart,
.entry-content > .wc-block-checkout {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.wc-block-cart,
.wc-block-checkout {
    font-family: inherit;
    font-size: 16px;
    color: #191919;
}

.wc-block-cart a,
.wc-block-checkout a {
    text-decoration: none;
}

/* Headings */
.wc-block-cart__totals-title,
.wc-block-components-checkout-order-summary__title,
.wc-block-components-checkout-step__title,
.wc-block-cart__empty-cart__title {
    font-family: inherit;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: capitalize;
    color: #191919;
}

.wc-block-components-checkout-step__description,
.wc-block-components-product-metadata,
.wc-block-components-product-details,
.wc-block-components-product-details__name,
.wc-block-components-product-details__value {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

/* Product name inside cart/checkout lists */
.wc-block-components-product-name,
.wc-block-components-product-name--static,
.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #152136;
}

a.wc-block-components-product-name:hover {
    color: var(--primary-color);
}

/* Amounts */
.wc-block-cart-item__prices,
.wc-block-cart-item__total,
.wc-block-components-product-price,
.wc-block-components-totals-item {
    font-size: 16px;
    font-weight: 600;
    color: #152136;
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
    font-size: 16px;
}

.wc-block-components-totals-footer-item {
    font-size: 18px;
    font-weight: 700;
    color: #191919;
}

/* Primary buttons */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-components-totals-coupon__button,
.wc-block-checkout__actions .wc-block-components-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 51px;
    padding: 0 28px;
    border: 0;
    border-radius: 51px;
    background-color: var(--primary-color);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    transition: background-color 240ms linear 0ms;
}

.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-button:focus,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button:focus,
.wc-block-components-totals-coupon__button:hover,
.wc-block-components-totals-coupon__button:focus,
.wc-block-checkout__actions .wc-block-components-button:hover,
.wc-block-checkout__actions .wc-block-components-button:focus {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.08);
}

.wc-block-cart__submit-button:focus-visible,
.wc-block-components-checkout-place-order-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Text/link style buttons */
.wc-block-components-totals-coupon-link,
.wc-block-components-totals-shipping__change-address-button,
.wc-block-components-checkout-return-to-cart-button,
.wc-block-cart-item__remove-link {
    background: none;
    padding: 0;
    border: 0;
    box-shadow: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wc-block-components-totals-coupon-link:hover,
.wc-block-components-totals-shipping__change-address-button:hover,
.wc-block-components-checkout-return-to-cart-button:hover,
.wc-block-cart-item__remove-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Quantity selector */
.wc-block-components-quantity-selector {
    border: 1px solid #ececec;
    border-radius: 3px;
    background-color: #fff;
}

.wc-block-components-quantity-selector__input {
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #191919;
}

.wc-block-components-quantity-selector__button {
    color: #191919;
}

.wc-block-components-quantity-selector__button:hover {
    color: var(--primary-color);
}

/* Cart line items table */
table.wc-block-cart-items {
    border: 0;
    margin-bottom: 24px;
}

table.wc-block-cart-items .wc-block-cart-items__header th {
    padding: 0 0 12px;
    border: 0;
    border-bottom: 3px solid var(--primary-color);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
    color: #333;
}

table.wc-block-cart-items .wc-block-cart-items__row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

table.wc-block-cart-items .wc-block-cart-items__row td {
    border: 0;
    padding-top: 20px;
    padding-bottom: 20px;
}

table.wc-block-cart-items .wc-block-cart-item__image img {
    border-radius: 4px;
}

/* Sidebar panels (cart totals / order summary) */
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
    box-sizing: border-box;
    padding: 30px;
    background-color: #fff;
    border-radius: 7px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

@media (min-width: 1200px) {
    .wc-block-checkout__sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 30px;
        align-self: flex-start;
    }
}

.wc-block-cart__totals-title {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(96, 101, 104, 0.15);
}

.wc-block-components-totals-item {
    padding: 10px 0;
}

.wc-block-components-totals-footer-item {
    padding-top: 14px;
    border-top: 1px solid rgba(96, 101, 104, 0.15);
}

.wc-block-cart__submit {
    margin-top: 20px;
}

.wc-block-cart__submit-button {
    width: 100%;
}

/* Checkout steps */
.wc-block-components-checkout-step {
    margin-bottom: 32px;
}

.wc-block-components-checkout-step__title {
    margin-bottom: 16px;
}

/* Form fields */
.wc-block-components-text-input input,
.wc-block-components-select-input select,
.wc-block-components-textarea,
.wc-block-components-state-input select,
.wc-block-components-country-input select {
    border: 1px solid #ececec;
    border-radius: 3px;
    background-color: #fff;
    font-family: inherit;
    font-size: 15px;
    color: #191919;
}

.wc-block-components-text-input input:focus,
.wc-block-components-select-input select:focus,
.wc-block-components-textarea:focus,
.wc-block-components-state-input select:focus,
.wc-block-components-country-input select:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    outline: none;
}

.wc-block-components-text-input label,
.wc-block-components-select-input label {
    font-family: inherit;
    color: #6b7280;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-select-input.is-active label {
    color: #6b7280;
}

.wc-block-components-checkbox label {
    font-size: 15px;
    line-height: 1.5;
}

.wc-block-components-checkbox__mark {
    border-radius: 3px;
}

/* Shipping method options */
.wc-block-checkout__shipping-method-option {
    border-radius: 3px;
}

.wc-block-checkout__shipping-method-option--selected {
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

.wc-block-components-radio-control__label {
    font-size: 16px;
    font-weight: 600;
}

.wc-block-components-radio-control__description,
.wc-block-components-radio-control__secondary-description {
    font-size: 14px;
    color: #6b7280;
}

/* Order summary inside the checkout sidebar */
.wc-block-components-order-summary-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.wc-block-components-order-summary-item__image img {
    border-radius: 4px;
}

.wc-block-components-order-summary__content > :last-child {
    border-bottom: 0;
}

/* Terms */
.wc-block-checkout__terms {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

/* Notices */
.wc-block-components-notice-banner {
    font-size: 15px;
    line-height: 1.5;
    border-radius: 3px;
    border-width: 1px;
}

.wc-block-components-notice-banner.is-success {
    border-color: rgba(var(--primary-color-rgb), 0.35);
    background-color: rgba(var(--primary-color-rgb), 0.08);
}

.wc-block-components-notice-banner.is-success > svg {
    background-color: var(--primary-color);
}

.wc-block-components-notice-banner a {
    color: var(--primary-color);
}

/* Empty cart state + "New in store" grid */
.wc-block-cart__empty-cart__title {
    margin-bottom: 24px;
}

.wc-block-cart .wc-block-grid__products {
    gap: 30px;
}

.wc-block-grid__product-title,
.wc-block-grid__product .wc-block-grid__product-title {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #152136;
}

.wc-block-grid__product-image img {
    border-radius: 4px;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 51px;
    background-color: var(--primary-color);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.08);
}

/* Responsive */
@media (max-width: 1000px) {
    .wc-block-cart__sidebar,
    .wc-block-checkout__sidebar {
        margin-top: 32px;
        padding: 24px;
    }
}

@media (max-width: 575px) {
    .wc-block-cart__sidebar,
    .wc-block-checkout__sidebar {
        padding: 20px;
    }

    .wc-block-cart__submit-button,
    .wc-block-components-checkout-place-order-button {
        width: 100%;
    }
}

/* =============================================
   WooCommerce 11 - Order received (thank you)
   Classic themes still render this endpoint with
   the checkout/thankyou.php template.
   ============================================= */

.woocommerce-order {
    max-width: 100%;
}

.woocommerce-thankyou-order-received,
.woocommerce-notice--success.woocommerce-thankyou-order-received {
    display: block;
    margin-bottom: 32px;
    padding: 20px 26px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.35);
    border-left: 4px solid var(--primary-color);
    border-radius: 3px;
    background-color: rgba(var(--primary-color-rgb), 0.08);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #191919;
}

ul.woocommerce-order-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

ul.woocommerce-order-overview li {
    margin: 0;
    padding: 18px 22px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

ul.woocommerce-order-overview li strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #191919;
}

.woocommerce-order-details,
.woocommerce-customer-details {
    margin-bottom: 40px;
}

.woocommerce-order-details__title,
.woocommerce-column__title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: capitalize;
    color: #191919;
    margin-bottom: 18px.
}

table.woocommerce-table--order-details {
    border: 0;
    margin-bottom: 0;
}

table.woocommerce-table--order-details thead th {
    padding: 10px 0;
    border: 0;
    border-bottom: 3px solid var(--primary-color);
    font-size: 15px;
    font-weight: 700;
    color: #333.
}

table.woocommerce-table--order-details tbody td,
table.woocommerce-table--order-details tfoot td,
table.woocommerce-table--order-details tfoot th {
    padding: 14px 0;
    border: 0.
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 15px.
    line-height: 1.5.
}

table.woocommerce-table--order-details tfoot tr:last-child td,
table.woocommerce-table--order-details tfoot tr:last-child th {
    border-bottom: 0;
    font-size: 16px.
    font-weight: 700.
}

.woocommerce-customer-details address {
    padding: 22px 24px;
    border: 1px solid #ececec.
    border-radius: 3px.
    font-size: 15px.
    font-style: normal.
    line-height: 1.8.
    color: #191919.
}

.woocommerce-bacs-bank-details {
    margin-bottom: 32px.
    padding: 24px.
    border: 1px solid #ececec.
    border-radius: 3px.
    background-color: #fff.
}

.woocommerce-bacs-bank-details .wc-bacs-bank-details-heading,
.woocommerce-bacs-bank-details h2,
.woocommerce-bacs-bank-details h3 {
    font-size: 20px.
    font-weight: 700.
    color: #191919.
}

.woocommerce-order .woocommerce-columns--addresses.col2-set {
    display: flex.
    flex-wrap: wrap.
    gap: 30px.
    margin: 0.
}

.woocommerce-order .woocommerce-columns--addresses.col2-set .woocommerce-column {
    flex: 1 1 320px.
    max-width: 100%.
    margin-top: 0.
}

@media (max-width: 767px) {
    ul.woocommerce-order-overview {
        grid-template-columns: 1fr.
    }
}

/*
 * Pre-initialization fallback for product carousels.
 *
 * Page optimizers (LiteSpeed "Delay JS", JS combine) can hold the carousel
 * script until the first user interaction. Until slick adds
 * .slick-initialized the slides are plain blocks and stack at full container
 * width, producing enormous, uneven cards. Lay them out as a grid using the
 * same column counts the carousel would use, so the section is already
 * correct on the first paint and does not jump when slick boots.
 */
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized) > .carousel-item {
    width: auto;
    min-width: 0;
    height: auto;
}
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colxl="1"] { grid-template-columns: minmax(0, 1fr); }
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colxl="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colxl="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colxl="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
[class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colxl="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1199px) {
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-collg="1"] { grid-template-columns: minmax(0, 1fr); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-collg="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-collg="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-collg="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-collg="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colmd="1"] { grid-template-columns: minmax(0, 1fr); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colmd="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colmd="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colsm="1"] { grid-template-columns: minmax(0, 1fr); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colsm="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized) { grid-template-columns: minmax(0, 1fr); }
    [class*="ct-product-carousel"] .ct-slick-carousel:not(.slick-initialized)[data-colxs="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =============================================
   Quantity +/- buttons (WooCommerce 10+ compatible)
   ============================================= */
.ct-quantity {
    display: inline-flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    vertical-align: middle;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    width: 120px !important;
    max-width: 120px !important;
    box-sizing: border-box;
}
.ct-quantity *,
.ct-quantity *::before,
.ct-quantity *::after {
    box-sizing: border-box;
    float: none !important;
}
.ct-quantity .minus,
.ct-quantity .plus {
    flex: 0 0 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 42px !important;
    background: #f5f5f5;
    border: 0;
    color: #333;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    -webkit-user-select: none;
    user-select: none;
    transition: background .2s, color .2s;
}
.ct-quantity .minus:hover,
.ct-quantity .plus:hover {
    background: #79b530;
    color: #fff;
}
.ct-quantity input.qty {
    flex: 1 1 auto !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: 42px !important;
    border: 0;
    text-align: center;
    font-size: 14px;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    background: #fff;
    border-radius: 0 !important;
}
.ct-quantity input.qty::-webkit-outer-spin-button,
.ct-quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =============================================
   Recently Viewed Products
   ============================================= */
.ct-recently-viewed {
    display: block !important;
    clear: both;
    width: 100%;
    padding: 40px 0 20px;
}
.ct-recently-viewed .ct-rv-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 12px;
}
.ct-recently-viewed .ct-rv-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: #79b530;
}
.ct-recently-viewed .ct-rv-grid,
.ct-recently-viewed ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
    list-style: none !important;
    padding: 0 !important;
    gap: 0;
}
.ct-recently-viewed .ct-rv-item,
.ct-recently-viewed ul.products > li.product {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    width: 25% !important;
    padding: 0 15px !important;
    margin: 0 0 30px 0 !important;
    box-sizing: border-box !important;
    float: none !important;
}
.ct-recently-viewed .woocommerce-product-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.ct-recently-viewed .woocommerce-product-header {
    width: 100% !important;
    overflow: hidden;
}
.ct-recently-viewed .woocommerce-product-header img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    max-width: 100% !important;
    object-fit: contain;
    aspect-ratio: 3 / 4;
}
.ct-recently-viewed .woocommerce-product-content {
    flex: 1 1 auto !important;
    padding: 16px;
    text-align: center;
}
.ct-recently-viewed .woocommerce-product--title {
    font-size: 15px;
    margin-bottom: 6px;
}
.ct-recently-viewed .woocommerce-product--title a {
    color: #222;
}
.ct-recently-viewed .woocommerce-add-to-cart a.button {
    margin-top: 8px;
    font-size: 12px;
    text-transform: uppercase;
    padding: 10px 18px;
}
@media (max-width: 991px) {
    .ct-recently-viewed .ct-rv-item,
    .ct-recently-viewed ul.products > li.product {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}
@media (max-width: 575px) {
    .ct-recently-viewed .ct-rv-item,
    .ct-recently-viewed ul.products > li.product {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}