/**
 * MacherHut WooCommerce Stylesheet
 * Overrides and customizations for WooCommerce templates
 *
 * @package MacherHut
 */

/* ==========================================================================
   Product Card (Loop)
   ========================================================================== */
.product-card {
    background: var(--mh-bg);
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
    border: 1px solid var(--mh-border-light);
    transition: all var(--mh-transition);
}

.product-card:hover {
    box-shadow: var(--mh-shadow-md);
    transform: translateY(-2px);
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--mh-bg-alt);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--mh-space-md);
    left: var(--mh-space-md);
    padding: 0.25rem 0.75rem;
    border-radius: var(--mh-radius-sm);
    font-size: var(--mh-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.sale-badge {
    background: var(--mh-danger);
    color: #fff;
}

.product-card-actions {
    position: absolute;
    bottom: var(--mh-space-md);
    right: var(--mh-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--mh-space-sm);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-card-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-view-btn {
    width: 40px;
    height: 40px;
    background: var(--mh-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--mh-shadow-md);
    transition: all var(--mh-transition);
    color: var(--mh-text);
}

.quick-view-btn:hover {
    background: var(--mh-primary);
    color: #fff;
}

.product-card-content {
    padding: var(--mh-space-lg);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: var(--mh-font-size-md);
    font-weight: 500;
    margin-bottom: var(--mh-space-xs);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: var(--mh-heading);
}

.product-card-title a:hover {
    color: var(--mh-primary);
}

.product-card-desc {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-light);
    margin-bottom: var(--mh-space-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: var(--mh-space-xs);
    margin-bottom: var(--mh-space-sm);
}

.product-card-rating .star-rating {
    color: #ffc107;
    font-size: var(--mh-font-size-sm);
}

.rating-count {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
}

.product-card-price {
    margin-bottom: var(--mh-space-md);
    font-size: var(--mh-font-size-lg);
    font-weight: 600;
    color: var(--mh-primary);
    margin-top: auto;
}

.product-card-price del {
    color: var(--mh-text-muted);
    font-size: var(--mh-font-size-sm);
    font-weight: 400;
    margin-left: var(--mh-space-xs);
}

.product-card-price ins {
    text-decoration: none;
    color: var(--mh-primary);
}

.product-card-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-card-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--mh-radius);
    text-decoration: none;
    cursor: pointer;
    border: none !important;
    outline: none !important;
    transition: all 0.3s ease;
}

.product-card-buttons .btn-primary {
    background: linear-gradient(135deg, var(--mh-primary) 0%, var(--mh-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

.product-card-buttons .btn-primary:hover {
    background: linear-gradient(135deg, var(--mh-primary-dark) 0%, var(--mh-primary-darker) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 148, 136, 0.35);
    color: #fff;
}

.product-card-buttons .btn-accent {
    background: linear-gradient(135deg, var(--mh-secondary) 0%, var(--mh-secondary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.25);
}

.product-card-buttons .btn-accent:hover {
    background: linear-gradient(135deg, var(--mh-secondary-dark) 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(6, 182, 212, 0.35);
    color: #fff;
}

/* Responsive: stack buttons vertically on mobile */
@media (max-width: 768px) {
    .product-card-buttons {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .product-card-buttons .btn {
        width: 100% !important;
        padding: 0.6rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

/* ==========================================================================
   Product Lists/Grid
   ========================================================================== */
ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--mh-space-lg);
    margin: 0;
    padding: 0;
}

ul.products li.product {
    width: 100%;
    margin: 0;
    padding: 0;
    float: none;
}

/* List view — toggled via JS (button[data-view="list"]) */
ul.products.products-list {
    display: block;
}

ul.products.products-list li.product {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 1.25rem;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--mh-border-light, #f1f1f1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

ul.products.products-list li.product .woocommerce-loop-product__link {
    display: block;
    width: 100%;
}

ul.products.products-list li.product img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

ul.products.products-list li.product .woocommerce-loop-product__title,
ul.products.products-list li.product h2.woocommerce-loop-product__title {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
}

ul.products.products-list li.product .price {
    margin: 0.4rem 0 0.6rem;
    font-size: 1.1rem;
}

ul.products.products-list li.product .add_to_cart_button,
ul.products.products-list li.product .button {
    align-self: end;
    width: auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    ul.products.products-list li.product {
        grid-template-columns: 1fr;
    }
    ul.products.products-list li.product img {
        height: 200px;
    }
}

/* Infinite scroll loader & end message */
.infinite-scroll-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 2rem 1rem;
    color: var(--mh-text-muted, #6b7280);
    font-size: 0.92rem;
}

.infinite-scroll-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--mh-border, #e5e7eb);
    border-top-color: var(--mh-primary, #1a8a4a);
    border-radius: 50%;
    animation: inf-spin 0.8s linear infinite;
}

.infinite-scroll-end {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--mh-text-muted, #6b7280);
    font-size: 0.92rem;
}

@keyframes inf-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Shop Toolbar
   ========================================================================== */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--mh-space-xl);
    padding-bottom: var(--mh-space-md);
    border-bottom: 1px solid var(--mh-border-light);
    flex-wrap: wrap;
    gap: var(--mh-space-md);
}

.woocommerce-result-count {
    font-size: var(--mh-font-size-sm);
    color: var(--mh-text-muted);
}

.woocommerce-ordering {
    display: flex;
    align-items: center;
}

.woocommerce-ordering .orderby {
    width: auto;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius-sm);
    font-size: var(--mh-font-size-sm);
    background: var(--mh-bg);
    cursor: pointer;
}

.shop-view-toggle {
    display: flex;
    gap: var(--mh-space-xs);
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius-sm);
    cursor: pointer;
    color: var(--mh-text-muted);
    transition: all var(--mh-transition);
}

.view-btn.active,
.view-btn:hover {
    background: var(--mh-primary);
    color: #fff;
    border-color: var(--mh-primary);
}

.shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--mh-space-md);
}

/* ==========================================================================
   Shop Category Description
   ========================================================================== */
.woocommerce-category-description {
    margin-bottom: var(--mh-space-xl);
    font-size: var(--mh-font-size-md);
    color: var(--mh-text-light);
    line-height: 1.7;
}

/* ==========================================================================
   Single Product Layout
   ========================================================================== */
.single-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mh-space-2xl);
    margin-bottom: var(--mh-space-3xl);
}

.product-images {
    position: sticky;
    top: 100px;
    align-self: start;
}

.product-images .woocommerce-product-gallery {
    margin: 0;
}

.product-images .woocommerce-product-gallery__image {
    margin: 0;
}

.product-images .woocommerce-product-gallery__image img {
    border-radius: var(--mh-radius-lg);
    width: 100%;
}

/* Product Summary */
.product-summary {
    padding: var(--mh-space-md) 0;
}

.summary .product_title {
    font-size: var(--mh-font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--mh-space-md);
}

.summary .price {
    font-size: var(--mh-font-size-2xl);
    color: var(--mh-primary);
    font-weight: 700;
    margin-bottom: var(--mh-space-lg);
}

.summary .price del {
    color: var(--mh-text-muted);
    font-size: var(--mh-font-size-lg);
    font-weight: 400;
}

.summary .price ins {
    text-decoration: none;
}

.summary .woocommerce-product-details__short-description {
    font-size: var(--mh-font-size-md);
    color: var(--mh-text-light);
    line-height: 1.7;
    margin-bottom: var(--mh-space-xl);
    padding-bottom: var(--mh-space-xl);
    border-bottom: 1px solid var(--mh-border-light);
}

/* Add to Cart Form */
.cart {
    margin-bottom: var(--mh-space-xl);
}

.cart .quantity {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--mh-border);
    border-radius: var(--mh-radius);
    overflow: hidden;
    margin-right: var(--mh-space-md);
}

.cart .quantity .qty {
    width: 50px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: var(--mh-font-size-md);
    font-weight: 600;
}

.cart .quantity .qty:focus {
    box-shadow: none;
}

.cart .single_add_to_cart_button {
    padding: 0.75rem 2rem;
    font-size: var(--mh-font-size-md);
}

/* Product Meta */
.product_meta {
    font-size: var(--mh-font-size-sm);
    color: var(--mh-text-muted);
    margin-bottom: var(--mh-space-xl);
    padding-bottom: var(--mh-space-xl);
    border-bottom: 1px solid var(--mh-border-light);
}

.product_meta span {
    display: block;
    margin-bottom: var(--mh-space-sm);
}

.product_meta a {
    color: var(--mh-text-light);
}

.product_meta a:hover {
    color: var(--mh-primary);
}

/* SKU */
.product_meta .sku_wrapper {
    display: block;
}

/* ==========================================================================
   Product Tabs
   ========================================================================== */
.product-tabs-section {
    margin-bottom: var(--mh-space-3xl);
}

.woocommerce-tabs {
    border: 1px solid var(--mh-border-light);
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--mh-bg-alt);
    border-bottom: 1px solid var(--mh-border-light);
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: var(--mh-space-md) var(--mh-space-xl);
    font-size: var(--mh-font-size-sm);
    font-weight: 500;
    color: var(--mh-text);
    border-bottom: 2px solid transparent;
    transition: all var(--mh-transition);
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--mh-primary);
    border-bottom-color: var(--mh-primary);
    background: var(--mh-bg);
}

.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after {
    display: none;
}

.woocommerce-tabs .panel {
    margin: 0;
    padding: var(--mh-space-xl);
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.woocommerce-Tabs-panel h2 {
    font-size: var(--mh-font-size-xl);
    margin-bottom: var(--mh-space-md);
}

.woocommerce-Tabs-panel p {
    font-size: var(--mh-font-size-md);
    line-height: 1.8;
    margin-bottom: var(--mh-space-md);
}

/* ==========================================================================
   Reviews
   ========================================================================== */
#reviews {
    margin-bottom: var(--mh-space-xl);
}

#comments {
    margin-bottom: var(--mh-space-xl);
}

.commentlist {
    list-style: none;
    padding: 0;
}

.commentlist .comment {
    padding: var(--mh-space-lg);
    border-bottom: 1px solid var(--mh-border-light);
}

.commentlist .comment:last-child {
    border-bottom: none;
}

.commentlist .comment-odd {
    background: transparent;
}

.commentlist .comment .comment-text {
    border: none;
    padding: 0;
    margin-top: var(--mh-space-sm);
}

.commentlist .comment .star-rating {
    margin-bottom: var(--mh-space-xs);
}

.commentlist .comment .woocommerce-review__author {
    font-weight: 600;
    font-size: var(--mh-font-size-md);
}

.commentlist .comment .woocommerce-review__published-date {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
    margin-left: var(--mh-space-sm);
}

/* Review Form */
#review_form {
    padding-top: var(--mh-space-xl);
    border-top: 1px solid var(--mh-border-light);
}

#review_form #reply_title {
    font-size: var(--mh-font-size-lg);
    margin-bottom: var(--mh-space-md);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    margin-bottom: var(--mh-space-md);
}

.comment-form .comment-form-rating {
    margin-bottom: var(--mh-space-md);
}

.comment-form .comment-form-rating label {
    display: block;
    margin-bottom: var(--mh-space-sm);
}

.comment-form .form-submit {
    margin-top: var(--mh-space-md);
}

/* ==========================================================================
   Related Products
   ========================================================================== */
.related-products-section {
    margin-top: var(--mh-space-2xl);
}

.related-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--mh-space-lg);
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-products li.product {
    width: 100%;
    float: none;
    margin: 0;
}

/* ==========================================================================
   Cart Page
   ========================================================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--mh-space-2xl);
    align-items: start;
}

.cart-items-wrapper {
    overflow-x: auto;
}

.woocommerce-cart-form__table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-cart-form__table th {
    padding: var(--mh-space-md);
    font-size: var(--mh-font-size-sm);
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--mh-border);
    color: var(--mh-heading);
    white-space: nowrap;
}

.woocommerce-cart-form__table td {
    padding: var(--mh-space-md);
    border-bottom: 1px solid var(--mh-border-light);
    vertical-align: middle;
}

.product-remove .remove {
    font-size: var(--mh-font-size-xl);
    color: var(--mh-text-muted);
    text-decoration: none;
}

.product-remove .remove:hover {
    color: var(--mh-danger);
}

.product-thumbnail {
    width: 80px;
}

.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--mh-radius-md);
}

.product-name a {
    color: var(--mh-heading);
    font-weight: 500;
}

.product-name a:hover {
    color: var(--mh-primary);
}

.product-name .variation {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
    margin-top: var(--mh-space-xs);
}

/* ==========================================================================
   Single Product Quantity Selector V4
   ========================================================================== */
.quantity-selector-v4 {
    margin-bottom: 1.5rem;
}

.selector-label-v4 {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--mh-text);
}

.qty-control-v4 {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--mh-border);
    border-radius: var(--mh-radius);
    overflow: hidden;
}

.qty-btn-v4 {
    width: 44px;
    height: 44px;
    border: none;
    background-color: var(--mh-bg-alt);
    color: var(--mh-text);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--mh-transition);
    user-select: none;
}

.qty-btn-v4:hover {
    background-color: var(--mh-primary);
    color: #fff;
}

.qty-btn-v4:active {
    transform: scale(0.95);
}

.qty-control-v4 input[type="number"]#product-qty-v4 {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--mh-border);
    border-right: 1px solid var(--mh-border);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mh-text);
    background-color: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-control-v4 input[type="number"]#product-qty-v4::-webkit-outer-spin-button,
.qty-control-v4 input[type="number"]#product-qty-v4::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-control-v4 input[type="number"]#product-qty-v4:focus {
    outline: none;
}

.product-quantity .quantity {
    display: inline-flex;
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius-sm);
    overflow: hidden;
}

.product-quantity .qty {
    width: 50px;
    height: 38px;
    border: none;
    text-align: center;
}

/* Cart Totals & Coupon */
.cart-collaterals {
    position: sticky;
    top: 100px;
}

.cart-coupon {
    padding: var(--mh-space-lg);
    background: var(--mh-bg-alt);
    border-radius: var(--mh-radius-lg);
    margin-bottom: var(--mh-space-lg);
}

.cart-coupon h3 {
    font-size: var(--mh-font-size-md);
    margin-bottom: var(--mh-space-md);
}

.coupon-form {
    display: flex;
    gap: var(--mh-space-sm);
}

.coupon-form input {
    flex: 1;
}

.cart-totals {
    padding: var(--mh-space-lg);
    background: var(--mh-bg-alt);
    border-radius: var(--mh-radius-lg);
}

.cart-totals h3 {
    font-size: var(--mh-font-size-lg);
    margin-bottom: var(--mh-space-lg);
    padding-bottom: var(--mh-space-md);
    border-bottom: 1px solid var(--mh-border);
}

.cart-totals .shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--mh-space-lg);
}

.cart-totals .shop_table th,
.cart-totals .shop_table td {
    padding: var(--mh-space-sm) 0;
    font-size: var(--mh-font-size-sm);
    border-bottom: 1px solid var(--mh-border-light);
}

.cart-totals .shop_table th {
    font-weight: 500;
    color: var(--mh-text);
}

.cart-totals .order-total th,
.cart-totals .order-total td {
    font-weight: 700;
    font-size: var(--mh-font-size-md);
    color: var(--mh-heading);
    border-bottom: none;
    padding-top: var(--mh-space-md);
}

.wc-proceed-to-checkout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wc-proceed-to-checkout .btn-outline {
    background: #fff;
    color: var(--mh-primary);
    border: 2px solid var(--mh-primary);
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wc-proceed-to-checkout .btn-outline:hover {
    background: var(--mh-primary);
    color: #fff;
    border-color: var(--mh-primary);
}

.wc-proceed-to-checkout .btn-primary {
    background: linear-gradient(135deg, var(--mh-primary) 0%, #20c957 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.35);
    transition: all 0.25s ease;
}

.wc-proceed-to-checkout .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

/* Cart Empty */
.cart-empty svg {
    margin: 0 auto var(--mh-space-lg);
    opacity: 0.3;
}

/* ==========================================================================
   Checkout
   ========================================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--mh-space-2xl);
    align-items: start;
}

.woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mh-space-xl);
    margin-bottom: var(--mh-space-2xl);
}

#order_review_heading {
    font-size: var(--mh-font-size-xl);
    margin-bottom: var(--mh-space-lg);
    padding-bottom: var(--mh-space-md);
    border-bottom: 2px solid var(--mh-primary);
}

.woocommerce-checkout-review-order {
    border: 1px solid var(--mh-border-light);
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
    margin-bottom: var(--mh-space-xl);
}

.woocommerce-checkout-review-order table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-checkout-review-order th,
.woocommerce-checkout-review-order td {
    padding: var(--mh-space-md);
    border-bottom: 1px solid var(--mh-border-light);
    font-size: var(--mh-font-size-sm);
}

.woocommerce-checkout-review-order tfoot th {
    font-weight: 600;
}

.woocommerce-checkout-review-order tfoot tr:last-child th,
.woocommerce-checkout-review-order tfoot tr:last-child td {
    border-bottom: none;
    font-weight: 700;
    font-size: var(--mh-font-size-md);
    color: var(--mh-heading);
    padding-top: var(--mh-space-lg);
}

/* Payment Methods */
.woocommerce-checkout-payment, .custom-checkout-payment-methods {
    margin-bottom: var(--mh-space-xl);
}

.woocommerce-checkout-payment ul, .custom-checkout-payment-methods ul {
    list-style: none;
    padding: 0;
}

.woocommerce-checkout-payment ul li, .custom-checkout-payment-methods ul li {
    margin-bottom: var(--mh-space-sm);
    background: #fff;
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    padding: var(--mh-space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    transition: all var(--mh-transition);
}

.woocommerce-checkout-payment ul li label, .custom-checkout-payment-methods ul li label {
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--mh-heading);
    flex: 1;
}

.woocommerce-checkout-payment ul li input[type="radio"], .custom-checkout-payment-methods ul li input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--mh-primary);
}

.woocommerce-checkout-payment ul li .payment_box, .custom-checkout-payment-methods ul li .payment_box {
    flex-basis: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--mh-border-light);
    font-size: 0.9rem;
    color: var(--mh-text-muted);
}

.woocommerce-checkout-payment ul li.payment_method_paypal label img, .custom-checkout-payment-methods ul li.payment_method_paypal label img {
    max-height: 30px;
}

.place-order-wrapper {
    margin-top: var(--mh-space-lg);
}

/* Order Summary Sidebar */
.checkout-order-summary {
    position: sticky;
    top: 100px;
}

.order-review-wrapper {
    padding: var(--mh-space-lg);
    background: var(--mh-bg-alt);
    border-radius: var(--mh-radius-lg);
}

.order-review-wrapper h3 {
    font-size: var(--mh-font-size-lg);
    margin-bottom: var(--mh-space-lg);
    padding-bottom: var(--mh-space-md);
    border-bottom: 1px solid var(--mh-border);
}

.order-review-wrapper .shop_table {
    width: 100%;
    border-collapse: collapse;
}

.order-review-wrapper .shop_table th,
.order-review-wrapper .shop_table td {
    padding: var(--mh-space-sm) 0;
    font-size: var(--mh-font-size-sm);
    border-bottom: 1px solid var(--mh-border-light);
}

.order-review-wrapper .shop_table tfoot th,
.order-review-wrapper .shop_table tfoot td {
    font-weight: 600;
    border-bottom: none;
    padding-top: var(--mh-space-md);
}

/* ==========================================================================
   WooCommerce Notices
   ========================================================================== */
.woocommerce-notices-wrapper {
    margin-bottom: var(--mh-space-xl);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: var(--mh-space-md) var(--mh-space-lg);
    border-radius: var(--mh-radius);
    margin-bottom: var(--mh-space-md);
    font-size: var(--mh-font-size-sm);
    list-style: none;
}

.woocommerce-message {
    background: var(--mh-primary-light);
    color: var(--mh-primary-dark);
    border: 1px solid var(--mh-primary);
}

.woocommerce-info {
    background: #e7f3ff;
    color: #0056b3;
    border: 1px solid #b3d7ff;
}

.woocommerce-error {
    background: #ffe0e0;
    color: #a80000;
    border: 1px solid #ffb3b3;
}

/* Prevent Checkout Form from becoming Blurry (BlockUI) */
form.checkout .blockUI.blockOverlay {
    display: none !important;
    opacity: 0 !important;
    background: transparent !important;
}

/* Disable Place Order button when processing instead */
form.checkout.processing .place-order-btn {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

/* ==========================================================================
   Star Rating
   ========================================================================== */
.star-rating {
    display: inline-flex;
    align-items: center;
    color: #ffc107;
    font-size: var(--mh-font-size-sm);
    line-height: 1;
}

.star-rating::before {
    content: '\2605\2605\2605\2605\2605';
    letter-spacing: 2px;
}

/* ==========================================================================
   Responsive WooCommerce
   ========================================================================== */
@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr);
    }

    .related-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .single-product-layout {
        grid-template-columns: 1fr;
    }

    .product-images {
        position: static;
    }

    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-collaterals,
    .checkout-order-summary {
        position: static;
    }

    .woocommerce-checkout .col2-set {
        grid-template-columns: 1fr;
    }

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

    .shop-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--mh-space-md);
    }

    .related-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .woocommerce-tabs ul.tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .woocommerce-tabs ul.tabs li a {
        white-space: nowrap;
        padding: var(--mh-space-md);
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--mh-space-sm);
    }

    .product-card-content {
        padding: var(--mh-space-md);
    }

    .product-card-title {
        font-size: var(--mh-font-size-sm);
    }

    .product-card-price {
        font-size: var(--mh-font-size-md);
    }
}

/* Mobile: ensure product grid is 2-column (override possible sidebar leftover) */
@media (max-width: 768px) {
    .shop-content-v4 ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Buy Now Button
   ========================================================================== */
.buy-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mh-space-sm);
    padding: 0.75rem 1.5rem;
    font-size: var(--mh-font-size-md);
    font-weight: 600;
    font-family: var(--mh-font);
    line-height: 1.5;
    border: 2px solid var(--mh-secondary);
    border-radius: var(--mh-radius);
    cursor: pointer;
    background: var(--mh-secondary);
    color: #fff;
    transition: all var(--mh-transition);
    width: 100%;
    text-align: center;
}

.buy-now-btn:hover {
    background: var(--mh-secondary-dark);
    border-color: var(--mh-secondary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Side-by-side buttons */
.macherhut-purchase-buttons {
    display: flex;
    gap: var(--mh-space-sm);
    margin-top: var(--mh-space-md);
}

.macherhut-purchase-buttons .single_add_to_cart_button {
    flex: 1;
    width: auto;
    margin: 0;
}

.macherhut-purchase-buttons .buy-now-btn {
    flex: 1;
    width: auto;
    margin: 0;
}

/* Enhanced form layout */
.summary .cart {
    border: none;
    padding: 0;
    margin-bottom: 0;
}

.summary .single_add_to_cart_button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: var(--mh-font-size-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trust badges under buttons */
.macherhut-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mh-space-lg);
    padding: var(--mh-space-md) 0;
    margin-top: var(--mh-space-md);
    border-top: 1px solid var(--mh-border-light);
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
}

.macherhut-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--mh-space-xs);
}

.macherhut-trust-badge svg {
    flex-shrink: 0;
    color: var(--mh-success);
}

/* ==========================================================================
   Sticky Mobile Purchase Bar
   ========================================================================== */
.sticky-purchase-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--mh-bg);
    border-top: 1px solid var(--mh-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: var(--mh-space-sm) var(--mh-space-md);
}

.sticky-purchase-bar.visible {
    display: block;
    transform: translateY(0);
}

.sticky-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mh-space-md);
    max-width: var(--mh-container);
    margin: 0 auto;
}

.sticky-bar-product {
    display: flex;
    align-items: center;
    gap: var(--mh-space-sm);
    min-width: 0;
    flex: 1;
}

.sticky-bar-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--mh-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--mh-border-light);
}

.sticky-bar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sticky-bar-name {
    font-size: var(--mh-font-size-sm);
    font-weight: 500;
    color: var(--mh-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.sticky-bar-price {
    font-size: var(--mh-font-size-md);
    font-weight: 700;
    color: var(--mh-primary);
    white-space: nowrap;
}

.sticky-bar-actions {
    display: flex;
    gap: var(--mh-space-sm);
    flex-shrink: 0;
    align-items: center;
}

.sticky-bar-actions .btn {
    padding: 0.5rem 1rem;
    font-size: var(--mh-font-size-sm);
    white-space: nowrap;
}

.sticky-buy-now {
    background: var(--mh-secondary);
    color: #fff;
    border-color: var(--mh-secondary);
}

.sticky-buy-now:hover {
    background: var(--mh-secondary-dark);
    border-color: var(--mh-secondary-dark);
    color: #fff;
}

.sticky-add-to-cart {
    background: var(--mh-primary);
    color: #fff;
    border-color: var(--mh-primary);
}

.sticky-add-to-cart:hover {
    background: var(--mh-primary-dark);
    border-color: var(--mh-primary-dark);
    color: #fff;
}

/* Cart page body padding for sticky bar */
body.has-sticky-bar {
    padding-bottom: 80px;
}

/* Notification positioning above sticky bar */
.macherhut-notification {
    bottom: 5rem !important;
}

/* ==========================================================================
   Cart Added Message Enhancements
   ========================================================================== */
.macherhut-added-msg {
    display: flex;
    align-items: center;
    gap: var(--mh-space-sm);
    flex-wrap: wrap;
}

.macherhut-checkout-btn {
    background: var(--mh-primary) !important;
    border-color: var(--mh-primary) !important;
    color: #fff !important;
}

.macherhut-checkout-btn:hover {
    background: var(--mh-primary-dark) !important;
    border-color: var(--mh-primary-dark) !important;
    color: #fff !important;
}

/* ==========================================================================
   Responsive Sticky Bar
   ========================================================================== */
@media (max-width: 768px) {
    .sticky-purchase-bar {
        padding: var(--mh-space-sm);
    }

    .sticky-bar-name {
        max-width: 120px;
        font-size: var(--mh-font-size-xs);
    }

    .sticky-bar-price {
        font-size: var(--mh-font-size-sm);
    }

    .sticky-bar-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: var(--mh-font-size-xs);
    }

    .macherhut-purchase-buttons {
        flex-direction: column;
    }

    .macherhut-purchase-buttons .single_add_to_cart_button,
    .macherhut-purchase-buttons .buy-now-btn {
        width: 100%;
    }

    .macherhut-trust-badges {
        gap: var(--mh-space-md);
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .sticky-bar-thumb {
        width: 36px;
        height: 36px;
    }

    .sticky-bar-name {
        max-width: 100px;
    }
}

/* ==========================================================================
   Simplified Checkout
   ========================================================================== */
.checkout-simple-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--mh-space-2xl);
    align-items: start;
}

.checkout-section {
    background: var(--mh-bg);
    border: 1px solid var(--mh-border-light);
    border-radius: var(--mh-radius-lg);
    padding: var(--mh-space-xl);
    margin-bottom: var(--mh-space-xl);
}

.checkout-section-title {
    display: flex;
    align-items: center;
    gap: var(--mh-space-sm);
    font-size: var(--mh-font-size-lg);
    font-weight: 600;
    margin-bottom: var(--mh-space-xl);
    padding-bottom: var(--mh-space-md);
    border-bottom: 2px solid var(--mh-primary);
    color: var(--mh-heading);
}

.checkout-section-title svg {
    color: var(--mh-primary);
    flex-shrink: 0;
}

.form-row {
    margin-bottom: var(--mh-space-lg);
}

.checkout-label {
    display: block;
    font-weight: 500;
    font-size: var(--mh-font-size-sm);
    color: var(--mh-heading);
    margin-bottom: var(--mh-space-sm);
}

.checkout-label .required {
    color: var(--mh-danger);
    margin-left: 2px;
}

.checkout-label .optional {
    color: var(--mh-text-muted);
    font-weight: 400;
    font-size: var(--mh-font-size-xs);
}

.form-row .input-text,
.form-row .input-select,
.form-row textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    font-size: var(--mh-font-size-md);
    font-family: var(--mh-font);
    background: var(--mh-bg);
    color: var(--mh-text);
    transition: border-color var(--mh-transition), box-shadow var(--mh-transition);
    box-sizing: border-box;
}

.form-row .input-text:focus,
.form-row .input-select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--mh-primary);
    box-shadow: 0 0 0 3px var(--mh-primary-light);
}

.form-row textarea {
    resize: vertical;
    min-height: 70px;
}

.form-row .input-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.checkout-field-hint {
    display: block;
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
    margin-top: var(--mh-space-xs);
}

/* Order items in sidebar */
.order-items-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: var(--mh-space-lg);
}

.order-item-row {
    display: flex;
    align-items: center;
    padding: var(--mh-space-sm) 0;
    border-bottom: 1px solid var(--mh-border-light);
    gap: var(--mh-space-sm);
}

.order-item-row:last-child {
    border-bottom: none;
}

.order-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--mh-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--mh-border-light);
}

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.order-item-name {
    font-size: var(--mh-font-size-sm);
    color: var(--mh-heading);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-qty {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
    white-space: nowrap;
}

.order-item-total {
    font-size: var(--mh-font-size-sm);
    font-weight: 600;
    color: var(--mh-heading);
    white-space: nowrap;
}

/* Totals */
.order-totals {
    border-top: 1px solid var(--mh-border);
    padding-top: var(--mh-space-md);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--mh-space-sm) 0;
    font-size: var(--mh-font-size-sm);
}

.order-total-row.discount {
    color: var(--mh-success);
}

.order-total-row.grand-total {
    font-size: var(--mh-font-size-lg);
    font-weight: 700;
    color: var(--mh-heading);
    border-top: 2px solid var(--mh-primary);
    padding-top: var(--mh-space-md);
    margin-top: var(--mh-space-sm);
}

/* Trust badges in checkout sidebar */
.checkout-trust {
    margin-top: var(--mh-space-xl);
    padding-top: var(--mh-space-lg);
    border-top: 1px solid var(--mh-border-light);
    display: flex;
    flex-direction: column;
    gap: var(--mh-space-sm);
}

.checkout-trust-item {
    display: flex;
    align-items: center;
    gap: var(--mh-space-sm);
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
}

.checkout-trust-item svg {
    color: var(--mh-success);
    flex-shrink: 0;
}

/* Place Order Button */
.place-order-wrapper {
    text-align: center;
}

.place-order-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mh-space-sm);
    padding: 1rem 2rem;
    font-size: var(--mh-font-size-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.place-order-note {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
    margin-top: var(--mh-space-sm);
}

/* Checkout responsive */
@media (max-width: 768px) {
    .checkout-simple-layout {
        grid-template-columns: 1fr;
    }

    .checkout-order-summary {
        position: static;
        order: -1;
    }

    .order-items-list {
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .checkout-section {
        padding: var(--mh-space-lg);
        border-radius: var(--mh-radius);
    }

    .checkout-section-title {
        font-size: var(--mh-font-size-md);
    }
}

/* ==========================================================================
   Thank You Page
   ========================================================================== */
.thank-you-page {
    max-width: 700px;
    margin: 0 auto;
}

.thank-you-header {
    text-align: center;
    margin-bottom: var(--mh-space-2xl);
}

.thank-you-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--mh-success-light, #d4edda);
    color: var(--mh-success, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--mh-space-xl);
    animation: thankYouPulse 0.6s ease-out;
}

@keyframes thankYouPulse {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.thank-you-title {
    font-size: var(--mh-font-size-2xl);
    font-weight: 700;
    color: var(--mh-heading);
    margin-bottom: var(--mh-space-md);
}

.thank-you-subtitle {
    font-size: var(--mh-font-size-md);
    color: var(--mh-text-light);
    line-height: 1.6;
}

/* Cards */
.thank-you-card {
    background: var(--mh-bg);
    border: 1px solid var(--mh-border-light);
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
    margin-bottom: var(--mh-space-xl);
}

.thank-you-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--mh-space-lg);
    background: var(--mh-bg-alt);
    border-bottom: 1px solid var(--mh-border-light);
}

.thank-you-card-header h3 {
    display: flex;
    align-items: center;
    gap: var(--mh-space-sm);
    font-size: var(--mh-font-size-md);
    font-weight: 600;
    margin: 0;
}

.thank-you-card-header h3 svg {
    color: var(--mh-primary);
}

.order-date {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
}

.thank-you-card-body {
    padding: var(--mh-space-lg);
}

/* Items */
.thank-you-items {
    margin-bottom: var(--mh-space-lg);
}

.thank-you-item {
    display: flex;
    align-items: center;
    gap: var(--mh-space-md);
    padding: var(--mh-space-md) 0;
    border-bottom: 1px solid var(--mh-border-light);
}

.thank-you-item:last-child {
    border-bottom: none;
}

.thank-you-item-img {
    width: 56px;
    height: 56px;
    border-radius: var(--mh-radius);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--mh-border-light);
}

.thank-you-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.thank-you-item-name {
    font-size: var(--mh-font-size-sm);
    font-weight: 600;
    color: var(--mh-heading);
    line-height: 1.3;
}

.thank-you-item-meta {
    display: flex;
    align-items: center;
    gap: var(--mh-space-sm);
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
}

.thank-you-item-price {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-light);
}

.thank-you-item-total {
    font-size: var(--mh-font-size-md);
    font-weight: 700;
    color: var(--mh-primary);
    white-space: nowrap;
}

/* Totals */
.thank-you-totals {
    border-top: 2px solid var(--mh-border-light);
    padding-top: var(--mh-space-md);
}

.thank-you-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--mh-space-sm) 0;
    font-size: var(--mh-font-size-sm);
}

.thank-you-total-row.discount {
    color: var(--mh-success);
}

.thank-you-total-row.total {
    font-size: var(--mh-font-size-lg);
    font-weight: 700;
    color: var(--mh-heading);
    border-top: 2px solid var(--mh-primary);
    padding-top: var(--mh-space-md);
    margin-top: var(--mh-space-sm);
}

/* Info blocks */
.thank-you-info p {
    margin-bottom: var(--mh-space-sm);
    font-size: var(--mh-font-size-sm);
    color: var(--mh-text);
}

.thank-you-info p:last-child {
    margin-bottom: 0;
}

.thank-you-note {
    font-size: var(--mh-font-size-xs);
    color: var(--mh-text-muted);
    margin-top: var(--mh-space-sm);
    font-style: italic;
}

/* Two column layout */
.thank-you-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mh-space-xl);
    margin-bottom: var(--mh-space-xl);
}

/* Status badge */
.thank-you-status {
    text-align: center;
    padding: var(--mh-space-xl);
    background: var(--mh-bg-alt);
    border-radius: var(--mh-radius-lg);
    margin-bottom: var(--mh-space-xl);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--mh-space-sm);
    padding: var(--mh-space-sm) var(--mh-space-lg);
    border-radius: 50px;
    font-size: var(--mh-font-size-sm);
    font-weight: 600;
    margin-bottom: var(--mh-space-md);
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-onhold {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #115e59;
}

.thank-you-status p {
    font-size: var(--mh-font-size-sm);
    color: var(--mh-text-light);
}

/* Actions */
.thank-you-actions {
    display: flex;
    justify-content: center;
    gap: var(--mh-space-md);
    flex-wrap: wrap;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--mh-space-sm);
    padding: 0.75rem 1.5rem;
    font-size: var(--mh-font-size-md);
    font-weight: 500;
    border: 2px solid var(--mh-border);
    border-radius: var(--mh-radius);
    color: var(--mh-text);
    text-decoration: none;
    background: var(--mh-bg);
    transition: all var(--mh-transition);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--mh-primary);
    color: var(--mh-primary);
    background: var(--mh-primary-light);
}

/* Thank you responsive */
@media (max-width: 768px) {
    .thank-you-columns {
        grid-template-columns: 1fr;
    }

    .thank-you-title {
        font-size: var(--mh-font-size-xl);
    }

    .thank-you-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .thank-you-actions .btn,
    .thank-you-actions .btn-outline {
        justify-content: center;
    }

    .thank-you-item-img {
        width: 48px;
        height: 48px;
    }

    .thank-you-item-total {
        font-size: var(--mh-font-size-sm);
    }

    .order-item-thumb {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .thank-you-card-header {
        flex-direction: column;
        gap: var(--mh-space-sm);
        align-items: flex-start;
    }

    .thank-you-icon {
        width: 80px;
        height: 80px;
    }

    .thank-you-icon svg {
        width: 48px;
        height: 48px;
    }

    .thank-you-item-img {
        width: 42px;
        height: 42px;
    }

    .thank-you-item-meta {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .order-item-thumb {
        width: 34px;
        height: 34px;
    }

    .order-item-name {
        font-size: var(--mh-font-size-xs);
    }
}

/* ==========================================================================
   Compact Form Row V4 (side-by-side fields)
   ========================================================================== */
.form-row-half {
    display: flex;
    gap: 0.75rem;
}

.form-row-half > div {
    flex: 1;
}

.form-row-half .checkout-label {
    display: block;
    margin-bottom: 0.35rem;
}

.form-row-v4 {
    display: flex;
    gap: 0.75rem;
}

.form-row-v4 .form-group-v4 {
    flex: 1;
}

/* ==========================================================================
   bKash/Nagad Payment Details V4
   ========================================================================== */
.bkash-payment-details-v4 {
    margin-top: 1rem;
    border: 2px solid #E2136E;
    border-radius: var(--mh-radius);
    overflow: hidden;
}

.bkash-info-box-v4 {
    background: linear-gradient(135deg, #fce4ec 0%, #fff0f5 100%);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f8bbd0;
}

.bkash-amount-v4 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.bkash-amount-v4 strong {
    color: #E2136E;
    font-size: 1.15rem;
}

.bkash-number-display-v4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bkash-label-v4 {
    font-size: 0.85rem;
    color: #666;
}

.bkash-number-text-v4 {
    font-weight: 700;
    font-size: 1.05rem;
    color: #E2136E;
    letter-spacing: 0.5px;
    background: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #f8bbd0;
}

.copy-bkash-number-v4 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #E2136E;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-bkash-number-v4:hover {
    background: #c21157;
}

.bkash-fields-v4 {
    padding: 1rem 1.25rem;
    background: #fff;
}

/* ==========================================================================
   Toast Notification V4
   ========================================================================== */
.mh-toast-v4 {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    transform: translateY(20px);
    padding: 0.85rem 1.5rem;
    border-radius: var(--mh-radius);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 100000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}

.mh-toast-v4.mh-toast-success {
    background-color: var(--mh-primary, #2e7d32);
}

.mh-toast-v4.mh-toast-error {
    background-color: #e74c3c;
}

.mh-toast-v4.mh-toast-show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HARD MOBILE OVERRIDES (v4) ===== */
@media (max-width: 1024px) {
    ul.products,
    .shop-content-v4 ul.products,
    .related-products,
    .products-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .shop-toolbar-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .product-card-content {
        padding: 0.6rem 0.75rem !important;
    }

    .product-card-title {
        font-size: 0.85rem !important;
        line-height: 1.25 !important;
    }

    .product-card-price {
        font-size: 1rem !important;
    }

    .woocommerce-result-count {
        font-size: 0.8rem;
        margin: 0 0 0.25rem;
    }
}

@media (max-width: 380px) {
    ul.products,
    .shop-content-v4 ul.products {
        gap: 0.5rem !important;
    }
}

/* ===== NUCLEAR MOBILE 2-COL OVERRIDE (v4.1) ===== */
@media (max-width: 1024px) {
    html body .shop-content-v4 ul.products,
    html body ul.products.products,
    html body ul.products,
    html body .products,
    html body .related-products,
    html body .up-sells.products,
    html body .cross-sells.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
        display: grid !important;
    }

    html body ul.products li.product,
    html body .products li.product,
    html body .shop-content-v4 ul.products li.product {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
    }
}
