/* ==========================================================================
   1. DEFINE WEBFONTS (RELATIVE PATHS FOR CHILD THEME)
   ========================================================================== */
@font-face {
    font-family: 'Garabosse Gaillarde';
    src: url('../fonts/Garabosse-Gaillarde.woff2') format('woff2'),
         url('../fonts/Garabosse-Gaillarde.woff') format('woff'),
         url('../fonts/Garabosse-Gaillarde.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Preloading in the header makes this seamless */
}

@font-face {
    font-family: 'Garabosse Perle';
    src: url('../fonts/Garabosse-Perle.woff2') format('woff2'),
         url('../fonts/Garabosse-Perle.woff') format('woff'),
         url('../fonts/Garabosse-Perle.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. APPLY TO WEBSITE (EXCLUDING WORDPRESS ADMIN BAR)
   ========================================================================== */
body:not(.wp-admin):not(#wpadminbar), 
body:not(.wp-admin):not(#wpadminbar) p {
    font-family: 'Garabosse Gaillarde', 'EB Garamond', serif !important;
}

h1, h2, h3, h4, h5, h6, .uk-logo, .uk-navbar-nav a {
    font-family: 'Garabosse Perle', 'Garabosse Gaillarde', serif !important;
}

#wpadminbar, #wpadminbar * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* ==========================================================================
   3. GLOBAL PAGE BACKGROUNDS & BASICS
   ========================================================================== */
html {
    scroll-behavior: auto !important; 
}

html, body, main, #tm-main {
    background-color: #f5f0eb !important;
}

/* Disable blue tap highlight on mobile buttons & general elements */
button, * {
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove default browser outlines and focus boxes */
a, button, input, textarea, select, details, summary, [tabindex], img, svg {
    outline: none !important;
    box-shadow: none !important;
}
a:focus, button:focus, img:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* General link behaviors */
a {
    text-decoration: none !important;
    transition: opacity 0.3s ease;
}
a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   4. TYPOGRAPHY SIZE & SPACING OPTIMIZATION
   ========================================================================== */
p {
    font-size: 1.125rem !important;  /* Base: 18px */
    line-height: 1.45 !important;  
    letter-spacing: -0.01em;       
}

.uk-text-large, .uk-text-lead {
    font-size: 1.125rem !important;  /* Base: 18px */
    line-height: 1.4 !important;
}

.thick,
.uk-text-thick {
    font-family: 'Garabosse Perle', serif !important;
    font-weight: 400 !important;
    letter-spacing: -0.03em !important;
}

/* ==========================================================================
   5. GLOBAL HEADINGS - GOLDEN RATIO SCALING
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6,
.uk-heading-small, .uk-heading-medium, .uk-heading-large, .uk-heading-xlarge,
.uk-article-title {
    font-family: 'Garabosse Gaillarde', 'EB Garamond', 'Garamond', serif !important;
    font-weight: normal !important;
    letter-spacing: -0.03em !important;
    text-transform: none;
}

/* Scaled Golden Ratio Size Controls in rem */
h1, .uk-h1 { 
    font-size: 4.75rem !important;         /* Large Title (76px) */
    line-height: 1.05 !important;
}
h2, .uk-h2 { 
    font-size: 3.0rem !important;          /* Medium Title (48px) */
    line-height: 1.1 !important;
}
h3, .uk-h3,
.uk-heading-small { 
    font-size: 1.75rem !important;         /* Small Title (28px) */
    line-height: 1.2 !important;
}
h4, .uk-h4 { 
    font-size: 1.125rem !important;        /* Base scaled step (18px) */
}

/* Responsive headings scaling dynamically for smaller mobile viewports */
@media (max-width: 768px) {
    h1, .uk-h1 { font-size: 3.0rem !important; }   /* Scales down to 48px on mobile */
    h2, .uk-h2 { font-size: 1.75rem !important; }   /* Scales down to 28px on mobile */
    h3, .uk-h3 { font-size: 1.125rem !important; }  /* Scales down to 18px on mobile */
}

/* ==========================================================================
   6. NAVIGATION & HEADER ELEMENTS
   ========================================================================== */
.uk-navbar-nav > li > a,
.uk-nav-default > li > a,
.tm-header-mobile .uk-nav > li > a {
    font-family: 'Garabosse Gaillarde', 'EB Garamond', 'Garamond', serif !important;
    font-size: 1.125rem !important;       /* Matching 18px scale */
    letter-spacing: -0.03em !important;
}

/* ==========================================================================
   7. lll-GRID MULTIPLY BLEND & HOVER ZOOM ANIMATION
   ========================================================================== */
.lll-grid {
    overflow: visible !important; 
}

/* Apply multiply blend mode across the entire hierarchy to fix Chrome/Firefox isolation */
.lll-grid div,
.lll-grid .el-item,
.lll-grid img {
    mix-blend-mode: multiply !important;
}

/* Base image styling & transitions */
.lll-grid img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.25, 1);
}

/* Responsive grid heights */
@media screen and (max-width: 1200px) { .lll-grid img { max-height: 250px; } }
@media screen and (max-width: 768px)  { .lll-grid img { max-height: 300px; } }
@media screen and (max-width: 480px)  { .lll-grid img { max-height: 180px; } }

/* Elevates hovered image and parent column cleanly to the top */
.lll-grid div:hover {
    position: relative !important;
    z-index: auto !important;
    transform: translate3d(0, 0, 1px) !important;
}

.lll-grid img:hover {
    transform: scale(2) translate3d(0, 0, 1px);
    position: relative !important;
    z-index: auto !important;
}

/* Disabled hover override rules */
.lll-grid img.no-hover:hover,
.lll-grid img.no-hover {
    transform: scale(1) !important;
    mix-blend-mode: multiply !important;
    position: static !important;
    z-index: auto !important;
}

/* ==========================================================================
   8. INTERACTIVE CAROUSEL GALLERY SYSTEM (SLIDER OVERLAYS)
   ========================================================================== */
.img-clone {
    position: fixed;
    object-fit: contain;
    z-index: 9999;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.6s cubic-bezier(0.25, 1.2, 0.25, 1), opacity 0.6s ease;
    transform: none !important;
    mix-blend-mode: normal !important;
    opacity: 0;
}

/* Main carousel view overlay images */
div[style*="display: flex; width:"] img {
    max-width: 82vw !important;  
    max-height: 82vh !important; 
    object-fit: contain !important;
    mix-blend-mode: normal !important;
    transition: transform 0.3s ease;
}

/* Desktop landscape constraints */
@media screen and (min-width: 769px) {
    div[style*="display: flex; width:"] img[src] {
        max-width: 60vw !important; 
    }
}

/* Mobile responsive constraints */
@media screen and (max-width: 768px) {
    div[style*="display: flex; width:"] img {
        max-width: 86vw !important;  
        max-height: 80vh !important;
    }
}

/* ==========================================================================
   9. WOOCOMMERCE CLEANUPS & OVERRIDES
   ========================================================================== */
.woocommerce-notices-wrapper { 
    margin: 40px; 
}

.wc-proceed-to-checkout a.checkout-button {
    width: auto;
    padding: 10px 40px;
    font-size: 1.125rem !important;        /* 18px */
    margin: 20px 0;
    letter-spacing: -0.03em !important;
}

.woocommerce-error, .woocommerce-info, .woocommerce-message {
    margin-top: 0;
    list-style: none;
    position: relative;
    margin-bottom: 20px;
    padding: 15px 29px 15px 15px;
    background: #f5f0eb;
    color: #6c6d74;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 1.125rem !important;        /* 18px */
    letter-spacing: -0.03em !important;
}

/* Hide checkout page primary H1 */
article#post-8 h1.uk-article-title {
    display: none;
}

/* Inputs styling */
.wc-block-components-form .wc-block-components-text-input input[type=email],
.wc-block-components-form .wc-block-components-text-input input[type=number],
.wc-block-components-form .wc-block-components-text-input input[type=password],
.wc-block-components-form .wc-block-components-text-input input[type=tel],
.wc-block-components-form .wc-block-components-text-input input[type=text],
.wc-block-components-form .wc-block-components-text-input input[type=url],
.wc-block-components-text-input.wc-block-components-text-input input[type=email],
.wc-block-components-text-input.wc-block-components-text-input input[type=number],
.wc-block-components-text-input.wc-block-components-text-input input[type=password],
.wc-block-components-text-input.wc-block-components-text-input input[type=tel],
.wc-block-components-text-input.wc-block-components-text-input input[type=text],
.wc-block-components-text-input.wc-block-components-text-input input[type=url] {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    font-size: 1.125rem !important;        /* 18px */
}

/* Select overrides */
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-blocks-components-select.wc-blocks-components-select .wc-blocks-components-select__select {
    appearance: none !important;
    background-color: #f5f0eb;
    border: none !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    font-family: 'Garabosse Gaillarde', 'EB Garamond', 'Garamond', serif !important;
    font-size: 1.125rem !important;        /* 18px */
    font-weight: inherit !important;
    line-height: inherit !important;
    width: 100% !important;
    letter-spacing: -0.03em !important;
}

.wc-blocks-components-select .wc-blocks-components-select__container {
    background-color: #f5f0eb;
    border-radius: 4px;
    height: 3.125em;
    position: relative;
    width: 100%;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked {
    background: #f5f0eb;
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted, 
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px currentColor;
}

.wc-block-checkout__actions .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
    height: auto;
    padding: .5em;
    width: 50%;
    background-color: #f5f0eb;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 1.125rem !important;        /* 18px */
    font-family: 'Garabosse Perle', 'EB Garamond', 'Garamond', serif !important;
    letter-spacing: -0.03em !important;
}

.wc-block-components-textarea {
    background-color: #f5f0eb;
    border: 1px solid hsla(0, 0%, 7%, .8);
    border-radius: 4px;
    color: #2b2d2f;
    font-family: 'Garabosse Gaillarde', 'EB Garamond', 'Garamond', serif !important;
    font-size: 1.125rem !important;        /* 18px */
    line-height: 1.375;
    margin: 0;
    padding: .75em 16px;
    width: 100%;
    letter-spacing: -0.03em !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
    display: none;
    visibility: hidden;
}

/* Product Titles on WooCommerce Grid pages */
.woocommerce-loop-product__title,
.onsale,
.price,
.amount {
    font-family: 'Garabosse Perle', 'EB Garamond', 'Garamond', serif !important;
    font-weight: 400 !important;
    font-size: 1.125rem !important;        /* 18px */
    letter-spacing: -0.03em !important;
}

/* Single Product Page Title & Details */
.product_title {
    font-family: 'Garabosse Perle', 'EB Garamond', 'Garamond', serif !important;
    font-weight: 400 !important;
    font-size: 3.0rem !important;          /* Medium Title (48px) */
    letter-spacing: -0.03em !important;
}

.woocommerce-product-details__short-description,
.woocommerce-Tabs-panel,
.quantity input.qty {
    font-family: 'Garabosse Gaillarde', 'EB Garamond', 'Garamond', serif !important;
    font-size: 1.125rem !important;        /* 18px */
    letter-spacing: -0.03em !important;
}

/* Checkout and Cart Actions / Buttons */
.button, 
button.button, 
.wc-block-checkout__actions-row button,
.checkout-button {
    font-family: 'Garabosse Perle', 'EB Garamond', 'Garamond', serif !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    font-size: 1.125rem !important;        /* 18px */
    letter-spacing: -0.03em !important;
}

/* ==========================================================================
   10. NAVIGATION CART BADGE HOOKS
   ========================================================================== */
.header-cart-link {
    position: relative; 
    display: inline-flex; 
    align-items: center;
    line-height: 1; 
}

.custom-cart-bubble {
    position: absolute;
    top: 25px;      
    right: -10px;    
    background-color: #000000; 
    color: #ffffff;
    font-size: 0.75rem !important;         /* 12px Bubble Font */
    font-weight: bold;
    border-radius: 50%; 
    min-width: 14px; 
    height: 14px;
    line-height: 14px; 
    text-align: center;
    transition: opacity 0.3s ease;
    z-index: 10; 
}

.cart-count-hidden {
    opacity: 0;
    pointer-events: none; 
}

.cart-count-visible {
    opacity: 1;
}

/* ==========================================================================
   11. BIO HOVER IMAGES OVERLAY RULES (FLUID & PERFORMANCE SAFE)
   ========================================================================== */
.tooltip-img {
    display: block !important;
    position: fixed !important;
    pointer-events: none !important;
    z-index: 99999 !important;
    
    width: 360px !important;
    height: auto !important;
    max-height: 50vh !important;
    object-fit: contain !important;
    
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.tooltip-img.show {
    opacity: 0.85 !important; 
    transform: scale(1);
}

@media screen and (max-width: 768px) {
    .tooltip-img {
        width: 240px !important;
        max-height: 40vh !important;
        transition: opacity 0.25s ease-out, transform 0.25s ease-out; 
    }
}