.ivory-swatches-field + select,
.ivory-swatches-field + .reset_variations + select,
.ivory-swatches-field + select + .reset_variations {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.elementor-widget-image-gallery .elementor-image-gallery.ivory-product-gallery-host,
.ivory-product-gallery-host {
    display: block;
}

.ivory-product-gallery {
    display: grid;
    gap: 16px;
}

.ivory-product-gallery__item {
    display: block;
    background: #f8f8f6;
    text-decoration: none;
}

.ivory-product-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.woocommerce div.product form.cart.variations_form {
    max-width: 435px;
}

.woocommerce div.product form.cart table.variations {
    width: 100%;
    margin: 0 0 1.5rem;
    border-collapse: collapse;
}

.woocommerce div.product form.cart table.variations tbody {
    display: block;
}

.woocommerce div.product form.cart table.variations tr {
    display: block;
    margin: 0 0 1rem;
    padding: 0 0 1rem;
    border-bottom: 0;
}

.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations td {
    margin: 0;
    padding: 0 !important;
    vertical-align: top;
}

.woocommerce div.product form.cart table.variations th.label {
    display: none !important;
}

.woocommerce div.product form.cart table.variations td.value {
    display: block;
    width: 100%;
    position: relative;
    background: transparent !important;
}

.woocommerce div.product form.cart .reset_variations,
.woocommerce div.product form.cart .woocommerce-variation-description,
.woocommerce div.product form.cart .woocommerce-variation-price,
.woocommerce div.product form.cart .woocommerce-variation-availability {
    display: none !important;
}

.woocommerce div.product form.cart .single_variation_wrap,
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart {
    width: 100%;
}

.woocommerce div.product form.cart .woocommerce-variation-add-to-cart {
    display: block !important;
}

.woocommerce div.product form.cart .woocommerce-variation-add-to-cart .quantity {
    display: none !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button.button.alt {
    display: inline-block !important;
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 16px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000000 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2em !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: uppercase !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button.button.alt:hover,
.woocommerce div.product form.cart .single_add_to_cart_button.button.alt:focus-visible {
    background: #1f2937 !important;
    color: #ffffff !important;
    outline: none;
}

.woocommerce div.product form.cart .single_add_to_cart_button.button.alt.disabled,
.woocommerce div.product form.cart .single_add_to_cart_button.button.alt:disabled {
    opacity: 1 !important;
}

.ivory-swatches-field {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: transparent !important;
}

.ivory-swatches-field__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: #6b7280;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.ivory-swatches-field__label {
    color: #6b7280;
    font-weight: 400;
}

.ivory-swatches-field__label::after {
    content: ":";
    margin-left: 0.3rem;
}

.ivory-swatches-field__selection {
    color: #6b7280;
    font-weight: 400;
}

.ivory-swatches-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.ivory-swatches-field .ivory-swatch {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ivory-swatches-field .ivory-swatch:hover,
.ivory-swatches-field .ivory-swatch:focus-visible {
    border-color: #111111 !important;
    color: #111111 !important;
    outline: none;
}

.ivory-swatches-field .ivory-swatch.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none !important;
}

.ivory-swatch__color {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--ivory-swatch-color, #d4d4d4);
}

.ivory-swatch__image,
.ivory-swatch__image img {
    display: block;
    width: 100%;
    height: 100%;
}

.ivory-swatch__image img {
    object-fit: cover;
}

.ivory-swatches-field--single {
    gap: 0.75rem;
}

.ivory-swatches-field--single .ivory-swatches-container {
    gap: 8px;
}

.ivory-swatches-field--single .ivory-swatch--color {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
}

.ivory-swatches-field--single .ivory-swatch--color .ivory-swatch__color {
    border: 0;
}

.ivory-swatches-field--single .ivory-swatch--color.is-selected {
    border-color: #d1d5db !important;
    box-shadow: 0 0 0 1px #111111, 0 0 0 3px #ffffff !important;
}

.ivory-swatches-field--single .ivory-swatch--image {
    width: 64px !important;
    min-width: 64px !important;
    height: 80px !important;
    min-height: 80px !important;
    overflow: hidden;
}

.ivory-swatches-field--single .ivory-swatch--image.is-selected {
    border-color: #111111 !important;
}

.ivory-swatches-field--single.ivory-swatches-field--button .ivory-swatches-container,
.ivory-swatches-field--single.ivory-swatches-field--size-attribute .ivory-swatches-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ivory-swatches-field--single .ivory-swatch--button {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 12px 0 !important;
    border: 1px solid #e5e7eb !important;
    background: transparent !important;
    color: #6b7280 !important;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ivory-swatches-field--single .ivory-swatch--button.is-selected {
    border-color: #111111 !important;
    color: #111111 !important;
}

.ivory-loop-swatches {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.ivory-loop-swatches .ivory-swatches-field {
    gap: 0.45rem;
}

.ivory-loop-swatches .ivory-swatches-field__meta {
    justify-content: space-between;
    gap: 1rem;
    font-size: 9px;
}

.ivory-loop-swatches .ivory-swatches-container {
    gap: 0.5rem;
}

.ivory-loop-swatches .ivory-swatch--color {
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    border-radius: 999px !important;
}

.ivory-loop-swatches .ivory-swatch--color .ivory-swatch__color {
    border: 0;
}

.ivory-loop-swatches .ivory-swatch--color.is-selected {
    border-color: #d1d5db !important;
    box-shadow: 0 0 0 1px #111111 !important;
}

.ivory-loop-swatches .ivory-swatch--image {
    width: 38px !important;
    min-width: 38px !important;
    height: 48px !important;
    min-height: 48px !important;
    overflow: hidden;
}

.ivory-loop-swatches .ivory-swatch--button {
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #6b7280 !important;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ivory-loop-swatches .ivory-swatch--button.is-selected {
    border-color: #111111 !important;
    color: #111111 !important;
}

.woocommerce ul.products li.product .ivory-loop-swatches + .button,
.woocommerce ul.products li.product .ivory-loop-swatches ~ .button {
    margin-top: 0.9rem;
}

@media (max-width: 767px) {
    .ivory-product-gallery {
        gap: 12px;
        margin-bottom: 1.25rem;
    }

    .woocommerce div.product form.cart.variations_form {
        max-width: none;
    }

    .woocommerce div.product form.cart table.variations tr {
        margin: 0 0 0.9rem;
        padding: 0 0 0.9rem;
    }

    .ivory-swatches-field--single {
        gap: 0.65rem;
    }

    .ivory-swatches-field--single .ivory-swatches-field__meta {
        gap: 0.3rem;
        font-size: 10px;
    }

    .ivory-swatches-field--single .ivory-swatch--image {
        width: 56px !important;
        min-width: 56px !important;
        height: 70px !important;
        min-height: 70px !important;
    }

    .ivory-swatches-field--single .ivory-swatch--button {
        height: 38px !important;
        min-height: 38px !important;
        font-size: 11px;
    }
}
