/*
Theme Name: Ian's Haworthia Store - Repairs
Theme URI: https://ianshaworthia.co.uk/
Description: Conservative repair child theme for TheGreen. Keeps the existing design while correcting contrast, forms, WooCommerce readability and small layout issues.
Author: Jayce / OpenAI
Template: thegreen
Version: 1.0.5
Text Domain: ians-haworthia-repairs
*/

/* --------------------------------------------------------------------------
   Ian's Haworthia Store - conservative visual repairs only
   -------------------------------------------------------------------------- */

:root {
    --ihs-text: #2d2a24;
    --ihs-muted: #69655d;
    --ihs-border: #dedbd3;
    --ihs-soft: #f7f7f3;
    --ihs-green: #6d7c43;
    --ihs-green-dark: #536132;
}


/* Preserve TheGreen's normal white page canvas. This is deliberately limited
   to the main document/content surfaces and does not alter dark header/footer
   or deliberately coloured Elementor sections. */
html,
body,
#page,
.site,
.site-content {
    background-color: #fff;
}

/* Content readability: avoid inherited white text on ordinary white pages. */
.site-content,
.site-content .entry-content,
.site-content .entry-summary,
.site-content .woocommerce,
.site-content .woocommerce-page {
    color: var(--ihs-text);
}

.site-content .entry-content p,
.site-content .entry-content li,
.site-content .entry-content td,
.site-content .entry-content th,
.site-content .woocommerce p,
.site-content .woocommerce li,
.site-content .woocommerce td,
.site-content .woocommerce th,
.site-content .woocommerce label {
    color: inherit;
}

/* TheGreen page-title area can inherit white text even when no dark background
   image/colour is present. Give the standard title strip a subtle neutral base. */
.page-title-bar {
    background-color: #f3f4ef;
}

.page-title-bar .page-title,
.page-title-bar .breadcrumb,
.page-title-bar .breadcrumbs,
.page-title-bar .breadcrumb a,
.page-title-bar .breadcrumb span,
.page-title-bar .breadcrumbs a,
.page-title-bar .breadcrumbs span {
    color: var(--ihs-text) !important;
    text-shadow: none !important;
}

.page-title-bar .breadcrumb a:hover,
.page-title-bar .breadcrumbs a:hover {
    color: var(--ihs-green-dark) !important;
}

/* Normal links in body copy. Avoid changing buttons, menus or footer links. */
.entry-content p a:not(.button):not(.wp-element-button),
.entry-content li a:not(.button):not(.wp-element-button),
.woocommerce-Tabs-panel a:not(.button) {
    color: var(--ihs-green-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* Forms: visible text, labels and borders on white backgrounds. */
.site-content input[type="text"],
.site-content input[type="email"],
.site-content input[type="tel"],
.site-content input[type="password"],
.site-content input[type="number"],
.site-content input[type="search"],
.site-content input[type="url"],
.site-content textarea,
.site-content select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: #fff;
    color: var(--ihs-text);
    border: 1px solid var(--ihs-border);
    border-radius: 2px;
}

.site-content input::placeholder,
.site-content textarea::placeholder {
    color: #8a867f;
    opacity: 1;
}

.site-content label,
.woocommerce form .form-row label,
.woocommerce form .form-row .required {
    color: var(--ihs-text);
}

/* Buttons: make the action clear and keep text visible. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.site-content button[type="submit"],
.site-content input[type="submit"] {
    background-color: var(--ihs-green);
    border-color: var(--ihs-green);
    color: #fff !important;
    text-shadow: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.site-content button[type="submit"]:hover,
.site-content input[type="submit"]:hover {
    background-color: var(--ihs-green-dark);
    border-color: var(--ihs-green-dark);
    color: #fff !important;
}

/* Product grids: prevent washed-out product names/prices on white cards. */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title a,
ul.products li.product h2,
ul.products li.product h2 a,
ul.products li.product h3,
ul.products li.product h3 a,
.woocommerce ul.products li.product .price,
.woocommerce div.product .product_title,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--ihs-text) !important;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--ihs-green-dark) !important;
}

/* Keep sale badges readable regardless of inherited theme colours. */
.woocommerce span.onsale {
    background: var(--ihs-green);
    color: #fff !important;
}

/* WooCommerce system messages. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    background: #fff;
    color: var(--ihs-text);
    border-color: var(--ihs-border);
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
    color: var(--ihs-green-dark);
}

/* Cart / account / checkout tables can be very faint in the old theme. */
.woocommerce table.shop_table,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce-checkout-review-order-table,
.woocommerce-MyAccount-content table {
    color: var(--ihs-text);
    border-color: var(--ihs-border);
}

.woocommerce table.shop_table th,
.woocommerce-checkout-review-order-table th {
    background: var(--ihs-soft);
}

/* Tabs on product pages. */
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: var(--ihs-text) !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: var(--ihs-green-dark) !important;
}

/* Category/filter widgets on shop pages. */
.widget_product_categories a,
.woocommerce-widget-layered-nav a,
.woof_container a {
    color: var(--ihs-text);
}

.widget_product_categories a:hover,
.woocommerce-widget-layered-nav a:hover,
.woof_container a:hover {
    color: var(--ihs-green-dark);
}

/* Contact Form 7 validation and response text. */
.wpcf7 form .wpcf7-response-output,
.wpcf7-not-valid-tip {
    color: var(--ihs-text);
}

/* A little breathing room without changing the site's layout. */
.entry-content > :first-child {
    margin-top: 0;
}

.entry-content p {
    line-height: 1.7;
}

@media (max-width: 767px) {
    .page-title-bar .wrap {
        min-height: 0;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .page-title,
    .page-header .page-title {
        font-size: 28px;
        line-height: 1.2;
    }

    .woocommerce table.shop_table_responsive tr td,
    .woocommerce-page table.shop_table_responsive tr td {
        color: var(--ihs-text);
    }
}


/* v1.0.4 — Header cart icon visibility
   Keep the shopping-bag/cart glyph blue in its normal state.
   The item-count badge is deliberately left untouched. */
.site-header .site-header-cart a.cart-contents.header-button > i.opal-icon-shopping-cart,
.site-header .site-header-cart a.cart-contents.header-button > i.opal-icon-shopping-cart::before,
.site-header-mobile .site-header-cart a.cart-contents.header-button > i.opal-icon-shopping-cart,
.site-header-mobile .site-header-cart a.cart-contents.header-button > i.opal-icon-shopping-cart::before {
    color: #0788c9 !important;
}

.site-header .site-header-cart a.cart-contents.header-button:hover > i.opal-icon-shopping-cart,
.site-header .site-header-cart a.cart-contents.header-button:hover > i.opal-icon-shopping-cart::before,
.site-header-mobile .site-header-cart a.cart-contents.header-button:hover > i.opal-icon-shopping-cart,
.site-header-mobile .site-header-cart a.cart-contents.header-button:hover > i.opal-icon-shopping-cart::before {
    color: #0788c9 !important;
}


/* v1.0.5 — Header account icon visibility
   Keep the account/user glyph visible in its normal state. */
.site-header .header-account a,
.site-header .header-account a i,
.site-header .header-account a i::before,
.site-header .site-header-account a,
.site-header .site-header-account a i,
.site-header .site-header-account a i::before,
.site-header-mobile .header-account a,
.site-header-mobile .header-account a i,
.site-header-mobile .header-account a i::before,
.site-header-mobile .site-header-account a,
.site-header-mobile .site-header-account a i,
.site-header-mobile .site-header-account a i::before {
    color: #111 !important;
}

.site-header .header-account a:hover,
.site-header .header-account a:hover i,
.site-header .header-account a:hover i::before,
.site-header .site-header-account a:hover,
.site-header .site-header-account a:hover i,
.site-header .site-header-account a:hover i::before,
.site-header-mobile .header-account a:hover,
.site-header-mobile .header-account a:hover i,
.site-header-mobile .header-account a:hover i::before,
.site-header-mobile .site-header-account a:hover,
.site-header-mobile .site-header-account a:hover i,
.site-header-mobile .site-header-account a:hover i::before {
    color: #111 !important;
}
