/* ==========================================================================
   Artisier Elementor — Base Theme Styles
   Design tokens, resets, and component styles that Elementor can't control.
   Layout and page structure are fully handled by Elementor.
   ========================================================================== */

/* ==========================================================================
   Design Tokens (CSS Custom Properties)
   ========================================================================== */

:root {
    /* Colors - Dark Neutral Palette */
    --color-charcoal: #1a1a1a;
    --color-ink: #0d0d0d;
    --color-graphite: #2d2d2d;

    /* Colors - Warm Neutrals */
    --color-warm-white: #FAF8F5;
    --color-cream: #F5F2ED;
    --color-pearl: #EEEBE6;
    --color-stone: #6B6B6B;
    --color-slate: #8B8B8B;

    /* Colors - Accent (Gold) */
    --color-gold: #C9A55C;
    --color-gold-muted: #B8A068;
    --color-gold-light: #D4B574;

    /* Colors - Semantic */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-success: #4A7C59;
    --color-error: #8B3A3A;

    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;

    /* Transitions */
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Minimal Reset (Elementor handles most, but we ensure consistency)
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-charcoal);
    background: var(--color-warm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   WooCommerce Notices
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    border-radius: 4px;
}

.woocommerce-message {
    background: #D4EDDA;
    color: #155724;
    border-left: 4px solid #155724;
}

.woocommerce-info {
    background: var(--color-cream);
    color: var(--color-stone);
    border-left: 4px solid var(--color-gold);
}

.woocommerce-error {
    background: #F8D7DA;
    color: #721C24;
    border-left: 4px solid #721C24;
}

.woocommerce-error li {
    list-style: none;
}

/* ==========================================================================
   Checkout - Order Summary Text Fix
   ========================================================================== */

/* WooCommerce Core & Elementor Pro Checkout Review */
/* WooCommerce Core & Elementor Pro Checkout Review */
.woocommerce-checkout-review-order .product-name,
.e-checkout__order-review .product-name,
.woocommerce-checkout tr.cart_item td.product-name,
table.shop_table.woocommerce-checkout-review-order-table tbody tr td.product-name,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order-table td.product-name,
.wc-block-components-product-name,
.wc-block-checkout__review-order .wc-block-components-product-name {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #1a1a1a !important;
    padding-bottom: 0.25rem !important;
    word-break: break-word !important;
}

/* Format the product quantity badge/text */
.woocommerce-checkout-review-order .product-quantity,
.e-checkout__order-review .product-quantity,
table.shop_table.woocommerce-checkout-review-order-table tbody tr td.product-name .product-quantity,
.wc-block-components-product-badge {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #666 !important;
}

/* Fix product variations (Material, Size, etc) underneath title */
.woocommerce-checkout-review-order dl.variation,
.woocommerce-checkout-review-order .wc-item-meta,
.e-checkout__order-review dl.variation,
table.shop_table.woocommerce-checkout-review-order-table tbody tr td.product-name dl.variation,
.wc-block-components-product-details,
.wc-block-components-product-metadata {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    color: #666 !important;
    margin: 0.25rem 0 0 0 !important;
    padding: 0 !important;
    display: block !important;
}

.woocommerce-checkout-review-order dl.variation dt,
.woocommerce-checkout-review-order .wc-item-meta dt,
.e-checkout__order-review dl.variation dt,
table.shop_table.woocommerce-checkout-review-order-table tbody tr td.product-name dl.variation dt,
.wc-block-components-product-metadata__description {
    font-weight: 500 !important;
    margin-right: 0.25rem !important;
    color: #333 !important;
    float: left !important;
    clear: both !important;
}

.woocommerce-checkout-review-order dl.variation dd,
.woocommerce-checkout-review-order .wc-item-meta dd,
.e-checkout__order-review dl.variation dd,
table.shop_table.woocommerce-checkout-review-order-table tbody tr td.product-name dl.variation dd {
    margin: 0 0 0.15rem 0 !important;
    float: left !important;
}

/* Clearfix for definitions */
.woocommerce-checkout-review-order dl.variation:after,
.woocommerce-checkout-review-order .wc-item-meta:after,
table.shop_table.woocommerce-checkout-review-order-table tbody tr td.product-name dl.variation:after {
    content: "";
    display: table;
    clear: both;
}

/* Fix prices */
.woocommerce-checkout-review-order .product-total,
.e-checkout__order-review .product-total,
.woocommerce-checkout td.product-total {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    vertical-align: top !important;
}

.woocommerce-checkout-review-order th,
.woocommerce-checkout-review-order td,
.e-checkout__order-review th,
.e-checkout__order-review td {
    padding: 0.75rem 0.5rem !important;
    vertical-align: top !important;
}

.woocommerce-checkout-review-order .order-total th,
.woocommerce-checkout-review-order .order-total td,
.e-checkout__order-review .order-total th,
.e-checkout__order-review .order-total td {
    font-size: 1rem !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   Product Page - Center Align Fonts
   ========================================================================== */

/* Center the tab headers */
.woocommerce div.product .woocommerce-tabs ul.tabs,
.woocommerce-tabs ul.tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 2rem;
    padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    text-align: center;
}

/* Center all text within the tab panels */
.woocommerce div.product .woocommerce-tabs .panel,
.woocommerce div.product .woocommerce-tabs .panel h2,
.woocommerce div.product .woocommerce-tabs .panel p,
.woocommerce div.product .woocommerce-tabs .panel ul {
    text-align: center;
    list-style-position: inside; /* For centered bullets if any */
}

/* Center related products heading and content */
.woocommerce .related.products {
    text-align: center;
    padding-top: 3rem;
}

.woocommerce .related.products > h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Karat & Diamond Selector (Widget Styles)
   ========================================================================== */

.artisier-option-selector {
    margin-bottom: 1.5rem;
}

.artisier-option-selector>label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-stone);
    margin-bottom: 0.75rem;
}

.artisier-option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.artisier-option-item {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.artisier-option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.artisier-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-pearl);
    background: var(--color-white);
    border-radius: 4px;
    transition: all var(--duration-fast) var(--ease-out);
    text-align: center;
}

.artisier-option-item:hover .artisier-option-label {
    border-color: var(--color-charcoal);
}

.artisier-option-item input[type="radio"]:checked+.artisier-option-label {
    background: var(--color-charcoal);
    color: var(--color-white);
    border-color: var(--color-charcoal);
}

.artisier-option-value {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-charcoal);
    line-height: 1.2;
}

.artisier-option-price {
    font-size: 0.65rem;
    color: #999;
    font-weight: 400;
    margin-top: 0.15rem;
}

.artisier-option-item input[type="radio"]:checked+.artisier-option-label .artisier-option-value {
    color: var(--color-white);
}

.artisier-option-item input[type="radio"]:checked+.artisier-option-label .artisier-option-price {
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Size Selector (Widget Styles)
   ========================================================================== */

.artisier-size-selector {
    margin-bottom: 1.5rem;
}

.artisier-size-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.artisier-size-label span {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-stone);
}

.artisier-size-guide-link {
    font-size: 0.7rem;
    color: var(--color-gold);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.artisier-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.artisier-size-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 1px solid var(--color-pearl);
    background: var(--color-white);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--duration-fast) var(--ease-out);
    padding: 0 0.5rem;
}

.artisier-size-btn:hover {
    border-color: var(--color-charcoal);
}

.artisier-size-btn.is-selected {
    background: var(--color-charcoal);
    color: var(--color-white);
    border-color: var(--color-charcoal);
}

/* ==========================================================================
   Product Actions (Buy Now + Add to Cart)
   ========================================================================== */

.artisier-cart-section {
    margin-top: 1.5rem;
}

.artisier-cart-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.artisier-qty {
    width: 80px;
}

.artisier-qty input {
    width: 100%;
    height: 100%;
    text-align: center;
    border: 1px solid var(--color-pearl);
    background: var(--color-white);
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 0.5rem;
}

.artisier-add-btn {
    flex: 1;
    background: var(--color-charcoal);
    color: var(--color-white);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.875rem 1.5rem;
    border: none;
    cursor: pointer;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.artisier-add-btn:hover {
    opacity: 0.85;
}

.artisier-buy-now-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--color-charcoal);
    background: transparent;
    color: var(--color-charcoal);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.artisier-buy-now-btn:hover {
    background: var(--color-charcoal);
    color: var(--color-white);
}

/* ==========================================================================
   Floating Cart Drawer
   ========================================================================== */

.floating-cart-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-charcoal);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-cart-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-cart-btn svg {
    width: 22px;
    height: 22px;
}

.floating-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gold);
    color: var(--color-white);
    border-radius: 50%;
    padding: 0 4px;
}

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    z-index: 1001;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--color-warm-white);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-drawer.is-open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-pearl);
}

.drawer-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-charcoal);
    margin: 0;
}

.drawer-count {
    font-size: 0.8rem;
    color: var(--color-stone);
    font-weight: 400;
}

.drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-stone);
    border-radius: 50%;
    transition: background 0.2s ease;
}

.drawer-close:hover {
    background: var(--color-pearl);
}

.drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.drawer-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-stone);
}

.drawer-empty p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.drawer-shop-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-charcoal);
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.2s ease;
}

.drawer-shop-btn:hover {
    opacity: 0.85;
    color: var(--color-white);
}

.drawer-items .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-items .woocommerce-mini-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-pearl);
}

.drawer-items .woocommerce-mini-cart-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.drawer-items .woocommerce-mini-cart-item a:not(.remove) {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-charcoal);
}

.drawer-items .woocommerce-mini-cart-item .quantity {
    font-size: 0.8rem;
    color: var(--color-stone);
}

.drawer-items .woocommerce-mini-cart-item .remove {
    font-size: 1.2rem;
    color: var(--color-stone);
    margin-left: auto;
}

.drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-pearl);
}

.drawer-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--color-charcoal);
}

.drawer-subtotal-amount {
    font-weight: 600;
}

.drawer-actions {
    display: flex;
    gap: 0.75rem;
}

.drawer-view-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-charcoal);
    background: transparent;
    color: var(--color-charcoal);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.drawer-view-cart-btn:hover {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.drawer-checkout-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: var(--color-charcoal);
    color: var(--color-white);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.drawer-checkout-btn:hover {
    opacity: 0.85;
    color: var(--color-white);
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .floating-cart-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 48px;
        height: 48px;
    }

    .cart-drawer {
        width: 100%;
        max-width: 100vw;
    }

    .artisier-cart-row {
        flex-direction: column;
    }

    .artisier-cart-row .artisier-qty {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .artisier-option-buttons {
        gap: 0.4rem;
    }

    .artisier-option-label {
        padding: 0.4rem 0.6rem;
    }
}

/* --- EXHAUSTIVE GLOBAL FONT OVERRIDE --- */
:root {
  --e-global-typography-primary-font-family: var(--font-body) !important;
  --e-global-typography-secondary-font-family: var(--font-body) !important;
  --e-global-typography-text-font-family: var(--font-body) !important;
  --e-global-typography-accent-font-family: var(--font-body) !important;
}

body, p, span, a, div, li, h1, h2, h3, h4, h5, h6, 
.elementor-heading-title, 
.elementor-widget-heading .elementor-heading-title, 
.artisier-title, 
.elementor-widget-text-editor, 
.elementor-text, 
.elementor-button, 
.elementor-price-list-title,
.product_title { 
    font-family: var(--font-body) !important; 
}

/* Ensure Elementor icons are not corrupted */
.elementor-widget-container i, 
.elementor-widget-container [class*="eicon"], 
.elementor-widget-container [class*="fa-"], 
.elementor-widget-container [class*="fas"], 
.elementor-widget-container [class*="fab"], 
.elementor-widget-container [class*="far"] {
    font-family: inherit !important;
}