/*
Theme Name:     MLab Child Theme (Storefront)
Theme URI:      https://mementolab.co.uk
Description:    Clinical Luxury Overrides for Storefront.
Version:        1.0.9
Template:       storefront
*/

/* --- 1. FONTS (Load your local files) --- */

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/Montserrat-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/Montserrat-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Courier Prime';
    src: url('assets/fonts/CourierPrime-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

/* --- 2. VARIABLES --- */

:root {
    --brand-blue: #1b1464;
    --brand-blue-light: #332b86;
    --brand-gold: #D4AF37;
    
    --bg-page: #FFFFFF;
    --bg-panel: #F4F4F5;
    
    --text-heading: #000000;
    --text-body: #404040;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-tech: 'Courier Prime', monospace;
    
    --border-color: #000000;
    --border-width: 2px;
    --radius: 0px; /* STRICTLY SQUARE */
}

/* --- 3. GLOBAL STOREFRONT OVERRIDES --- */

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--bg-page);
}

/* Force Headings to Black & Montserrat */
h1, h2, h3, h4, h5, h6, 
.gamma, .delta, .epsilon, .zeta {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* Links */
a { color: var(--brand-blue); }
a:hover { color: var(--brand-blue-light); text-decoration: none; }

/* --- 3.5 PROMOTIONAL TOP BAR --- */

.mlabs-promo-bar {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 999;
}

.mlabs-promo-content {
    max-width: 1200px;
    margin: 0 auto;
}

.mlabs-promo-bar .promo-text {
    display: inline-block;
    text-transform: uppercase;
    font-weight: 700;
}

@media (max-width: 768px) {
    .mlabs-promo-bar {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* --- 4. HEADER & NAV (Storefront Specifics) --- */

/* Remove Storefront's default bottom margin/padding madness */
.site-header {
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

/* Navigation Links */
.main-navigation ul li a,
.site-header-cart .cart-contents,
.site-header .secondary-navigation a {
    font-family: var(--font-heading);
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-heading) !important;
}

button.menu-toggle::before, button.menu-toggle::after, button.menu-toggle span::before {
    display: none;
}

button#site-navigation-menu-toggle {
    margin-top: 25px;
}

/* Search Bar - Make it "Lab" Style (Boxy) */
.site-search .widget_product_search form input[type=search],
.site-search .widget_search form input[type=search] {
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 10px 10px 35px;
    background-color: #fff;
    color: var(--text-heading);
}

.site-search .widget_product_search form::before {
    top: 1em;
    left: 1.15em;
}

/* Cart Icon Area */
.site-header-cart {
    background: transparent !important; /* Remove grey box */
}

/* --- 5. BUTTONS & INPUTS (The "Lab" Look) --- */

/* Target ALL Storefront Buttons */
button, input[type="button"], input[type="reset"], input[type="submit"], 
.button, .added_to_cart, .widget a.button, 
.site-header-cart .widget_shopping_cart a.button {
    background-color: var(--text-heading) !important; /* Black */
    color: #fff !important;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius) !important; /* Square */
    border: none;
    padding: 12px 25px !important;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

button:hover, .button:hover, input[type="submit"]:hover {
    background-color: var(--brand-blue) !important;
    color: #fff !important;
}

/* Inputs - Thick Borders */
input[type="text"], input[type="email"], input[type="url"], 
input[type="password"], input[type="search"], input[type="number"], 
input[type="tel"], textarea, select {
    background-color: #fff;
    border: var(--border-width) solid var(--border-color); /* Thick Black */
    border-radius: var(--radius);
    padding: 12px;
    color: var(--text-heading);
    font-family: var(--font-body);
}

input:focus, textarea:focus {
    border-color: var(--brand-blue);
    outline: none;
}

/* --- 6. HOMEPAGE / PRODUCT GRID --- */

.home h1.entry-title {
    display: none;
}

/* Remove Storefront's shadow and rounded corners */
ul.products li.product {
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible;
}

ul.products li.product img {
    border: 1px solid #eee;
    border-radius: var(--radius) !important;
    margin-bottom: 15px !important;
}

/* Product Titles */
ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 1rem;
    padding-top: 0;
    color: var(--text-heading);
}

/* Price Font */
ul.products li.product .price {
    font-family: var(--font-tech);
    color: var(--text-body);
    font-weight: 400;
    margin-bottom: 15px;
}

.woocommerce-variation-price {
    font-weight: 900;
    font-size: 1.5rem;
}

/* "Sale" Badge - Tech Style */
.onsale {
    background-color: var(--brand-blue);
    color: #fff;
    border-radius: var(--radius);
    font-family: var(--font-tech);
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 5px 10px;
    min-height: auto;
    line-height: 1;
}

/* --- 7. SINGLE PRODUCT PAGE --- */

/* Title */
.single-product div.product .product_title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    clear: none;
}

/* Price */
.single-product div.product p.price {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 20px;
}

.star-rating span:before, p.stars a:hover:after, p.stars a:after, .star-rating span:before {
    color: #efde39;
}

/* Swatches */

.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected:not(.no-stock) {
    background-color: #000;
    color: #fff;
}

/* Tabs - Clean up Storefront tabs */
.woocommerce-tabs ul.tabs {
    border-bottom: 2px solid var(--border-color) !important;
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 30px !important;
}

.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin-right: 20px !important;
}

.woocommerce-tabs ul.tabs li a {
    padding: 10px 0 !important;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #aaa !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--text-heading) !important;
    border-bottom: 4px solid var(--brand-blue);
}

/* Hide the "Built with Storefront" credit if you want */
.site-info {
    font-family: var(--font-tech);
    font-size: 0.8rem;
}

/* --- 9. MOBILE FIXES --- */

@media (max-width: 768px) {
    /* Fix Storefront's huge margins on mobile */
    .storefront-breadcrumb {
        margin-bottom: 10px;
        padding: 10px 0;
    }
    
    .single-product div.product .product_title {
        font-size: 1.8rem;
    }
    
    /* Make inputs nice and big for tapping */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    /* Storefront Mobile Menu Bar */
    .storefront-handheld-footer-bar {
        background-color: #fff;
        border-top: 2px solid var(--border-color);
    }
    .storefront-handheld-footer-bar ul li > a {
        color: var(--text-heading);
    }

    .footer-widgets {
        display: flex;
        flex-direction: column;
    }
}