header>div>div {
    display: flex;
    justify-content: space-between;
    max-width: 1280px;
}

.villegas-shop-header {
    background-color: #000;
    color: #fff;
    padding: 20px 0 10px;
    margin-bottom: 20px;
}

.villegas-shop-header-inner {
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
    text-align: left;
}

.villegas-shop-breadcrumb {
    margin-bottom: 0 !important;
    color: #fff;
}

.villegas-shop-breadcrumb .woocommerce-breadcrumb {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    font-size: 12px;
}

.villegas-shop-breadcrumb a {
    color: #fff;
}

.villegas-shop-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.villegas-shop-header h1 {
    color: #fff;
    margin: 0;
    font-size: 3rem;
    line-height: 1;
}

.villegas-shop-result-count {
    color: #fff;
    font-size: 12px;
    margin: 0;
}

.villegas-shop-content {
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
}

/* Force 4 columns for this template if not already handled by theme */
.villegas-shop-content ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px 20px;
}

.villegas-shop-content ul.products::before,
.villegas-shop-content ul.products::after {
    content: none !important;
    display: none !important;
}

.villegas-shop-content ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.villegas-shop-content ul.products li.product .woocommerce-loop-product__title,
.villegas-shop-content ul.products li.product .price {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    display: block;
}

.villegas-shop-content ul.products li.product .woocommerce-loop-product__title {
    font-size: 1em !important;
    font-weight: 900 !important;
}

.villegas-shop-content ul.products li.product .button {
    display: inline-block !important;
    font-family: sans-serif !important;
    font-weight: 900 !important;
}

.villegas-shop-content ul.products li.product img {
    margin-bottom: 0 !important;
    transition: opacity 0.3s ease;
    width: 100%;
    height: auto;
    display: block;
}

.villegas-shop-content ul.products li.product:hover img {
    opacity: 0.6;
}

.villegas-image-wrapper {
    position: relative;
    overflow: hidden;
}

.villegas-image-wrapper .button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    margin: 0 !important;
    display: inline-block !important;
}

.villegas-image-wrapper:hover .button {
    opacity: 1;
}

/* WooCommerce Success Notice Styling */
.wc-block-components-notice-banner.is-success {
    background: linear-gradient(314deg, rgb(255, 241, 158) 0%, rgb(220, 194, 105) 100%) !important;
    border-color: rgb(255, 225, 110) !important;
}

.wc-block-components-notice-banner.is-success>svg {
    background-color: #ff7300 !important;
    fill: #ffffff !important;
    border-radius: 50% !important;
    padding: 2px !important;
}

.wc-block-components-notice-banner.is-success>svg path {
    fill: #ffffff !important;
}

.wc-block-components-notice-banner.is-success .button.wc-forward {
    font-family: sans-serif !important;
    color: #000 !important;
    background: transparent !important;
    border: none !important;
    text-decoration: underline !important;
    padding-left: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.wc-block-components-notice-banner.is-success .button.wc-forward::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="%23000"><path d="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Cart Indicator */
.villegas-cart-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    gap: 4px;
    z-index: 20;
}

.villegas-cart-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.villegas-cart-badge svg {
    flex-shrink: 0;
}

.villegas-remove-from-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 0;
    transition: background-color 0.2s ease;
}

.villegas-remove-from-cart:hover {
    background-color: #b91c1c;
}

.villegas-remove-from-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination */
.villegas-shop-content .woocommerce-pagination {
    margin-bottom: 80px;
}

@media (max-width: 920px) {
    .villegas-shop-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .villegas-shop-content ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .villegas-shop-content ul.products {
        grid-template-columns: 1fr;
    }
}

/* Mobile: Fixed cart button at bottom-left (800px and below) */
@media (max-width: 800px) {
    .wc-block-components-notice-banner.is-success {
        position: fixed !important;
        bottom: 10px !important;
        left: 10px !important;
        right: auto !important;
        top: auto !important;
        z-index: 9999 !important;
        margin: 0 !important;
        padding: 12px 16px !important;
        width: auto !important;
        max-width: none !important;
    }

    /* Hide the checkmark icon on mobile */
    .wc-block-components-notice-banner.is-success>svg {
        display: none !important;
    }

    /* Hide product name text, only show "Ver carrito" link */
    .wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__content {
        font-size: 0 !important;
    }

    /* Show only the "Ver carrito" button */
    .wc-block-components-notice-banner.is-success a,
    .wc-block-components-notice-banner.is-success .button {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin: 0 !important;
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

.villegas-shop-header-inner,
.villegas-shop-content {
    padding-right: var(--wp--style--root--padding-right);
    padding-left: var(--wp--style--root--padding-left);
}


/* Cart Layout 66/33 */
.villegas-cart-one .woocommerce {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    align-items: flex-start !important;
}

/* Fix for WooCommerce pseudo-elements breaking flex layout */
.villegas-cart-one .woocommerce::before,
.villegas-cart-one .woocommerce::after {
    display: none !important;
    content: none !important;
}

.villegas-cart-one .woocommerce-notices-wrapper {
    width: 100% !important;
    flex-basis: 100% !important;
}

/* Left Column: Cart Form */
.villegas-cart-one .woocommerce-cart-form {
    width: calc(60% - 15px) !important;
    /* Requested: 60% */
    float: none !important;
    margin: 0 !important;
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-sizing: border-box;
}

/* Right Column: Cart Totals */
.villegas-cart-one .cart-collaterals {
    width: calc(40% - 15px) !important;
    /* Requested: 40% */
    float: none !important;
    margin: 0 !important;
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-sizing: border-box;
}

.villegas-cart-one .cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
}

/* --- Product Table Styling --- */
.villegas-cart-one table.shop_table {
    border: none;
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    border-radius: 0;
}

.villegas-cart-one table.shop_table thead th {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: none;
    font-size: 0.875rem;
    /* text-sm */
    padding: 10px 0;
    /* Requested padding */
    border-bottom: 1px solid #e5e7eb;
    background: black;
    /* Requested */
    color: white;
    /* Requested */
}

.villegas-cart-one table.shop_table tbody td {
    border-top: 1px solid #e5e7eb;
    /* border-b in reference, but tables use border-top usually */
    padding: 1.5rem 0;
    vertical-align: middle;
    background-color: transparent;
}

.villegas-cart-one table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Remove */
.villegas-cart-one td.product-remove {
    width: 30px;
    padding-right: 10px;
}

.villegas-cart-one td.product-remove a.remove {
    color: #ef4444;
    /* text-red-500 */
    font-weight: bold;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    display: inline-block;
    line-height: 1;
}

.villegas-cart-one td.product-remove a.remove:hover {
    background: transparent;
    color: #b91c1c;
}

/* Product Thumbnail */
.villegas-cart-one td.product-thumbnail {
    width: 80px;
    padding-right: 1rem;
}

.villegas-cart-one td.product-thumbnail img {
    width: 60px !important;
    /* Fallback */
    height: 60px !important;
    /* Requested: 60px */
    object-fit: cover !important;
    border-radius: 0.375rem;
}

/* User requested specificity */
.woocommerce-page .woocommerce-cart-form .product-thumbnail a img {
    width: 60px !important;
    margin-left: 10px;
    height: 60px !important;
    /* Requested: 60px */
    object-fit: cover !important;
    border-radius: 0.375rem;
}

/* Global Button Font */
.villegas-cart-one button,
.villegas-cart-one .button,
.villegas-cart-one input[type="submit"],
.villegas-cart-one input[type="button"] {
    font-family: sans-serif !important;
}

/* Product Name */
.villegas-cart-one td.product-name a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    /* font-medium */
    color: #111827;
    /* text-gray-900 */
    text-decoration: none;
}

/* Product Price & Subtotal */
.villegas-cart-one td.product-price,
.villegas-cart-one td.product-subtotal {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1f2937;
    /* text-gray-800 */
}

.villegas-cart-one td.product-subtotal {
    font-weight: 700;
    /* font-bold */
    color: #111827;
    /* text-gray-900 */
}

/* Quantity Input */
.villegas-cart-one .quantity .qty {
    width: 4rem;
    /* w-16 */
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    /* rounded-md */
    padding: 0.25rem;
    font-family: 'Inter', sans-serif;
}

/* --- Coupon Section & Actions --- */
.villegas-cart-one td.actions {
    padding-top: 1.5rem;
    border-top: none !important;
    /* Restore table-cell behavior */
    display: table-cell !important;
    vertical-align: middle;
}

/* Clearfix for floated elements inside td */
.villegas-cart-one td.actions::after {
    content: "";
    display: table;
    clear: both;
}

.villegas-cart-one .coupon {
    display: inline-flex;
    /* Use inline-flex to sit nicely with floats if needed, or just float the container */
    float: left;
    align-items: center;
    gap: 0.5rem;
}

.villegas-cart-one .coupon label {
    display: none;
}

.villegas-cart-one .coupon .input-text {
    border: 1px solid #d1d5db;
    /* border-gray-300 */
    border-radius: 0.375rem;
    /* rounded-md */
    padding: 0.5rem;
    width: auto;
    min-width: 200px;
    color: #374151;
    /* text-gray-700 */
    font-family: sans-serif !important;
}

.villegas-cart-one .coupon .button {
    background-color: #1f2937;
    /* bg-gray-800 */
    color: #fff;
    border-radius: 0.375rem;
    /* rounded-md */
    padding: 0.5rem 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    font-family: sans-serif !important;
}

.villegas-cart-one .coupon .button:hover {
    background-color: #374151;
    /* bg-gray-700 */
}

/* Update Cart Button - Hidden as per request for auto-update */
.villegas-cart-one button[name="update_cart"] {
    display: none !important;
}

/* --- Cart Totals --- */
.villegas-cart-one .cart_totals {
    width: 100%;
}

.villegas-cart-one .cart_totals h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    /* text-xl */
    font-weight: 700;
    /* font-bold */
    margin-bottom: 1.5rem;
    color: #111827;
    /* text-gray-900 */
    text-align: left;
    /* Requested: Align left */
    border-bottom: none;
    padding-bottom: 0;
}

.villegas-cart-one .cart_totals table.shop_table {
    border: none;
    width: 100%;
    margin-bottom: 1.5rem;
}

.villegas-cart-one .cart_totals table.shop_table th,
.villegas-cart-one .cart_totals table.shop_table td {
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}

.villegas-cart-one .cart_totals table.shop_table tr:first-child th,
.villegas-cart-one .cart_totals table.shop_table tr:first-child td {
    border-top: none;
}

/* Autocomplete Styling */
.ui-autocomplete {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    padding: 0.5rem 0 !important;
    list-style: none !important;
    z-index: 9999 !important;
    max-height: 300px;
    overflow-y: auto;
    width: auto !important;
    min-width: 200px;
}

.ui-menu-item {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.ui-menu-item-wrapper {
    padding: 0.5rem 1rem !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    color: #374151 !important;
    cursor: pointer !important;
    display: block !important;
}

.ui-menu-item-wrapper:hover,
.ui-menu-item-wrapper.ui-state-active {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    border: none !important;
    margin: 0 !important;
}

.villegas-cart-one .cart_totals .order-total th,
.villegas-cart-one .cart_totals .order-total td {
    font-size: 1.25rem;
    /* text-xl */
    font-weight: 700;
    color: #111827;
    /* text-gray-900 */
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Shipping Comuna Field Styling */
.villegas-cart-comuna-wrapper label {
    display: block;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    color: #374151;
    /* text-gray-700 */
    margin-bottom: 0.5rem;
}

.villegas-cart-comuna-wrapper input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
    box-sizing: border-box;
}

.villegas-cart-comuna-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    /* focus:border-blue-500 */
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Checkout Button */
.villegas-cart-one .wc-proceed-to-checkout {
    padding: 0;
    margin-top: 2rem;
    text-align: center;
    width: 100%;
}

.villegas-cart-one .wc-proceed-to-checkout .checkout-button {
    background-color: #000;
    color: #fff;
    width: 100%;
    padding: 10px;
    border-radius: 0.375rem;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    display: block;
    transition: background-color 0.15s;
    box-sizing: border-box !important;
    margin: 0 auto;
    margin-bottom: 0;
}

.villegas-cart-one .wc-proceed-to-checkout .checkout-button:hover {
    background-color: #1f2937;
    /* hover:bg-gray-800 */
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .villegas-cart-one .woocommerce-cart-form,
    .villegas-cart-one .cart-collaterals {
        width: 100%;
    }

    .villegas-cart-one .coupon {
        flex-direction: column;
    }

    .villegas-cart-one .coupon .input-text,
    .villegas-cart-one .coupon .button,
    .villegas-cart-one button[name="update_cart"] {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }
}