/* ==========================================================
   Marine Reuse — WooCommerce Styling
   Shop, category, single product, cart, checkout, account
   ========================================================== */

.mr-shop-main { padding: 30px 0 60px; min-height: 60vh; }
.mr-shop-container { padding: 0 20px; }

.mr-shop-header { margin: 6px 0 22px; }
.mr-shop-header-row {
    display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px;
    border-bottom: 1px solid var(--mr-border);
    padding-bottom: 14px;
}
.mr-shop-title { font-size: 26px; margin: 0; }
.mr-shop-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--mr-text-soft); }

/* Shop layout: sidebar + content */
.mr-shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    margin-top: 18px;
}
.mr-shop-sidebar { font-size: 14px; }
.mr-shop-sidebar .mr-widget-cats ul { list-style: none; padding: 0; margin: 0; }
.mr-shop-sidebar .mr-widget-cats li {
    border-bottom: 1px solid var(--mr-border);
}
.mr-shop-sidebar .mr-widget-cats li:last-child { border-bottom: 0; }
.mr-shop-sidebar .mr-widget-cats a {
    display: block; padding: 9px 0;
    color: var(--mr-text); font-size: 13.5px;
    transition: color 0.15s, padding 0.15s;
}
.mr-shop-sidebar .mr-widget-cats a:hover { color: var(--mr-primary); padding-left: 4px; }
.mr-shop-sidebar .mr-widget-cats .children {
    list-style: none; padding-left: 14px; margin: 0;
    border-top: 1px solid #f0f3f7;
}
.mr-shop-sidebar .mr-widget-cats .children a { font-size: 13px; color: var(--mr-text-soft); padding: 6px 0; }
.mr-shop-sidebar .mr-widget-cats .children .children { padding-left: 10px; border-left: 2px solid var(--mr-border); }
.mr-shop-sidebar .mr-widget-cats .children .children a { font-size: 12px; color: #9aa5b4; padding: 4px 0; }

/* Product grid */
.mr-shop-content ul.products,
ul.products {
    list-style: none; padding: 0; margin: 0;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
ul.products.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Product card */
.mr-product-card {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    overflow: hidden;
    box-shadow: var(--mr-shadow-sm);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.mr-product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mr-shadow);
    border-color: var(--mr-primary);
}
.mr-product-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid var(--mr-border);
}
.mr-product-card-image {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    padding: 16px;
}
.mr-product-card-image img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain;
    transition: transform 0.3s;
}
.mr-product-card:hover .mr-product-card-image img { transform: scale(1.04); }
.mr-product-card-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px;
    font-size: 11px; font-weight: 700;
    border-radius: 999px;
    z-index: 2; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mr-badge-sale { background: var(--mr-accent); color: #fff; }
.mr-badge-out  { background: #6c7989; color: #fff; }

.mr-product-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}
.mr-product-card-cat {
    font-size: 11px; color: var(--mr-primary);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.mr-product-card-title { font-size: 14.5px; font-weight: 600; margin: 0; line-height: 1.4; }
.mr-product-card-title a { color: var(--mr-text); }
.mr-product-card-title a:hover { color: var(--mr-primary); }
.mr-product-card-price {
    font-size: 16px; font-weight: 700; color: var(--mr-text);
    margin: 4px 0 8px;
}
.mr-product-card-price del { color: var(--mr-text-soft); font-weight: 400; margin-right: 6px; font-size: 13px; }
.mr-product-card-price ins { text-decoration: none; color: var(--mr-accent); }

.mr-product-card-actions {
    display: flex; gap: 8px; margin-top: auto; align-items: stretch;
}
.mr-product-card .button,
.mr-product-card-actions .button {
    flex: 1;
    background: var(--mr-primary) !important;
    color: #fff !important;
    border: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    text-align: center !important;
    transition: background 0.15s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}
.mr-product-card .button:hover,
.mr-product-card-actions .button:hover {
    background: var(--mr-primary-dark) !important;
    color: #fff !important;
}
.mr-product-card .added_to_cart,
.mr-product-card .button.product_type_variable,
.mr-product-card .button.product_type_grouped,
.mr-product-card .button.product_type_external { font-size: 12.5px !important; }
.mr-product-card-view {
    padding: 10px 14px;
    border: 1px solid var(--mr-border);
    border-radius: 8px;
    color: var(--mr-text);
    font-size: 13px; font-weight: 600;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mr-product-card-view:hover {
    background: var(--mr-bg-soft);
    color: var(--mr-primary);
    border-color: var(--mr-primary);
}

/* WooCommerce result count + sort */
.woocommerce-result-count { margin: 0; font-size: 13px; color: var(--mr-text-soft); }
.woocommerce-ordering select {
    padding: 8px 12px;
    border: 1px solid var(--mr-border);
    border-radius: 8px;
    background: #fff;
    font-size: 13.5px;
    cursor: pointer;
}

/* Pagination */
.woocommerce-pagination { margin-top: 28px; }
.woocommerce-pagination ul.page-numbers {
    list-style: none; padding: 0; margin: 0;
    display: flex; gap: 6px; flex-wrap: wrap;
}
.woocommerce-pagination ul.page-numbers li { border: 0; }
.woocommerce-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid var(--mr-border); border-radius: 8px;
    color: var(--mr-text); font-size: 14px;
    text-decoration: none;
}
.woocommerce-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers:hover {
    background: var(--mr-primary);
    color: #fff;
    border-color: var(--mr-primary);
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-left: 4px solid var(--mr-primary);
    padding: 14px 18px;
    border-radius: var(--mr-radius);
    margin-bottom: 16px;
    font-size: 14px;
    list-style: none;
    box-shadow: var(--mr-shadow-sm);
}
.woocommerce-message { border-left-color: #2e7d32; }
.woocommerce-error   { border-left-color: var(--mr-accent); }
.woocommerce-message a.button,
.woocommerce-info a.button {
    background: var(--mr-primary) !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    margin-left: 12px !important;
}

/* Single product */
.mr-single-product-page { padding: 24px 0 64px; }
.mr-single-product-page div.product { display: contents; }

/* ── New SP Layout ── */
.sp-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin: 20px 0 0; align-items: start; }
.sp-gallery { position: sticky; top: 170px; }
.sp-summary { display: flex; flex-direction: column; gap: 0; }

/* Badges */
.sp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sp-cat-badge { background: var(--mr-bg-soft); color: var(--mr-text-soft); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--mr-border); text-transform: uppercase; letter-spacing: 0.05em; }
.sp-sale-badge { background: var(--mr-accent); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em; }
.sp-stock-badge { background: #f0fdf4; color: #166534; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; border: 1px solid #86efac; display: inline-flex; align-items: center; gap: 4px; }
.sp-stock-badge svg { color: #22c55e; }

/* Title */
.sp-title { font-size: clamp(18px,2.2vw,26px) !important; font-weight: 600 !important; line-height: 1.3 !important; color: var(--mr-text) !important; margin: 0 0 10px !important; }

/* Rating */
.sp-rating-row { margin-bottom: 14px; }

/* Price */
.sp-price-block { background: var(--mr-bg-soft); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.sp-price-block .price { font-size: 26px !important; font-weight: 700 !important; color: var(--mr-primary) !important; margin: 0 0 6px !important; }
.sp-price-block .price del { color: #999 !important; font-size: 16px !important; font-weight: 400 !important; }
.sp-price-block .price ins { color: var(--mr-accent) !important; text-decoration: none !important; }
.sp-club-price { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #7c3aed; font-weight: 600; background: #f5f3ff; border-radius: 20px; padding: 4px 10px; border: 1px solid #ddd6fe; }
.sp-club-price svg { color: #7c3aed; }

/* Short desc */
.sp-short-desc { font-size: 14px; color: var(--mr-text-soft); line-height: 1.7; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--mr-border); }
.sp-short-desc p { margin: 0 0 6px; }

/* Availability */
.sp-avail { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #166534; background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 7px 12px; margin-bottom: 16px; font-weight: 500; }
.sp-avail svg { color: #22c55e; flex-shrink: 0; }

/* Cart form */
.sp-cart-wrap { margin-bottom: 18px; }
.sp-cart-wrap form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 !important; }
.sp-cart-wrap .quantity { border: 1.5px solid var(--mr-border); border-radius: 8px; overflow: hidden; background: #fff; display: inline-flex; }
.sp-cart-wrap .qty { width: 64px; border: 0; text-align: center; font-size: 15px; font-weight: 600; padding: 12px 6px; }
.sp-cart-wrap .single_add_to_cart_button { background: var(--mr-accent) !important; color: #fff !important; padding: 14px 32px !important; font-size: 15px !important; font-weight: 600 !important; border-radius: 8px !important; border: 0 !important; cursor: pointer !important; transition: background 0.15s, transform 0.12s !important; flex: 1; min-height: 50px; }
.sp-cart-wrap .single_add_to_cart_button:hover { background: var(--mr-accent-dark) !important; transform: translateY(-1px) !important; }

/* Trust row */
.sp-trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.sp-trust-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mr-text-soft); background: var(--mr-bg-soft); border-radius: 8px; padding: 9px 12px; border: 1px solid var(--mr-border); }
.sp-trust-item svg { color: var(--mr-primary); flex-shrink: 0; }

/* Meta */
.sp-meta-block { font-size: 12.5px; color: var(--mr-text-soft); border-top: 1px solid var(--mr-border); padding-top: 14px; margin-top: 4px; margin-bottom: 10px; }
.sp-meta-block .product_meta > span { display: block; margin-bottom: 4px; }
.sp-meta-block .product_meta a { color: var(--mr-primary); }

/* Guarantee strip */
.sp-guarantee { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; background: var(--mr-primary); border-radius: 12px; margin: 36px 0; overflow: hidden; }
.sp-guarantee-item { display: flex; align-items: center; gap: 14px; padding: 22px 20px; border-right: 1px solid rgba(255,255,255,0.12); color: #fff; }
.sp-guarantee-item:last-child { border-right: none; }
.sp-guarantee-item svg { color: #ffd1a0; flex-shrink: 0; }
.sp-guarantee-item strong { display: block; font-size: 13.5px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.sp-guarantee-item span { display: block; font-size: 11.5px; color: rgba(255,255,255,0.75); }

/* Tabs */
.sp-tabs-section { margin-top: 0; }
.sp-tabs-section .woocommerce-tabs { margin-top: 0; border-top: none; padding-top: 0; }
.sp-tabs-section .woocommerce-tabs ul.tabs { border-bottom: 2px solid var(--mr-border); margin-bottom: 24px; }
.sp-tabs-section .woocommerce-tabs ul.tabs li a { font-size: 14px; font-weight: 500; padding: 12px 20px; color: var(--mr-text-soft); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.sp-tabs-section .woocommerce-tabs ul.tabs li.active a { color: var(--mr-primary); border-bottom-color: var(--mr-primary); font-weight: 600; }

@media(max-width:900px) {
    .sp-wrap { grid-template-columns: 1fr; gap: 24px; }
    .sp-gallery { position: static; }
    .sp-trust-row { grid-template-columns: 1fr 1fr; }
    .sp-guarantee { grid-template-columns: 1fr 1fr; }
}
@media(max-width:600px) {
    .sp-trust-row { grid-template-columns: 1fr; }
    .sp-guarantee { grid-template-columns: 1fr; }
    .sp-guarantee-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
}
.mr-single-product-page .woocommerce-product-gallery {
    width: 100% !important;
    margin: 0 !important;
}
.mr-single-product-page .woocommerce-product-gallery__wrapper {
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    overflow: hidden;
    background: #fff;
}
.mr-single-product-page .woocommerce-product-gallery__image img {
    width: 100%; height: auto; display: block;
}
.mr-single-product-page .flex-control-thumbs {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px; margin: 12px 0 0; padding: 0;
    list-style: none;
}
.mr-single-product-page .flex-control-thumbs li {
    margin: 0 !important; width: auto !important;
}
.mr-single-product-page .flex-control-thumbs img {
    border: 1px solid var(--mr-border);
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s, border-color 0.15s;
}
.mr-single-product-page .flex-control-thumbs img:hover,
.mr-single-product-page .flex-control-thumbs img.flex-active {
    opacity: 1;
    border-color: var(--mr-primary);
}

.mr-single-product-page .product_title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 12px;
}
.mr-single-product-page .price {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--mr-text) !important;
    margin: 0 0 16px !important;
}
.mr-single-product-page .price del { color: var(--mr-text-soft); font-weight: 400; margin-right: 8px; font-size: 16px; }
.mr-single-product-page .price ins { text-decoration: none; color: var(--mr-accent); }
.mr-single-product-page .woocommerce-product-rating { margin-bottom: 14px; }
.mr-single-product-page .woocommerce-product-details__short-description {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--mr-text-soft);
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--mr-border);
}
.mr-single-product-page form.cart {
    display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center;
    margin-bottom: 18px !important;
}
.mr-single-product-page form.cart .quantity {
    display: inline-flex;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    overflow: hidden;
    background: #fff;
}
.mr-single-product-page form.cart .qty {
    width: 70px;
    border: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 8px;
    background: transparent;
}
.mr-single-product-page form.cart .button,
.mr-single-product-page .single_add_to_cart_button {
    background: var(--mr-accent) !important;
    color: #fff !important;
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: var(--mr-radius) !important;
    border: 0 !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    transition: background 0.15s, transform 0.15s !important;
}
.mr-single-product-page form.cart .button:hover,
.mr-single-product-page .single_add_to_cart_button:hover {
    background: var(--mr-accent-dark) !important;
    transform: translateY(-1px);
}
.mr-single-product-page .product_meta {
    font-size: 13px;
    color: var(--mr-text-soft);
    border-top: 1px solid var(--mr-border);
    padding-top: 14px;
    margin-top: 18px;
}
.mr-single-product-page .product_meta > span { display: block; margin-bottom: 4px; }
.mr-single-product-page .product_meta a { color: var(--mr-primary); }

/* Variations */
.mr-single-product-page .variations {
    margin-bottom: 16px !important;
}
.mr-single-product-page .variations th { padding: 8px 12px 8px 0; font-weight: 600; font-size: 13.5px; }
.mr-single-product-page .variations td { padding: 8px 0; }
.mr-single-product-page .variations select {
    padding: 10px 12px;
    border: 1px solid var(--mr-border);
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    background: #fff;
}
.mr-single-product-page .reset_variations {
    font-size: 12px;
    color: var(--mr-accent);
    margin-left: 8px;
}

/* Tabs */
.woocommerce-tabs {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--mr-border);
}
.woocommerce-tabs ul.tabs {
    list-style: none; padding: 0; margin: 0 0 18px;
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--mr-border);
}
.woocommerce-tabs ul.tabs li {
    margin: 0;
}
.woocommerce-tabs ul.tabs li a {
    display: inline-block;
    padding: 12px 20px;
    color: var(--mr-text-soft);
    font-weight: 600; font-size: 14px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.woocommerce-tabs ul.tabs li.active a {
    color: var(--mr-primary);
    border-bottom-color: var(--mr-primary);
}
.woocommerce-tabs ul.tabs li a:hover {
    color: var(--mr-primary);
}
.woocommerce-Tabs-panel { font-size: 14.5px; line-height: 1.7; }
.woocommerce-Tabs-panel h2 { font-size: 18px; margin-bottom: 12px; }

/* Related & upsells */
.related.products,
.upsells.products {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--mr-border);
}
.related.products > h2,
.upsells.products > h2 {
    font-size: 20px;
    margin-bottom: 18px;
}

/* Cart page */
.woocommerce-cart-form,
.woocommerce-cart .cart-collaterals {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--mr-shadow-sm);
}
.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.shop_table th, .shop_table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--mr-border);
}
.shop_table th {
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mr-text-soft);
}
.shop_table .product-thumbnail img {
    max-width: 70px;
    border-radius: 6px;
    border: 1px solid var(--mr-border);
}
.cart_totals h2, .cross-sells h2 { font-size: 18px; margin-bottom: 12px; }
.checkout-button, .wc-proceed-to-checkout .button {
    display: inline-block !important;
    background: var(--mr-accent) !important;
    color: #fff !important;
    padding: 14px 24px !important;
    border-radius: var(--mr-radius) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    text-align: center !important;
    width: 100% !important;
    text-decoration: none !important;
}
.checkout-button:hover { background: var(--mr-accent-dark) !important; }

/* Checkout */
form.checkout.woocommerce-checkout {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.woocommerce-checkout #customer_details {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 24px;
    box-shadow: var(--mr-shadow-sm);
}
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    background: var(--mr-bg-soft);
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 22px;
    margin-top: 14px;
}
.woocommerce-checkout #order_review_heading { padding: 14px 22px; margin: 24px 0 0; border-bottom: 0; border-radius: var(--mr-radius) var(--mr-radius) 0 0; font-size: 18px; }
.woocommerce-checkout #order_review { border-radius: 0 0 var(--mr-radius) var(--mr-radius); border-top: 0; }

.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--mr-text); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row select,
.form-row textarea,
.woocommerce form .form-row input.input-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mr-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--mr-primary);
    box-shadow: 0 0 0 3px rgba(0,60,113,0.1);
}

/* My Account */
.woocommerce-MyAccount-navigation ul {
    list-style: none; padding: 0; margin: 0;
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    overflow: hidden;
}
.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 12px 16px;
    color: var(--mr-text);
    border-bottom: 1px solid var(--mr-border);
    font-size: 14px; font-weight: 500;
}
.woocommerce-MyAccount-navigation li:last-child a { border-bottom: 0; }
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
    background: var(--mr-primary);
    color: #fff;
}

/* Stars */
.star-rating { color: #f5b301; font-size: 14px; }

/* Responsive */
@media (max-width: 980px) {
    .mr-shop-layout { grid-template-columns: 1fr; }
    .mr-shop-sidebar { order: 2; }
    ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .mr-single-product-page div.product { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
    ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
    .mr-product-card-body { padding: 12px; gap: 5px; }
    .mr-product-card-title { font-size: 13.5px; }
    .mr-product-card-price { font-size: 15px; }
    .mr-product-card-actions { flex-direction: column; }
    .mr-product-card .button { font-size: 12.5px !important; padding: 9px 10px !important; }
    .mr-product-card-view { padding: 9px 10px; font-size: 12.5px; text-align: center; }
    .mr-single-product-page .product_title { font-size: 22px; }
    .woocommerce-tabs ul.tabs li a { padding: 10px 14px; font-size: 13px; }
}

/* ==========================================================
   WooCommerce Professional Responsive Overhaul - v1.0.3
   Fixes shop, category, single product, and related products.
   ========================================================== */

.woocommerce,
.mr-shop-main,
.mr-single-product-page {
    overflow-x: clip;
}

.mr-shop-main {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    padding: 34px 0 70px;
}

.mr-shop-container,
.mr-single-product-page .mr-container {
    max-width: 1320px;
}

.mr-shop-header {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: 18px;
    box-shadow: var(--mr-shadow-sm);
    padding: 20px 22px;
    margin: 0 0 24px;
}

.mr-shop-header-row {
    border-bottom: 0;
    padding-bottom: 0;
    align-items: center;
}

.mr-shop-title {
    font-size: clamp(24px, 2.4vw, 34px);
    letter-spacing: -0.025em;
    color: var(--mr-primary-dark);
}

.mr-shop-header .term-description,
.mr-shop-header .page-description {
    color: var(--mr-text-soft);
    max-width: 850px;
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.75;
}

.mr-shop-tools {
    justify-content: flex-end;
    gap: 12px;
}

.woocommerce-result-count {
    background: var(--mr-bg-soft);
    border: 1px solid var(--mr-border);
    border-radius: 999px;
    color: var(--mr-text-soft);
    padding: 8px 12px;
    line-height: 1;
}

.woocommerce-ordering {
    margin: 0;
}

.woocommerce-ordering select {
    min-height: 38px;
    border-radius: 999px;
    padding: 8px 36px 8px 14px;
    max-width: 100%;
}

.mr-shop-layout {
    grid-template-columns: 282px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.mr-shop-sidebar {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: 18px;
    box-shadow: var(--mr-shadow-sm);
    padding: 18px;
    position: sticky;
    top: 170px;
}

.mr-widget-title,
.mr-shop-sidebar .widgettitle {
    font-size: 15px;
    color: var(--mr-primary-dark);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mr-border);
}

.mr-shop-sidebar ul,
.mr-shop-sidebar ol {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.mr-shop-sidebar .mr-widget-cats a,
.mr-shop-sidebar .cat-item a,
.mr-shop-sidebar .product-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--mr-text);
    font-weight: 500;
    border-bottom: 0;
}

.mr-shop-sidebar .mr-widget-cats li,
.mr-shop-sidebar .cat-item,
.mr-shop-sidebar .product-categories li {
    border-bottom: 0;
}

.mr-shop-sidebar .mr-widget-cats a:hover,
.mr-shop-sidebar .cat-item a:hover,
.mr-shop-sidebar .product-categories a:hover,
.mr-shop-sidebar .current-cat > a,
.mr-shop-sidebar .current-cat-parent > a {
    background: #eef6fc;
    color: var(--mr-primary);
    padding-left: 12px;
}

.mr-shop-sidebar .children {
    border-top: 0 !important;
    padding-left: 10px !important;
    margin: 2px 0 4px !important;
}

.mr-shop-sidebar .children a {
    min-height: 32px;
    font-size: 12.5px !important;
    color: var(--mr-text-soft) !important;
    padding: 6px 10px !important;
}

/* 3rd-level grandchild categories */
.mr-shop-sidebar .children .children {
    padding-left: 10px !important;
    margin: 0 !important;
    border-left: 2px solid var(--mr-border) !important;
}
.mr-shop-sidebar .children .children a {
    font-size: 12px !important;
    color: #9aa5b4 !important;
    padding: 4px 8px !important;
    min-height: 28px;
}
.mr-shop-sidebar .children .children a:hover { color: var(--mr-primary) !important; }

.mr-shop-content {
    min-width: 0;
}

.mr-shop-content ul.products,
.woocommerce ul.products,
ul.products {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    clear: both;
}

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

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

.mr-product-card,
.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #dde5ee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 30, 60, 0.06);
    display: flex !important;
    flex-direction: column;
    height: 100%;
    position: relative;
    isolation: isolate;
}

.mr-product-card:hover,
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(0, 30, 60, 0.12);
    border-color: rgba(0, 60, 113, 0.35);
}

.mr-product-card-media {
    aspect-ratio: 1 / 0.86;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

.mr-product-card-image {
    padding: 20px;
}

.mr-product-card-image img,
.woocommerce ul.products li.product a img {
    width: 100%;
    height: 100%;
    max-height: 230px;
    object-fit: contain;
    margin: 0 auto;
}

.mr-product-card-body {
    padding: 16px 16px 18px;
    gap: 8px;
}

.mr-product-card-title {
    font-size: 15px;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mr-product-card-price {
    font-size: 17px;
    margin: 2px 0 10px;
}

.mr-product-card-actions {
    gap: 10px;
}

.mr-product-card .button,
.mr-product-card-actions .button,
.woocommerce ul.products li.product .button {
    min-height: 42px;
    border-radius: 12px !important;
    white-space: normal !important;
}

.mr-product-card-view {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.mr-single-product-page {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    padding: 30px 0 70px;
}

.mr-single-product-page div.product {
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 34px;
    align-items: start;
    margin-top: 16px;
}

.mr-single-product-page div.product::before,
.mr-single-product-page div.product::after {
    content: none !important;
    display: none !important;
}

.mr-single-product-page div.product div.images,
.mr-single-product-page div.product div.summary,
.mr-single-product-page .woocommerce-product-gallery,
.mr-single-product-page .summary.entry-summary {
    float: none !important;
    width: 100% !important;
    clear: none !important;
    margin: 0 !important;
}

.mr-single-product-page .woocommerce-product-gallery {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: 22px;
    box-shadow: var(--mr-shadow-sm);
    padding: 16px;
}

.mr-single-product-page .woocommerce-product-gallery__wrapper {
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f7fb 100%);
}

.mr-single-product-page .woocommerce-product-gallery__image {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 440px;
}

.mr-single-product-page .woocommerce-product-gallery__image img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

.mr-single-product-page .summary.entry-summary {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: 22px;
    box-shadow: var(--mr-shadow-sm);
    padding: 26px;
    position: sticky;
    top: 170px;
}

.mr-single-product-page .product_title {
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--mr-primary-dark);
    margin-bottom: 12px;
    line-height: 1.3;
}

.mr-single-product-page .price {
    font-size: clamp(23px, 2vw, 30px) !important;
    color: var(--mr-primary-dark) !important;
    margin-bottom: 18px !important;
}

.mr-single-product-page .woocommerce-product-details__short-description {
    color: var(--mr-text-soft);
    font-size: 15px;
    line-height: 1.75;
    padding: 16px 0;
    margin: 0 0 18px;
    border-top: 1px solid var(--mr-border);
    border-bottom: 1px solid var(--mr-border);
}

.mr-single-product-page form.cart {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr);
    gap: 12px;
    align-items: stretch;
    margin: 18px 0 !important;
}

.mr-single-product-page form.cart .quantity {
    min-height: 52px;
    border-radius: 14px;
}

.mr-single-product-page form.cart .qty {
    height: 52px;
    width: 78px;
}

.mr-single-product-page form.cart .button,
.mr-single-product-page .single_add_to_cart_button {
    min-height: 52px;
    width: 100%;
    border-radius: 14px !important;
    box-shadow: 0 10px 22px rgba(201, 33, 41, 0.20);
}

.mr-single-product-page .product_meta {
    background: #f7f9fc;
    border: 1px solid var(--mr-border);
    border-radius: 14px;
    padding: 14px;
}

.mr-single-product-page .variations,
.mr-single-product-page .variations tbody,
.mr-single-product-page .variations tr,
.mr-single-product-page .variations th,
.mr-single-product-page .variations td {
    display: block;
    width: 100%;
}

.mr-single-product-page .variations th {
    padding: 0 0 6px;
}

.mr-single-product-page .variations td {
    padding: 0 0 12px;
}

.mr-single-product-page .variations select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
}

.mr-single-product-page .woocommerce-tabs,
.mr-single-product-page .related.products,
.mr-single-product-page .upsells.products {
    grid-column: 1 / -1;
    clear: both;
}

.mr-single-product-page .woocommerce-tabs {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: 22px;
    box-shadow: var(--mr-shadow-sm);
    padding: 24px;
    margin-top: 8px;
}

.woocommerce-tabs ul.tabs {
    border-bottom: 1px solid var(--mr-border);
    gap: 8px;
}

.woocommerce-tabs ul.tabs li a {
    border-radius: 12px 12px 0 0;
    padding: 12px 18px;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    background: #eef6fc;
}

.related.products,
.upsells.products {
    background: #fff;
    border: 1px solid var(--mr-border);
    border-radius: 22px;
    box-shadow: var(--mr-shadow-sm);
    padding: 24px;
    margin-top: 28px;
}

.related.products > h2,
.upsells.products > h2 {
    font-size: clamp(20px, 2vw, 26px);
    color: var(--mr-primary-dark);
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mr-border);
}

.related.products ul.products,
.upsells.products ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.related.products .mr-product-card-title,
.upsells.products .mr-product-card-title {
    font-size: 14px;
}

.related.products .mr-product-card-actions,
.upsells.products .mr-product-card-actions {
    flex-direction: column;
}

.mr-single-product-page .woocommerce-notices-wrapper,
.mr-shop-main .woocommerce-notices-wrapper {
    margin-bottom: 16px;
}

.woocommerce-pagination {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.woocommerce-cart-form,
.woocommerce-checkout-review-order,
.shop_table {
    max-width: 100%;
}

@media (min-width: 1321px) {
    .mr-shop-content ul.products,
    .woocommerce ul.products,
    ul.products {
        gap: 26px !important;
    }
}

@media (max-width: 1180px) {
    .mr-shop-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 22px;
    }

    .mr-shop-content ul.products,
    .woocommerce ul.products,
    ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }

    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .mr-single-product-page div.product {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
        gap: 24px;
    }

    .mr-single-product-page .summary.entry-summary {
        padding: 22px;
    }
}

@media (max-width: 980px) {
    .mr-shop-main,
    .mr-single-product-page {
        padding: 24px 0 56px;
    }

    .mr-shop-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mr-shop-sidebar {
        order: 0;
        position: static;
        padding: 16px;
    }

    .mr-shop-sidebar .mr-widget-cats > ul,
    .mr-shop-sidebar .product-categories {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 10px;
    }

    .mr-shop-sidebar .children {
        display: none;
    }

    .mr-shop-content {
        order: 1;
    }

    .mr-single-product-page div.product {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mr-single-product-page .summary.entry-summary {
        position: static;
    }

    .mr-single-product-page .woocommerce-product-gallery__image {
        min-height: 360px;
    }
}

@media (max-width: 720px) {
    .mr-shop-container,
    .mr-single-product-page .mr-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mr-shop-header {
        padding: 16px;
        border-radius: 16px;
    }

    .mr-shop-header-row {
        align-items: stretch;
    }

    .mr-shop-tools,
    .woocommerce-result-count,
    .woocommerce-ordering,
    .woocommerce-ordering select {
        width: 100%;
    }

    .woocommerce-result-count {
        text-align: center;
        justify-content: center;
    }

    .mr-shop-sidebar .mr-widget-cats > ul,
    .mr-shop-sidebar .product-categories {
        grid-template-columns: 1fr;
    }

    .mr-shop-content ul.products,
    .woocommerce ul.products,
    ul.products,
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .mr-product-card-media {
        aspect-ratio: 1 / 0.92;
    }

    .mr-product-card-image {
        padding: 12px;
    }

    .mr-product-card-body {
        padding: 12px;
    }

    .mr-product-card-cat {
        font-size: 10px;
    }

    .mr-product-card-title {
        font-size: 13px;
        min-height: 37px;
    }

    .mr-product-card-price {
        font-size: 14.5px;
        margin-bottom: 8px;
    }

    .mr-product-card-actions {
        flex-direction: column;
        gap: 8px;
    }

    .mr-product-card .button,
    .mr-product-card-actions .button,
    .mr-product-card-view,
    .woocommerce ul.products li.product .button {
        min-height: 38px;
        font-size: 12px !important;
        padding: 9px 8px !important;
        width: 100%;
    }

    .mr-single-product-page .woocommerce-product-gallery,
    .mr-single-product-page .summary.entry-summary,
    .mr-single-product-page .woocommerce-tabs,
    .related.products,
    .upsells.products {
        border-radius: 16px;
        padding: 16px;
    }

    .mr-single-product-page .woocommerce-product-gallery__image {
        min-height: 280px;
    }

    .mr-single-product-page .flex-control-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    }

    .mr-single-product-page form.cart {
        grid-template-columns: 1fr;
    }

    .mr-single-product-page form.cart .quantity,
    .mr-single-product-page form.cart .qty {
        width: 100%;
    }

    .woocommerce-tabs ul.tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .woocommerce-tabs ul.tabs li {
        flex: 0 0 auto;
    }

    .woocommerce-tabs ul.tabs li a {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .mr-shop-content ul.products,
    .woocommerce ul.products,
    ul.products,
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: 1fr !important;
    }

    .mr-product-card {
        flex-direction: row;
        min-height: 150px;
    }

    .mr-product-card-media {
        width: 42%;
        min-width: 42%;
        aspect-ratio: auto;
        border-bottom: 0;
        border-right: 1px solid var(--mr-border);
    }

    .mr-product-card-body {
        width: 58%;
    }

    .mr-product-card-title {
        min-height: auto;
    }

    .related.products .mr-product-card,
    .upsells.products .mr-product-card {
        flex-direction: column;
    }

    .related.products .mr-product-card-media,
    .upsells.products .mr-product-card-media {
        width: 100%;
        min-width: 0;
        aspect-ratio: 1 / 0.86;
        border-right: 0;
        border-bottom: 1px solid var(--mr-border);
    }

    .related.products .mr-product-card-body,
    .upsells.products .mr-product-card-body {
        width: 100%;
    }
}

/* ==========================================================
   WooCommerce Final Polish - v1.0.4
   Fix product title clipping, cramped grids, shop/category
   sidebar widgets, sticky header spacing, and mobile cards.
   ========================================================== */

html {
    scroll-padding-top: 180px;
}

body.admin-bar .mr-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .mr-header {
        top: 46px;
    }
}

/* Shop/category content must never slide under the sticky header. */
.mr-shop-main,
.mr-single-product-page {
    position: relative;
    z-index: 1;
    padding-top: clamp(30px, 3vw, 48px) !important;
}

.mr-shop-container,
.mr-single-product-page .mr-container {
    max-width: 1380px;
}

/* Product archive: show useful Woo product categories, not blog archives. */
.mr-shop-sidebar .widget_archive,
.mr-shop-sidebar .widget_categories,
.mr-shop-sidebar [id^="archives-"],
.mr-shop-sidebar [id^="categories-"] {
    display: none !important;
}

.mr-shop-sidebar .mr-product-cats-widget {
    display: block !important;
}

.mr-shop-sidebar .mr-product-cats-widget > ul,
.mr-shop-sidebar .mr-product-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* More professional archive layout: avoid cramped 4-column cards with a sidebar. */
.mr-shop-layout {
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) !important;
    gap: 28px !important;
}

.mr-shop-content ul.products,
.woocommerce .mr-shop-content ul.products,
.woocommerce-page .mr-shop-content ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch !important;
}

/* Related/upsell should stay neat and full width on product pages. */
.related.products ul.products,
.upsells.products ul.products,
.cross-sells ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)) !important;
    gap: 22px !important;
    align-items: stretch !important;
}

/* Product cards: no cropped title, no broken card height. */
.woocommerce ul.products li.product,
ul.products li.product,
.mr-product-card {
    min-width: 0 !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: hidden !important;
}

.mr-product-card-media {
    aspect-ratio: 1 / 0.92 !important;
    min-height: 220px;
    overflow: hidden !important;
}

.mr-product-card-image {
    min-height: 100%;
}

.mr-product-card-image img,
.woocommerce ul.products li.product a img {
    width: 100% !important;
    height: 100% !important;
    max-height: 245px !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.mr-product-card-body {
    min-width: 0;
    height: auto !important;
}

.mr-product-card-cat {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.mr-product-card-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    line-height: 1.42 !important;
    white-space: normal !important;
    text-overflow: clip !important;
    word-break: normal;
    overflow-wrap: anywhere;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
}

.mr-product-card-title a,
.woocommerce ul.products li.product .woocommerce-loop-product__title a,
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: inline !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
}

.mr-product-card-price,
.woocommerce ul.products li.product .price {
    line-height: 1.35 !important;
}

.mr-product-card-actions {
    margin-top: auto !important;
    width: 100%;
}

.mr-product-card .button,
.mr-product-card-actions .button,
.woocommerce ul.products li.product .button,
.mr-product-card-view {
    white-space: normal !important;
    line-height: 1.2 !important;
}

/* Single product page: keep gallery, summary, tabs, and related products clean. */
.mr-single-product-page div.product {
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr) !important;
}

.mr-single-product-page .woocommerce-product-gallery__image {
    min-height: clamp(320px, 34vw, 500px) !important;
}

.mr-single-product-page .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    max-height: 540px !important;
    object-fit: contain !important;
}

.mr-single-product-page .product_title {
    overflow-wrap: anywhere;
}

.related.products .mr-product-card-title,
.upsells.products .mr-product-card-title,
.cross-sells .mr-product-card-title {
    min-height: 0 !important;
    font-size: 14.5px;
}

@media (max-width: 1280px) {
    .mr-shop-layout {
        grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) !important;
        gap: 22px !important;
    }

    .mr-shop-content ul.products,
    .woocommerce .mr-shop-content ul.products,
    .woocommerce-page .mr-shop-content ul.products {
        grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (max-width: 1100px) {
    .mr-shop-layout {
        grid-template-columns: 1fr !important;
    }

    .mr-shop-sidebar {
        position: static !important;
        order: 0;
    }

    .mr-shop-content {
        order: 1;
    }

    .mr-shop-content ul.products,
    .woocommerce .mr-shop-content ul.products,
    .woocommerce-page .mr-shop-content ul.products,
    .related.products ul.products,
    .upsells.products ul.products,
    .cross-sells ul.products {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }

    .mr-single-product-page div.product {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 720px) {
    html {
        scroll-padding-top: 120px;
    }

    .mr-shop-main,
    .mr-single-product-page {
        padding-top: 22px !important;
    }

    .mr-shop-content ul.products,
    .woocommerce .mr-shop-content ul.products,
    .woocommerce-page .mr-shop-content ul.products,
    .related.products ul.products,
    .upsells.products ul.products,
    .cross-sells ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .mr-product-card-media {
        min-height: 0;
        aspect-ratio: 1 / 0.95 !important;
    }

    .mr-product-card-image img,
    .woocommerce ul.products li.product a img {
        max-height: 190px !important;
    }

    .mr-product-card-title {
        font-size: 13.5px !important;
        line-height: 1.38 !important;
    }

    .mr-product-card-actions {
        flex-direction: column !important;
    }
}

@media (max-width: 430px) {
    .mr-shop-content ul.products,
    .woocommerce .mr-shop-content ul.products,
    .woocommerce-page .mr-shop-content ul.products,
    .related.products ul.products,
    .upsells.products ul.products,
    .cross-sells ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .mr-product-card,
    .related.products .mr-product-card,
    .upsells.products .mr-product-card,
    .cross-sells .mr-product-card {
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .mr-product-card-media,
    .related.products .mr-product-card-media,
    .upsells.products .mr-product-card-media,
    .cross-sells .mr-product-card-media {
        width: 100% !important;
        min-width: 0 !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--mr-border) !important;
        aspect-ratio: 1 / 0.82 !important;
    }

    .mr-product-card-body,
    .related.products .mr-product-card-body,
    .upsells.products .mr-product-card-body,
    .cross-sells .mr-product-card-body {
        width: 100% !important;
    }
}

/* ── Related Products ── */
.sp-related-section { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--mr-border); }
.sp-related-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.sp-related-head h2 { font-size: 20px; font-weight: 600; color: var(--mr-primary); margin: 0; }
.sp-related-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important; list-style: none !important; padding: 0 !important; margin: 0 !important; float: none !important; }
.sp-related-grid li.product { float: none !important; width: auto !important; margin: 0 !important; }
.sp-related-grid .mr-product-card { border-radius: 12px; }

/* override old blank related */
.related.products, .upsells.products { display: none !important; }

@media(max-width:900px) { .sp-related-grid { grid-template-columns: repeat(2,1fr) !important; } }
@media(max-width:500px) { .sp-related-grid { grid-template-columns: 1fr 1fr !important; } }

/* ── Mobile: sidebar stacks above products, 2-col grid ── */
.mr-filter-btn-wrap { display: none; }
.mr-sidebar-close { display: none; }
.mr-sidebar-overlay { display: none; }

@media (max-width: 980px) {
    .mr-shop-layout { display: block !important; }
    .mr-shop-sidebar { order: unset !important; position: static !important; transform: none !important; width: 100% !important; margin-bottom: 20px; }
    .mr-shop-content { width: 100% !important; }
    .mr-shop-content ul.products,
    .woocommerce .mr-shop-content ul.products,
    .woocommerce-page .mr-shop-content ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
}
@media (max-width: 480px) {
    .mr-shop-content ul.products,
    .woocommerce .mr-shop-content ul.products,
    .woocommerce-page .mr-shop-content ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .mr-product-card-body { padding: 10px !important; }
    .mr-product-card-title { font-size: 12.5px !important; }
}

.fp-na-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .fp-na-grid { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 480px) { .fp-na-grid { grid-template-columns: 1fr 1fr !important; } }

/* ── About page hero image ── */
.ab-hero-img-wrap { border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,60,113,0.18); }
.ab-hero-img-wrap img { width: 100%; height: 320px; object-fit: cover; display: block; }

/* Checkout responsive fix - keeps shortcode checkout full width and prevents body grid overflow. */
body.woocommerce-checkout {
    display: block !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.woocommerce-checkout .mr-page-content {
    max-width: 100% !important;
    width: 100% !important;
}

body.woocommerce-checkout form.checkout.woocommerce-checkout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout .woocommerce form.checkout,
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order,
body.woocommerce-checkout .shop_table {
    max-width: 100% !important;
    box-sizing: border-box;
}

body.woocommerce-checkout .woocommerce .col2-set,
body.woocommerce-checkout .woocommerce-page .col2-set {
    width: 100% !important;
    max-width: 100% !important;
}

body.woocommerce-checkout .woocommerce .col2-set .col-1,
body.woocommerce-checkout .woocommerce-page .col2-set .col-1,
body.woocommerce-checkout .woocommerce .col2-set .col-2,
body.woocommerce-checkout .woocommerce-page .col2-set .col-2 {
    width: calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    box-sizing: border-box;
}

body.woocommerce-checkout .woocommerce .col2-set .col-1,
body.woocommerce-checkout .woocommerce-page .col2-set .col-1 {
    float: left !important;
}

body.woocommerce-checkout .woocommerce .col2-set .col-2,
body.woocommerce-checkout .woocommerce-page .col2-set .col-2 {
    float: right !important;
}

body.woocommerce-checkout .woocommerce form .form-row-first,
body.woocommerce-checkout .woocommerce form .form-row-last,
body.woocommerce-checkout .woocommerce-page form .form-row-first,
body.woocommerce-checkout .woocommerce-page form .form-row-last {
    width: calc(50% - 8px) !important;
    box-sizing: border-box;
}

body.woocommerce-checkout .woocommerce form .form-row-first,
body.woocommerce-checkout .woocommerce-page form .form-row-first {
    float: left !important;
}

body.woocommerce-checkout .woocommerce form .form-row-last,
body.woocommerce-checkout .woocommerce-page form .form-row-last {
    float: right !important;
}

@media (max-width: 768px) {
    body.woocommerce-checkout .mr-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.woocommerce-checkout .mr-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
        max-width: 100% !important;
    }

    body.woocommerce-checkout .mr-page-header {
        margin-bottom: 18px;
    }

    body.woocommerce-checkout .woocommerce .col2-set .col-1,
    body.woocommerce-checkout .woocommerce-page .col2-set .col-1,
    body.woocommerce-checkout .woocommerce .col2-set .col-2,
    body.woocommerce-checkout .woocommerce-page .col2-set .col-2,
    body.woocommerce-checkout .woocommerce form .form-row-first,
    body.woocommerce-checkout .woocommerce form .form-row-last,
    body.woocommerce-checkout .woocommerce-page form .form-row-first,
    body.woocommerce-checkout .woocommerce-page form .form-row-last {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }

    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review_heading,
    body.woocommerce-checkout #order_review {
        padding: 16px !important;
    }

    body.woocommerce-checkout .woocommerce table.shop_table_responsive tr td,
    body.woocommerce-checkout .woocommerce-page table.shop_table_responsive tr td {
        display: block;
        text-align: right !important;
    }
}

/* Marine Reuse custom manual payment methods */
body.woocommerce-checkout #payment {
    background: #ffffff;
    border: 1px solid rgba(22, 54, 85, 0.14);
    border-radius: 0 0 var(--mr-radius) var(--mr-radius);
}

body.woocommerce-checkout #payment ul.payment_methods {
    padding: 0 18px 16px !important;
    border-bottom: 0 !important;
}

body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
    position: relative;
    display: block;
    margin: 0 !important;
    padding: 11px 0 !important;
    border-bottom: 1px solid rgba(22, 54, 85, 0.10);
    line-height: 1.35;
}

body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:last-child {
    border-bottom: 0;
}

body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input.input-radio {
    margin: 0 10px 0 0 !important;
    vertical-align: middle;
    transform: translateY(-1px);
}

body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
    display: inline-flex;
    align-items: center;
    width: calc(100% - 32px);
    margin: 0 !important;
    color: #121820;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    vertical-align: middle;
}

body.woocommerce-checkout .mr-pay-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

body.woocommerce-checkout .mr-pay-title {
    display: inline-block;
}

body.woocommerce-checkout .mr-pay-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

body.woocommerce-checkout .mr-pay-logo--cashapp {
    color: #ffffff;
    background: #18b44b;
}

body.woocommerce-checkout .mr-pay-logo--chime {
    color: #ffffff;
    background: #5bc7b6;
    text-transform: lowercase;
}

body.woocommerce-checkout .mr-pay-logo--applepay {
    color: #111111;
    background: #ffffff;
    border: 1px solid #111111;
}

body.woocommerce-checkout .mr-pay-logo--zelle {
    color: #ffffff;
    background: #6d1ed4;
}

body.woocommerce-checkout .mr-pay-logo--wire {
    color: #163655;
    background: #edf4f9;
    border: 1px solid rgba(22, 54, 85, 0.18);
}

body.woocommerce-checkout .mr-pay-logo--giftcard {
    color: #ffffff;
    background: #222222;
}

body.woocommerce-checkout .mr-pay-logo--etransfer {
    color: #111111;
    background: #ffd747;
    border-radius: 0;
    font-size: 18px;
    font-weight: 500;
}

body.woocommerce-checkout .mr-pay-logo--payid {
    color: #ffffff;
    background: #050505;
    border-radius: 0;
    font-size: 18px;
}

body.woocommerce-checkout .mr-pay-logo--europe {
    color: #ffffff;
    background: #1f4ea3;
}

body.woocommerce-checkout #payment div.payment_box {
    margin: 10px 0 0 28px !important;
    padding: 12px 14px !important;
    background: #f7fafc !important;
    border: 1px solid rgba(22, 54, 85, 0.10);
    border-radius: 10px;
    color: #44505c;
    font-size: 13px;
    line-height: 1.55;
}

body.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #f7fafc !important;
}

body.woocommerce-checkout #payment div.payment_box p:last-child,
body.woocommerce-checkout .mr-pay-instructions p:last-child {
    margin-bottom: 0;
}

body.woocommerce-checkout #payment .place-order {
    padding: 0 18px 18px !important;
    margin: 0 !important;
}

body.woocommerce-checkout #payment #place_order {
    width: 100%;
    min-height: 48px;
    border-radius: 0 !important;
    background: #c4552e !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.woocommerce-checkout #payment #place_order:hover {
    background: #a94424 !important;
}

.mr-payment-thankyou {
    margin: 24px 0;
    padding: 18px 20px;
    border: 1px solid rgba(22, 54, 85, 0.12);
    border-radius: 14px;
    background: #f7fafc;
}

.mr-payment-thankyou h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

@media (max-width: 640px) {
    body.woocommerce-checkout #payment ul.payment_methods {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
        align-items: flex-start;
        font-size: 13px;
    }

    body.woocommerce-checkout .mr-pay-label {
        gap: 6px;
    }

    body.woocommerce-checkout .mr-pay-logo {
        font-size: 12px;
    }

    body.woocommerce-checkout .mr-pay-logo--etransfer,
    body.woocommerce-checkout .mr-pay-logo--payid {
        font-size: 15px;
    }

    body.woocommerce-checkout #payment div.payment_box {
        margin-left: 0 !important;
    }
}

/* Manual payment badges inside WooCommerce Checkout Block */
body.woocommerce-checkout .wc-block-checkout .mr-pay-label,
body.woocommerce-checkout .wc-block-components-radio-control__label .mr-pay-label,
body.woocommerce-checkout .wc-block-components-radio-control__option .mr-pay-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    color: #121820;
    font-weight: 700;
}

body.woocommerce-checkout .wc-block-checkout .mr-pay-title,
body.woocommerce-checkout .wc-block-components-radio-control__label .mr-pay-title {
    display: inline-block;
}

body.woocommerce-checkout .wc-block-checkout .mr-pay-logo,
body.woocommerce-checkout .wc-block-components-radio-control__label .mr-pay-logo,
body.woocommerce-checkout .wc-block-components-radio-control__option .mr-pay-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

body.woocommerce-checkout .wc-block-checkout .mr-block-payment-box {
    margin-top: 10px;
    padding: 12px 14px;
    background: #f7fafc;
    border: 1px solid rgba(22, 54, 85, 0.10);
    border-radius: 10px;
    color: #44505c;
    font-size: 13px;
    line-height: 1.55;
}

body.woocommerce-checkout .wc-block-checkout .mr-block-payment-box p:last-child,
body.woocommerce-checkout .wc-block-checkout .mr-pay-instructions p:last-child {
    margin-bottom: 0;
}
