/* ENAJ Creative Expressions - Custom WooCommerce & Global Page Polish Stylesheet */

:root {
    --primary: #C4956A;      /* Warm Canvas Gold */
    --primary-hover: #B4875A;
    --blue: #1D437D;         /* Navy Blueprint */
    --blue-hover: #15325c;
    --gray-bg: #FAF9F6;      /* Linen / Warm Off-white */
    --border: #C4BDB5;       /* Muted Border */
    --text: #111827;         /* Dark Gray / Black */
    --text-muted: #6A6460;
    --white: #FFFFFF;
}

/* Global Page Background & Layout Base */
.woocommerce-cart,
.woocommerce-checkout,
.archive.post-type-archive-product,
.single-product {
    background-color: var(--gray-bg) !important;
    font-family: 'DM Sans', -apple-system, sans-serif !important;
    color: var(--text) !important;
}

/* WooCommerce Tables & Card Layouts */
.woocommerce-cart-form,
.cart-collaterals,
.woocommerce-checkout #order_review,
.woocommerce-checkout #customer_details,
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
    background: var(--white) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 30px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
    margin-bottom: 30px !important;
}

/* Table styling fixes */
.shop_table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: none !important;
    width: 100% !important;
}
table.shop_table.cart {
    table-layout: fixed !important;
}

.shop_table th {
    font-family: 'Playfair Display', serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--blue) !important;
    border-bottom: 2px solid var(--border) !important;
    padding: 12px 8px !important;
}

.shop_table td {
    padding: 16px 8px !important;
    border-bottom: 1px solid rgba(196, 189, 181, 0.4) !important;
    vertical-align: middle !important;
}

/* Form inputs & selections */
.woocommerce-billing-fields input,
.woocommerce-shipping-fields input,
.woocommerce-checkout input.input-text,
.woocommerce-cart table.cart td.actions .input-text,
.select2-container--default .select2-selection--single,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    padding: 12px 14px !important;
    height: auto !important;
    border-radius: 4px !important;
    border: 1px solid var(--border) !important;
    background-color: var(--white) !important;
    color: var(--text) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    outline: none !important;
    transition: border-color 0.2s !important;
    box-sizing: border-box !important;
}

.woocommerce-billing-fields input:focus,
.woocommerce-shipping-fields input:focus,
.woocommerce-checkout input.input-text:focus,
.select2-container--default .select2-selection--single:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 2px rgba(29, 67, 125, 0.1) !important;
}

/* Coupon & Action fields alignment */
.actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.coupon {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 280px !important;
    max-width: 480px !important;
}

.coupon input.input-text#coupon_code {
    width: 240px !important;
    min-width: 180px !important;
    height: 48px !important;
    font-size: 14px !important;
    letter-spacing: 0.5px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 4px !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 1 !important;
}

.coupon input.input-text#coupon_code:focus {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 2px rgba(29, 67, 125, 0.1) !important;
}

.coupon button.button {
    height: 48px !important;
    padding: 0 24px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}


/* Premium Buttons Styling */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
    background-color: var(--primary) !important;
    color: var(--white) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    padding: 14px 28px !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover {
    background-color: var(--blue) !important;
    color: var(--white) !important;
}

/* Secondary Button Overrides (e.g. Return to Shop, Update Cart) */
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[hover] {
    background-color: #E2E8F0 !important;
    color: #94A3B8 !important;
    cursor: not-allowed !important;
}

/* Cart Totals Panel */
.cart-collaterals .cart_totals h2,
.woocommerce-checkout #order_review_heading {
    font-family: 'Playfair Display', serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--blue) !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 12px !important;
}

/* Custom Product Page Details */
.woocommerce-product-gallery {
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Shop Category Titles & Price Tags */
.woocommerce-loop-product__title {
    font-family: 'Playfair Display', serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--blue) !important;
    margin: 12px 0 6px 0 !important;
}

.price {
    font-family: 'DM Mono', monospace !important;
    color: var(--primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* Alert/Notice Styling (Standard Green/Blue/Red to match ENAJ Brand) */
.woocommerce-message, 
.woocommerce-info, 
.woocommerce-error {
    background-color: var(--white) !important;
    border-top: 3px solid var(--blue) !important;
    color: var(--text) !important;
    border-radius: 4px !important;
    padding: 16px 24px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 24px !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

.woocommerce-message::before {
    color: var(--blue) !important;
}

.woocommerce-error {
    border-top-color: #dc2626 !important;
}

.woocommerce-error::before {
    color: #dc2626 !important;
}

/* Responsive tweaks for mobile checkout */
@media (max-width: 768px) {
    .woocommerce-cart-form,
    .cart-collaterals,
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #customer_details {
        padding: 16px !important;
    }
}

/* Green Styling Removals & WooCommerce Notice Polishing */
.woocommerce-message,
.woocommerce-info {
    border: 1px solid var(--border) !important;
    border-top: 3px solid var(--blue) !important;
    background-color: var(--white) !important;
}

.woocommerce-message a.button.wc-forward,
.woocommerce-message a.button {
    background-color: var(--primary) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

.woocommerce-message a.button.wc-forward:hover,
.woocommerce-message a.button:hover {
    background-color: var(--blue) !important;
    color: var(--white) !important;
}

.woocommerce-message::before {
    color: var(--blue) !important;
}

/* Cart Table Layout Grid & Spacing Enhancements */
table.shop_table.cart th.product-remove,
table.shop_table.cart td.product-remove {
    width: 50px !important;
    text-align: center !important;
    padding: 12px 6px !important;
}

table.shop_table.cart th.product-thumbnail,
table.shop_table.cart td.product-thumbnail {
    width: 80px !important;
    text-align: left !important;
    padding: 12px 6px !important;
}

table.shop_table.cart th.product-name,
table.shop_table.cart td.product-name {
    width: 100% !important;
    text-align: left !important;
    padding: 12px 16px !important;
}

table.shop_table.cart th.product-price,
table.shop_table.cart td.product-price {
    width: 100px !important;
    text-align: right !important;
    padding: 12px 8px !important;
}

table.shop_table.cart th.product-quantity,
table.shop_table.cart td.product-quantity {
    width: 130px !important;
    text-align: right !important;
    padding: 12px 8px !important;
}

table.shop_table.cart th.product-subtotal,
table.shop_table.cart td.product-subtotal {
    width: 120px !important;
    text-align: right !important;
    padding: 12px 8px !important;
}

table.shop_table.cart td.product-quantity .quantity {
    display: inline-flex !important;
    justify-content: flex-end !important;
}

/* Remove default table borders/empty columns if they push layout */
.woocommerce-cart table.cart td.product-remove a.remove {
    color: #DC2626 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 22px !important;
    text-align: center !important;
    border-radius: 50% !important;
    transition: all 0.2s !important;
}

.woocommerce-cart table.cart td.product-remove a.remove:hover {
    background-color: #FEE2E2 !important;
}
