/*
 Theme Name:   Nègès Market Child
 Theme URI:    https://lujensp.com
 Description:  Child theme for Nègès Market — Haitian products import & retail. Built on Cosmetsy.
 Author:       LujensP
 Author URI:   https://lujensp.com
 Template:     cosmetsy
 Version:      1.2.0
 Text Domain:  neges-market-child
*/

/* =============================================
   CSS VARIABLES
============================================= */
:root {
    --nm-red:       #C8102E;
    --nm-navy:      #002868;
    --nm-cream:     #F7F1E8;
    --nm-brown:     #3D2418;
    --nm-gold:      #B8860B;
    --nm-white:     #FFFFFF;
    --nm-red-dark:  #9E0C24;
    --nm-navy-dark: #001A4D;
    --nm-cream-dark:#EDE4D4;
    --nm-text:      #2A1A0E;
    --nm-muted:     #7A6653;
    --nm-radius:    2px;
    --nm-font-display: 'Playfair Display', Georgia, serif;
    --nm-font-body:    'Inter', system-ui, sans-serif;
}

/* =============================================
   GLOBAL
============================================= */
body {
    background-color: var(--nm-cream) !important;
    color: var(--nm-text) !important;
    font-family: var(--nm-font-body) !important;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--nm-font-display) !important;
    color: var(--nm-brown) !important;
}
a { color: var(--nm-red); }
a:hover { color: var(--nm-red-dark); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }

/* =============================================
   WOOCOMMERCE
============================================= */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce #payment #place_order,
.nm-btn-primary {
    background: var(--nm-red) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--nm-radius) !important;
    font-family: var(--nm-font-body) !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    transition: background 0.2s !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.nm-btn-primary:hover { background: var(--nm-red-dark) !important; }
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price { color: var(--nm-text) !important; font-weight: 600 !important; }
.woocommerce ul.products { margin: 0 !important; }
.woocommerce ul.products li.product {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce ul.products li.product a img { margin: 0 !important; display: block; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--nm-font-body) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--nm-text) !important;
    padding: 12px 14px 4px !important;
    line-height: 1.4 !important;
}
.woocommerce ul.products li.product .price {
    padding: 0 14px 8px !important;
    font-size: 13px !important;
    display: block !important;
}
.woocommerce ul.products li.product .price::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--nm-red);
    margin-top: 6px;
}
.woocommerce ul.products li.product .button {
    margin: 0 14px 14px !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
}

/* =============================================
   TOP BAR
============================================= */
.nm-topbar {
    background: var(--nm-navy);
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-family: var(--nm-font-body);
    font-weight: 500;
    letter-spacing: 0.06em;
    padding: 8px 16px;
    position: relative;
    z-index: 100;
}
.nm-topbar a { color: #fff; text-decoration: underline; }

/* =============================================
   HERO — full bleed behind header, diagonal split
   Strategy: The Cosmetsy header is position:absolute
   or sits on top. We make the hero a full-width
   section with min-height that includes header height.
   Left cream panel clips diagonally. Right photo fills
   from very top edge.
============================================= */
.nm-hero {
    position: relative;
    min-height: 620px;
    display: grid;
    /* Left cream col slightly narrower than right photo col */
    grid-template-columns: 45% 55%;
    overflow: hidden;
    background: var(--nm-cream);
}

/* Left: cream, diagonal right edge clip */
.nm-hero__left {
    position: relative;
    z-index: 2;
    background: var(--nm-cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Top padding accommodates header height ~80px + breathing room */
    padding: 120px 100px 80px 56px;
    /* Diagonal cut: top-right corner stays, bottom-right pulls left */
    clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

/* Right: photo fills edge to edge, behind header too */
.nm-hero__right {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.nm-hero__right-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--nm-navy);
    transition: transform 8s ease;
}
.nm-hero:hover .nm-hero__right-bg { transform: scale(1.02); }

/* Vertical side text */
.nm-hero__vertical-text {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--nm-muted);
    white-space: nowrap;
    opacity: 0.55;
    z-index: 3;
    font-family: var(--nm-font-body);
}

.nm-hero__eyebrow {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--nm-muted);
    margin-bottom: 20px;
    font-family: var(--nm-font-body);
}
.nm-hero__title {
    font-family: var(--nm-font-display) !important;
    font-size: clamp(48px, 5.5vw, 78px) !important;
    font-weight: 900 !important;
    line-height: 1.0 !important;
    color: var(--nm-navy) !important;
    margin: 0 !important;
    letter-spacing: -0.01em !important;
}
.nm-hero__title em {
    color: var(--nm-red) !important;
    font-style: italic;
    display: block;
}
.nm-hero__divider {
    width: 40px;
    height: 2px;
    background: var(--nm-red);
    margin: 22px 0 18px 0;
}
.nm-hero__subtitle {
    font-size: 14px;
    color: var(--nm-muted);
    line-height: 1.7;
    margin: 0 0 32px 0;
    max-width: 300px;
    font-family: var(--nm-font-body);
}
.nm-hero__cta-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--nm-text);
    text-decoration: none;
    border-bottom: 1.5px solid var(--nm-text);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s;
    font-family: var(--nm-font-body);
}
.nm-hero__cta-link:hover { color: var(--nm-red); border-color: var(--nm-red); }

/* =============================================
   CATEGORY STRIP — label sidebar + 6 photo cards
   Layout: left sidebar col (label) + cards fill rest
============================================= */
.nm-categories {
    background: var(--nm-brown);
    display: grid;
    /* Sidebar col for "SHOP BY CATEGORY" label + 6 equal photo cols */
    grid-template-columns: 160px repeat(6, 1fr);
    min-height: 200px;
    padding: 0;
}

/* Sidebar label col */
.nm-categories__sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px 20px 24px;
    background: var(--nm-brown);
}
.nm-categories__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    font-family: var(--nm-font-body);
    line-height: 1.4;
    margin-bottom: 6px;
}
.nm-categories__sublabel {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-family: var(--nm-font-body);
    line-height: 1.5;
}

/* Photo cards — each fills its grid cell */
.nm-category-card {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    text-decoration: none;
    display: block;
}
.nm-category-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
    transition: filter 0.35s, transform 0.5s;
}
.nm-category-card:hover .nm-category-card__bg {
    filter: brightness(0.7);
    transform: scale(1.05);
}
.nm-category-card__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 14px 16px;
}
.nm-category-card__name {
    font-family: var(--nm-font-display);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    line-height: 1.1;
}

/* =============================================
   BUTTON STYLES
============================================= */
.nm-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: var(--nm-red);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-radius: var(--nm-radius);
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-family: var(--nm-font-body);
}
.nm-btn-primary:hover { background: var(--nm-red-dark) !important; color: #fff !important; }
.nm-view-all {
    font-size: 11px;
    font-weight: 700;
    color: var(--nm-red);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    font-family: var(--nm-font-body);
}
.nm-view-all:hover { color: var(--nm-red-dark); }

/* =============================================
   STORY SECTION
   Left: cream text panel with diagonal right clip
   Right: full-bleed photo with navy quote block
         overlapping on the right ~40% of the photo
============================================= */
.nm-story {
    position: relative;
    overflow: hidden;
    display: grid;
    /* Left text ~38%, right photo+quote ~62% */
    grid-template-columns: 38% 62%;
    min-height: 400px;
    background: var(--nm-cream);
}

/* Left text col — diagonal right edge */
.nm-story__left {
    position: relative;
    z-index: 2;
    background: var(--nm-cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 80px 56px 40px;
    /* Diagonal cut matches hero direction */
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

/* Right: photo + quote overlay — single cell, photo as bg */
.nm-story__right-wrap {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}
.nm-story__photo-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #5C3D2E;
}

/* Navy quote block — overlays the RIGHT portion of the photo */
.nm-story__quote-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 42%;
    background: var(--nm-navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
    z-index: 2;
}

/* Typography */
.nm-story__eyebrow {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--nm-muted);
    margin-bottom: 10px;
    font-family: var(--nm-font-body);
}
.nm-story__title {
    font-family: var(--nm-font-display) !important;
    font-size: clamp(24px, 2.4vw, 36px) !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    color: var(--nm-navy) !important;
    margin: 0 0 14px 0 !important;
    letter-spacing: -0.01em !important;
}
.nm-story__divider {
    width: 36px;
    height: 2px;
    background: var(--nm-red);
    margin-bottom: 16px;
}
.nm-story__text {
    font-size: 13px;
    color: var(--nm-muted);
    line-height: 1.8;
    margin-bottom: 24px;
    font-family: var(--nm-font-body);
}
.nm-proverb__bigquote {
    font-size: 52px;
    line-height: 0.7;
    color: var(--nm-red);
    font-family: var(--nm-font-display);
    margin-bottom: 14px;
    display: block;
}
.nm-proverb__text {
    font-family: var(--nm-font-display);
    font-size: 18px;
    font-style: italic;
    line-height: 1.55;
    color: rgba(255,255,255,0.95);
    margin-bottom: 18px;
}
.nm-proverb__attr {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    font-family: var(--nm-font-body);
}

/* =============================================
   FEATURED PRODUCTS — 4-col grid
============================================= */
.nm-featured {
    background: var(--nm-cream);
    padding: 56px 0 64px;
}
.nm-featured__header {
    margin-bottom: 32px;
}
.nm-section-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--nm-red);
    margin-bottom: 6px;
    font-family: var(--nm-font-body);
}
.nm-section-title {
    font-family: var(--nm-font-display) !important;
    font-size: clamp(26px, 2.8vw, 38px) !important;
    font-weight: 800 !important;
    color: var(--nm-navy) !important;
    margin: 0 !important;
    line-height: 1.1 !important;
}
.nm-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
}
/* 4-col grid */
.nm-featured .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1px !important;
    float: none !important;
}
.nm-featured .woocommerce ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* =============================================
   TRUST STRIP
============================================= */
.nm-trust {
    background: var(--nm-cream-dark);
    padding: 48px 0;
}
.nm-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.nm-trust-item { display: flex; flex-direction: column; gap: 8px; }
.nm-trust-item__icon { font-size: 24px; line-height: 1; }
.nm-trust-item__title {
    font-family: var(--nm-font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--nm-navy);
}
.nm-trust-item__text {
    font-size: 12px;
    color: var(--nm-muted);
    line-height: 1.65;
    font-family: var(--nm-font-body);
}

/* =============================================
   FOOTER — deep red, 3-col body
============================================= */
.nm-footer {
    background: var(--nm-red);
    color: rgba(255,255,255,0.85);
    font-family: var(--nm-font-body);
}
.nm-footer__body {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr 1fr;
    gap: 48px;
    padding: 56px 40px 48px;
    max-width: 1280px;
    margin: 0 auto;
}
.nm-footer__brand-statement {
    font-family: var(--nm-font-display);
    font-size: clamp(18px, 1.8vw, 26px);
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 10px 0;
}
.nm-footer__brand-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin: 0;
    font-family: var(--nm-font-body);
    max-width: 320px;
}
.nm-footer__col-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 10px;
    font-family: var(--nm-font-body);
}
.nm-footer__community-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 18px;
    font-family: var(--nm-font-body);
}
.nm-footer__email-row {
    display: flex;
    align-items: stretch;
}
.nm-footer__email-row input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-right: none;
    color: #fff;
    font-size: 12px;
    outline: none;
    font-family: var(--nm-font-body);
    border-radius: 0;
}
.nm-footer__email-row input[type="email"]::placeholder { color: rgba(255,255,255,0.45); }
.nm-footer__email-row button {
    padding: 10px 16px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
}
.nm-footer__email-row button:hover { background: rgba(255,255,255,0.3); }
.nm-footer__social-icons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.nm-footer__social-icons a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.nm-footer__social-icons a:hover { color: #fff; }
.nm-footer__sub {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 14px 40px;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.nm-footer__sub-left { font-size: 11px; color: rgba(255,255,255,0.5); }
.nm-footer__sub-center { display: flex; gap: 20px; font-size: 11px; }
.nm-footer__sub-center a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}
.nm-footer__sub-center a:hover { color: #fff; }
.nm-footer__sub-right { font-size: 11px; color: rgba(255,255,255,0.45); }
.nm-footer__sub-right a { color: rgba(255,255,255,0.45); text-decoration: none; }
.nm-footer__sub-right a:hover { color: #fff; }

/* =============================================
   SHOP PAGE BANNER
============================================= */
.nm-shop-banner {
    background: var(--nm-navy);
    padding: 56px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}
.nm-shop-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,40,104,0.72);
}
.nm-shop-banner__inner { position: relative; z-index: 1; }
.nm-shop-banner h1 {
    font-family: var(--nm-font-display) !important;
    font-size: 42px !important;
    color: #fff !important;
    margin-bottom: 12px !important;
}
.nm-shop-banner p {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    max-width: 460px;
    margin: 0 auto;
    font-family: var(--nm-font-body);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
    .nm-hero { grid-template-columns: 50% 50%; }
    .nm-categories { grid-template-columns: 140px repeat(3, 1fr); }
    .nm-categories .nm-category-card:nth-child(n+5) { display: none; }
    .nm-story { grid-template-columns: 1fr; }
    .nm-story__left { clip-path: none; padding: 48px 32px; }
    .nm-story__right-wrap { min-height: 360px; }
    .nm-story__quote-overlay { width: 50%; }
    .nm-trust__grid { grid-template-columns: repeat(2, 1fr); }
    .nm-featured .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
    .nm-footer__body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nm-hero { grid-template-columns: 1fr; min-height: auto; }
    .nm-hero__left { clip-path: none; padding: 100px 24px 48px; }
    .nm-hero__right { height: 260px; position: relative; }
    .nm-hero__right-bg { position: absolute; }
    .nm-categories { grid-template-columns: 1fr; }
    .nm-categories__sidebar { padding: 20px 24px; }
    .nm-story__left { padding: 40px 24px; }
    .nm-story__right-wrap { min-height: 300px; }
    .nm-story__quote-overlay { position: relative; width: 100%; bottom: auto; top: auto; right: auto; }
    .nm-trust__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .nm-featured .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
    .nm-footer__body { grid-template-columns: 1fr; padding: 40px 24px 32px; gap: 32px; }
    .nm-footer__sub { flex-direction: column; align-items: flex-start; padding: 14px 24px; }
    .nm-section-header { flex-direction: column; gap: 10px; }
}

/* =============================================
   THEME OVERRIDE PATCH — v1.2.1
   Force our sections to break out of Cosmetsy's
   container/wrapper constraints
============================================= */

/* Strip any padding/margin Cosmetsy adds to main content wrapper */
.site-content,
.site-primary,
.main-content,
#main,
#content,
.content-area {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Hero: force full width, no extra padding from theme */
.nm-hero {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Vertical text: lives on the section, not inside text flow.
   Push hero content RIGHT to give the vertical text its own lane */
.nm-hero__left {
    padding-left: 52px !important; /* lane for vertical text */
}

/* The vertical text sits in the left panel's absolute space,
   positioned at the left edge of the section */
.nm-hero__vertical-text {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) rotate(-90deg) !important;
    transform-origin: center center !important;
    z-index: 10 !important;
    pointer-events: none;
}

/* Content block inside left — shift right away from vertical text */
.nm-hero__left .nm-hero__eyebrow,
.nm-hero__left .nm-hero__title,
.nm-hero__left .nm-hero__divider,
.nm-hero__left .nm-hero__subtitle,
.nm-hero__left .nm-hero__cta-link {
    margin-left: 28px;
}

/* Category strip: force full-width grid, no wrapping */
.nm-categories {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* Tighter sidebar, more room for cards */
    grid-template-columns: 130px repeat(6, 1fr) !important;
}

/* Category cards: remove any gap between them */
.nm-category-card {
    min-height: 180px !important;
    border-right: 1px solid rgba(0,0,0,0.15);
}
.nm-category-card:last-child { border-right: none; }

/* Category sidebar: align text to bottom-left like mockup */
.nm-categories__sidebar {
    justify-content: flex-end !important;
    padding-bottom: 16px !important;
}

/* Product grid: fix gap and border between cards */
.nm-featured {
    width: 100% !important;
}
.nm-featured .woocommerce ul.products {
    gap: 0 !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
}
.nm-featured .woocommerce ul.products li.product {
    border: none !important;
    border-right: 1px solid rgba(0,0,0,0.07) !important;
    border-bottom: 1px solid rgba(0,0,0,0.07) !important;
}
.nm-featured .woocommerce ul.products li.product:nth-child(4n) {
    border-right: none !important;
}

/* Product category label above product name */
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.nm-product-cat-label {
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--nm-red) !important;
    padding: 14px 14px 0 !important;
    display: block !important;
    font-family: var(--nm-font-body) !important;
}

/* Story: force full width */
.nm-story {
    width: 100% !important;
    max-width: 100% !important;
}

/* Hero content wrapper — sits right of the vertical text lane */
.nm-hero__content {
    display: flex;
    flex-direction: column;
    margin-left: 32px; /* clear the vertical text */
}
/* Remove the individual margin-left rules since we use the wrapper now */
.nm-hero__left .nm-hero__eyebrow,
.nm-hero__left .nm-hero__title,
.nm-hero__left .nm-hero__divider,
.nm-hero__left .nm-hero__subtitle,
.nm-hero__left .nm-hero__cta-link {
    margin-left: 0 !important;
}
/* Left panel: tighter left padding since content wrapper handles the offset */
.nm-hero__left {
    padding-left: 32px !important;
}

/* =============================================
   v1.3.0 — TRANSPARENT HEADER + LAYOUT FIXES
============================================= */

/* 1. Force transparent header behavior on front page.
      Cosmetsy uses .header-transparent class for position:absolute.
      We override the default (position:relative) on front page. */
.nm-front-page #masthead.site-header {
    position: absolute !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 100 !important;
    background: transparent !important;
}
/* Make header links white so they're visible over the dark photo */
.nm-front-page .site-header--content,
.nm-front-page .site-header--content .container,
.nm-front-page .site-header--content a:not(.button),
.nm-front-page .site-header--content .menu > .menu-item > a,
.nm-front-page .site-header--desktop .quick-button,
.nm-front-page .site-header--desktop .quick-button a,
.nm-front-page .site-header--desktop .quick-button svg {
    color: #fff !important;
    stroke: #fff !important;
    background-color: transparent !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.nm-front-page .site-header--content .site-header--nav {
    background: transparent !important;
}
/* Logo stays visible */
.nm-front-page .site-brand img { filter: none; }

/* 2. Strip the #page/.site--inner wrapper max-width & padding
      that header-type1 introduces */
.nm-front-page #page,
.nm-front-page .site--inner {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* 3. Hero: now that header is absolute, hero fills from true top */
.nm-front-page .nm-hero {
    min-height: 100vh !important;
    max-height: 720px !important;
}
.nm-front-page .nm-hero__left {
    padding-top: 130px !important; /* clear the absolute header */
    padding-bottom: 80px !important;
}

/* 4. Vertical text — anchored to left of the left panel */
.nm-front-page .nm-hero__vertical-text {
    left: 20px !important;
    writing-mode: vertical-rl !important;
    transform: rotate(180deg) !important;
    top: 50% !important;
    margin-top: -60px !important;
    position: absolute !important;
}

/* 5. Content block clears the vertical text lane */
.nm-front-page .nm-hero__content {
    margin-left: 36px;
}

/* 6. Category strip — ensure no padding/margin from parent */
.nm-front-page .nm-categories {
    display: grid !important;
    grid-template-columns: 130px repeat(6, 1fr) !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}
.nm-front-page .nm-categories__sidebar {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 20px 16px 18px 20px !important;
    background: var(--nm-brown) !important;
}
.nm-front-page .nm-category-card {
    display: block !important;
    min-height: 190px !important;
    border-right: 1px solid rgba(0,0,0,0.15) !important;
}

/* 7. Product grid gaps */
.nm-front-page .nm-featured .woocommerce ul.products,
.nm-featured .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}
.nm-featured .woocommerce ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    border: none !important;
    border-right: 1px solid rgba(0,0,0,0.08) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.nm-featured .woocommerce ul.products li.product:nth-child(4n) {
    border-right: none !important;
}

/* 8. Story section full width */
.nm-front-page .nm-story {
    display: grid !important;
    grid-template-columns: 38% 62% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =============================================
   PATCH v1.4.0 — Targeted fixes only
   (Homepage styles untouched)
============================================= */

/* 1. Search/cart icons white in header */
#nmSearchBtn,
#nmCartBtn { color: #fff !important; }
#nmSearchBtn svg,
#nmCartBtn svg { stroke: #fff !important; }
#nmSearchBtn:hover,
#nmCartBtn:hover { color: rgba(255,255,255,0.75) !important; }
/* Also catch Cosmetsy's own header search if it exists */
.site-header .search-toggle svg,
.cosmetsy-header .icon-search svg,
.header-icons svg { stroke: #fff !important; color: #fff !important; }

/* 2. Product card background = page cream */
.woocommerce ul.products li.product {
    background: var(--nm-cream) !important;
}
.woocommerce ul.products li.product img {
    background: #EDE4D4 !important;
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

/* 3. Category label above title — style */
.nm-product-cat-label {
    display: block !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--nm-red) !important;
    padding: 14px 16px 0 !important;
    font-family: var(--nm-font-body) !important;
    line-height: 1 !important;
}
/* Hide any duplicate category that appears AFTER the button */
.woocommerce ul.products li.product .button ~ .nm-product-cat-label,
.woocommerce ul.products li.product .added_to_cart ~ .nm-product-cat-label {
    display: none !important;
}
/* Hide Cosmetsy's built-in category link if it sneaks through */
.woocommerce ul.products li.product .product-categories,
.woocommerce ul.products li.product .posted-in {
    display: none !important;
}

/* =============================================
   POLICY / CONTACT PAGE STYLES
============================================= */
.nm-page-banner {
    background: var(--nm-navy);
    padding: 72px 0 56px;
    text-align: center;
    position: relative;
}
.nm-page-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: var(--nm-red);
}
.nm-page-banner h1 {
    font-family: var(--nm-font-display) !important;
    font-size: clamp(32px, 4vw, 52px) !important;
    color: #fff !important;
    margin: 0 0 12px !important;
    font-weight: 800 !important;
}
.nm-page-banner p {
    color: rgba(255,255,255,0.6) !important;
    font-size: 13px !important;
    margin: 0 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--nm-font-body) !important;
}
.nm-policy-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 64px 40px 96px;
}
.nm-policy-effective {
    display: inline-block;
    background: var(--nm-cream-dark);
    color: var(--nm-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 2px;
    margin-bottom: 40px;
    font-family: var(--nm-font-body);
}
.nm-policy-body h2 {
    font-family: var(--nm-font-display) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--nm-navy) !important;
    margin: 48px 0 12px !important;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--nm-cream-dark);
}
.nm-policy-body h2:first-of-type { margin-top: 0 !important; }
.nm-policy-body p,
.nm-policy-body li {
    font-size: 15px;
    color: var(--nm-muted);
    line-height: 1.85;
    font-family: var(--nm-font-body);
}
.nm-policy-body ul,
.nm-policy-body ol { padding-left: 20px; margin-bottom: 16px; }
.nm-policy-body li { margin-bottom: 8px; }
.nm-policy-body strong { color: var(--nm-text); font-weight: 600; }
.nm-policy-body a { color: var(--nm-red); }

/* Contact page */
.nm-contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    max-width: 1060px;
    margin: 0 auto;
    padding: 64px 40px 96px;
    gap: 0;
}
.nm-contact-info {
    padding-right: 56px;
    border-right: 1px solid var(--nm-cream-dark);
}
.nm-contact-info h2 {
    font-family: var(--nm-font-display) !important;
    font-size: 28px !important;
    color: var(--nm-navy) !important;
    margin: 0 0 14px !important;
    font-weight: 800 !important;
}
.nm-contact-info > p {
    font-size: 14px;
    color: var(--nm-muted);
    line-height: 1.8;
    margin-bottom: 36px;
    font-family: var(--nm-font-body);
}
.nm-contact-channel {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}
.nm-contact-channel__icon {
    width: 38px; height: 38px;
    background: var(--nm-cream-dark);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}
.nm-contact-channel__label {
    display: block;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--nm-muted);
    font-family: var(--nm-font-body);
    margin-bottom: 3px;
}
.nm-contact-channel__value {
    font-size: 14px; font-weight: 600;
    color: var(--nm-navy);
    font-family: var(--nm-font-body);
    text-decoration: none;
    display: block;
}
.nm-contact-channel__value:hover { color: var(--nm-red); }

.nm-contact-form { padding-left: 56px; }
.nm-contact-form h2 {
    font-family: var(--nm-font-display) !important;
    font-size: 24px !important;
    color: var(--nm-navy) !important;
    margin: 0 0 28px !important;
    font-weight: 800 !important;
}
.nm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nm-form-row { margin-bottom: 16px; }
.nm-form-row label {
    display: block;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--nm-muted);
    margin-bottom: 6px;
    font-family: var(--nm-font-body);
}
.nm-form-row input,
.nm-form-row select,
.nm-form-row textarea {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--nm-cream-dark);
    background: #fff;
    font-size: 14px; font-family: var(--nm-font-body);
    color: var(--nm-text);
    border-radius: 2px; outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.nm-form-row input:focus,
.nm-form-row select:focus,
.nm-form-row textarea:focus { border-color: var(--nm-navy); }
.nm-form-row textarea { min-height: 130px; resize: vertical; }
.nm-form-submit { margin-top: 8px; }
.nm-form-submit .nm-btn-primary { width: 100%; justify-content: center; }
.nm-contact-success {
    margin-top: 16px;
    color: var(--nm-red);
    font-weight: 600;
    font-size: 14px;
    font-family: var(--nm-font-body);
}

@media (max-width: 768px) {
    .nm-contact-wrap { grid-template-columns: 1fr; padding: 40px 24px 60px; }
    .nm-contact-info { padding-right: 0; border-right: none; border-bottom: 1px solid var(--nm-cream-dark); padding-bottom: 36px; margin-bottom: 36px; }
    .nm-contact-form { padding-left: 0; }
    .nm-form-grid { grid-template-columns: 1fr; }
    .nm-policy-body { padding: 40px 24px 60px; }
}

/* =============================================
   PATCH v1.5.0 — Product card fixes
============================================= */

/* 1. Price: dark text, NOT red */
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price *,
.woocommerce ul.products li.product span.price,
.woocommerce ul.products li.product span.amount {
    color: var(--nm-text) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* 2. Price underline: thin red bar, 24px wide, 2px tall — subtle */
.woocommerce ul.products li.product .price::after {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: var(--nm-red) !important;
    margin-top: 8px !important;
}

/* 3. Image area: same cream as card — no color break */
.woocommerce ul.products li.product img,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link img,
.woocommerce ul.products li.product a img {
    background: var(--nm-cream) !important;
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* 4. Card borders — hairline separator between cards, no gap */
.nm-featured .woocommerce ul.products li.product {
    border-right: 1px solid rgba(0,0,0,0.08) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    border-top: none !important;
    border-left: none !important;
}
/* Remove right border from last card in each row */
.nm-featured .woocommerce ul.products li.product:nth-child(4n) {
    border-right: none !important;
}
/* Outer border wrapping the whole grid */
.nm-featured .woocommerce ul.products {
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-bottom: none !important;
}

/* 5. Hide Add to Cart button entirely */
.nm-featured .woocommerce ul.products li.product .button,
.nm-featured .woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_simple {
    display: none !important;
}

/* 6. Duplicate category label — CSS failsafe in case PHP hook misses it.
   The label BEFORE the title is ours (keep). Any label appearing AFTER
   the price's ::after bar gets hidden. */
.woocommerce ul.products li.product .price ~ .nm-product-cat-label,
.woocommerce ul.products li.product .price + .nm-product-cat-label,
.woocommerce ul.products li.product .button ~ .nm-product-cat-label {
    display: none !important;
}
/* Cosmetsy renders category in a span/div with class containing 'cat' after the price */
.woocommerce ul.products li.product .woocommerce-loop-product__title ~ span[class*="cat"],
.woocommerce ul.products li.product .price ~ span[class*="cat"],
.woocommerce ul.products li.product .price ~ a[class*="cat"],
.woocommerce ul.products li.product .price ~ div[class*="cat"] {
    display: none !important;
}

/* =============================================
   MOBILE OVERHAUL v1.5.0
   Three breakpoints matching Noelie pattern:
   1024px = tablet
   767px  = mobile
   480px  = small mobile
============================================= */

/* ---- TABLET (≤1024px) ---- */
@media (max-width: 1024px) {

    /* HERO: reduce font, tighten padding */
    .nm-hero { grid-template-columns: 52% 48%; min-height: 520px; }
    .nm-hero__left { padding: 100px 60px 64px 40px; }
    .nm-hero__title { font-size: clamp(38px, 4.5vw, 58px) !important; }

    /* CATEGORIES: show sidebar + 3 cards per row */
    .nm-categories { grid-template-columns: 120px repeat(3, 1fr); }
    .nm-category-card:nth-child(n+6) { display: none; }
    /* Cards 2–4 show (child 2,3,4 = cards 1–3), card 5 (child 5) hides */

    /* STORY */
    .nm-story { grid-template-columns: 42% 58%; }
    .nm-story__left { padding: 48px 48px 48px 32px; }
    .nm-story__quote-overlay { width: 48%; padding: 32px 28px; }
    .nm-proverb__text { font-size: 16px; }

    /* FEATURED: 3-col */
    .nm-featured .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
    .nm-featured .woocommerce ul.products li.product:nth-child(4n) { border-right: 1px solid rgba(0,0,0,0.08) !important; }
    .nm-featured .woocommerce ul.products li.product:nth-child(3n) { border-right: none !important; }

    /* FOOTER */
    .nm-footer__body { grid-template-columns: 1fr 1fr; gap: 36px; padding: 48px 32px 40px; }
}

/* ---- MOBILE (≤767px) ---- */
@media (max-width: 767px) {

    /* GLOBAL */
    .container { padding: 0 20px; }

    /* HERO: stack vertically, photo below */
    .nm-hero {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto 260px;
        min-height: auto !important;
    }
    .nm-hero__left {
        clip-path: none !important;
        padding: 88px 24px 40px 24px !important;
        order: 1;
    }
    .nm-hero__right {
        order: 2;
        height: 260px;
        position: relative;
    }
    .nm-hero__right-bg { position: absolute; inset: 0; }
    .nm-hero__vertical-text { display: none; }
    .nm-hero__title { font-size: clamp(40px, 10vw, 56px) !important; }
    .nm-hero__content { margin-left: 0; }
    .nm-hero__subtitle { max-width: 100%; font-size: 14px; }

    /* CATEGORIES: sidebar hidden, 3-col × 2 rows of cards */
    .nm-categories {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
    }
    /* Hide the sidebar label — no room on mobile */
    .nm-categories__sidebar {
        display: none !important;
    }
    /* All 6 cards visible: row 1 = Coffee/Chocolate/Cassava, row 2 = Manba/Épicé/Djondjon */
    .nm-category-card {
        min-height: 120px !important;
        display: block !important;
    }
    .nm-category-card:nth-child(n+2) { display: block !important; }
    .nm-category-card__name { font-size: 13px; }

    /* STORY: text on top full-width, photo + quote side-by-side below */
    .nm-story {
        display: block !important;
    }
    /* 1. Text panel: full width, on top */
    .nm-story__left {
        clip-path: none !important;
        padding: 40px 24px 36px !important;
        width: 100% !important;
        box-sizing: border-box;
        display: block;
    }
    /* 2. Right wrap: photo left + quote right, side by side */
    .nm-story__right-wrap {
        width: 100% !important;
        min-height: 240px;
        display: flex !important;
        flex-direction: row !important;
        position: relative;
    }
    /* Photo: left 55% of the bottom row */
    .nm-story__photo-bg {
        position: relative !important;
        inset: auto !important;
        flex: 0 0 55% !important;
        min-height: 240px;
        background-size: cover;
        background-position: center;
    }
    /* Quote block: right 45% of the bottom row */
    .nm-story__quote-overlay {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        flex: 0 0 45% !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 24px 18px !important;
        background: var(--nm-navy) !important;
    }
    .nm-proverb__bigquote { font-size: 32px; margin-bottom: 6px; }
    .nm-proverb__text { font-size: 13px; line-height: 1.4; margin-bottom: 10px; }
    .nm-proverb__attr { font-size: 9px; }

    /* FEATURED: 2-col grid — Noelie pattern */
    .nm-featured { padding: 40px 0 48px; }
    .nm-featured .woocommerce ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0 !important;
    }
    .nm-featured .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        /* Reset border to 2-col pattern */
        border-right: 1px solid rgba(0,0,0,0.08) !important;
        border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    }
    /* Every 2nd card: no right border */
    .nm-featured .woocommerce ul.products li.product:nth-child(2n) {
        border-right: none !important;
    }
    /* Reset the 4-col rule that was removing border from every 4th */
    .nm-featured .woocommerce ul.products li.product:nth-child(4n) {
        border-right: 1px solid rgba(0,0,0,0.08) !important;
    }
    .nm-featured .woocommerce ul.products li.product:nth-child(4n):nth-child(2n) {
        border-right: none !important;
    }
    .woocommerce ul.products li.product img { height: 160px !important; }

    /* SECTION HEADER: stack title + view all */
    .nm-section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* FOOTER: single column */
    .nm-footer__body {
        grid-template-columns: 1fr !important;
        padding: 40px 24px 32px !important;
        gap: 32px !important;
    }
    .nm-footer__brand-statement { font-size: 20px; }
    .nm-footer__sub {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 14px 24px !important;
        gap: 10px !important;
    }
    .nm-footer__sub-center {
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* POLICY PAGES */
    .nm-page-banner { padding: 56px 24px 40px; }
    .nm-page-banner h1 { font-size: 32px !important; }
    .nm-policy-body { padding: 36px 20px 56px; }
    .nm-policy-body h2 { font-size: 18px !important; margin-top: 36px !important; }

    /* CONTACT PAGE */
    .nm-contact-wrap {
        grid-template-columns: 1fr !important;
        padding: 36px 20px 56px !important;
    }
    .nm-contact-info {
        padding-right: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid var(--nm-cream-dark);
        padding-bottom: 36px;
        margin-bottom: 36px;
    }
    .nm-contact-form { padding-left: 0 !important; }
    .nm-form-grid { grid-template-columns: 1fr !important; }
}

/* ---- SMALL MOBILE (≤480px) ---- */
@media (max-width: 480px) {

    /* HERO */
    .nm-hero__title { font-size: 38px !important; }
    .nm-hero__subtitle { font-size: 13px; }

    /* CATEGORIES: 2-col cards still, smaller height */
    .nm-category-card { min-height: 110px; }
    .nm-category-card__name { font-size: 13px; }

    /* FEATURED: 2-col, tighter */
    .woocommerce ul.products li.product img { height: 140px !important; padding: 12px !important; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 12px !important; padding: 10px 10px 2px !important; }
    .woocommerce ul.products li.product .price { font-size: 12px !important; padding: 0 10px 6px !important; }
    .nm-product-cat-label { padding: 10px 10px 0 !important; font-size: 8px !important; }

    /* STORY quote overlay text smaller */
    .nm-proverb__text { font-size: 13px; }

    /* FOOTER */
    .nm-footer__brand-statement { font-size: 18px; }
    .nm-footer__email-row input[type="email"] { font-size: 13px; padding: 9px 10px; }

    /* POLICY */
    .nm-page-banner h1 { font-size: 26px !important; }
    .nm-policy-body { padding: 28px 16px 48px; }
}
