/* ==========================================================================
   Terea Express ? WooCommerce overrides
   ========================================================================== */

/* Shop wrapper */
.terea-wc-container { padding-top: 16px; padding-bottom: 64px; }

/* Archive grid */
.terea-shop-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    margin-top: 24px;
}
.terea-shop-sidebar .widget {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.terea-shop-sidebar .widget-title {
    font-family: var(--tx-font-heading);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tx-primary);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tx-border);
}
.terea-shop-sidebar .widget-title svg { color: var(--tx-accent); flex-shrink: 0; }

.terea-filter-list,
.terea-filter-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.terea-filter-list { display: flex; flex-direction: column; gap: 2px; }
.terea-filter-sublist {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 6px 14px;
    padding-left: 14px;
    border-left: 1.5px solid var(--tx-border);
}
.terea-filter-list > li > a,
.terea-filter-sublist > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tx-text);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.terea-filter-list > li > a:hover,
.terea-filter-sublist > li > a:hover {
    background: var(--tx-bg-soft);
    color: var(--tx-accent-2);
}
.terea-filter-list > li.is-active > a,
.terea-filter-sublist > li.is-active > a {
    background: var(--tx-primary);
    color: #fff;
    font-weight: 700;
}
.terea-filter-list > li.is-active > a .terea-filter-count,
.terea-filter-sublist > li.is-active > a .terea-filter-count {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.terea-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    background: var(--tx-bg-soft);
    color: var(--tx-muted);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Reassurance panel at bottom of sidebar */
.terea-filter-reassurance {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}
.terea-reassurance-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}
.terea-reassurance-item:last-child { border-bottom: 0; }
.terea-reassurance-item svg {
    color: var(--tx-accent);
    flex-shrink: 0;
    margin-top: 2px;
}
.terea-reassurance-item strong {
    display: block;
    color: var(--tx-primary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}
.terea-reassurance-item span {
    color: var(--tx-muted);
    font-size: 12px;
    line-height: 1.4;
}

.woocommerce-products-header { margin-bottom: 8px; }
.woocommerce-products-title { color: var(--tx-primary); }

/* Toolbar */
.woocommerce-result-count, .woocommerce-ordering { margin-bottom: 16px; font-size: 14px; color: var(--tx-muted); }
.woocommerce-ordering select { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--tx-border); }

/* Single product */
.terea-single-product-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    margin-top: 16px;
}
.terea-single-gallery { background: var(--tx-bg-soft); border-radius: var(--tx-radius-lg); padding: 24px; }
.terea-single-cats {
    font-size: 13px;
    color: var(--tx-accent-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 8px;
}
.terea-single-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 8px;
    color: var(--tx-primary);
}
.terea-single-rating { color: var(--tx-accent); margin-bottom: 16px; }
.terea-single-price {
    font-size: 1.6rem;
    color: var(--tx-primary);
    margin: 12px 0;
    font-weight: 700;
}
.terea-single-price del { color: var(--tx-muted); margin-right: 8px; }
.terea-single-short { color: var(--tx-muted); margin-bottom: 24px; }
.single_add_to_cart_button {
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--tx-radius);
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--tx-transition);
    box-shadow: 0 6px 18px -8px rgba(15, 118, 110, 0.55);
}
.single_add_to_cart_button:hover {
    background: linear-gradient(135deg, var(--tx-primary-2) 0%, var(--tx-primary-3) 100%);
    box-shadow: 0 10px 22px -8px rgba(15, 118, 110, 0.65);
    transform: translateY(-1px);
}
.terea-single-summary .quantity { margin-bottom: 16px; }
.terea-single-summary .quantity input {
    width: 80px;
    padding: 10px;
    border: 1px solid var(--tx-border);
    border-radius: 8px;
    font-size: 16px;
}

/* Tabs */
.woocommerce-tabs {
    margin-top: 48px;
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 24px;
}
.woocommerce-tabs ul.tabs {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--tx-border);
}
.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--tx-muted);
    border-bottom: 2px solid transparent;
}
.woocommerce-tabs ul.tabs li.active a {
    color: var(--tx-primary);
    border-color: var(--tx-accent);
}

/* Related / upsells */
.related.products, .upsells.products {
    margin-top: 48px;
}
.related h2, .upsells h2 {
    text-align: center;
    color: var(--tx-primary);
    margin-bottom: 24px;
}

/* Cart */
.terea-cart-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    margin-top: 24px;
}
.terea-cart-form, .terea-cart-totals {
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 24px;
}
.woocommerce-cart-form__contents {
    width: 100%;
    border-collapse: collapse;
}
.woocommerce-cart-form__contents th {
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--tx-muted);
    padding: 8px 12px;
    border-bottom: 1px solid var(--tx-border);
}
.woocommerce-cart-form__contents td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--tx-border);
    vertical-align: middle;
}
.product-remove .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--tx-bg-soft);
    color: var(--tx-danger);
    font-size: 18px;
    line-height: 1;
}
.product-thumbnail img { max-width: 80px; border-radius: 6px; }
.product-name a { font-weight: 600; color: var(--tx-primary); }
.product-quantity input.qty { width: 70px; padding: 6px; border: 1px solid var(--tx-border); border-radius: 6px; }
.cart_totals table { width: 100%; }
.cart_totals th, .cart_totals td { padding: 8px 0; }
.cart_totals th { text-align: left; color: var(--tx-muted); font-weight: 500; }
.cart_totals td { text-align: right; font-weight: 600; }
.cart_totals .order-total th, .cart_totals .order-total td { font-size: 18px; color: var(--tx-primary); }
.checkout-button {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: var(--tx-accent);
    color: #fff;
    text-align: center;
    border-radius: var(--tx-radius);
    font-weight: 600;
}
.checkout-button:hover { background: var(--tx-accent-2); }
.coupon input { padding: 8px 12px; border: 1px solid var(--tx-border); border-radius: 6px; }

/* Checkout */
.terea-checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    margin-top: 24px;
}
.terea-checkout-form, .terea-checkout-sidebar {
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 24px;
}
.woocommerce-checkout-review-order { margin-top: 24px; }
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { padding: 10px 0; }
.woocommerce form .form-row label { font-weight: 600; color: var(--tx-primary); }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    padding: 10px 12px;
    border: 1px solid var(--tx-border);
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
}
.checkout-payment-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tx-border);
    font-size: 14px;
    color: var(--tx-muted);
}
.checkout-payment-info ul {
    list-style: disc;
    padding-left: 18px;
    margin: 8px 0 0;
}
#payment { margin-top: 16px; }

/* ==========================================================================
   My Account ? Terea Express Custom Styles
   ========================================================================== */

/* Wrapper */
.terea-myaccount-wrapper {
    padding-top: 24px;
    padding-bottom: 64px;
}
.terea-myaccount-main .site-main {
    padding: 0;
}

/* Grid layout */
.terea-myaccount-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 24px;
}

/* ---- Account Sidebar ---- */
.terea-account-sidebar {
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    overflow: hidden;
    position: sticky;
    top: 88px;
    box-shadow: var(--tx-shadow);
}

.terea-account-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 20px;
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.terea-account-avatar {
    flex-shrink: 0;
}

.terea-account-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
    display: block;
}

.terea-account-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.terea-account-greeting {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.terea-account-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Account navigation menu */
.woocommerce-MyAccount-navigation {
    padding: 8px 0 16px;
}

.terea-account-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.terea-account-menu-item {
    margin: 0;
}

.terea-account-menu-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tx-text);
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.terea-account-menu-item a:hover {
    background: var(--tx-bg-soft);
    color: var(--tx-primary);
    border-left-color: var(--tx-border);
}

.terea-account-menu-item.is-active a,
.terea-account-menu-item a[aria-current="page"] {
    background: rgba(245, 158, 11, 0.08);
    color: var(--tx-accent-2);
    font-weight: 600;
    border-left-color: var(--tx-accent);
}

.terea-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: currentColor;
    opacity: 0.6;
    width: 20px;
    height: 20px;
}

.terea-account-menu-item.is-active .terea-menu-icon,
.terea-account-menu-item a[aria-current="page"] .terea-menu-icon {
    opacity: 1;
    color: var(--tx-accent-2);
}

.terea-menu-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terea-logout-link {
    color: var(--tx-danger) !important;
}

.terea-logout-link .terea-menu-icon { color: var(--tx-danger); }

.terea-logout-link:hover {
    background: rgba(220, 38, 38, 0.06) !important;
    border-left-color: var(--tx-danger) !important;
}

/* Divider before logout */
.terea-account-menu li:last-child { border-top: 1px solid var(--tx-border); margin-top: 6px; }

/* ---- Account Content ---- */
.woocommerce-MyAccount-content {
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 28px;
    box-shadow: var(--tx-shadow);
}

/* Page title header inside content area */
.terea-account-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--tx-border);
}

.terea-account-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0;
}

.terea-account-page-desc {
    font-size: 13px;
    color: var(--tx-muted);
    margin: -16px 0 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--tx-border);
}

/* ---- Dashboard ---- */
.terea-dashboard {}

.terea-dashboard-welcome {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.04));
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--tx-radius);
    margin-bottom: 24px;
}

.terea-dashboard-welcome-icon {
    width: 48px;
    height: 48px;
    background: var(--tx-accent);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terea-dashboard-welcome-text { flex: 1; }

.terea-dashboard-greeting {
    font-size: 15px;
    margin: 0 0 4px;
    color: var(--tx-primary);
}

.terea-dashboard-greeting strong { color: var(--tx-primary); }

.terea-logout-inline {
    color: var(--tx-danger);
    font-size: 13px;
    margin-left: 8px;
    font-weight: 500;
}

.terea-logout-inline:hover { text-decoration: underline; }

.terea-dashboard-subtext {
    font-size: 13px;
    color: var(--tx-muted);
    margin: 0;
    line-height: 1.6;
}

.terea-dashboard-subtext a { color: var(--tx-accent-2); text-decoration: underline; }

/* Stats cards */
.terea-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}

.terea-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.terea-stat-card--action {
    text-decoration: none;
    cursor: pointer;
}

.terea-stat-card--action:hover {
    border-color: var(--tx-accent);
    box-shadow: 0 4px 12px rgba(245,158,11,0.15), 0 0 0 3px rgba(245,158,11,0.08);
    transform: translateY(-1px);
}

.terea-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(245,158,11,0.1);
    color: var(--tx-accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terea-stat-card--action .terea-stat-icon {
    background: var(--tx-bg-soft);
    color: var(--tx-primary);
}

.terea-stat-card--action:hover .terea-stat-icon {
    background: rgba(245,158,11,0.12);
    color: var(--tx-accent-2);
}

.terea-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.terea-stat-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--tx-primary);
    line-height: 1.1;
}

.terea-stat-label {
    font-size: 13px;
    color: var(--tx-muted);
    font-weight: 500;
}

.terea-stat-arrow {
    font-size: 18px;
    color: var(--tx-muted);
    margin-left: auto;
    flex-shrink: 0;
}

.terea-stat-card--action:hover .terea-stat-arrow { color: var(--tx-accent-2); }

/* ---- Orders ---- */
.terea-orders-section {}

.terea-orders-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    margin: 16px 0 24px;
}

.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.woocommerce-orders-table thead tr {
    background: var(--tx-bg-soft);
    border-bottom: 2px solid var(--tx-border);
}

.woocommerce-orders-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tx-muted);
    white-space: nowrap;
}

.woocommerce-orders-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--tx-border);
    vertical-align: middle;
    color: var(--tx-text);
}

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

.woocommerce-orders-table tbody tr:hover td {
    background: rgba(245,158,11,0.03);
}

.terea-order-number {
    font-weight: 700;
    color: var(--tx-primary);
    text-decoration: none;
}

.terea-order-number:hover { color: var(--tx-accent-2); text-decoration: underline; }

.terea-order-total { font-weight: 600; color: var(--tx-primary); }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge--pending {
    background: rgba(107,114,128,0.1);
    color: #6b7280;
}
.status-badge--processing {
    background: rgba(59,130,246,0.1);
    color: #2563eb;
}
.status-badge--onhold {
    background: rgba(245,158,11,0.12);
    color: var(--tx-accent-2);
}
.status-badge--completed {
    background: rgba(22,163,74,0.1);
    color: var(--tx-success);
}
.status-badge--cancelled {
    background: rgba(220,38,38,0.08);
    color: var(--tx-danger);
}
.status-badge--refunded {
    background: rgba(107,114,128,0.1);
    color: #6b7280;
}
.status-badge--failed {
    background: rgba(220,38,38,0.08);
    color: var(--tx-danger);
}

/* Order detail */
.terea-order-detail-meta-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
}

.terea-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-text);
}

.terea-meta-sep {
    color: var(--tx-border);
    font-weight: 300;
}

.terea-order-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    margin-bottom: 24px;
}

.terea-order-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0 0 4px;
}

.terea-order-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--tx-muted);
    margin: 0;
}

.terea-order-number { font-weight: 700; color: var(--tx-primary); font-size: 15px; }

.terea-order-notes {
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.terea-order-notes-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woocommerce-OrderUpdates { padding: 0; margin: 0; list-style: none; }

.woocommerce-OrderUpdate {
    padding: 12px 0;
    border-bottom: 1px solid var(--tx-border);
}

.woocommerce-OrderUpdate:last-child { border-bottom: none; }

.woocommerce-OrderUpdate-meta {
    font-size: 12px;
    color: var(--tx-muted);
    margin: 0 0 6px;
    font-weight: 600;
}

.woocommerce-OrderUpdate-description { font-size: 14px; color: var(--tx-text); margin: 0; }

/* ---- Buttons ---- */
.terea-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--tx-radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--tx-transition);
    white-space: nowrap;
}

.terea-btn--primary {
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(15, 118, 110, 0.55);
}
.terea-btn--primary:hover {
    background: linear-gradient(135deg, var(--tx-primary-2) 0%, var(--tx-primary-3) 100%);
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(15, 118, 110, 0.65);
}

.terea-btn--outline {
    background: transparent;
    border: 1px solid var(--tx-border);
    color: var(--tx-primary);
}

.terea-btn--outline:hover {
    border-color: var(--tx-primary);
    background: var(--tx-primary);
    color: #fff;
}

.terea-btn--danger {
    background: transparent;
    border: 1px solid rgba(220,38,38,0.3);
    color: var(--tx-danger);
}

.terea-btn--danger:hover {
    background: var(--tx-danger);
    color: #fff;
    border-color: var(--tx-danger);
}

.terea-btn--sm { padding: 7px 14px; font-size: 13px; }

.woocommerce-button.button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--tx-radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    background: var(--tx-primary);
    color: #fff;
    border: none;
    transition: var(--tx-transition);
    cursor: pointer;
}

.woocommerce-button.button:hover {
    background: var(--tx-accent);
    color: #fff;
}

.woocommerce-pagination {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ---- Empty states ---- */
.terea-empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
}

.terea-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(245,158,11,0.1);
    color: var(--tx-accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.terea-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0 0 8px;
}

.terea-empty-desc {
    color: var(--tx-muted);
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 24px;
}

/* ---- Forms ---- */
.terea-form-card {
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    overflow: hidden;
}

.terea-form-card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--tx-border);
    background: var(--tx-bg-soft);
    display: flex;
    align-items: center;
    gap: 14px;
}

.terea-form-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(245,158,11,0.1);
    color: var(--tx-accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terea-form-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0;
}

.terea-form-card-subtitle {
    font-size: 13px;
    color: var(--tx-muted);
    margin: 4px 0 0;
}

.terea-form-card form {
    padding: 24px 28px;
}

.woocommerce form .form-row {
    margin-bottom: 18px;
}

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

.woocommerce form .form-row .required { color: var(--tx-danger); }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row input[type="email"],
.woocommerce form .form-row input[type="password"],
.woocommerce form .form-row input[type="text"],
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--tx-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--tx-text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.woocommerce form .form-row input[aria-invalid="true"],
.woocommerce form .form-row textarea[aria-invalid="true"] {
    border-color: var(--tx-danger);
}

.woocommerce form .form-row input[disabled] {
    background: var(--tx-bg-soft);
    cursor: not-allowed;
}

.terea-form-hint {
    display: block;
    font-size: 12px;
    color: var(--tx-muted);
    margin-top: 4px;
}

.woocommerce form fieldset {
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    padding: 20px;
    margin: 8px 0 24px;
}

.woocommerce form fieldset legend {
    font-size: 13px;
    font-weight: 700;
    color: var(--tx-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 8px;
}

.terea-form-divider {
    text-align: center;
    position: relative;
    margin: 8px 0 24px;
    border-top: 1px solid var(--tx-border);
}

.terea-form-divider span {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tx-bg-card);
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tx-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.terea-form-grid {
    display: grid;
    gap: 16px;
}

.terea-form-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.terea-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

/* ---- Section headers ---- */
.terea-section-header {
    margin-bottom: 20px;
}

.terea-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0 0 4px;
}

/* ---- Orders pagination ---- */
.terea-orders-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

/* ---- Payment methods ---- */
.terea-payment-methods-section { margin-bottom: 24px; }

.terea-payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terea-payment-method-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    transition: var(--tx-transition);
}

.terea-payment-method-card.is-default {
    border-color: var(--tx-accent);
    background: rgba(245,158,11,0.03);
}

.terea-payment-method-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.terea-payment-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--tx-bg-soft);
    color: var(--tx-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terea-payment-method-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.terea-payment-method-name { font-size: 14px; font-weight: 600; color: var(--tx-primary); }

.terea-payment-method-default-badge {
    display: inline-block;
    background: var(--tx-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.terea-payment-method-expires { font-size: 12px; color: var(--tx-muted); }

.terea-payment-method-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.terea-add-payment-method { margin-top: 16px; }

/* ---- Downloads ---- */
.terea-downloads-section { margin-bottom: 8px; }

.terea-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terea-download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
}

.terea-download-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(22,163,74,0.1);
    color: var(--tx-success);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.terea-download-name { font-size: 14px; font-weight: 600; color: var(--tx-primary); }

.terea-download-remaining { font-size: 12px; color: var(--tx-muted); }

/* ---- Addresses ---- */
.terea-addresses-section {}

.terea-addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.terea-address-card {
    background: var(--tx-bg-card);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    overflow: hidden;
}

.terea-address-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--tx-bg-soft);
    border-bottom: 1px solid var(--tx-border);
}

.terea-address-card-icon {
    color: var(--tx-accent-2);
    display: flex;
    align-items: center;
}

.terea-address-card-title {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.terea-address-edit-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-accent-2);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(245,158,11,0.3);
    transition: var(--tx-transition);
}

.terea-address-edit-btn:hover {
    background: var(--tx-accent);
    border-color: var(--tx-accent);
    color: #fff;
}

.terea-address-card-body { padding: 18px 20px; }

.terea-address-display {
    font-size: 14px;
    color: var(--tx-text);
    line-height: 1.7;
}

.terea-address-empty {
    font-size: 14px;
    color: var(--tx-muted);
    font-style: italic;
    margin: 0;
}

/* ---- WooCommerce notices (styled globally) ---- */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--tx-radius);
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid;
}

.woocommerce-message {
    background: rgba(22,163,74,0.08);
    border-color: rgba(22,163,74,0.3);
    color: var(--tx-success);
}

.woocommerce-error {
    background: rgba(220,38,38,0.08);
    border-color: rgba(220,38,38,0.3);
    color: var(--tx-danger);
}

.woocommerce-info {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.3);
    color: #2563eb;
}

.woocommerce-error li { list-style: none; }

/* ==========================================================================
   Responsive ? My Account
   ========================================================================== */
@media (max-width: 992px) {
    .terea-myaccount-grid {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }
    .terea-addresses-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .terea-myaccount-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .terea-account-sidebar { position: static; }
    .woocommerce-MyAccount-content { padding: 20px; }
    .terea-form-card form { padding: 20px; }
    .terea-form-card-header { padding: 18px 20px; }
    .terea-form-grid--2 { grid-template-columns: 1fr; }
    .terea-dashboard-stats { grid-template-columns: 1fr 1fr; }
    .terea-payment-method-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .terea-payment-method-actions { width: 100%; }
    .woocommerce-orders-table { font-size: 13px; }
    .woocommerce-orders-table th,
    .woocommerce-orders-table td { padding: 10px 12px; }
}

@media (max-width: 576px) {
    .terea-dashboard-stats { grid-template-columns: 1fr; }
    .terea-myaccount-wrapper { padding-bottom: 48px; }
}

/* ==========================================================================
   UPGRADE 1 ? Shop / Category archive toolbar + grid
   ========================================================================== */
.terea-wc-container {
    padding-top: 8px;
    padding-bottom: 80px;
    background: var(--tx-bg-soft);
    min-height: 60vh;
}
.terea-wc-container > .container { position: relative; }

.terea-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 22px;
    margin-top: 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    position: relative;
}
.terea-shop-toolbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 2px;
    background: linear-gradient(90deg, var(--tx-primary) 0%, var(--tx-accent) 100%);
    border-radius: 2px;
}
.terea-shop-grid .woocommerce-breadcrumb {
    margin-top: 18px;
}

/* Breadcrumb polish ? applies to cart, checkout, shop, etc. */
.woocommerce-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 4px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--tx-muted);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.woocommerce-breadcrumb a {
    color: var(--tx-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.woocommerce-breadcrumb a:hover { color: var(--tx-accent-2); }
.woocommerce-breadcrumb .separator {
    color: var(--tx-muted);
    opacity: 0.6;
    font-size: 12px;
}
.terea-shop-toolbar .woocommerce-result-count {
    margin: 0;
    font-size: 13.5px;
    color: var(--tx-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.terea-shop-toolbar .woocommerce-result-count::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--tx-primary);
    border-radius: 50%;
    flex-shrink: 0;
}
.terea-shop-toolbar .woocommerce-result-count strong {
    color: var(--tx-primary);
    font-weight: 700;
}
.terea-shop-toolbar .woocommerce-ordering {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.terea-shop-toolbar .woocommerce-ordering::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' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><line x1='3' y1='6' x2='21' y2='6'/><line x1='3' y1='12' x2='15' y2='12'/><line x1='3' y1='18' x2='9' y2='18'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}
.terea-shop-toolbar .woocommerce-ordering select {
    padding: 10px 36px 10px 14px;
    border: 1.5px solid rgba(15, 118, 110, 0.2);
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 36px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tx-text);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    min-width: 180px;
}
.terea-shop-toolbar .woocommerce-ordering select:hover,
.terea-shop-toolbar .woocommerce-ordering select:focus {
    border-color: var(--tx-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    background-color: rgba(15, 118, 110, 0.03);
}

.terea-shop-sidebar .widget {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.terea-shop-sidebar .widget-title,
.terea-shop-sidebar .woocommerce-widget-title {
    font-family: var(--tx-font-heading) !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--tx-text) !important;
    margin: 0 0 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--tx-border);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.terea-shop-sidebar .widget-title::before,
.terea-shop-sidebar .woocommerce-widget-title::before {
    content: "";
    width: 4px;
    height: 14px;
    background: var(--tx-primary);
    border-radius: 2px;
}
.terea-shop-sidebar ul { list-style: none; margin: 0; padding: 0; }
.terea-shop-sidebar ul li { padding: 4px 0; }
.terea-shop-sidebar ul a {
    color: var(--tx-text) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    transition: color 0.15s ease, padding-left 0.2s ease;
    border-radius: 4px;
}
.terea-shop-sidebar ul a:hover {
    color: var(--tx-primary) !important;
    padding-left: 6px;
}
.terea-shop-sidebar ul li.current-cat > a,
.terea-shop-sidebar ul li.is-active > a {
    color: var(--tx-primary) !important;
    font-weight: 700;
}
.terea-shop-sidebar .count,
.terea-filter-count {
    background: var(--tx-bg-soft);
    color: var(--tx-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    flex-shrink: 0;
}
.terea-filter-rating-list .terea-filter-rating-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 14px;
    line-height: 1;
}
.terea-filter-star {
    color: #e2e8f0;
}
.terea-filter-star.is-filled {
    color: #f59e0b;
}
.terea-filter-widget ul.terea-filter-list > li > a {
    padding: 7px 10px !important;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}
.terea-filter-widget ul.terea-filter-list > li > a:hover {
    background: rgba(15, 118, 110, 0.06);
    padding-left: 12px !important;
}
.terea-filter-widget ul.terea-filter-list > li.is-active > a {
    background: rgba(15, 118, 110, 0.08);
}

.woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item {
    padding: 4px 0 !important;
}
.woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item a {
    padding: 6px 0 !important;
}

.terea-shop-sidebar .price_slider_wrapper .ui-slider {
    background: var(--tx-border) !important;
    border-radius: 4px;
    height: 4px;
}
.terea-shop-sidebar .price_slider_wrapper .ui-slider-range {
    background: var(--tx-accent) !important;
}
.terea-shop-sidebar .price_slider_wrapper .ui-slider-handle {
    background: var(--tx-accent) !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4) !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    top: -7px !important;
}
.terea-shop-sidebar .price_slider_wrapper .button {
    background: var(--tx-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}
.terea-price-range { display: flex; flex-direction: column; gap: 10px; }
.terea-price-range-fields { display: flex; align-items: center; gap: 8px; }
.terea-price-range-fields label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--tx-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.terea-price-range-fields input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--tx-border);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: var(--tx-text);
}
.terea-price-range-fields input[type="number"]:focus { outline: none; border-color: var(--tx-primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.terea-price-range-sep { color: var(--tx-muted); font-weight: 700; padding-top: 18px; }
.terea-price-range-submit {
    background: var(--tx-primary);
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.terea-price-range-submit:hover { background: var(--tx-primary-2); }

/* Product grid */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.terea-shop-content ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
}
@media (max-width: 1180px) {
    .terea-shop-content ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
    .terea-shop-content ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
    .terea-shop-content ul.products { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}
ul.products { align-items: stretch !important; }
ul.products > li,
ul.products > .terea-product-card,
ul.products > li.product,
ul.products > article.terea-product-card {
    background: #ffffff;
    border: 1.5px solid #e8eaed;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    list-style: none !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    position: relative;
    display: flex !important;
    flex-direction: column;
}
ul.products > li { min-height: unset; }
ul.products { align-items: stretch !important; }

ul.products > li:hover,
ul.products > .terea-product-card:hover,
ul.products > li.product:hover,
ul.products > article.terea-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.35);
}

/* Sale / OnSale badge ? red for urgency */
.woocommerce span.onsale,
.woocommerce ul.products li span.onsale,
ul.products li.product span.onsale {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

/* Product image in shop grid */
ul.products .terea-product-card-media,
ul.products > li .attachment-woocommerce_thumbnail,
ul.products > li img,
ul.products > .terea-product-card img,
ul.products li.product a img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: block !important;
    margin: 0 !important;
}
ul.products li:hover .attachment-woocommerce_thumbnail,
ul.products li:hover img {
    transform: scale(1.04) !important;
    filter: brightness(1.04) !important;
}

/* Pagination */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
.woocommerce-pagination ul {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 42px;
    height: 44px;
    padding: 0 16px;
    background: #fff;
    color: var(--tx-text);
    border: 1.5px solid var(--tx-border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    line-height: 1;
}
.woocommerce-pagination .page-numbers:hover {
    border-color: var(--tx-primary);
    color: var(--tx-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.12);
}
.woocommerce-pagination .page-numbers.current {
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    border-color: var(--tx-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.28);
}
.woocommerce-pagination .page-numbers.current:hover {
    transform: none;
    color: #fff;
}
.woocommerce-pagination .page-numbers.prev,
.woocommerce-pagination .page-numbers.next {
    padding: 0 18px;
    color: var(--tx-primary);
    background: rgba(15, 118, 110, 0.05);
    border-color: rgba(15, 118, 110, 0.2);
}
.woocommerce-pagination .page-numbers.prev:hover,
.woocommerce-pagination .page-numbers.next:hover {
    background: var(--tx-primary);
    color: #fff;
    border-color: var(--tx-primary);
}
.woocommerce-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
    color: var(--tx-muted);
    padding: 0 4px;
    min-width: 24px;
}
.woocommerce-pagination .page-numbers.dots:hover {
    transform: none;
    color: var(--tx-muted);
}
@media (max-width: 520px) {
    .woocommerce-pagination .page-numbers {
        min-width: 36px;
        height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }
    .woocommerce-pagination .page-numbers.prev span,
    .woocommerce-pagination .page-numbers.next span {
        display: none;
    }
}

/* ==========================================================================
   Archive (shop / category) hero banner
   ========================================================================== */
.terea-archive-banner {
    position: relative;
    margin-top: 24px;
    padding: 0;
    border-radius: var(--tx-radius-lg);
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(15, 23, 42, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    box-shadow: 0 14px 40px -20px rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: stretch;
}
.terea-archive-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
        linear-gradient(135deg, transparent 40%, rgba(245, 158, 11, 0.06) 100%);
    pointer-events: none;
    z-index: 1;
}
.terea-archive-banner-inner {
    position: relative;
    padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 56px);
    max-width: 760px;
    flex: 1 1 auto;
    z-index: 2;
}
.terea-archive-banner-media {
    position: relative;
    width: clamp(180px, 32%, 360px);
    flex-shrink: 0;
    align-self: stretch;
    overflow: hidden;
    z-index: 2;
}
.terea-archive-banner-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.terea-archive-banner-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.6) 0%, transparent 40%);
    z-index: 1;
    pointer-events: none;
}
@media (max-width: 720px) {
    .terea-archive-banner { flex-direction: column; }
    .terea-archive-banner-media {
        width: 100%;
        height: 200px;
        order: 2;
    }
}
.terea-archive-banner-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--tx-accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 18px;
}
.terea-archive-banner-eyebrow svg { color: var(--tx-accent); }
.terea-archive-banner-title {
    font-family: var(--tx-font-heading);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.015em;
}
.terea-archive-banner-subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.65;
    margin: 0 0 22px;
    max-width: 600px;
}
.terea-archive-banner-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.terea-archive-banner-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}
.terea-archive-banner-chip svg { color: var(--tx-accent); }
@media (max-width: 600px) {
    .terea-archive-banner-inner { padding: 28px 22px; }
}

/* Quick category navigation chips below the banner */
.terea-archive-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
}
.terea-archive-subnav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.terea-archive-subnav a:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}
.terea-archive-subnav a.is-current {
    background: var(--tx-accent);
    border-color: var(--tx-accent);
    color: #0f172a;
}
.terea-subnav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
}
.terea-archive-subnav a.is-current .terea-subnav-count {
    background: rgba(15, 23, 42, 0.18);
    color: #0f172a;
}

/* Category description block above products */
.term-description {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 18px 20px;
    margin: 24px 0;
    color: var(--tx-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* ==========================================================================
   UPGRADE 2 ? Single product page polish
   ========================================================================== */
.terea-single-product {
    padding-bottom: 64px;
}
.terea-single-product-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    margin-top: 28px;
    align-items: start;
}
.terea-single-gallery {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 28px;
    position: sticky;
    top: 100px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.terea-single-gallery .woocommerce-product-gallery__image { display: block; }
.terea-single-gallery .woocommerce-product-gallery__image img {
    border-radius: var(--tx-radius);
    width: 100%;
    height: auto;
}
.terea-single-gallery .flex-control-thumbs {
    list-style: none !important;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0 0;
    padding: 0 !important;
}
.terea-single-gallery .flex-control-thumbs li { margin: 0 !important; padding: 0 !important; }
.terea-single-gallery .flex-control-thumbs img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 2px solid var(--tx-border);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}
.terea-single-gallery .flex-control-thumbs img:hover { opacity: 1; }
.terea-single-gallery .flex-control-thumbs li img.flex-active {
    opacity: 1;
    border-color: var(--tx-accent);
}

.terea-single-cats {
    display: inline-block;
    font-size: 12px;
    color: var(--tx-accent-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 4px 12px;
    background: rgba(245,158,11,0.1);
    border-radius: 999px;
}
.terea-single-title {
    font-family: var(--tx-font-heading);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    margin: 0 0 12px;
    color: var(--tx-primary);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.terea-single-rating {
    color: var(--tx-accent);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.terea-single-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-family: var(--tx-font-heading);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    color: var(--tx-primary);
    margin: 16px 0 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.terea-single-price del {
    color: var(--tx-muted);
    margin-right: 0;
    font-size: 0.7em;
    font-weight: 600;
}
.terea-single-price ins { background: none; text-decoration: none; }
.terea-single-price .amount { color: inherit; }
.terea-single-short {
    color: var(--tx-muted);
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.7;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--tx-border);
}
.terea-single-cart-form {
    background: linear-gradient(180deg, #fef9f0 0%, #fff 100%);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--tx-radius-lg);
    padding: 22px;
    margin-bottom: 24px;
}
.terea-single-summary .quantity {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.terea-single-summary .quantity input {
    width: 90px !important;
    padding: 12px 14px !important;
    border: 1.5px solid var(--tx-border) !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center;
}
.terea-single-summary .quantity label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-primary);
    margin-right: 8px;
}
.single_add_to_cart_button {
    width: 100%;
    background: var(--tx-accent) !important;
    color: #fff !important;
    padding: 16px 28px !important;
    border-radius: var(--tx-radius) !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 8px !important;
    box-shadow: 0 6px 18px -8px rgba(245,158,11,0.6);
}
.single_add_to_cart_button:hover {
    background: var(--tx-accent-2) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(217,119,6,0.7) !important;
}
.single_add_to_cart_button:active { transform: translateY(0); }
.single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}
.single_add_to_cart_button.loading::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: terea-spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes terea-spin { to { transform: rotate(360deg); } }

/* Product meta block (SKU, categories, tags) */
.terea-single-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0 0;
    border-top: 1px solid var(--tx-border);
    color: var(--tx-muted);
    font-size: 13px;
}
.terea-single-meta .posted_in,
.terea-single-meta .tagged_as {
    display: inline-block;
    margin-right: 8px;
}
.terea-single-meta .posted_in a,
.terea-single-meta .tagged_as a {
    color: var(--tx-accent-2);
    font-weight: 600;
    transition: color 0.15s ease;
}
.terea-single-meta .posted_in a:hover,
.terea-single-meta .tagged_as a:hover {
    color: var(--tx-primary);
    text-decoration: underline;
}
.sku_wrapper { color: var(--tx-muted); font-size: 13px; }
.sku_wrapper .sku {
    color: var(--tx-primary);
    font-weight: 600;
    background: var(--tx-bg-soft);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
    font-family: 'JetBrains Mono', monospace;
}

/* Trust row in product summary */
.terea-single-trust {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 24px;
    padding: 18px 0 0;
    border-top: 1px solid var(--tx-border);
}
.terea-single-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    font-size: 12px;
    color: var(--tx-text);
    font-weight: 600;
    line-height: 1.3;
}
.terea-single-trust-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--tx-accent);
}

/* Tabs */
.woocommerce-tabs {
    margin-top: 56px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.woocommerce-tabs ul.tabs {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--tx-bg-soft);
    border-bottom: 1px solid var(--tx-border);
    overflow-x: auto;
    flex-wrap: nowrap;
}
.woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: block !important;
    float: none !important;
}
.woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 16px 24px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: var(--tx-muted) !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    margin: 0 !important;
    background: transparent !important;
}
.woocommerce-tabs ul.tabs li a:hover { color: var(--tx-primary) !important; }
.woocommerce-tabs ul.tabs li.active a {
    color: var(--tx-primary) !important;
    border-color: var(--tx-accent) !important;
    background: #fff !important;
    margin-bottom: -1px !important;
}
.woocommerce-tabs .panel { padding: 28px; }
.woocommerce-tabs .panel h2 { font-size: 18px; margin-top: 0; }
.woocommerce-tabs .panel p,
.woocommerce-tabs .panel li { color: var(--tx-text); line-height: 1.7; }

/* Related/upsells */
.related.products, .upsells.products {
    margin-top: 56px;
}
.related.products > h2,
.upsells.products > h2 {
    text-align: center;
    color: var(--tx-primary);
    margin-bottom: 28px;
    font-family: var(--tx-font-heading);
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Reviews */
#reviews #comments h2,
#reviews .comment-reply-title {
    font-family: var(--tx-font-heading);
    color: var(--tx-primary);
    font-weight: 800;
}
#reviews .commentlist {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 24px;
}
#reviews .commentlist li {
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    padding: 18px 20px;
    margin-bottom: 12px;
}
#reviews .comment-text p { margin-top: 8px; }
#review_form {
    background: var(--tx-bg-soft);
    padding: 20px;
    border-radius: var(--tx-radius);
    border: 1px solid var(--tx-border);
}
#review_form .form-submit .submit {
    background: var(--tx-accent) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer;
}

/* Stock badge */
.stock.in-stock {
    display: inline-block;
    background: rgba(22,163,74,0.1);
    color: var(--tx-success);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}
.stock.out-of-stock {
    display: inline-block;
    background: rgba(220,38,38,0.1);
    color: var(--tx-danger);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}

/* Variable product swatches */
.terea-single-summary .variations {
    margin-bottom: 16px;
    width: 100%;
}
.terea-single-summary .variations td { padding: 6px 0; vertical-align: middle; }
.terea-single-summary .variations label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-primary);
    margin-bottom: 0;
}
.terea-single-summary .variations select {
    padding: 10px 14px;
    border: 1.5px solid var(--tx-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}
.terea-single-summary .reset_variations {
    color: var(--tx-muted);
    text-decoration: underline;
    font-size: 13px;
    margin-left: 10px;
}

/* ==========================================================================
   UPGRADE 3 ? Cart page polish
   ========================================================================== */
.cart-main .terea-wc-container { background: var(--tx-bg); }

/* Cart page header (eyebrow + title) */
.terea-cart-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin: 8px 0 20px;
    padding: 22px 26px;
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-3) 100%);
    border-radius: var(--tx-radius-lg);
    color: #fff;
    box-shadow: 0 14px 40px -20px rgba(15, 23, 42, 0.55);
    position: relative;
    overflow: hidden;
}
.terea-cart-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 50%, rgba(245, 158, 11, 0.18) 0%, transparent 60%),
        radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.18) 0%, transparent 50%);
    pointer-events: none;
}
.terea-cart-page-header-left {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.terea-cart-page-header-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tx-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.terea-cart-page-header-eyebrow svg { color: var(--tx-accent); }
.terea-cart-page-header-title {
    font-family: var(--tx-font-heading);
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.terea-cart-page-header-right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.terea-cart-page-header-right svg { color: var(--tx-accent); }

.terea-cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: 24px;
    align-items: start;
}
.terea-cart-grid > * { min-width: 0; }
.terea-cart-form,
.terea-cart-totals {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    min-width: 0;
    overflow: hidden;
}
.terea-cart-totals {
    position: sticky;
    top: 100px;
}
@media (max-width: 992px) {
    .terea-cart-grid { grid-template-columns: 1fr; }
    .terea-cart-totals { position: static; }
}

/* Cart table ? auto layout with column widths */
.woocommerce-cart-form__contents {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}
.woocommerce-cart-form__contents colgroup col { display: table-column; }
.woocommerce-cart-form__contents thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--tx-muted);
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--tx-border);
    background: var(--tx-bg-soft);
}
.woocommerce-cart-form__contents thead th:first-child {
    border-top-left-radius: 10px;
    padding-left: 18px;
}
.woocommerce-cart-form__contents thead th:last-child {
    border-top-right-radius: 10px;
    padding-right: 18px;
}
.woocommerce-cart-form__contents tbody td {
    padding: 22px 14px;
    border-bottom: 1px solid var(--tx-border);
    vertical-align: middle;
    font-size: 14px;
}
.woocommerce-cart-form__contents tbody td:first-child { padding-left: 18px; }
.woocommerce-cart-form__contents tbody td:last-child { padding-right: 18px; }
.woocommerce-cart-form__contents tbody tr {
    transition: background 0.15s ease;
}
.woocommerce-cart-form__contents tbody tr:hover td { background: var(--tx-bg-soft); }
.woocommerce-cart-form__contents tbody tr:last-child td {
    border-bottom: 0;
}

/* Column widths ? product gets the most space, others compact */
.woocommerce-cart-form__contents th.product-remove,
.woocommerce-cart-form__contents td.product-remove { width: 44px; padding-left: 6px; padding-right: 6px; }
.woocommerce-cart-form__contents th.product-thumbnail,
.woocommerce-cart-form__contents td.product-thumbnail { width: 110px; }
.woocommerce-cart-form__contents th.product-name,
.woocommerce-cart-form__contents td.product-name { min-width: 180px; }
.woocommerce-cart-form__contents th.product-price,
.woocommerce-cart-form__contents td.product-price { width: 130px; white-space: nowrap; }
.woocommerce-cart-form__contents th.product-quantity,
.woocommerce-cart-form__contents td.product-quantity { width: 170px; }
.woocommerce-cart-form__contents th.product-subtotal,
.woocommerce-cart-form__contents td.product-subtotal { width: 130px; white-space: nowrap; text-align: right; }

.product-remove .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(220,38,38,0.08);
    color: var(--tx-danger);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}
.product-remove .remove:hover {
    background: var(--tx-danger);
    color: #fff;
    transform: rotate(90deg);
}

.product-thumbnail a {
    display: inline-block;
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    padding: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.product-thumbnail a:hover {
    transform: scale(1.05);
    border-color: var(--tx-accent);
}
.product-thumbnail img {
    max-width: 84px;
    height: auto;
    display: block;
    border-radius: 6px;
}

.product-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-name a {
    font-weight: 700;
    color: var(--tx-primary);
    font-size: 15px;
    text-decoration: none;
    line-height: 1.4;
}
.product-name a:hover { color: var(--tx-accent-2); }
.product-name .variation {
    font-size: 12px;
    color: var(--tx-muted);
    margin-top: 4px;
}
.product-name .variation dt,
.product-name .variation dd { display: inline-block; margin: 0; font-size: 12px; }
.product-name .variation dt { color: var(--tx-muted); margin-right: 4px; }
.product-name .variation dd { color: var(--tx-text); font-weight: 600; margin-right: 8px; }
.product-name .variation p { margin: 0; }

.product-price, .product-subtotal {
    font-weight: 700;
    color: var(--tx-primary);
    font-size: 15px;
    white-space: nowrap;
}
.product-price .amount,
.product-subtotal .amount { color: var(--tx-primary); font-weight: 700; }
.product-price del,
.product-subtotal del {
    color: var(--tx-muted);
    font-weight: 500;
    margin-right: 6px;
    font-size: 13px;
}

/* Quantity stepper ? proper width */
.product-quantity {
    min-width: 140px;
}
.terea-qty-input {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--tx-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    height: 42px;
    min-width: 130px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.terea-qty-input:focus-within {
    border-color: var(--tx-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.terea-qty-input button {
    width: 36px;
    height: 100%;
    background: var(--tx-bg-soft);
    border: 0;
    color: var(--tx-primary);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.terea-qty-input button:hover {
    background: var(--tx-accent);
    color: #fff;
}
.terea-qty-input input.qty {
    width: 56px !important;
    height: 100%;
    text-align: center;
    border: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: transparent;
    padding: 0 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield;
    flex: 1 1 auto;
    min-width: 0;
}
.terea-qty-input input.qty::-webkit-outer-spin-button,
.terea-qty-input input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.woocommerce-cart-form__contents .actions {
    background: var(--tx-bg-soft) !important;
    padding: 18px 14px !important;
    border-radius: 8px !important;
}
.woocommerce-cart-form__contents .actions .coupon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    float: left;
}
.woocommerce-cart-form__contents .actions .coupon label {
    display: none;
}
.coupon #coupon_code {
    padding: 10px 14px !important;
    border: 1.5px solid var(--tx-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    width: 200px !important;
    height: auto;
}
.coupon .button {
    background: var(--tx-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.coupon .button:hover {
    background: var(--tx-accent) !important;
}
.woocommerce-cart-form__contents .actions button[name="update_cart"] {
    float: right;
    background: var(--tx-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 11px 22px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.woocommerce-cart-form__contents .actions button[name="update_cart"]:hover {
    background: var(--tx-accent) !important;
}

/* Cart totals */
.terea-cart-totals > h2,
.terea-cart-totals .cart_totals h2 {
    font-family: var(--tx-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--tx-text);
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--tx-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.terea-cart-totals > h2::before,
.terea-cart-totals .cart_totals h2::before {
    content: "";
    width: 5px;
    height: 22px;
    background: var(--tx-primary);
    border-radius: 3px;
}
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td {
    padding: 12px 0;
    vertical-align: middle;
}
.cart_totals th {
    text-align: left;
    color: var(--tx-muted);
    font-weight: 500;
    font-size: 14px;
}
.cart_totals td {
    text-align: right;
    font-weight: 700;
    color: var(--tx-primary);
}
.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 22px;
    color: var(--tx-primary);
    padding-top: 16px;
    border-top: 2px solid var(--tx-border);
    margin-top: 8px;
}
.cart_totals .order-total td .amount { color: var(--tx-accent-2); }

.terea-cart-totals .checkout-button {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%) !important;
    color: #fff !important;
    text-align: center;
    border-radius: var(--tx-radius);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: none !important;
    box-shadow: 0 6px 18px -8px rgba(15,118,110,0.55);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.terea-cart-totals .checkout-button:hover {
    background: linear-gradient(135deg, var(--tx-primary-2) 0%, var(--tx-primary-3) 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(15,118,110,0.65) !important;
    color: #fff !important;
}

.terea-cart-promo {
    margin-top: 18px;
    background: linear-gradient(180deg, var(--tx-primary-50) 0%, #fff 100%);
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: var(--tx-radius);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--tx-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.terea-cart-promo svg {
    width: 18px;
    height: 18px;
    color: var(--tx-primary);
    flex-shrink: 0;
}
.terea-cart-promo strong { color: var(--tx-primary-2); }

/* ==========================================================================
   UPGRADE 4 ? Checkout page polish
   ========================================================================== */
.checkout-main .terea-wc-container { background: var(--tx-bg); }

/* ---------- Hero / steps band ---------- */
.terea-checkout-hero {
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #fff;
    border-radius: var(--tx-radius-lg);
    padding: 32px 36px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(15, 118, 110, 0.45);
}
.terea-checkout-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(245,158,11,0.18) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,0.10) 0%, transparent 40%);
    pointer-events: none;
}
.terea-checkout-hero-inner { position: relative; z-index: 1; max-width: 640px; }
.terea-checkout-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.2);
}
.terea-checkout-hero-eyebrow svg { color: var(--tx-accent); }
.terea-checkout-hero-title {
    font-family: var(--tx-font-heading);
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.terea-checkout-hero-sub {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin: 0 0 22px;
    max-width: 520px;
}
.terea-checkout-steps {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.terea-checkout-steps li {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    font-weight: 600;
    position: relative;
}
.terea-checkout-steps li:not(:last-child)::after {
    content: "";
    width: 36px;
    height: 1.5px;
    background: rgba(255,255,255,0.2);
    display: inline-block;
}
.terea-checkout-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    font-weight: 800;
    font-size: 13px;
    border: 1.5px solid rgba(255,255,255,0.18);
}
.terea-checkout-steps li.is-current { color: #fff; }
.terea-checkout-steps li.is-current .terea-checkout-step-num {
    background: var(--tx-accent);
    border-color: var(--tx-accent);
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.22);
}

.terea-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: 24px;
    align-items: start;
}
@media (max-width: 992px) {
    .terea-checkout-grid { grid-template-columns: 1fr; }
}

.terea-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.terea-checkout-panel {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 28px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    position: relative;
}
.terea-checkout-panel-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--tx-border);
}
.terea-checkout-panel-step {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    background: var(--tx-primary-soft);
    color: var(--tx-primary-2);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 999px;
}
.terea-checkout-panel-title {
    font-family: var(--tx-font-heading);
    color: var(--tx-primary);
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}
.terea-checkout-panel-title svg { color: var(--tx-primary); flex-shrink: 0; }
.terea-checkout-panel-sub {
    color: var(--tx-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.terea-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.terea-checkout-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#order_review_heading { display: none; }
.woocommerce-checkout-review-order {
    margin: 0;
}
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 10px 0;
    vertical-align: top;
}
.woocommerce-checkout-review-order-table tfoot th {
    border-top: 1px solid var(--tx-border);
    padding-top: 12px;
    text-align: left;
    color: var(--tx-muted);
    font-weight: 500;
    font-size: 14px;
}
.woocommerce-checkout-review-order-table tfoot td {
    border-top: 1px solid var(--tx-border);
    padding-top: 12px;
    text-align: right;
    font-weight: 700;
    color: var(--tx-primary);
}
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 18px;
    border-top: 2px solid var(--tx-border);
    padding-top: 14px;
}
.woocommerce-checkout-review-order-table .order-total td .amount { color: var(--tx-primary); }

/* WC default field overrides ? applied inside our panels */
.terea-checkout-form .woocommerce-billing-fields__field-wrapper,
.terea-checkout-form .woocommerce-shipping-fields__field-wrapper,
.terea-checkout-form .woocommerce-additional-fields__field-wrapper,
.terea-checkout-form .woocommerce-account-fields,
.terea-checkout-form .woocommerce-shipping-fields,
.terea-checkout-form #billing_address_2_field,
.terea-checkout-form #shipping_address_2_field {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.terea-checkout-form .woocommerce-billing-fields__field-wrapper > .form-row,
.terea-checkout-form .woocommerce-shipping-fields__field-wrapper > .form-row,
.terea-checkout-form .woocommerce-additional-fields__field-wrapper > .form-row {
    flex: 1 1 calc(50% - 7px);
    min-width: 0;
}
.terea-checkout-form .form-row.form-row-wide,
.terea-checkout-form .form-row.notes,
.terea-checkout-form .form-row.woocommerce-account-fields,
.terea-checkout-form .form-row#billing_email_field,
.terea-checkout-form .form-row#billing_phone_field {
    flex: 1 1 100% !important;
}

/* Hide the default WC inside-panel headings since our panel header replaces them. */
.terea-checkout-form #customer_details > .col-1 > h3,
.terea-checkout-form #customer_details > .col-2 > h3,
.terea-checkout-form .woocommerce-shipping-fields > h3,
.terea-checkout-form .woocommerce-billing-fields > h3,
.terea-checkout-form .woocommerce-additional-fields > h3 {
    display: none !important;
}
.terea-checkout-form #customer_details,
.terea-checkout-form #customer_details > .col-1,
.terea-checkout-form #customer_details > .col-2 {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.woocommerce form .form-row {
    margin-bottom: 0;
    padding: 0;
}
.woocommerce form .form-row label {
    display: block !important;
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-primary);
    margin-bottom: 6px;
}
.woocommerce form .form-row .required { color: var(--tx-danger); }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row input[type="email"],
.woocommerce form .form-row input[type="password"],
.woocommerce form .form-row input[type="tel"],
.woocommerce form .form-row input[type="text"],
.woocommerce form .form-row input[type="number"],
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--tx-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--tx-text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.woocommerce form .form-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--tx-primary);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.15);
    outline: none;
}
.woocommerce form .form-row input[aria-invalid="true"] {
    border-color: var(--tx-danger);
}
.woocommerce form .form-row .select2-container {
    width: 100% !important;
}
.woocommerce form .form-row .select2-container .select2-selection--single {
    border-radius: 10px !important;
    border: 1.5px solid var(--tx-border) !important;
    padding: 8px 12px !important;
    height: auto !important;
    min-height: 44px;
    font-size: 14px;
}

/* WC inline checkboxes (create account, ship to billing) */
.woocommerce form .form-row .woocommerce-form__input-checkbox,
.woocommerce form .form-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--tx-primary);
    margin-right: 8px;
    vertical-align: -3px;
}
.woocommerce form .form-row .checkbox + label,
.woocommerce form .form-row label.checkbox,
.woocommerce form .form-row label.woocommerce-form__label-for-checkbox,
.woocommerce form .form-row > label.checkbox {
    display: inline-flex !important;
    align-items: center;
    font-weight: 500;
    color: var(--tx-text);
    cursor: pointer;
}

/* Ship to different address toggle */
.terea-checkout-form .woocommerce-shipping-fields #ship-to-different-address {
    background: var(--tx-primary-soft);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0 0 18px;
    border: 1px dashed rgba(15, 118, 110, 0.35);
}
.terea-checkout-form .woocommerce-shipping-fields #ship-to-different-address label {
    color: var(--tx-primary);
    font-size: 13px;
}

/* Order notes textarea */
.terea-checkout-form .woocommerce-additional-fields textarea {
    min-height: 96px;
    resize: vertical;
}

/* Payment gateway box */
#payment {
    background: var(--tx-bg-soft);
    border-radius: var(--tx-radius);
    border: 1px solid var(--tx-border);
    margin-top: 18px;
    padding: 16px 18px;
}
#payment .payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    border-bottom: 0 !important;
}
#payment .payment_methods li {
    background: #fff !important;
    border: 1.5px solid var(--tx-border) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#payment .payment_methods li:has(input:checked),
.wc_payment_method.payment_method_active {
    border-color: var(--tx-primary) !important;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
#payment .payment_methods label {
    font-weight: 700 !important;
    color: var(--tx-primary) !important;
    font-size: 14px !important;
    cursor: pointer;
}
#payment .payment_box {
    background: var(--tx-bg-soft) !important;
    border: 1px solid var(--tx-border) !important;
    border-radius: 8px !important;
    margin: 10px 0 0 !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
}
#payment .payment_box p { color: var(--tx-muted); margin: 0 0 8px; }
#payment .payment_box::before { display: none !important; }

#place_order {
    width: 100%;
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%) !important;
    color: #fff !important;
    padding: 16px !important;
    border-radius: var(--tx-radius) !important;
    border: none !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    margin-top: 14px;
    box-shadow: 0 8px 22px -10px rgba(15,118,110,0.65);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#place_order:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(15,118,110,0.7) !important;
    filter: brightness(1.05);
}
#place_order::after {
    content: "?";
    font-size: 18px;
}

.woocommerce-privacy-policy-text { font-size: 12px; color: var(--tx-muted); line-height: 1.6; }
.woocommerce-checkout-payment .woocommerce-privacy-policy-text a { color: var(--tx-primary); }

/* Checkout sidebar ? order summary card */
.terea-checkout-summary-card {
    background: #fff !important;
    border: 1px solid var(--tx-border) !important;
    border-radius: var(--tx-radius-lg) !important;
    padding: 24px 26px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 100px;
}
.terea-checkout-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--tx-border);
}
.terea-checkout-summary-title {
    font-family: var(--tx-font-heading);
    color: var(--tx-primary);
    font-weight: 800;
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}
.terea-checkout-summary-title svg { color: var(--tx-primary); flex-shrink: 0; }
.terea-checkout-summary-count {
    display: inline-flex;
    align-items: center;
    background: var(--tx-primary-soft);
    color: var(--tx-primary-2);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* Cart review-product lines */
.woocommerce-checkout-review-order-table .product-name {
    color: var(--tx-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    padding-right: 12px;
}
.woocommerce-checkout-review-order-table .product-total {
    color: var(--tx-primary);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.woocommerce-checkout-review-order-table .product-quantity {
    color: var(--tx-muted);
    font-weight: 500;
    font-size: 12px;
}

/* Checkout help card */
.terea-checkout-help {
    background: linear-gradient(180deg, var(--tx-primary-soft) 0%, #ffffff 100%) !important;
    border: 1px solid rgba(15, 118, 110, 0.2) !important;
    border-radius: var(--tx-radius-lg) !important;
    padding: 20px 22px !important;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.terea-checkout-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--tx-primary);
    color: #fff;
    flex-shrink: 0;
}
.terea-checkout-help svg { color: var(--tx-primary); }
.terea-checkout-help strong {
    display: block;
    color: var(--tx-primary);
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 800;
}
.terea-checkout-help p {
    color: var(--tx-muted);
    font-size: 13px;
    margin: 0 0 10px;
    line-height: 1.5;
}
.terea-checkout-help-link {
    color: var(--tx-primary) !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}
.terea-checkout-help-link:hover {
    text-decoration: underline;
}

/* Checkout trust card */
.terea-checkout-trust {
    background: #fff !important;
    border: 1px solid var(--tx-border) !important;
    border-radius: var(--tx-radius-lg) !important;
    padding: 20px 22px !important;
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}
.terea-checkout-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--tx-text);
    font-weight: 500;
}
.terea-checkout-trust-item svg {
    width: 36px;
    height: 36px;
    color: var(--tx-primary);
    flex-shrink: 0;
    padding: 8px;
    background: var(--tx-primary-soft);
    border-radius: 10px;
}

/* Checkout payment chips */
.terea-checkout-payments {
    background: #fff !important;
    border: 1px solid var(--tx-border) !important;
    border-radius: var(--tx-radius-lg) !important;
    padding: 18px 22px !important;
}
.terea-checkout-payments-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--tx-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.terea-checkout-payments-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.terea-checkout-payments-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--tx-text);
    letter-spacing: 0.04em;
}

/* Coupon + login toggles (WC default look) */
.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-form-login-toggle .woocommerce-info {
    background: var(--tx-primary-soft) !important;
    color: var(--tx-primary-2) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.woocommerce-form-coupon-toggle .woocommerce-info a,
.woocommerce-form-login-toggle .woocommerce-info a {
    color: var(--tx-primary) !important;
    font-weight: 700;
    text-decoration: underline;
    margin-left: auto;
}
.woocommerce-form-coupon-toggle .woocommerce-info::before,
.woocommerce-form-login-toggle .woocommerce-info::before { display: none !important; }

.checkout_coupon.woocommerce-form-coupon,
.woocommerce-form.woocommerce-form-login {
    background: var(--tx-bg-soft);
    border-radius: var(--tx-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--tx-border);
}
.checkout_coupon .form-row,
.woocommerce-form-login .form-row {
    display: flex !important;
    gap: 8px;
}
.checkout_coupon button[type="submit"],
.woocommerce-form-login button[type="submit"] {
    background: var(--tx-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.2s ease;
}
.checkout_coupon button[type="submit"]:hover,
.woocommerce-form-login button[type="submit"]:hover {
    background: var(--tx-primary-2) !important;
}

/* Term & conditions + privacy wrapper */
.woocommerce-terms-and-conditions-wrapper {
    margin: 12px 0;
    font-size: 13px;
}
.woocommerce-terms-and-conditions-wrapper a { color: var(--tx-primary); }

/* Coupon chip on cart review table */
.coupon-terea-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Wider hero on small screens */
@media (max-width: 600px) {
    .terea-checkout-hero { padding: 24px 22px; }
    .terea-checkout-panel { padding: 22px 18px; }
}

/* Hide duplicate checkout heading */
.woocommerce-billing-fields > h3,
.woocommerce-shipping-fields > h3,
.woocommerce-additional-fields > h3 { display: none !important; }

/* Checkout trust card */
.terea-checkout-trust {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.terea-checkout-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--tx-text);
}
.terea-checkout-trust-item svg {
    width: 18px;
    height: 18px;
    color: var(--tx-accent);
    flex-shrink: 0;
}
.terea-checkout-trust-item strong,
.terea-checkout-trust-item span { color: var(--tx-text); }

/* ==========================================================================
   UPGRADE 5 ? Terms / Privacy / Policy pages
   ========================================================================== */
.terea-policy-page {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 40px clamp(20px, 4vw, 56px);
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    color: var(--tx-text);
    font-size: 15px;
    line-height: 1.8;
}
.terea-policy-page > h1,
.terea-policy-page > .entry-title {
    font-family: var(--tx-font-heading);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--tx-primary);
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.01em;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tx-border);
}
.terea-policy-page > .entry-content {
    margin-top: 24px;
}
.terea-policy-page .entry-content > h2,
.terea-policy-page .entry-content > h3,
.terea-policy-page h2,
.terea-policy-page h3 {
    font-family: var(--tx-font-heading);
    color: var(--tx-primary);
    font-weight: 800;
    margin: 32px 0 14px;
    letter-spacing: -0.005em;
    padding-bottom: 6px;
}
.terea-policy-page h2 { font-size: 1.4rem; border-bottom: 1px solid var(--tx-border); padding-bottom: 10px; }
.terea-policy-page h3 { font-size: 1.15rem; }
.terea-policy-page h2:first-child,
.terea-policy-page h3:first-child { margin-top: 0; }
.terea-policy-page p {
    color: var(--tx-text);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.8;
}
.terea-policy-page ul,
.terea-policy-page ol {
    padding-left: 22px;
    margin-bottom: 18px;
}
.terea-policy-page li {
    margin-bottom: 8px;
    line-height: 1.8;
    color: var(--tx-text);
}
.terea-policy-page ul li::marker { color: var(--tx-accent); }
.terea-policy-page a {
    color: var(--tx-accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.terea-policy-page a:hover { color: var(--tx-primary); }
.terea-policy-page strong { color: var(--tx-primary); }
.terea-policy-page blockquote {
    margin: 18px 0;
    padding: 14px 20px;
    background: linear-gradient(180deg, #fef9f0 0%, #fff 100%);
    border-left: 4px solid var(--tx-accent);
    border-radius: 6px;
    font-style: italic;
    color: var(--tx-text);
}
.terea-policy-page hr {
    border: 0;
    border-top: 1px solid var(--tx-border);
    margin: 32px 0;
}
.terea-policy-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
}
.terea-policy-page th,
.terea-policy-page td {
    padding: 12px 14px;
    border: 1px solid var(--tx-border);
    text-align: left;
    font-size: 14px;
}
.terea-policy-page th {
    background: var(--tx-bg-soft);
    font-weight: 700;
    color: var(--tx-primary);
}

/* ==========================================================================
   UPGRADE 6 ? Add-to-Cart slide-in drawer (right-side)
   ========================================================================== */
.terea-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99998;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.terea-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.terea-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    background: #fff;
    box-shadow: -24px 0 60px -20px rgba(15, 23, 42, 0.25);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}
.terea-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.terea-drawer-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--tx-border);
    background: #fff;
    position: relative;
}
.terea-drawer-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 3px;
    background: linear-gradient(90deg, var(--tx-primary), var(--tx-primary-2));
}
.terea-drawer-title {
    font-family: var(--tx-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--tx-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.terea-drawer-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--tx-primary), var(--tx-primary-2));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.terea-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--tx-border);
    background: var(--tx-bg-soft);
    color: var(--tx-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.terea-drawer-close:hover {
    background: var(--tx-danger);
    color: #fff;
    border-color: var(--tx-danger);
    transform: rotate(90deg);
}

.terea-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: var(--tx-bg-soft);
    -webkit-overflow-scrolling: touch;
}
.terea-drawer-body::-webkit-scrollbar { width: 6px; }
.terea-drawer-body::-webkit-scrollbar-track { background: transparent; }
.terea-drawer-body::-webkit-scrollbar-thumb {
    background: var(--tx-border);
    border-radius: 3px;
}

.terea-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    text-align: center;
}
.terea-drawer-empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: rgba(245,158,11,0.1);
    color: var(--tx-accent-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.terea-drawer-empty-title {
    font-family: var(--tx-font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0 0 6px;
}
.terea-drawer-empty-sub {
    font-size: 14px;
    color: var(--tx-muted);
    margin: 0;
}

.terea-drawer-products {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terea-drawer-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}
.terea-drawer-item:hover {
    border-color: rgba(245,158,11,0.3);
}
.terea-drawer-item.is-updated {
    border-color: var(--tx-success);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}
.terea-drawer-thumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--tx-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.terea-drawer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.terea-drawer-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.terea-drawer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tx-primary);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.terea-drawer-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.terea-drawer-name a:hover { color: var(--tx-accent-2); }
.terea-drawer-variation {
    font-size: 12px;
    color: var(--tx-muted);
    line-height: 1.4;
    margin: 0;
}
.terea-drawer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.terea-drawer-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--tx-primary);
    margin: 0;
}
.terea-drawer-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--tx-border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.terea-drawer-qty button {
    width: 26px;
    height: 28px;
    background: var(--tx-bg-soft);
    border: 0;
    color: var(--tx-primary);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.terea-drawer-qty button:hover { background: var(--tx-accent); color: #fff; }
.terea-drawer-qty input {
    width: 36px;
    height: 28px;
    text-align: center;
    border: 0 !important;
    background: transparent;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield;
}
.terea-drawer-qty input::-webkit-outer-spin-button,
.terea-drawer-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.terea-drawer-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(220,38,38,0.1);
    color: var(--tx-danger);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}
.terea-drawer-remove:hover {
    background: var(--tx-danger);
    color: #fff;
}

.terea-drawer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    color: var(--tx-muted);
    gap: 12px;
}
.terea-drawer-loading .spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--tx-border);
    border-top-color: var(--tx-accent);
    border-radius: 50%;
    animation: terea-spin 0.8s linear infinite;
}

.terea-drawer-success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: rgba(22,163,74,0.08);
    border: 1px solid rgba(22,163,74,0.25);
    border-radius: var(--tx-radius);
    color: var(--tx-success);
    font-weight: 600;
    font-size: 14px;
}
.terea-drawer-success-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--tx-success);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.terea-drawer-success-text strong { color: var(--tx-primary); display: block; line-height: 1.3; }
.terea-drawer-success-text span { font-weight: 500; font-size: 13px; }

.terea-drawer-progress {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fef9f0 0%, #fff 100%);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: var(--tx-radius);
    font-size: 13px;
    color: var(--tx-text);
}
.terea-drawer-progress-msg { font-weight: 600; color: var(--tx-primary); margin-bottom: 8px; }
.terea-drawer-progress-bar {
    height: 6px;
    background: var(--tx-border);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.terea-drawer-progress-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--tx-accent), var(--tx-accent-2));
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.terea-drawer-progress.is-done .terea-drawer-progress-bar > span {
    background: linear-gradient(90deg, var(--tx-success), #0d9488);
    width: 100%;
}

.terea-drawer-upsell {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
}
.terea-drawer-upsell-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--tx-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}
.terea-drawer-upsell-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.terea-drawer-upsell-item {
    display: flex;
    gap: 10px;
    align-items: center;
}
.terea-drawer-upsell-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid var(--tx-border);
    flex-shrink: 0;
    background: #fff;
}
.terea-drawer-upsell-thumb img { width: 100%; height: 100%; object-fit: cover; }
.terea-drawer-upsell-info { flex: 1; min-width: 0; }
.terea-drawer-upsell-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-primary);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.terea-drawer-upsell-price {
    font-size: 12px;
    color: var(--tx-accent-2);
    font-weight: 700;
}
.terea-drawer-upsell-btn {
    background: var(--tx-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.terea-drawer-upsell-btn:hover { background: var(--tx-accent); }

.terea-drawer-footer {
    flex-shrink: 0;
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid var(--tx-border);
}
.terea-drawer-totals {
    margin: 0 0 16px;
    padding: 0;
}
.terea-drawer-totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--tx-muted);
}
.terea-drawer-totals-row strong { color: var(--tx-text); font-weight: 700; }
.terea-drawer-totals-row--saving strong { color: var(--tx-success); }
.terea-drawer-totals-row--total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 2px solid var(--tx-border);
    font-size: 17px;
}
.terea-drawer-totals-row--total strong {
    font-family: var(--tx-font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--tx-primary);
}
.terea-drawer-totals-row--total .terea-drawer-grand { color: var(--tx-primary); }
.terea-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.terea-drawer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: var(--tx-radius);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.terea-drawer-btn--checkout {
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #fff;
    box-shadow: 0 6px 18px -8px rgba(15,118,110,0.55);
}
.terea-drawer-btn--checkout:hover {
    background: linear-gradient(135deg, var(--tx-primary-2) 0%, var(--tx-primary-3) 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(15,118,110,0.65);
}
.terea-drawer-btn--cart {
    background: #fff;
    color: var(--tx-primary);
    border: 1.5px solid var(--tx-border);
}
.terea-drawer-btn--cart:hover {
    border-color: var(--tx-primary);
    background: var(--tx-bg-soft);
    color: var(--tx-primary);
}

/* Floating cart button (header) gets a "shake" animation when item is added */
.terea-cart-pulse { animation: terea-cart-pulse 0.6s ease; }
@keyframes terea-cart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

/* Inline notification fallback (when drawer is closed) */
.terea-cart-toast {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 99997;
    background: var(--tx-primary);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--tx-radius);
    box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.4);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    max-width: 320px;
}
.terea-cart-toast.is-visible { transform: translateX(0); }
.terea-cart-toast svg { flex-shrink: 0; color: var(--tx-accent); }

/* When drawer is open, allow body scroll lock */
body.terea-drawer-open { overflow: hidden; }

@media (max-width: 480px) {
    .terea-drawer { width: 100vw; }
}

/* ==========================================================================
   Empty cart page state
   ========================================================================== */
.terea-cart-empty {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    padding: 56px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.terea-cart-empty .terea-empty-icon {
    width: 84px;
    height: 84px;
    margin: 0;
    border-radius: 50%;
    background: rgba(245,158,11,0.1);
    color: var(--tx-accent-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.terea-cart-empty .terea-empty-title {
    font-family: var(--tx-font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--tx-primary);
    margin: 0;
}
.terea-cart-empty .terea-empty-desc {
    color: var(--tx-muted);
    font-size: 15px;
    max-width: 380px;
    margin: 0 0 6px;
}
.terea-cart-empty .terea-btn--lg {
    padding: 14px 24px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.terea-cart-empty .terea-btn--primary {
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #fff;
}
.terea-cart-empty .terea-btn--primary:hover {
    background: linear-gradient(135deg, var(--tx-primary-2) 0%, var(--tx-primary-3) 100%);
    color: #fff;
}

/* ==========================================================================
   Auth (Login / Register) cards
   ========================================================================== */
.terea-auth-wrap {
    margin-top: 24px;
    display: grid;
    gap: 20px;
}
.terea-auth-wrap--split {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    align-items: start;
}
@media (max-width: 768px) {
    .terea-auth-wrap--split { grid-template-columns: 1fr; }
}

.terea-auth-card {
    margin: 0;
}
.terea-auth-card form { padding: 24px 28px; }
.terea-auth-card .terea-btn--block {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    font-size: 14px;
}
.terea-auth-card .terea-btn--outline {
    background: #fff;
    color: var(--tx-primary);
    border: 1.5px solid var(--tx-border);
}
.terea-auth-card .terea-btn--outline:hover {
    border-color: var(--tx-primary);
    background: var(--tx-bg-soft);
    color: var(--tx-primary);
}
.terea-form-row-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
    flex-wrap: wrap;
    font-size: 13px;
}
.terea-form-row-inline .woocommerce-form__label-for-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tx-text);
    margin: 0;
    font-weight: 500;
}
.terea-form-row-inline .woocommerce-form__label-for-checkbox input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--tx-accent);
}
.terea-lost-password {
    color: var(--tx-accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}
.terea-lost-password:hover { color: var(--tx-primary); }

/* ==========================================================================
   UPGRADE 7 ? Generic content typography for pages
   ========================================================================== */
.entry-content > h2,
.entry-content > h3,
.entry-content > h4 {
    color: var(--tx-primary);
    margin-top: 28px;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.01em;
    font-family: var(--tx-font-heading);
}
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.2rem; }
.entry-content p { line-height: 1.75; margin-bottom: 14px; color: var(--tx-text); }
.entry-content ul, .entry-content ol { margin-bottom: 16px; }
.entry-content li { line-height: 1.7; margin-bottom: 6px; }
.entry-content a { color: var(--tx-accent-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--tx-primary); }
.entry-content img { border-radius: var(--tx-radius); }
.entry-content pre,
.entry-content code { background: var(--tx-bg-soft); border-radius: 6px; }
.entry-content pre { padding: 14px 16px; overflow-x: auto; }
.entry-content code { padding: 2px 6px; font-size: 0.92em; }
.entry-content pre code { padding: 0; background: transparent; }

/* Related products polish */
section.related.products,
.up-sells.related.products {
    margin-top: 56px;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
section.related.products > h2,
.up-sells.related.products > h2 {
    font-family: var(--tx-font-heading);
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    color: var(--tx-primary);
    margin: 0 0 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}
section.related.products > h2::before,
.up-sells.related.products > h2::before {
    content: "";
    width: 5px;
    height: 22px;
    background: var(--tx-accent);
    border-radius: 3px;
}
section.related.products ul.products,
.up-sells.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
}
@media (max-width: 960px) {
    section.related.products ul.products,
    .up-sells.related.products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
    section.related.products ul.products,
    .up-sells.related.products ul.products { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}
section.related.products ul.products > li,
.up-sells.related.products ul.products > li {
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    overflow: hidden;
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    display: flex !important;
    flex-direction: column;
}





/* Mobile shop filter sidebar trigger ? desktop hidden */
.terea-mobile-filter-trigger { display: none; }
.terea-shop-sidebar-backdrop { display: none; }
.terea-shop-sidebar-close { display: none; }

/* ==========================================================================
   Mobile filter sidebar ? slides up from bottom on small screens
   ========================================================================== */
.terea-mobile-filter-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin: 12px 0 14px;
    background: linear-gradient(135deg, var(--tx-primary) 0%, var(--tx-primary-2) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.terea-mobile-filter-trigger:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 118, 110, 0.24); }
.terea-mobile-filter-trigger:active { transform: translateY(0); }
.terea-mobile-filter-trigger svg { flex-shrink: 0; }

.terea-shop-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    z-index: 88;
    transition: opacity 0.3s ease;
}
.terea-shop-sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }

.terea-shop-sidebar-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.18);
    color: var(--tx-primary);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 2;
}
.terea-shop-sidebar-close:hover { background: rgba(15, 118, 110, 0.16); }

body.terea-filters-open { overflow: hidden; }

@media (max-width: 992px) {
    .terea-mobile-filter-trigger { display: inline-flex; }
    .terea-shop-sidebar-close { display: inline-flex; }
    .terea-shop-sidebar-backdrop { display: block; }

    .terea-shop-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .terea-shop-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #ffffff !important;
        z-index: 90 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 56px 16px 28px !important;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overscroll-behavior: contain;
        border: none !important;
        border-radius: 16px 16px 0 0 !important;
        margin: 0 !important;
    }
    .terea-shop-sidebar.is-open { transform: translateY(0); }
    .terea-shop-grid > .terea-shop-sidebar:not(.is-open) {
        visibility: hidden;
        pointer-events: none;
        height: 0;
        overflow: hidden;
    }
}
