/*
Theme Name: Build A Mask Child
Theme URI: https://bam.helioswebdesigns.com/
Description: Custom interactive 4-layer mask customizer child theme for Storefront.
Author: Helios Web Designs
Author URI: https://helioswebdesigns.com/
Template: storefront
Version: 1.0.0
Text Domain: bam-child
*/

/* --- Product Page: Mask Builder Layout --- */
.mask-builder-container {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
    margin: 24px 0;
    width: 100%;
}

.mask-preview-stage {
    position: relative;
    width: 380px;
    height: 380px;
    max-width: 100%;
    background-color: #f7f7f9;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.mask-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    display: block !important;
}

.mask-layer.layer-1 { z-index: 10; }
.mask-layer.layer-2 { z-index: 20; }
.mask-layer.layer-3 { z-index: 30; }
.mask-layer.layer-4 { z-index: 40; }

.mask-layer.fading {
    opacity: 0.3;
}

/* Controls Panel */
.mask-controls-panel {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
}

.swatch-row, .pill-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.swatch-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch-btn:hover {
    transform: scale(1.08);
}

.swatch-btn.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #0073aa, 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pill-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pill-btn:hover {
    border-color: #999;
}

.pill-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* --- Cart & Checkout: Mini Stacking Thumbnail --- */
.cart-mask-thumb-stage {
    position: relative;
    width: 68px;
    height: 68px;
    background-color: #f6f7f9;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.cart-mask-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    pointer-events: none;
    box-shadow: none !important;
    border: none !important;
}

.cart-mask-layer.layer-1 { z-index: 1; }
.cart-mask-layer.layer-2 { z-index: 2; }
.cart-mask-layer.layer-3 { z-index: 3; }
.cart-mask-layer.layer-4 { z-index: 4; }
/* Platform Section Toggling */
.platform-panel {
    display: none;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.platform-panel.active-panel {
    display: flex;
}
/**
 * 2. Custom CSS for Order Item Meta in WooCommerce Emails
 */
add_filter('woocommerce_email_styles', function ($css) {
    $custom_css = "
        .wc-item-meta {
            margin: 6px 0 0 0 !important;
            padding: 8px 12px !important;
            background-color: #f7f7f9 !important;
            border-left: 3px solid #111111 !important;
            list-style: none !important;
            font-size: 12px !important;
            line-height: 1.6 !important;
        }
        .wc-item-meta li {
            margin: 0 !important;
            padding: 2px 0 !important;
            color: #333333 !important;
        }
        .wc-item-meta li strong {
            color: #111111 !important;
            font-weight: 600 !important;
            display: inline-block !important;
            min-width: 110px !important;
        }
        .wc-item-meta li p {
            display: inline !important;
            margin: 0 !important;
        }
    ";
    return $css . $custom_css;
});
/* Platform Panel Display Rules */
.platform-panel {
    display: none;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.platform-panel.active-panel {
    display: flex !important;
}