/*
 * Greenhome custom styles.
 *
 * Loaded AFTER dist/styles/main.css (see includes/scripts.php). New CSS goes
 * here as plain CSS — the Sage webpack/node-sass pipeline is legacy (only
 * builds on Node 12) and is no longer part of the day-to-day workflow.
 * Rules here override the compiled stylesheet by cascade order, so match the
 * compiled selector prefixes:
 *   tiles:       ul.products li.product …
 *   detail page: .storefront-full-width-content.single-product div.product …
 *
 * Brand colours: navy #0F1C46, pink #E00C5D, availability green #2e7d32.
 */

/* ───────────────────────── Sale badge (all pages) ──────────────────── */

/* The compiled .product-type-simple .onsale rule points at a missing
   /wp-content/uploads/2025/10/product-icons.png, so simple products render
   an empty/broken 65×65 box instead of a badge. Restore a plain, readable
   badge (matches the orange ribbon variable products already get via
   _products-listing.scss). The sale-flash text is WooCommerce's own
   translatable "Sale!" (the theme no longer blanks it — see includes/actions.php).
   Only `background` needs !important (the compiled longhands are !important);
   color/width/height win by source order since custom.css loads after main.css. */
.product-type-simple .onsale {
    background: #FF7E26 !important;
    color: #ffffff;
    width: auto;
    height: auto;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

/* ───────────────────────── Listing tiles ───────────────────────── */

/* Dropdown values stay left-aligned (reverts the compiled right-align). */
ul.products li.product .gh-loop-uom-picker select,
ul.products li.product .quantity-listing select {
    text-align: left;
}

/* Single-size: plain left-aligned text, not a right-pushed chip. */
ul.products li.product .gh-loop-uom-picker__static {
    justify-content: flex-start;
    flex: 0 1 auto;
    padding: 8px 0;
}

/* A bit more air between the Pack and Carton blocks… */
ul.products li.product .gh-loop-uom-block {
    margin-bottom: 12px;
}

/* …and less between the details and the selects. */
ul.products li.product .gh-tile__controls {
    padding-top: 6px;
}

/* Units / unit-price line right-aligned under the price. */
ul.products li.product .gh-loop-uom-block__meta {
    text-align: right;
}

/* Availability row renders as the first row of the controls group (see
   filters.php), so it hugs the bottom of the tile just above Size/Qty and
   acts as the divider — faint dotted rule above it, always rendered (says
   "Out of stock" when the product is) so every tile breaks up the same. */
ul.products li.product .gh-tile__availability {
    width: 100%;
    border-top: 1px dotted rgba(15, 28, 70, 0.3);
    padding-top: 8px;
    margin-top: 0;
    margin-bottom: 0;
}
ul.products li.product .gh-tile__availability > .c-tooltip {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
}
ul.products li.product .gh-tile__availability-out {
    color: #b71c1c;
    font-size: 12px;
}

/* No review stars on listing tiles. */
ul.products li.product .star-rating {
    display: none;
}

/* Selects sit slightly inset from the tile edge so they read as aligned
   with the rounded Add to cart button. */
ul.products li.product .gh-loop-uom-picker,
ul.products li.product .quantity-listing {
    padding-right: 10px;
}

/* ─────────────────────────── Shop page ─────────────────────────────── */

/* Category tiles: longer names wrap to 3+ lines and push the tile out of
   alignment with its row-mates. Clamp to 2 lines and reserve exactly two
   lines of height. min-height is in em (2 lines × 1.2 line-height) so it
   tracks the font-size, which differs by breakpoint (1rem mobile / 1.625rem
   at ≥768px) — a fixed px value would only align at one breakpoint. */
.c-categories-listing__cat_title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    min-height: 2.4em;
}

/* ──────────────────────── Product detail page ─────────────────────── */

/* Tighter spacing between the ruled detail rows (Price / Pack / Carton /
   Packed etc) — compiled main.css sets 16px mobile / 26px desktop. */
.storefront-full-width-content.single-product div.product p.price {
    padding: 10px 0;
}
@media only screen and (min-width: 992px) {
    .storefront-full-width-content.single-product div.product p.price {
        padding: 17px 0;
    }
}

/* The Size row's top spacing matches the ruled rows above it
   (counters p.price:last-of-type's bottom margin). */
.storefront-full-width-content.single-product div.product .variations_form {
    margin-top: -20px;
}

/* The selected variation's price/stock line duplicates the detail rows
   above — hide it. */
.storefront-full-width-content.single-product div.product .variations_form .single_variation_wrap .woocommerce-variation.single_variation {
    display: none !important;
}

/* Qty dropdown matches the Size dropdown — neutral navy pill, not the
   global solid-pink select. */
.storefront-full-width-content.single-product div.product .gh-qty-row .quantity select {
    min-width: 160px;
    -webkit-appearance: none;
    appearance: none;
    padding: 7px 36px 7px 14px;
    height: auto;
    line-height: 1.3;
    border: 1px solid rgba(15, 28, 70, 0.35);
    border-radius: 999px;
    background-color: #ffffff;
    background-image: url('/wp-content/themes/storefront-greenhome/dist/images/angle-down-blue.svg');
    background-repeat: no-repeat;
    background-position: right 14px center;
    color: #0F1C46;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.storefront-full-width-content.single-product div.product .gh-qty-row .quantity select option {
    background: #ffffff;
    color: #222222;
    font-weight: normal;
}

/* Add to cart spans the full row, like the ruled rows above it. */
.storefront-full-width-content.single-product div.product .single_add_to_cart_button {
    width: 100%;
    min-width: 0;
}

/* Related-products tiles render inside div.product, so the summary's
   .quantity select sizing leaks into them and inflates the dropdowns —
   restore the compact tile sizing. */
.storefront-full-width-content.single-product div.product ul.products li.product .quantity-listing select,
.storefront-full-width-content.single-product div.product ul.products li.product .gh-loop-uom-picker select {
    line-height: 1.3;
    min-width: 0;
    height: auto;
}

/* Product description links always underlined (DEAR-synced content in
   .summary .gh-product-description, matching blog convention). */
.storefront-full-width-content.single-product div.product .gh-product-description a:not(.button) {
    text-decoration: underline;
}
.storefront-full-width-content.single-product div.product .gh-product-description a:not(.button):hover {
    text-decoration: none;
}

/* ──────────────────────── Product gallery ─────────────────────────── */

/* Thumbnails as a grid, not a horizontal scroll strip. FlexSlider builds this
   list in JS and sets inline flex/width, so these need !important to win. */
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    overflow: visible !important;
    width: auto !important;
}
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100% !important;
}

/* Cleaner prev/next arrows: smaller, subtler circle with a CSS-drawn navy
   chevron instead of the heavy shadowed SVG button. (.flex-prev keeps the
   compiled rotate(180deg), which flips the chevron to point left.) */
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-direction-nav a {
    position: relative;
    width: 34px;
    height: 34px;
    background-image: none;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 28, 70, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-direction-nav a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 46%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #0F1C46;
    border-right: 2px solid #0F1C46;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* The yellow swirl ring shows on the MAIN image only while the featured
   (first) slide is the one on screen. FlexSlider (slide mode) tags the
   visible slide `.flex-active-slide`; so the ring is scoped to the featured
   slide AND only when it is active. Navigate to any other image → the
   featured slide loses `.flex-active-slide`, its ring is removed, and no
   other slide ever carries one.
   Scoped to `.flex-viewport` (which only exists once FlexSlider has
   initialised): single-image galleries never start the slider (Woo sets
   allowOneSlide:false), so without this scope the featured slide never
   gains `.flex-active-slide` and the ring would be hidden forever. */
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image.gh-slide--featured:not(.flex-active-slide)::after,
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image.gh-slide--featured:not(.flex-active-slide) a::after {
    content: none !important;
    background-image: none !important;
}
/* Non-featured slides are always plain full-bleed squares (no ring, no
   circular crop), whether active or not. */
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(.gh-slide--featured)::after,
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(.gh-slide--featured) a::after {
    content: none !important;
    background-image: none !important;
}
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(.gh-slide--featured) a {
    padding: 0 !important;
}
.storefront-full-width-content.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image:not(.gh-slide--featured) img {
    border-radius: 0 !important;
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
}

/* ──────────────────────── Contact page ─────────────────────────────── */

/* All contact page h2s: compact spacing, no underlines. */
.page-id-582 h2 {
    margin-bottom: 16px;
}

/* Contact info items (email, phone, WhatsApp): larger, spaced out. */
.page-id-582 .wp-block-columns.contact-main .wp-block-column:first-child .margin-bottom-2 {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Social Media section: add top margin to move it down. */
.page-id-582 .wp-block-columns.contact-main .wp-block-column:first-child > .wp-block-html:last-of-type {
    margin-top: 48px;
}

/* Contact info + form row: left column (contact details + social), right
   column (intro + form). Column widths via inline flex-basis (36% / 64%);
   Gutenberg stacks on mobile. WhatsApp icon sizing matches fa-icons. */
.page-id-582 .wp-block-columns.contact-main .gh-whatsapp-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Reduce spacer heights to move content up. */
.page-id-582 .wp-block-spacer {
    height: 20px !important;
}
@media only screen and (min-width: 641px) {
    .page-id-582 .wp-block-spacer {
        height: 60px !important;
    }
}




.page-template-template-categories  .storefront-breadcrumb {
display: none !important;
}
