/*
Theme Name: ShopEase
Theme URI: https://example.com/shopease
Author: ShopEase Team
Author URI: https://example.com
Description: A modern WooCommerce theme built with Tailwind CSS. Features a clean e-commerce design with support for WooCommerce, blog posts, and responsive layouts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shopease
Tags: e-commerce, woocommerce, blog, tailwind, responsive, dark-mode

WooCommerce: true
*/

/* ──────────────────────────────────────────────────────────────────────────────
   ShopEase – WooCommerce Global Styles
   All generated HTML from WooCommerce hooks that can't receive Tailwind classes
   directly is styled here with regular CSS, matching the theme's design tokens.
────────────────────────────────────────────────────────────────────────────── */

:root {
    --se-primary:      #0d7ff2;
    --se-primary-90:   rgba(13,127,242,.9);
    --se-slate-50:     #f8fafc;
    --se-slate-100:    #f1f5f9;
    --se-slate-200:    #e2e8f0;
    --se-slate-300:    #cbd5e1;
    --se-slate-400:    #94a3b8;
    --se-slate-500:    #64748b;
    --se-slate-600:    #475569;
    --se-slate-700:    #334155;
    --se-slate-800:    #1e293b;
    --se-slate-900:    #0f172a;
    --se-radius:       0.75rem;
    --se-radius-sm:    0.5rem;
    --se-radius-full:  9999px;
}

/* ── Base form input reset for WooCommerce ─────────────────────────────────── */
.woocommerce-page .input-text,
.woocommerce-page input[type="text"],
.woocommerce-page input[type="email"],
.woocommerce-page input[type="tel"],
.woocommerce-page input[type="number"],
.woocommerce-page input[type="password"],
.woocommerce-page textarea,
.woocommerce-page select {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--se-slate-900);
    background-color: var(--se-slate-50);
    border: 1px solid var(--se-slate-300);
    border-radius: var(--se-radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: auto;
}
.woocommerce-page .input-text:focus,
.woocommerce-page input[type="text"]:focus,
.woocommerce-page input[type="email"]:focus,
.woocommerce-page input[type="tel"]:focus,
.woocommerce-page input[type="number"]:focus,
.woocommerce-page input[type="password"]:focus,
.woocommerce-page textarea:focus,
.woocommerce-page select:focus {
    border-color: var(--se-primary);
    box-shadow: 0 0 0 3px rgba(13,127,242,.15);
}

/* ── Form rows / field labels ──────────────────────────────────────────────── */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row,
.woocommerce-checkout .form-row {
    margin-bottom: 1rem;
}
.woocommerce-billing-fields .form-row label,
.woocommerce-shipping-fields .form-row label,
.woocommerce-checkout .form-row label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--se-slate-700);
    margin-bottom: 0.375rem;
}
abbr.required { color: var(--se-primary); border: none; text-decoration: none; }

/* Half-width fields side-by-side */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: calc(50% - .5rem);
    display: inline-block;
    vertical-align: top;
}
.woocommerce-checkout .form-row-first { margin-right: .5rem; }
.woocommerce-checkout .form-row-last  { margin-left: .5rem; }
.woocommerce-checkout .form-row-wide  { width: 100%; display: block; }

.woocommerce-checkout .woocommerce-invalid .input-text,
.woocommerce-checkout .woocommerce-invalid input,
.woocommerce-checkout .woocommerce-invalid select {
    border-color: #ef4444;
}
.woocommerce-checkout .woocommerce-invalid-required-field::after {
    font-size: 0.75rem;
    color: #ef4444;
}

/* Ship to different address checkbox */
.woocommerce-shipping-fields h3 label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}
.woocommerce-shipping-fields h3 { display: none; }

/* ── Cart totals (outputted by woocommerce_cart_collaterals hook) ──────────── */
.cart_totals h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--se-slate-900);
}
.cart_totals {
    background: #fff;
    border: 1px solid var(--se-slate-200);
    border-radius: var(--se-radius);
    padding: 1.5rem;
}
.cart_totals table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.cart_totals table.shop_table th,
.cart_totals table.shop_table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--se-slate-100);
    vertical-align: middle;
}
.cart_totals table.shop_table th {
    font-weight: 600;
    color: var(--se-slate-600);
    text-align: left;
    width: 40%;
}
.cart_totals table.shop_table td { text-align: right; }
.cart_totals table.shop_table tr:last-child th,
.cart_totals table.shop_table tr:last-child td { border-bottom: none; }
.cart_totals table.shop_table tr.order-total th,
.cart_totals table.shop_table tr.order-total td {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--se-slate-900);
    padding-top: 1rem;
    border-top: 2px solid var(--se-slate-200);
    border-bottom: none;
}
.cart_totals table.shop_table tr.order-total td strong { color: var(--se-primary); }
.cart_totals .wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--se-primary);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--se-radius-full);
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(13,127,242,.3);
    text-decoration: none;
}
.cart_totals .wc-proceed-to-checkout a.checkout-button:hover {
    background: var(--se-primary-90);
    box-shadow: 0 6px 20px rgba(13,127,242,.35);
}

/* Shipping calculator */
.cart_totals .shipping-calculator-button {
    color: var(--se-primary);
    font-size: 0.8125rem;
    cursor: pointer;
    text-decoration: underline;
}
.cart_totals .shipping-calculator-form { margin-top: 0.75rem; }
.cart_totals .shipping-calculator-form .form-row { margin-bottom: .75rem; }

/* ── Qty stepper (woocommerce_quantity_input output) ─────────────────────── */
.quantity.woocommerce-quantity-input-group,
.woocommerce .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--se-slate-300);
    border-radius: var(--se-radius-sm);
    overflow: hidden;
    background: #fff;
    height: 2.5rem;
}
.quantity input.qty {
    width: 3rem !important;
    border: none !important;
    text-align: center;
    font-weight: 600;
    background: transparent;
    padding: 0;
    box-shadow: none !important;
    -moz-appearance: textfield;
}
.quantity input.qty::-webkit-inner-spin-button,
.quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Order review table (checkout right column) ───────────────────────────── */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}
.woocommerce-checkout-review-order-table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--se-slate-400);
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--se-slate-100);
    text-align: left;
}
.woocommerce-checkout-review-order-table thead th:last-child { text-align: right; }
.woocommerce-checkout-review-order-table tbody td {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--se-slate-100);
    vertical-align: middle;
    color: var(--se-slate-700);
}
.woocommerce-checkout-review-order-table tbody td:last-child { text-align: right; }
.woocommerce-checkout-review-order-table tbody td .product-quantity {
    color: var(--se-slate-400);
    font-size: 0.8125rem;
}
.woocommerce-checkout-review-order-table tfoot tr th,
.woocommerce-checkout-review-order-table tfoot tr td {
    padding: 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--se-slate-700);
    border-top: 1px solid var(--se-slate-100);
}
.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.woocommerce-checkout-review-order-table tfoot tr.order-total td {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--se-slate-900);
    border-top: 2px solid var(--se-slate-200);
    padding-top: 1rem;
}
.woocommerce-checkout-review-order-table tfoot tr.order-total td strong { color: var(--se-primary); }
.woocommerce-checkout-review-order-table tfoot tr td { text-align: right; }

/* ── Payment methods ──────────────────────────────────────────────────────── */
#payment.woocommerce-checkout-payment {
    margin-top: 1.5rem;
}
#payment .wc_payment_methods { list-style: none; margin: 0; padding: 0; }
#payment .wc_payment_method {
    border: 1px solid var(--se-slate-200);
    border-radius: var(--se-radius-sm);
    margin-bottom: 0.625rem;
    overflow: hidden;
}
#payment .wc_payment_method > label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--se-slate-800);
    background: var(--se-slate-50);
    transition: background .15s;
}
#payment .wc_payment_method > label:hover { background: var(--se-slate-100); }
#payment .wc_payment_method input[type="radio"] { accent-color: var(--se-primary); }
#payment .payment_box {
    padding: 1rem;
    background: #fff;
    border-top: 1px solid var(--se-slate-100);
    font-size: 0.85rem;
    color: var(--se-slate-600);
}
#payment.woocommerce-checkout-payment .place-order {
    margin-top: 1.25rem;
}
#payment.woocommerce-checkout-payment .place-order #place_order {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--se-primary);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    border: none;
    border-radius: var(--se-radius-full);
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(13,127,242,.3);
    letter-spacing: .02em;
}
#payment.woocommerce-checkout-payment .place-order #place_order:hover {
    background: var(--se-primary-90);
}
#payment .payment_method_paypal img { height: 1.5rem; vertical-align: middle; }

/* Privacy notice */
#payment .woocommerce-privacy-policy-text {
    font-size: 0.75rem;
    color: var(--se-slate-400);
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.5;
}
#payment .woocommerce-privacy-policy-text a { color: var(--se-primary); text-decoration: underline; }

/* ── Coupon forms on cart/checkout ────────────────────────────────────────── */
.checkout_coupon .form-row { display: flex; gap: .75rem; align-items: center; }
.checkout_coupon input[type="text"] { flex: 1; }
.checkout_coupon .button { white-space: nowrap; }

/* ── My Account navigation ────────────────────────────────────────────────── */
.se-account-nav .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.se-account-nav .woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--se-slate-600);
    text-decoration: none;
    border-bottom: 1px solid var(--se-slate-100);
    transition: background .15s, color .15s;
}
.se-account-nav .woocommerce-MyAccount-navigation li:last-child a { border-bottom: none; }
.se-account-nav .woocommerce-MyAccount-navigation li a:hover { background: var(--se-slate-50); color: var(--se-primary); }
.se-account-nav .woocommerce-MyAccount-navigation li.is-active a,
.se-account-nav .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--active a {
    color: var(--se-primary);
    font-weight: 700;
    background: rgba(13,127,242,.06);
}

/* ── My Account content: orders table ─────────────────────────────────────── */
.woocommerce-account .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.woocommerce-account .woocommerce-orders-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--se-slate-400);
    padding: 0 0 0.75rem;
    border-bottom: 2px solid var(--se-slate-100);
    text-align: left;
}
.woocommerce-account .woocommerce-orders-table td {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--se-slate-100);
    color: var(--se-slate-700);
    vertical-align: middle;
}
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: var(--se-primary);
    color: #fff;
    border-radius: var(--se-radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a:hover { background: var(--se-primary-90); }
.woocommerce-account mark.order-status {
    background: transparent;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--se-radius-full);
}
.woocommerce-account mark.order-status.status-completed { background: #dcfce7; color: #166534; }
.woocommerce-account mark.order-status.status-processing { background: #dbeafe; color: #1e40af; }
.woocommerce-account mark.order-status.status-on-hold    { background: #fef9c3; color: #854d0e; }
.woocommerce-account mark.order-status.status-cancelled  { background: #fee2e2; color: #991b1b; }
.woocommerce-account mark.order-status.status-pending    { background: var(--se-slate-100); color: var(--se-slate-600); }

/* My account section headings */
.woocommerce-account h2,
.woocommerce-account h3 { font-weight: 700; margin-bottom: 1.25rem; }
.woocommerce-account h2 { font-size: 1.25rem; }
.woocommerce-account h3 { font-size: 1.0625rem; }

/* Address edit forms */
.woocommerce-address-fields .form-row { margin-bottom: 1rem; }
.woocommerce-address-fields .form-row label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--se-slate-700);
    margin-bottom: .375rem;
}
.woocommerce-account .woocommerce-Button,
.woocommerce-account button[type="submit"],
.woocommerce-account input[type="submit"],
.woocommerce-account .button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem 1.25rem;
    background: var(--se-primary);
    color: #fff;
    border: none;
    border-radius: var(--se-radius-full);
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    box-shadow: 0 2px 8px rgba(13,127,242,.25);
}
.woocommerce-account .woocommerce-Button:hover,
.woocommerce-account button[type="submit"]:hover,
.woocommerce-account input[type="submit"]:hover,
.woocommerce-account .button:hover { background: var(--se-primary-90); }

/* ── Cross-sells below cart (outputted by woocommerce_cart_collaterals) ─────── */
.cross-sells { margin-top: 2rem; }
.cross-sells h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
.cross-sells ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cross-sells ul.products li.product { font-size: .85rem; }
.cross-sells ul.products li.product a img { border-radius: var(--se-radius-sm); width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ── WooCommerce notices (legacy - fallback) ──────────────────────────────── */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: .875rem 1rem .875rem 1.25rem;
    border-radius: var(--se-radius-sm);
    font-size: .875rem;
}
.woocommerce-error  { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; }
.woocommerce-message{ background: #f0fdf4; border-left: 4px solid #22c55e; color: #166534; }
.woocommerce-info   { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af; }

/* ── Loading overlay ──────────────────────────────────────────────────────── */
.blockUI.blockOverlay { background: rgba(255,255,255,.6) !important; }

/* ── Checkout order submitted overlay ────────────────────────────────────── */
.processing { opacity: .6; pointer-events: none; }
