/**
 * Gaceria Art — WooCommerce Overrides
 *
 * Styles for: product grid, single product, cart, checkout, my-account,
 * breadcrumbs, pagination, notices, buttons.
 *
 * Loaded after WooCommerce core styles (via dependency chain), so equal
 * specificity wins without !important.
 *
 * @package Gaceria_Art
 */


.woocommerce .header-search input {
    border: none;
    outline: none;
}

.woocommerce .header-search.is-open input {
    display: block;
    border: none;
    box-shadow: none;
    padding: 0;
}

.woocommerce .header-search.is-open input:focus {
    border: none;
    box-shadow: none;
    padding: 0;
}

/* ═══════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════ */

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.products-header h2 {
    font-size: 24px;
    margin: 0;
}

.products-header .result-count {
    font-size: 13px;
    color: var(--text-muted);
}

.woocommerce .related.products {
    grid-column: 1 / -1;
}

ul.products,
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

/* ── Product Card ── */
ul.products li.product,
.woocommerce ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product, .woocommerce-page ul.products[class*="columns-"] li.product {
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    margin: 0;
    padding: 0;
    width: 100%;
    float: none;
}

ul.products li.product:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.product-image-wrap {
    position: relative;
    background: linear-gradient(135deg, var(--product-img-start) 0%, var(--product-img-end) 100%);
    overflow: hidden;
    aspect-ratio: 4/3;
}

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

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

/* Product badges */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 2;
}

.product-badge--sale {
    background: var(--badge-bg);
    color: var(--badge-text);
}

.product-badge--new {
    background: var(--new-badge-bg);
    color: var(--new-badge-text);
}

/* Wishlist heart */
.product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    z-index: 2;
    transition: color 0.2s;
}

.product-wishlist:hover,
.product-wishlist.is-liked {
    color: #DB5D50;
}

.product-wishlist svg {
    width: 16px;
    height: 16px;
}

/* Product info */
.product-info {
    padding: 16px 18px 18px;
}

.product-category-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 4px;
}

.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h3,
.woocommerce ul.products .woocommerce-loop-product__title,
.product-info h3 {
    font-size: 15px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.3;
    margin: 0 0 8px;
    padding: 0;
    color: var(--text);
}

/* Star rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 12px;
    color: var(--star-color);
}

.product-rating svg {
    width: 13px;
    height: 13px;
}

.product-rating .review-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Price + Add to cart row */
.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-bottom .price,
.woocommerce ul.products li.product .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Playfair Display', Georgia, serif;
    margin: 0;
}

.woocommerce ul.products li.product .price del,
.product-bottom .price del {
    font-size: 14px;
    color: var(--text-muted);
    margin-right: 6px;
}

.woocommerce ul.products li.product .price ins,
.product-bottom .price ins {
    text-decoration: none;
}

.btn-add-to-cart,
.woocommerce ul.products li.product .button {
    padding: 8px 18px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--btn-primary-text);
    font-size: 12px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    border: none;
    transition: background 0.2s;
    margin-top: 0;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-add-to-cart:hover,
.woocommerce ul.products li.product .button:hover {
    background: var(--accent-hover);
}

/* ── Add-to-cart loading spinner ── */
.btn-add-to-cart.loading,
.woocommerce ul.products li.product .button.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
    color: transparent;
}

.btn-add-to-cart.loading::after,
.woocommerce ul.products li.product .button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--btn-primary-text);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-add-to-cart.added::after,
.woocommerce ul.products li.product .button.added::after {
    content: '✓';
    margin-left: 6px;
    font-size: 14px;
}

/* ── Product card animations ── */
li.product {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

li.product:nth-child(1)  { animation-delay: 0.05s; }
li.product:nth-child(2)  { animation-delay: 0.10s; }
li.product:nth-child(3)  { animation-delay: 0.15s; }
li.product:nth-child(4)  { animation-delay: 0.20s; }
li.product:nth-child(5)  { animation-delay: 0.25s; }
li.product:nth-child(6)  { animation-delay: 0.30s; }
li.product:nth-child(7)  { animation-delay: 0.35s; }
li.product:nth-child(8)  { animation-delay: 0.40s; }
li.product:nth-child(9)  { animation-delay: 0.45s; }
li.product:nth-child(10) { animation-delay: 0.50s; }
li.product:nth-child(11) { animation-delay: 0.55s; }
li.product:nth-child(12) { animation-delay: 0.60s; }


/* ═══════════════════════════════════════════
   BREADCRUMBS, ORDERING, PAGINATION
   ═══════════════════════════════════════════ */

.woocommerce .woocommerce-breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--text-secondary);
}

.woocommerce .woocommerce-breadcrumb a:hover {
    color: var(--accent);
}

.woocommerce .woocommerce-ordering select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
}

.woocommerce nav.woocommerce-pagination ul {
    border: none;
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 40px;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--accent-muted);
    color: var(--accent);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--accent);
    color: var(--btn-primary-text);
    border-color: var(--accent);
}


/* ═══════════════════════════════════════════
   NOTICES
   ═══════════════════════════════════════════ */

.woocommerce-message,
.woocommerce-info {
    background: var(--surface);
    border-top-color: var(--accent);
    color: var(--text);
}

.woocommerce-info::before {
    color: var(--accent);
}

.woocommerce-error {
    background: var(--surface);
    border-top-color: #DB5D50;
    color: var(--text);
}

.woocommerce .woocommerce-notice {
    margin-bottom: 1em;
}

.woocommerce ul.order_details {
    margin-bottom: 2em;
}


/* ═══════════════════════════════════════════
   SINGLE PRODUCT
   ═══════════════════════════════════════════ */

.single-product .site-main {
    padding-top: 32px;
    padding-bottom: 60px;
}

.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.woocommerce span.onsale {
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.woocommerce #content div.product div.images,
.woocommerce div.product div.images,
.woocommerce-page #content div.product div.images,
.woocommerce-page div.product div.images {
    width: 100%;
}

.woocommerce div.product div.images {
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--product-img-start), var(--product-img-end));
}

.woocommerce div.product div.images img {
    border-radius: 0;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before,
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after {
    border-color: var(--text);
    background-color: var(--surface);
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after {
    background-color: var(--text);
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
    background: var(--surface);
}

.woocommerce div.product .product_title {
    font-size: clamp(24px, 3vw, 36px);
    margin-bottom: 12px;
    color: var(--text);
}

.woocommerce div.product p.price {
    font-size: 28px;
    color: var(--accent);
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 20px;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.woocommerce div.product form.cart {
    margin-bottom: 24px;
}

.woocommerce .quantity {
    display: inline-flex;
    align-items: stretch;
    position: relative;
}

.woocommerce div.product form.cart .quantity input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    padding: 10px 30px 10px 14px;
    font-family: inherit;
    width: 80px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce div.product form.cart .quantity input::-webkit-inner-spin-button,
.woocommerce div.product form.cart .quantity input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce .quantity .quantity-btn {
    position: absolute;
    right: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 50%;
    background: var(--surface);
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    line-height: 1;
    padding: 0;
}

.woocommerce .quantity .quantity-plus {
    top: 1px;
    border-radius: 0 3px 0 0;
    border-bottom: 1px solid var(--border);
}

.woocommerce .quantity .quantity-minus {
    bottom: 1px;
    border-radius: 0 0 3px 0;
}

.woocommerce .quantity .quantity-btn:hover {
    background: var(--border);
}

.woocommerce div.product .woocommerce-tabs {
    grid-column: 1 / -1;
    margin-top: 24px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0 0 24px;
    border-bottom: 1px solid var(--border);
    list-style: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    display: none;
}

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

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    content: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background-color: var(--surface);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.woocommerce div.product .woocommerce-tabs .panel {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .woocommerce div.product {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}


/* ═══════════════════════════════════════════
   CART PAGE
   ═══════════════════════════════════════════ */

.woocommerce-cart .site-main {
    padding-top: 32px;
    padding-bottom: 60px;
}

.woocommerce table.shop_table {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.woocommerce table.shop_table th {
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'DM Sans', sans-serif;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.woocommerce table.shop_table td {
    padding: 18px;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}

.woocommerce table.shop_table td.product-name a {
    font-weight: 600;
    color: var(--text);
}

.woocommerce table.shop_table td.product-name a:hover {
    color: var(--accent);
}

.woocommerce table.shop_table img {
    border-radius: 4px;
    width: 64px;
}

.woocommerce .cart_totals {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.woocommerce .cart_totals h2 {
    font-size: 18px;
    margin-bottom: 16px;
}


/* ═══════════════════════════════════════════
   CHECKOUT
   ═══════════════════════════════════════════ */

.woocommerce-checkout .site-main {
    padding-top: 32px;
    padding-bottom: 60px;
}

.woocommerce form .form-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

#order_review_heading {
    font-size: 20px;
    margin-bottom: 16px;
}

.woocommerce-checkout #payment {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.woocommerce-checkout #payment div.payment_box {
    background: var(--elevated);
    color: var(--text-secondary);
    font-size: 13px;
}


/* ═══════════════════════════════════════════
   MY ACCOUNT
   ═══════════════════════════════════════════ */

/* ── Layout ── */
body.woocommerce-account .container {
    padding-top: 40px;
    padding-bottom: 60px;
}

body.woocommerce-account .entry-content .woocommerce {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
    float: none;
}

body.woocommerce-account .woocommerce::before,
body.woocommerce-account .woocommerce::after,
body.woocommerce-account .woocommerce-Addresses::before,
body.woocommerce-account .woocommerce-Addresses::after {
    display: none;
}

/* ── Navigation ── */
.woocommerce-MyAccount-navigation {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    position: sticky;
    top: 100px;
}

.woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--accent-muted);
    color: var(--accent);
    font-weight: 600;
}

/* Logout link subtle */
.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: var(--text-muted);
}

/* ── Content area ── */
.woocommerce-MyAccount-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    min-height: 300px;
}

.woocommerce-MyAccount-content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.woocommerce-MyAccount-content p:last-child {
    margin-bottom: 0;
}

#billing_email_field {
    margin-bottom: 6px;
}

.woocommerce-MyAccount-content p a {
    color: var(--accent);
    font-weight: 600;
}

.woocommerce-MyAccount-content p a:hover {
    color: var(--accent-hover);
}

.woocommerce-MyAccount-content mark {
    background: var(--accent-muted);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Orders table inside account ── */
.woocommerce-MyAccount-content table.woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-MyAccount-content table.woocommerce-orders-table th {
    background: var(--elevated);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.woocommerce-MyAccount-content table.woocommerce-orders-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

.woocommerce-MyAccount-content table.woocommerce-orders-table tr:last-child td {
    border-bottom: none;
}

/* ── Address cards ── */
.woocommerce-MyAccount-content .woocommerce-Addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address {
    width: 100%;
    float: none;
}

.woocommerce-MyAccount-content .woocommerce-Address {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.woocommerce-MyAccount-content .woocommerce-Address header h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text);
}

.woocommerce-MyAccount-content .woocommerce-Address address {
    font-style: normal;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ── Forms inside account (edit account, edit address) ── */
.woocommerce-MyAccount-content .woocommerce-EditAccountForm fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.woocommerce-MyAccount-content .woocommerce-EditAccountForm fieldset legend {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 0 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    body.woocommerce-account .entry-content .woocommerce {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .woocommerce-MyAccount-navigation {
        position: static;
    }

    .woocommerce-MyAccount-navigation ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .woocommerce-MyAccount-navigation ul li a {
        padding: 8px 14px;
        font-size: 12px;
    }

    .woocommerce-MyAccount-content .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }
}


/* ═══════════════════════════════════════════
   BUTTONS — GLOBAL
   ═══════════════════════════════════════════ */

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--accent);
    color: var(--btn-primary-text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    transition: background 0.2s;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: var(--accent-hover);
}


/* ═══════════════════════════════════════════
   FORM FIELDS — THEME OVERRIDES
   ═══════════════════════════════════════════ */

/* ── Text inputs, textareas, selects ── */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="password"],
.woocommerce input[type="search"],
.woocommerce input[type="url"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce input[type="date"],
.woocommerce textarea,
.woocommerce select,
.wc-block-components-text-input input[type="text"],
.wc-block-components-form .wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-form .wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-form .wc-block-components-text-input input[type="password"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-form .wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="url"],
.wc-block-components-form .wc-block-components-text-input input[type="url"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-form .wc-block-components-text-input input[type="number"],
.wc-block-components-textarea,
.wc-blocks-components-select .wc-blocks-components-select__select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.woocommerce input[type="text"]:focus,
.woocommerce input[type="email"]:focus,
.woocommerce input[type="password"]:focus,
.woocommerce input[type="search"]:focus,
.woocommerce input[type="url"]:focus,
.woocommerce input[type="tel"]:focus,
.woocommerce input[type="number"]:focus,
.woocommerce input[type="date"]:focus,
.woocommerce textarea:focus,
.woocommerce select:focus,
.wc-block-components-text-input input[type="text"]:focus,
.wc-block-components-form .wc-block-components-text-input input[type="text"]:focus,
.wc-block-components-form .wc-block-components-text-input.is-active input[type="text"]:focus,
.wc-block-components-text-input input[type="email"]:focus,
.wc-block-components-form .wc-block-components-text-input input[type="email"]:focus,
.wc-block-components-form .wc-block-components-text-input.is-active input[type="email"]:focus,
.wc-block-components-text-input input[type="password"]:focus,
.wc-block-components-form .wc-block-components-text-input input[type="password"]:focus,
.wc-block-components-form .wc-block-components-text-input.is-active input[type="password"]:focus,
.wc-block-components-text-input input[type="tel"]:focus,
.wc-block-components-form .wc-block-components-text-input input[type="tel"]:focus,
.wc-block-components-form .wc-block-components-text-input.is-active input[type="tel"]:focus,
.wc-block-components-text-input input[type="url"]:focus,
.wc-block-components-form .wc-block-components-text-input input[type="url"]:focus,
.wc-block-components-form .wc-block-components-text-input.is-active input[type="url"]:focus,
.wc-block-components-text-input input[type="number"]:focus,
.wc-block-components-form .wc-block-components-text-input input[type="number"]:focus,
.wc-block-components-form .wc-block-components-text-input.is-active input[type="number"]:focus,
.wc-block-components-textarea:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{
    background: var(--surface);
    padding-left: 9px;
    border-color: var(--accent);
    color: var(--text);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.woocommerce input::placeholder,
.woocommerce textarea::placeholder,
.wc-block-components-form .wc-block-components-text-input input::placeholder {
    color: var(--text-muted);
}

/* ── Block text input label (floating label) ── */
.wc-block-components-text-input label {
    color: var(--text-secondary);
}

.wc-block-components-text-input.is-active label {
    color: var(--accent);
}

/* ── Block select ── */
.wc-blocks-components-select .wc-blocks-components-select__label {
    color: var(--text-secondary);
}

.wc-blocks-components-select .wc-blocks-components-select__container {
    background: transparent;
}

.wc-blocks-components-select .wc-blocks-components-select__expand {
    fill: var(--text-secondary);
}

.wc-blocks-components-select .wc-blocks-components-select__select:focus ~ .wc-blocks-components-select__expand {
    fill: var(--accent);
}

/* ── Checkbox ── */
.woocommerce input[type="checkbox"],
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"],
.wc-block-checkout input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.woocommerce input[type="checkbox"]:hover,
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:hover {
    border-color: var(--accent);
}

.woocommerce input[type="checkbox"]:focus,
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
    outline: none;
}

.woocommerce input[type="checkbox"]:checked,
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked,
.wc-block-checkout input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.wc-block-components-checkbox label,
.wc-block-components-checkbox .wc-block-components-checkbox__label {
    color: var(--text);
    font-size: 14px;
}

.wc-block-components-checkbox .wc-block-components-checkbox__mark {
    fill: var(--bg);
}

/* ── Radio button ── */
.woocommerce input[type="radio"],
.wc-block-components-radio-control input[type="radio"],
.wc-block-checkout input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.woocommerce input[type="radio"]:hover,
.wc-block-components-radio-control input[type="radio"]:hover {
    border-color: var(--accent);
}

.woocommerce input[type="radio"]:focus,
.wc-block-components-radio-control input[type="radio"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
    outline: none;
}

.woocommerce input[type="radio"]:checked,
.wc-block-components-radio-control input[type="radio"]:checked {
    border-color: var(--accent);
    background-color: var(--surface);
}

.woocommerce input[type="radio"]:checked::after,
.wc-block-components-radio-control input[type="radio"]:checked::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent);
}

.wc-block-components-radio-control__label,
.wc-block-components-radio-control__description {
    color: var(--text);
}

.wc-block-components-radio-control__description {
    color: var(--text-secondary);
}

/* ── Disabled state ── */
.woocommerce input:disabled,
.woocommerce textarea:disabled,
.woocommerce select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Block component borders & validation ── */
.wc-block-components-text-input,
.wc-block-components-select {
    border-color: var(--border);
}

.wc-block-components-validation-error p {
    color: #DB5D50;
}

.wc-block-components-address-card address .wc-block-components-address-card__address-section--secondary {
    color: var(--text-secondary);
}

/* ── WPLoyalty message ── */
.wlr-message-info.wlr_thankyou_message {
    background-color: var(--accent-muted) !important;
    border-color: var(--accent) !important;
    color: var(--text) !important;
}

.wlr-message-info.wlr_thankyou_message .wlr-theme-color-apply {
    color: var(--accent) !important;
}

/* WPLoyalty My Account page (inline <style> stripped via filter) */
.wlr-myaccount-page {
    background-color: transparent;
}

.wlr-myaccount-page .wlr-heading {
    color: var(--text);
    border-left: 3px solid var(--accent);
}

.wlr-myaccount-page .wlr-theme-color-apply {
    color: var(--accent);
}

.wlr-myaccount-page .wlr-text-color {
    color: var(--text);
}

.wlr-myaccount-page .wlr-border-color {
    border-color: var(--border);
}

.wlr-myaccount-page .wlr-button-text-color {
    color: var(--btn-primary-text);
}

.wlr-myaccount-page .wlr-progress-bar .wlr-progress-level {
    background-color: var(--accent);
}

.wlr-myaccount-page table:not(.has-background) th {
    background-color: var(--accent-muted);
}

.wlr-myaccount-page table thead {
    outline: solid 1px var(--border);
}

.wlr-myaccount-page .wlr-my-rewards-title.active {
    border-bottom: 3px solid var(--accent);
}

.wlr-myaccount-page .wlr-my-rewards-title.active h4,
.wlr-myaccount-page .wlr-my-rewards-title.active i {
    color: var(--accent);
}

.wlr-myaccount-page .wlr-user-reward-titles {
    border-bottom: 0.5px solid var(--border);
}

.wlr-myaccount-page .wlr-card {
    background: var(--surface);
}

.wlr-myaccount-page .wlr-coupons-expired-content .wlr-card-icon-container i {
    color: var(--text);
}

.wlr-myaccount-page .wlr-out-of-stock {
    background: var(--border);
    cursor: not-allowed;
}

.wlr-myaccount-page #wlr-available-points,
.wlr-myaccount-page #wlr-redeemed-points,
.wlr-myaccount-page #wlr-used-rewards {
    background: var(--surface);
    border-radius: 8px;
}

.wlr-myaccount-page select {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.wlr-myaccount-page .wlr-norecords-container p,
.wlr-myaccount-page .wlr-norecords-container h4 {
    color: var(--text-secondary);
}

.alertify .ajs-ok {
    color: var(--btn-primary-text);
    background: var(--accent);
    border-radius: 6px;
}

.alertify .ajs-cancel {
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════
   SHIPPING & PAYMENT — CARD-STYLE OPTIONS
   ═══════════════════════════════════════════ */

/* ── Hide radio buttons ── */
.wc-block-components-radio-control input[type="radio"] {
    display: none;
}

/* ── Option as card ── */
.wc-block-components-radio-control .wc-block-components-radio-control__option,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 8px;
    background: var(--surface);
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.wc-block-components-radio-control .wc-block-components-radio-control__option:hover,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:hover {
    border-color: var(--accent);
}

/* ── Selected option ── */
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option-checked {
    background: var(--accent-muted);
    box-shadow: 0 0 0 1px var(--accent);
}

.wc-block-components-radio-control::after,
.wc-block-components-radio-control-accordion-option::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option::after,
.wc-block-components-radio-control--highlight-checked div.wc-block-components-radio-control-accordion-option::after{
    border: none;
    background: none;
}

.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
    padding: 0;
    background: none;
    margin-bottom: 0;
}

/* ── Labels & descriptions ── */
.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label {
    color: var(--text);
    font-weight: 600;
}

.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__description,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__description {
    color: var(--text-secondary);
}

/* ── Cart quantity selector ── */
.wc-block-components-quantity-selector {
    display: inline-flex;
    align-items: stretch;
    position: relative;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    padding: 4px 28px 4px 10px;
    font-family: inherit;
    font-size: 14px;
    width: 64px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.wc-block-components-quantity-selector__input::-webkit-inner-spin-button,
.wc-block-components-quantity-selector__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
    position: absolute;
    right: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 50%;
    background: var(--surface);
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text);
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
    line-height: 1;
    padding: 0;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus {
    box-shadow: none;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button--plus {
    top: 1px;
    border-radius: 0 3px 0 0;
    border-bottom: 1px solid var(--border);
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button--minus {
    bottom: 1px;
    border-radius: 0 0 3px 0;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:not(:disabled) {
    background: var(--border);
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
    opacity: 0.4;
    cursor: default;
}

.wc-block-components-quantity-selector .wc-block-cart-item__remove-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.wc-block-components-quantity-selector .wc-block-cart-item__remove-link:hover {
    color: var(--accent);
}

.wc-block-components-quantity-selector .wc-block-cart-item__remove-link svg {
    fill: currentColor;
}

/* ── Imoje ── */
.wc-block-components-radio-control-accordion-content {
    padding: 0;
}

.imoje-block-checkout__header {
    align-items: center;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label img{
    flex-shrink: 0;
    min-width: 50px;
    object-position: center;
}

.wp-block-woocommerce-checkout-payment-block img {
    padding: 4px;
}

[data-theme="dark"] .wp-block-woocommerce-checkout-payment-block img {
    background: var(--text);
}

.wc-block-components-radio-control-accordion-content .imoje-payment-method-container__label {
    border-color: var(--accent);
}

.wc-block-components-radio-control-accordion-content .imoje-payment-method-container__label--active {
    padding: 9px;
}

[data-theme="dark"] .imoje-payment-method-container__label,
[data-theme="dark"] .imoje-payment-method-container__label--active{
    background: var(--text);
}
