/*
Theme Name: KGallery
Theme URI: https://kgallery.art
Description: Custom theme for K Gallery Dubai. Standalone - no Divi dependency.
Author: K Gallery
Version: 1.0.0
License: Private
Text Domain: kgallery
*/

/* Base resets and typography inherited from child theme or plugin styles */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: inherit; background: #fafaf8; }

/* ============================================================
   K Gallery — Migrated Global CSS (from Divi Theme Options)
   ============================================================ */

/* Filter label text color */
.wpf_form .wpf_item label { color: #7ab4b9 !important; }
.wpf_form .wpf_item_name  { color: #7ab4b9 !important; }

/* Hide Sidebar Across Entire Site */
#sidebar,
#main-content .container:before { display: none !important; }

/* Hide WooCommerce Breadcrumb */
.woocommerce-breadcrumb { display: none !important; }

/* Hide Sorting Dropdown */
.woocommerce-ordering { display: none !important; }

/* Hide Quantity field */
.quantity { display: none !important; }
.woocommerce table.shop_table th.product-quantity,
.woocommerce table.shop_table td.product-quantity { display: none !important; }

/* Hide Subtotal column in cart */
.woocommerce table.shop_table th.product-subtotal,
.woocommerce table.shop_table td.product-subtotal { display: none !important; }

/* Product title & price color */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-weight: 700 !important;
    color: #65b6be !important;
}
.woocommerce ul.products li.product .woocommerce-Price-amount { color: #65b6be !important; }
.woocommerce-page .page-title { color: #65b6be !important; font-weight: bold; }
.woocommerce-result-count { color: #65b6be !important; }

/* Soldout badges */
.soldout-badge {
    position: absolute;
    top: 15px; left: 15px;
    background-color: #ff4d4d;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 3px;
    z-index: 10;
    text-transform: uppercase;
}
.kgallery-soldout-price {
    display: inline-block;
    background-color: #e74c3c;
    color: #fff;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 16px;
    text-transform: uppercase;
}
.kgallery-soldout-under-price {
    margin-top: 15px;
    background: #e74c3c;
    color: #fff;
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
}
.kgallery-loop-soldout {
    position: absolute;
    top: 10px; left: 10px;
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    z-index: 9;
    text-transform: uppercase;
}
body:not(.tax-product_artist) .kgallery-loop-soldout { display: none !important; }

/* Currency symbol (AED / Dirham) */
.woocommerce-Price-currencySymbol img.custom-dirham-symbol {
    height: 0.75em !important;
    width: auto !important;
    max-height: 1em !important;
    object-fit: contain !important;
    display: inline-block !important;
    margin-left: 0.2em !important;
    line-height: 1 !important;
}
/* Dirham symbol — no transform needed, alignment handled by inline styles */
/* Removed translateY rule that was misaligning the symbol on product/shop pages */

/* Artist page — square artwork thumbnails */
.artist-products .artwork-thumbnail-wrapper { position: relative; display: inline-block; }
.artist-products .artist-product .artwork-thumbnail-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.artist-products .artist-product .artwork-thumbnail-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* All product images square */
.woocommerce ul.products li.product a img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ── Logo size override — beats WooCommerce .woocommerce-page img rule ── */
nav img.kgnav-logo-img,
nav img.nav-logo-img,
.kgnav img.kgnav-logo-img,
.woocommerce nav img.kgnav-logo-img,
.woocommerce-page nav img.kgnav-logo-img,
.single-product nav img.kgnav-logo-img,
.tax-product_artist nav img.kgnav-logo-img {
    height: 36px !important;
    width: auto !important;
    max-height: 36px !important;
    max-width: none !important;
    display: block !important;
    object-fit: contain !important;
}

/* ── WooCommerce notices (sitewide default) ──────────────────
   Fixes the default unstyled/distorted "added to cart" banner
   and pairs with the auto-dismiss script in functions.php. ── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 14px 20px !important;
    margin: 0 0 20px !important;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    background: #f0ede8;
    border-left: 3px solid #0097A7;
    border-radius: 2px;
    list-style: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
/* Keep the default icon, but flow it inline (as a flex item) instead of
   letting it sit absolutely-positioned on top of the text. */
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
    position: static !important;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
}
.woocommerce-error { border-left-color: #c0392b; background: #fdf0ee; }
/* Pin "Continue shopping" / info links to the right — margin-left:auto keeps
   them right-aligned even if the text wraps onto its own line, unlike
   justify-content:space-between which collapses to the left in that case. */
.woocommerce-message a.button.wc-forward,
.woocommerce-info a {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0097A7 !important;
    text-decoration: underline;
    white-space: nowrap;
    background: none !important;
    padding: 0 !important;
}
.woocommerce-message a.button.wc-forward:hover,
.woocommerce-info a:hover { color: #006064 !important; }

/* JS-driven auto-dismiss fade state */
.woocommerce-message.kg-notice-hide,
.woocommerce-error.kg-notice-hide,
.woocommerce-info.kg-notice-hide {
    opacity: 0 !important;
    transform: translateY(-6px) !important;
    pointer-events: none;
}