/* ============================================================
   Areco – WooCommerce overrides
   Loaded on: shop, product, cart, checkout, my-account pages
   ============================================================ */

/* ---- V2 Portal: Inter font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- V2 Portal: full-bleed layout within Blocksy My Account ---- */
.is-portal-v2 {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--ink);
}

/* Hide Blocksy's My Account nav on v2 pages */
.is-portal-v2 ~ .woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-navigation:has(~ .is-portal-v2) {
    display: none !important;
}

/* Hide the portal "new" tab from WC's account nav (it's a router, not a visible tab) */
.woocommerce-MyAccount-navigation li[class*="--new"] {
    display: none !important;
}

/* Give v2 content full width (WC limits it to .woocommerce-MyAccount-content max-width) */
.woocommerce-MyAccount-content:has(.is-portal-v2) {
    max-width: none;
    padding: 0;
    float: none;
    width: 100%;
}

/* ---- General ---- */
.woocommerce,
.woocommerce-page {
    font-size: 1rem;
}

/* Hide sale badges site-wide */
.onsale {
    display: none !important;
}

/* Featured category block title padding */
.wc-block-featured-category__title {
    padding: 0 20px 16px;
}

/* ---- Buttons ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    border-radius: 3px;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background-color: var(--theme-palette-color-1, #00aeef);
    color: #fff;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: var(--theme-palette-color-2, #0090c8);
}

/* ---- Product grid ---- */
.woocommerce ul.products li.product .price {
    color: var(--theme-palette-color-1, #00aeef);
    font-weight: 600;
}

.woocommerce ul.products li.product img {
    border-radius: 4px;
}

.areco-loop-sku {
    display: block;
    font-size: 0.78em;
    color: var(--text-gray, #666);
    margin: 2px 0 4px;
}

/* Price skeleton — reserves layout space while AJAX price loads.
   :empty matches only until JS fills the span; no JS changes needed. */
.custom-ajax-price:empty {
    display: block;
    min-height: 1.4em;
    width: 72px;
    border-radius: 3px;
    background: linear-gradient(90deg, #e0e0e0 25%, #ebebeb 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: areco-price-shimmer 1.2s ease-in-out infinite;
}

@keyframes areco-price-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Single product ---- */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--theme-palette-color-1, #00aeef);
}

.areco-single-sku {
    display: block;
    font-size: 0.875em;
    color: var(--text-gray, #666);
    margin-bottom: 8px;
}

/* ---- Cart table ---- */
.woocommerce table.cart td,
.woocommerce table.cart th,
.wc-block-cart-items td,
.wc-block-cart-items th {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 12px 8px;
    vertical-align: middle;
}

/* iOS Safari drops font-family on <td> when parent <tr> becomes display:grid
   (WC Blocks sets .wc-block-cart-items__row { display:grid } on mobile).
   Target the outer div container so all children inherit cleanly. */
.wc-block-cart {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.wc-block-cart .wc-block-cart-item__wrap,
.wc-block-cart .wc-block-components-product-name,
.wc-block-cart .wc-block-cart-item__prices,
.wc-block-cart .wc-block-cart-item__quantity,
.wc-block-cart .wc-block-components-product-price,
.wc-block-cart .wc-block-components-formatted-money-amount,
.wc-block-cart .wc-block-components-product-price bdi,
.wc-block-cart .wc-block-components-formatted-money-amount bdi {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.woocommerce table.cart td.product-thumbnail img {
    max-width: 80px;
    border-radius: 3px;
}

.woocommerce table.cart input[type="number"] {
    max-width: 70px;
}

/* Cart totals */
.woocommerce .cart-collaterals .cart_totals {
    float: none;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

/* ---- Checkout ---- */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading {
    font-size: 1.15rem;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    border-radius: 3px;
    border: 1px solid #ccc;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--theme-palette-color-1, #00aeef);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.15);
}

/* Readonly billing email (set via functions.php) */
#billing_email[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
}

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

.woocommerce-checkout-review-order table.shop_table th,
.woocommerce-checkout-review-order table.shop_table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e5e5;
}

/* ---- Order confirmation / thank-you ---- */
.woocommerce-order-received .woocommerce-thankyou-order-received {
    font-size: 1.1rem;
    color: #2a8a3e;
}


/* ---- My Account ---- */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: var(--theme-palette-color-1, #00aeef);
    color: #fff;
}

/* ---- Notices ---- */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--theme-palette-color-1, #00aeef);
}

.woocommerce-error {
    border-top-color: #c0392b;
}


div#customer_login {
    padding: 70px 0px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    div#customer_login {
    padding: 20px;
    margin: 30px;
    }
    .woocommerce table.cart td.product-remove,
    .woocommerce table.cart td.product-thumbnail {
        display: none;
    }

    .woocommerce .cart-collaterals .cart_totals {
        max-width: 100%;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100%;
        float: none;
    }
}

/* changes to order confirmation page - start*/
table.woocommerce-table.woocommerce-table--order-details.shop_table.order_details tfoot td, 
th.woocommerce-table__product-table.product-total, 
td.woocommerce-table__product-total.product-total {
    text-align: right;
}
 
small.shipped_via {
    display: none;
}

.woocommerce-customer-details address {
    padding: unset;
    margin-bottom: 20px;
    border: none;
}
/* changes to order confirmation page - end */

/* ---- Cart / mini-cart / checkout: SKU and UOM metadata ---- */

/* Cart block only: show native SKU/UOM metadata rows */
.wc-block-components-product-metadata {
    display: none;
}
.wc-block-cart .wc-block-components-product-metadata {
    display: block;
    margin-top: 4px;
}
.wc-block-cart .wc-block-components-product-metadata__description p {
    margin: 0;
    font-size: 11px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Mini-cart (PHP template): SKU/UOM via dl.variation — fix white label on Blocksy dark panel */
.ct-header-cart dl.variation,
.wc-block-mini-cart__drawer dl.variation {
    margin: 3px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1px 4px;
}
.ct-header-cart dl.variation dt,
.wc-block-mini-cart__drawer dl.variation dt {
    font-size: 11px;
    font-weight: 400;
    color: #888 !important;
    margin: 0;
}
.ct-header-cart dl.variation dd,
.wc-block-mini-cart__drawer dl.variation dd {
    font-size: 11px;
    color: #888 !important;
    margin: 0;
}

/* Checkout order review: align SKU/UOM label next to value */
.woocommerce-checkout-review-order dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 4px;
    margin: 3px 0 0;
}
.woocommerce-checkout-review-order dl.variation dt {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-gray);
    margin: 0;
}
.woocommerce-checkout-review-order dl.variation dd {
    font-size: 11px;
    color: var(--text-gray);
    margin: 0;
}

.variation-SKU p {
    line-height: unset;
}

/* ---- Empty Cart button ---- */
.areco-empty-cart-btn {
    display: block;
    margin: 12px 0 0 auto;
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    border-radius: 3px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    margin: 10px;
    float: right;
}
.areco-empty-cart-btn:hover:not(:disabled) {
    border-color: #c0392b;
    color: #c0392b;
}
.areco-empty-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ── Checkout address selector ───────────────────────────────────────────── */
.is-ab-ship-to {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}
.is-ab-ship-to__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-gray);
    margin: 0 0 4px;
}
.is-ab-ship-to__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--areco-body);
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
}
.is-ab-ship-to__item:hover { border-color: #bbb; }
.is-ab-ship-to__item:has(input:checked) {
    border-color: var(--areco-blue);
    background: rgba(0,174,239,.04);
}
.is-ab-ship-to__item input[type="radio"] {
    margin: 3px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}
 div.woocommerce .is-ab-ship-to__item input[type="radio"]:focus {
    outline: none !important;
}
.is-ab-ship-to__item span { flex: 1; }
.is-ab-ship-to__item--new { border-style: dashed; }
.is-ab-ship-to__item--new span { color: var(--theme-link-initial-color); font-weight: 400; font-size:15px;}
.woocommerce-shipping-fields span.error-message {display: none !important;}
