/* Penshelf Commerce Mega Menu — Flatsome-compatible front-end styles */
.psmm-has-mega-menu {
    position: static !important;
    display: flex !important;
    align-items: center;
}
.psmm-has-mega-menu > .sub-menu { display: none !important; }
.psmm-has-mega-menu > a.psmm-trigger { display: inline-flex; align-items: center; }
.psmm-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: currentColor;
    width: 22px;
    height: 32px;
    padding: 0 5px;
    margin-left: -5px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}
.psmm-toggle svg { width: 10px; height: 7px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform .2s ease; }
.psmm-open > .psmm-toggle svg { transform: rotate(180deg); }
.psmm-panel {
    --psmm-bg: #fff;
    --psmm-heading: #0a2442;
    --psmm-text: #30343b;
    --psmm-accent: #b8872f;
    --psmm-max-width: 1320px;
    --psmm-top: 100px;
    position: fixed;
    z-index: 99999;
    top: var(--psmm-top);
    left: 50%;
    width: min(var(--psmm-max-width), calc(100vw - 30px));
    max-height: calc(100vh - var(--psmm-top) - 16px);
    overflow: auto;
    padding: 0;
    margin: 0;
    background: var(--psmm-bg);
    color: var(--psmm-text);
    border: 1px solid rgba(10,36,66,.10);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 18px 50px rgba(10,24,42,.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    text-align: left;
}
.psmm-width-container { width: min(1080px, calc(100vw - 30px)); }
.psmm-width-compact { width: min(820px, calc(100vw - 30px)); }
.psmm-has-mega-menu.psmm-open > .psmm-panel,
.psmm-mode-hover:hover > .psmm-panel,
.psmm-mode-hover:focus-within > .psmm-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.psmm-panel-inner { padding: 16px 14px 14px; }
.psmm-grid {
    display: grid;
    grid-template-columns: var(--psmm-grid-template, repeat(12, minmax(0,1fr)));
    gap: 0;
    align-items: stretch;
    width: 100%;
}
.psmm-section {
    grid-column: auto;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 11px;
    border-right: 1px solid rgba(10,36,66,.09);
}
.psmm-section:first-child { padding-left: 8px; }
.psmm-section:last-child { border-right: 0; padding-right: 8px; }
.psmm-heading {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin: 0 0 12px;
    padding: 0 6px 0 0;
    color: var(--psmm-heading);
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .015em;
    text-transform: uppercase;
    box-sizing: border-box;
}
.psmm-heading > span {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}
.psmm-heading-icon { display: inline-flex; color: var(--psmm-accent); flex: 0 0 14px; }
.psmm-heading-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.psmm-link-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.psmm-link-list li { margin: 0 !important; padding: 0 !important; }
.psmm-link-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 3px;
    color: var(--psmm-text) !important;
    font-size: 12.5px;
    line-height: 1.3;
    text-decoration: none;
    border-radius: 5px;
    transition: color .15s ease, background .15s ease, padding .15s ease;
}
.psmm-link-list a:hover,
.psmm-link-list a:focus {
    color: var(--psmm-heading) !important;
    background: color-mix(in srgb, var(--psmm-accent) 9%, transparent);
    padding-left: 8px;
}
.psmm-link-list .is-featured > a { color: var(--psmm-accent) !important; font-weight: 700; }
.psmm-link-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.psmm-link-copy small, .psmm-card-copy small { color: #77808b; font-size: 11px; font-weight: 400; }
.psmm-arrow { color: #98a0aa; font-size: 17px; line-height: 1; flex: 0 0 auto; }
.psmm-link-thumb { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; background: #f7f7f7; border-radius: 4px; overflow: hidden; }
.psmm-link-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.psmm-card-list { display: grid; gap: 8px; }
.psmm-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px;
    color: var(--psmm-text) !important;
    border: 1px solid rgba(10,36,66,.09);
    border-radius: 7px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.psmm-card:hover, .psmm-card:focus { border-color: var(--psmm-accent); box-shadow: 0 6px 18px rgba(10,36,66,.08); transform: translateY(-1px); }
.psmm-card.is-featured { border-color: color-mix(in srgb, var(--psmm-accent) 45%, #fff); background: color-mix(in srgb, var(--psmm-accent) 5%, #fff); }
.psmm-card-image { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: #f7f7f7; }
.psmm-card-image img { width: 100%; height: 100%; object-fit: contain; }
.psmm-section-logos .psmm-card-image { width: 70px; height: 38px; flex-basis: 70px; background: transparent; }
.psmm-card-copy { min-width: 0; display: grid; gap: 3px; font-size: 12px; line-height: 1.3; }
.psmm-swatches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 8px; }
.psmm-swatch-link { display: flex; align-items: center; gap: 7px; color: var(--psmm-text) !important; font-size: 12px; text-decoration: none; }
.psmm-swatch-link:hover span:last-child { color: var(--psmm-accent); }
.psmm-swatch { width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.psmm-swatch-link.is-featured .psmm-swatch { box-shadow: 0 0 0 2px var(--psmm-accent); }
.psmm-product-list { display: grid; gap: 8px; }
.psmm-product {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    min-height: 69px;
    padding: 6px;
    color: var(--psmm-text) !important;
    background: #fbfaf7;
    border: 1px solid rgba(10,36,66,.07);
    border-radius: 7px;
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}
.psmm-product:hover, .psmm-product:focus { border-color: var(--psmm-accent); transform: translateY(-1px); }
.psmm-product-image { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; background: #fff; border-radius: 5px; }
.psmm-product-image img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.psmm-product-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
    font-size: 11.5px;
    line-height: 1.25;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}
.psmm-product-copy strong {
    color: var(--psmm-heading);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}
.psmm-price { color: var(--psmm-heading); font-size: 12px; font-weight: 700; }
.psmm-price del { color: #8a8f98; font-weight: 400; font-size: 10px; }
.psmm-price ins { text-decoration: none; }
.psmm-rating .star-rating { float: none; margin: 0; font-size: 10px; color: var(--psmm-accent); }
.psmm-promo {
    position: relative;
    min-height: 282px;
    height: 100%;
    margin-left: 10px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    isolation: isolate;
    background: #15202d var(--psmm-promo-image) center/cover no-repeat;
}
.psmm-promo-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(5,14,25,.88), rgba(5,14,25,.05) 70%); }
.psmm-promo-content { position: absolute; left: 15px; right: 15px; bottom: 14px; color: #fff; text-align: center; }
.psmm-promo-eyebrow { display: block; margin-bottom: 7px; color: #e5bf74; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.psmm-promo h3 {
    margin: 0 0 10px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.psmm-promo p { margin: 0 0 12px; color: rgba(255,255,255,.82); font-size: 12px; line-height: 1.4; }
.psmm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 36px;
    padding: 8px 14px;
    color: #fff !important;
    background: var(--psmm-heading);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.psmm-promo .psmm-button { width: 100%; }
.psmm-button:hover { color: #fff !important; background: color-mix(in srgb, var(--psmm-heading) 85%, #fff); }
.psmm-footer-link { margin-top: 15px; padding: 12px 4px 0; border-top: 1px solid rgba(10,36,66,.09); text-align: right; }
.psmm-footer-link a { display: inline-flex; gap: 9px; color: var(--psmm-heading) !important; font-size: 12px; font-weight: 700; text-decoration: none; }
.psmm-footer-link a:hover { color: var(--psmm-accent) !important; }

/* Flatsome compatibility */
.header-wrapper .psmm-panel a,
.header .psmm-panel a { text-transform: none; letter-spacing: 0; }
.header-wrapper .psmm-panel ul,
.header .psmm-panel ul { position: static; display: block; width: auto; min-width: 0; background: none; box-shadow: none; border: 0; }
.header-wrapper .psmm-panel li,
.header .psmm-panel li { display: block; width: auto; }

@media (max-width: 1100px) and (min-width: 850px) {
    .psmm-panel-inner { padding-left: 14px; padding-right: 14px; }
    .psmm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
    .psmm-section { padding-left: 14px; padding-right: 14px; }
    .psmm-section:nth-child(2n) { border-right: 0; }
    .psmm-product { grid-template-columns: 58px minmax(0,1fr); }
    .psmm-product-image { width: 58px; height: 58px; }
    .psmm-promo { margin-left: 0; min-height: 250px; }
}

@media (max-width: 849px) {
    .psmm-has-mega-menu { display: flex !important; flex-wrap: wrap; width: 100%; }
    .psmm-has-mega-menu > a.psmm-trigger { flex: 1; }
    .psmm-toggle { display: inline-grid; width: 42px; height: 42px; margin: 0; }
    .psmm-panel {
        position: static;
        order: 10;
        width: 100%;
        max-height: none;
        margin: 0;
        border: 0;
        border-top: 1px solid rgba(10,36,66,.08);
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        display: none;
        overflow: visible;
    }
    .psmm-open > .psmm-panel { display: block; transform: none; }
    .psmm-mobile-disabled > .psmm-panel,
    .psmm-mobile-disabled > .psmm-toggle { display: none !important; }
    .psmm-panel-inner { padding: 14px 12px; }
    .psmm-grid { display: block; }
    .psmm-section { padding: 14px 3px; border-right: 0; border-bottom: 1px solid rgba(10,36,66,.08); }
    .psmm-section:first-child, .psmm-section:last-child { padding-left: 3px; padding-right: 3px; }
    .psmm-heading { margin-bottom: 9px; }
    .psmm-link-list a { min-height: 38px; }
    .psmm-promo { min-height: 210px; margin: 14px 0 0; }
    .psmm-products, .psmm-promo { display: none; }
    .psmm-footer-link { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .psmm-panel, .psmm-toggle svg, .psmm-link-list a, .psmm-card, .psmm-product { transition: none !important; }
}

/* Keep desktop headings inside their own grid track. They remain on one line when space allows and wrap safely when it does not. */
@media (min-width: 1101px) {
    .psmm-heading {
        width: 100%;
        font-size: 10px;
        gap: 4px;
        padding-right: 8px;
    }
    .psmm-heading > span { white-space: normal; }
}


/* Dynamic attribute columns */
.psmm-swatches-circles-only {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: none;
    gap: 9px;
}
.psmm-swatches-circles-only .psmm-swatch-link {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 2px;
    border-radius: 50%;
}
.psmm-swatches-circles-only .psmm-swatch {
    width: 17px;
    height: 17px;
}
.psmm-column-view-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
    color: var(--psmm-heading) !important;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
}
.psmm-column-view-all:hover { color: var(--psmm-accent) !important; }

/* Collapsible alphabet groups for long brand lists */
.psmm-brand-groups {
    display: grid;
    gap: 5px;
}
.psmm-brand-group {
    border: 1px solid rgba(10,36,66,.09);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.psmm-brand-group-toggle {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 33px;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--psmm-heading);
    font: inherit;
    font-size: 11.5px;
    line-height: 1.2;
    font-weight: 700;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: none;
}
.psmm-brand-group-toggle:hover,
.psmm-brand-group-toggle:focus-visible,
.psmm-brand-group-toggle[aria-expanded="true"] {
    background: color-mix(in srgb, var(--psmm-accent) 8%, #fff);
    color: var(--psmm-heading);
    outline: none;
}
.psmm-brand-group-toggle small {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 19px;
    padding: 0 5px;
    color: #707985;
    background: rgba(10,36,66,.06);
    border-radius: 999px;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 600;
}
.psmm-brand-chevron {
    color: var(--psmm-accent);
    font-size: 15px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .16s ease;
}
.psmm-brand-group-toggle[aria-expanded="true"] .psmm-brand-chevron {
    transform: rotate(180deg);
}
.psmm-brand-group-panel[hidden] {
    display: none !important;
}
.psmm-brand-group-panel {
    max-height: 225px;
    overflow-y: auto;
    border-top: 1px solid rgba(10,36,66,.07);
    background: #fff;
    scrollbar-width: thin;
}
.psmm-brand-group-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 4px !important;
}
.psmm-brand-group-list li {
    margin: 0 !important;
    padding: 0 !important;
}
.psmm-brand-group-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 29px;
    padding: 4px 6px;
    color: var(--psmm-text) !important;
    border-radius: 4px;
    font-size: 11.5px;
    line-height: 1.25;
    text-decoration: none;
}
.psmm-brand-group-list a:hover,
.psmm-brand-group-list a:focus {
    color: var(--psmm-heading) !important;
    background: color-mix(in srgb, var(--psmm-accent) 9%, transparent);
}
.psmm-brand-group-list .is-featured > a {
    color: var(--psmm-accent) !important;
    font-weight: 700;
}
@media (max-width: 849px) {
    .psmm-brand-group-toggle { min-height: 39px; font-size: 12px; }
    .psmm-brand-group-panel { max-height: 260px; }
    .psmm-brand-group-list a { min-height: 36px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .psmm-brand-chevron { transition: none !important; }
}
