/**
 * Digalco Desktop Navigation & Catalogue Flyout Styles
 *
 * Scoped styles for the desktop header (viewports >= 992px)
 * and the anchored two-pane desktop catalogue mega-flyout.
 *
 * @package UnderstrapChild
 */

/* ==========================================================================
   1. NAVBAR POSITIONING, OVERFLOW CONTAINMENT & TRIGGER
   ========================================================================== */

#secNavbar {
    position: relative;
    z-index: 1020;
}

#secNavbar > .container-fluid {
    position: relative;
}

/* Prevent cart badge translate-middle from generating horizontal overflow */
#main-nav .toolbar {
    margin-right: 8px;
}

/* Prevent invisible legacy text-label and skip-link from causing sub-pixel horizontal overflow */
.centradivnav span.text-label {
    overflow: hidden !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    clip: rect(0, 0, 0, 0) !important;
}

a.skip-link.sr-only:not(:focus) {
    left: 0 !important;
    right: auto !important;
}

.dg-nav-catalogue-wrapper {
    position: static;
    display: inline-flex;
    align-items: center;
}

.dg-nav-catalogue-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 8px 16px 8px 4px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.dg-nav-catalogue-btn__icon {
    flex-shrink: 0;
}

.dg-nav-catalogue-btn__label {
    user-select: none;
}

.dg-nav-catalogue-btn__chevron {
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dg-nav-catalogue-btn:hover {
    color: #6ba3ed;
}

.dg-nav-catalogue-btn:hover .dg-nav-catalogue-btn__icon,
.dg-nav-catalogue-btn:hover .dg-nav-catalogue-btn__chevron {
    color: #6ba3ed;
}

.dg-nav-catalogue-btn[aria-expanded="true"] {
    color: #6ba3ed;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.dg-nav-catalogue-btn[aria-expanded="true"] .dg-nav-catalogue-btn__chevron {
    transform: rotate(180deg);
}

.dg-nav-catalogue-btn:focus-visible {
    outline: 2px solid #6ba3ed;
    outline-offset: 2px;
}

/* ==========================================================================
   2. DESKTOP CATALOGUE MEGA-FLYOUT CONTAINER
   ========================================================================== */

#wrapper-navbar #dg-desktop-catalogue,
.dg-desktop-catalogue {
    position: absolute;
    top: 100%;
    left: 1.5rem;
    width: min(1240px, calc(100% - 3rem));
    max-width: 1240px;
    background-color: #ffffff;
    border-radius: 0 0 10px 10px;
    border: 1px solid #e2e8f0;
    border-top: 2px solid #1a73e8;
    box-shadow: 0 12px 28px -4px rgba(10, 27, 41, 0.18), 0 6px 14px -3px rgba(10, 27, 41, 0.1);
    z-index: 1030;
    overflow: hidden;
    animation: dgNavFlyoutFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

#wrapper-navbar #dg-desktop-catalogue[hidden],
.dg-desktop-catalogue[hidden] {
    display: none !important;
}

@keyframes dgNavFlyoutFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dg-desktop-catalogue__inner {
    display: flex;
    height: clamp(380px, 44vh, 430px);
    max-height: calc(100vh - 160px);
}

/* ==========================================================================
   2b. DESKTOP CATALOGUE BACKDROP
   ========================================================================== */

#dg-desktop-backdrop,
.dg-desktop-backdrop {
    position: fixed;
    top: var(--dg-nav-bottom, 100px);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    background-color: rgba(8, 24, 38, 0.22);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1025;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease-out, visibility 0.12s ease-out;
}

#dg-desktop-backdrop.is-active,
.dg-desktop-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    #dg-desktop-backdrop,
    .dg-desktop-backdrop {
        display: none !important;
    }
}

/* ==========================================================================
   3. LEFT SIDEBAR: TOP-LEVEL CATEGORIES
   ========================================================================== */

#wrapper-navbar .dg-desktop-catalogue__sidebar,
.dg-desktop-catalogue__sidebar {
    flex: 0 0 270px;
    width: 270px;
    background-color: #f1f5f9;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.dg-desktop-catalogue__sidebar::-webkit-scrollbar {
    width: 5px;
}

.dg-desktop-catalogue__sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.dg-desktop-cat-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.dg-desktop-cat-item {
    margin: 0;
    padding: 0;
}

#wrapper-navbar .dg-desktop-cat-btn,
#wrapper-navbar .dg-desktop-cat-link,
.dg-desktop-cat-btn,
.dg-desktop-cat-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 5px 14px;
    border: none;
    border-left: 3px solid transparent;
    background: transparent;
    text-align: left;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 60ms ease-out, color 60ms ease-out, border-color 60ms ease-out;
    text-decoration: none;
    line-height: 1.35;
    outline: none;
}

#wrapper-navbar .dg-desktop-cat-btn:hover,
#wrapper-navbar .dg-desktop-cat-btn:focus,
#wrapper-navbar .dg-desktop-cat-link:hover,
#wrapper-navbar .dg-desktop-cat-link:focus,
.dg-desktop-cat-btn:hover,
.dg-desktop-cat-btn:focus,
.dg-desktop-cat-link:hover,
.dg-desktop-cat-link:focus {
    background-color: #e2e8f0;
    color: #1a73e8;
}

#wrapper-navbar .dg-desktop-cat-btn.is-active,
#wrapper-navbar .dg-desktop-cat-btn[aria-expanded="true"],
#wrapper-navbar .dg-desktop-cat-link.is-active,
.dg-desktop-cat-btn.is-active,
.dg-desktop-cat-btn[aria-expanded="true"],
.dg-desktop-cat-link.is-active {
    background-color: #ffffff;
    color: #1a73e8;
    border-left-color: #1a73e8;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#wrapper-navbar .dg-desktop-cat-btn:focus-visible,
#wrapper-navbar .dg-desktop-cat-link:focus-visible,
.dg-desktop-cat-btn:focus-visible,
.dg-desktop-cat-link:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
}

#wrapper-navbar .dg-desktop-cat-icon,
.dg-desktop-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin-right: 10px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    color: #64748b;
    transition: background-color 60ms ease-out, border-color 60ms ease-out, color 60ms ease-out;
}

#wrapper-navbar .dg-desktop-cat-icon svg,
.dg-desktop-cat-icon svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.75px;
    fill: none;
    color: inherit;
}

#wrapper-navbar .dg-desktop-cat-btn:hover .dg-desktop-cat-icon,
#wrapper-navbar .dg-desktop-cat-link:hover .dg-desktop-cat-icon,
.dg-desktop-cat-btn:hover .dg-desktop-cat-icon,
.dg-desktop-cat-link:hover .dg-desktop-cat-icon {
    background-color: #ffffff;
    border-color: rgba(26, 115, 232, 0.25);
    color: #1a73e8;
}

#wrapper-navbar .dg-desktop-cat-btn.is-active .dg-desktop-cat-icon,
#wrapper-navbar .dg-desktop-cat-btn[aria-expanded="true"] .dg-desktop-cat-icon,
#wrapper-navbar .dg-desktop-cat-link.is-active .dg-desktop-cat-icon,
.dg-desktop-cat-btn.is-active .dg-desktop-cat-icon,
.dg-desktop-cat-btn[aria-expanded="true"] .dg-desktop-cat-icon,
.dg-desktop-cat-link.is-active .dg-desktop-cat-icon {
    background-color: rgba(26, 115, 232, 0.08);
    border-color: rgba(26, 115, 232, 0.25);
    color: #1a73e8;
    box-shadow: none;
}

#wrapper-navbar .dg-desktop-cat-btn:hover .dg-desktop-cat-icon svg,
#wrapper-navbar .dg-desktop-cat-btn.is-active .dg-desktop-cat-icon svg,
#wrapper-navbar .dg-desktop-cat-link:hover .dg-desktop-cat-icon svg,
#wrapper-navbar .dg-desktop-cat-link.is-active .dg-desktop-cat-icon svg,
.dg-desktop-cat-btn:hover .dg-desktop-cat-icon svg,
.dg-desktop-cat-btn.is-active .dg-desktop-cat-icon svg,
.dg-desktop-cat-link:hover .dg-desktop-cat-icon svg,
.dg-desktop-cat-link.is-active .dg-desktop-cat-icon svg {
    stroke: currentColor;
    fill: none;
}

#wrapper-navbar .dg-desktop-cat-name,
.dg-desktop-cat-name {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

#wrapper-navbar .dg-desktop-cat-arrow,
.dg-desktop-cat-arrow {
    color: #cbd5e1;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75px;
    margin-left: 6px;
    flex-shrink: 0;
    transition: transform 60ms ease-out, color 60ms ease-out;
}

#wrapper-navbar .dg-desktop-cat-arrow svg,
.dg-desktop-cat-arrow svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 1.75px;
    fill: none;
}

#wrapper-navbar .dg-desktop-cat-btn:hover .dg-desktop-cat-arrow,
#wrapper-navbar .dg-desktop-cat-btn.is-active .dg-desktop-cat-arrow,
.dg-desktop-cat-btn:hover .dg-desktop-cat-arrow,
.dg-desktop-cat-btn.is-active .dg-desktop-cat-arrow {
    color: #1a73e8;
    stroke: currentColor;
    transform: translateX(2px);
}

/* ==========================================================================
   4. RIGHT CONTENT PANELS: CONTEXTUAL SUBCATEGORIES
   ========================================================================== */

#wrapper-navbar .dg-desktop-catalogue__panels,
.dg-desktop-catalogue__panels {
    flex: 1 1 auto;
    background-color: #ffffff;
    padding: 22px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.dg-desktop-catalogue__panels::-webkit-scrollbar {
    width: 5px;
}

.dg-desktop-catalogue__panels::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.dg-desktop-cat-panel {
    display: none;
    flex-direction: column;
    min-height: 100%;
}

.dg-desktop-cat-panel.is-active {
    display: flex;
}

.dg-desktop-cat-panel[hidden] {
    display: none !important;
}

/* Panel Header */
.dg-desktop-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.dg-desktop-panel-header__info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

#wrapper-navbar .dg-desktop-panel-title,
.dg-desktop-panel-title {
    font-size: 18px !important;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    line-height: 1.25;
}

#wrapper-navbar .dg-desktop-panel-count,
.dg-desktop-panel-count {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    background-color: #f8fafc;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

#wrapper-navbar .dg-desktop-panel-all-link,
.dg-desktop-panel-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

#wrapper-navbar .dg-desktop-panel-all-link span,
.dg-desktop-panel-all-link span {
    color: inherit;
}

#wrapper-navbar .dg-desktop-panel-all-link svg,
.dg-desktop-panel-all-link svg {
    width: 14px;
    height: 14px;
    color: inherit;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75px;
    transition: transform 0.15s ease;
}

#wrapper-navbar .dg-desktop-panel-all-link:hover,
.dg-desktop-panel-all-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

#wrapper-navbar .dg-desktop-panel-all-link:hover svg,
.dg-desktop-panel-all-link:hover svg {
    transform: translateX(3px);
}

#wrapper-navbar .dg-desktop-panel-all-link:focus-visible,
.dg-desktop-panel-all-link:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Subcategory Groups */
.dg-desktop-subcat-group {
    margin-bottom: 20px;
}

.dg-desktop-subcat-group:last-child {
    margin-bottom: 0;
}

#wrapper-navbar .dg-desktop-subcat-group__heading,
.dg-desktop-subcat-group__heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #475569;
    margin: 0 0 10px 0;
}

#wrapper-navbar .dg-desktop-subcat-group--secondary .dg-desktop-subcat-group__heading,
.dg-desktop-subcat-group--secondary .dg-desktop-subcat-group__heading {
    color: #64748b;
}

.dg-desktop-subcat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
}

@media (min-width: 1200px) {
    .dg-desktop-subcat-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 8px 12px;
    }
}

#wrapper-navbar .dg-desktop-subcat-card,
.dg-desktop-subcat-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    color: #1e293b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 70ms ease-out, color 70ms ease-out, border-color 70ms ease-out;
    line-height: 1.35;
}

#wrapper-navbar .dg-desktop-subcat-card:hover,
.dg-desktop-subcat-card:hover {
    background-color: rgba(26, 115, 232, 0.04);
    border-color: rgba(26, 115, 232, 0.15);
    color: #1a73e8;
}

#wrapper-navbar .dg-desktop-subcat-card:focus-visible,
.dg-desktop-subcat-card:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-color: #1a73e8;
    background-color: rgba(26, 115, 232, 0.04);
}

#wrapper-navbar .dg-desktop-subcat-card__bullet,
.dg-desktop-subcat-card__bullet {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #94a3b8;
    flex-shrink: 0;
    transition: background-color 70ms ease-out;
}

#wrapper-navbar .dg-desktop-subcat-card:hover .dg-desktop-subcat-card__bullet,
.dg-desktop-subcat-card:hover .dg-desktop-subcat-card__bullet {
    background-color: #1a73e8;
}

#wrapper-navbar .dg-desktop-subcat-card__name,
.dg-desktop-subcat-card__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

/* Visual thumbnail card variant - softened navigation tile */
#wrapper-navbar .dg-desktop-subcat-card--visual,
.dg-desktop-subcat-card--visual {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    background-color: transparent;
    color: #1e293b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 70ms ease-out, border-color 70ms ease-out, color 70ms ease-out;
    line-height: 1.35;
}

#wrapper-navbar .dg-desktop-subcat-card--visual:hover,
.dg-desktop-subcat-card--visual:hover {
    background-color: rgba(26, 115, 232, 0.04);
    border-color: rgba(26, 115, 232, 0.15);
    color: #1a73e8;
    box-shadow: none;
}

#wrapper-navbar .dg-desktop-subcat-card--visual:focus-visible,
.dg-desktop-subcat-card--visual:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-color: #1a73e8;
    background-color: rgba(26, 115, 232, 0.04);
}

#wrapper-navbar .dg-desktop-subcat-card__thumb,
.dg-desktop-subcat-card__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: border-color 70ms ease-out, background-color 70ms ease-out;
}

@media (min-width: 1200px) {
    #wrapper-navbar .dg-desktop-subcat-card__thumb,
    .dg-desktop-subcat-card__thumb {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
    }
}

#wrapper-navbar .dg-desktop-subcat-card--visual:hover .dg-desktop-subcat-card__thumb,
.dg-desktop-subcat-card--visual:hover .dg-desktop-subcat-card__thumb {
    border-color: rgba(26, 115, 232, 0.35);
    background-color: #ffffff;
}

#wrapper-navbar .dg-desktop-subcat-card__thumb img,
.dg-desktop-subcat-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    display: block;
}

#wrapper-navbar .dg-desktop-subcat-card--visual .dg-desktop-subcat-card__name,
.dg-desktop-subcat-card--visual .dg-desktop-subcat-card__name {
    flex: 1 1 auto;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1e293b;
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.3;
    transition: color 70ms ease-out;
}

#wrapper-navbar .dg-desktop-subcat-card--visual:hover .dg-desktop-subcat-card__name,
.dg-desktop-subcat-card--visual:hover .dg-desktop-subcat-card__name {
    color: #1a73e8;
}

/* Leaf / Direct Panel Discovery Callout */
#wrapper-navbar .dg-desktop-panel-direct,
.dg-desktop-panel-direct {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    background: transparent;
    border: none;
    margin-top: 4px;
}

#wrapper-navbar .dg-desktop-panel-direct__card,
.dg-desktop-panel-direct__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 390px;
    width: 100%;
    padding: 28px 32px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

#wrapper-navbar .dg-desktop-panel-direct__header,
.dg-desktop-panel-direct__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

#wrapper-navbar .dg-desktop-panel-direct__icon,
.dg-desktop-panel-direct__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(26, 115, 232, 0.08);
    color: #1a73e8;
    flex-shrink: 0;
}

#wrapper-navbar .dg-desktop-panel-direct__icon svg,
.dg-desktop-panel-direct__icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.75px;
    fill: none;
}

#wrapper-navbar .dg-desktop-panel-direct__title,
.dg-desktop-panel-direct__title {
    font-size: 17px;
    font-weight: 700;
    color: #0a1b29;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

#wrapper-navbar .dg-desktop-panel-direct__text,
.dg-desktop-panel-direct__text {
    font-size: 14px;
    color: #51606d;
    margin: 0;
    line-height: 1.5;
}

#wrapper-navbar .dg-desktop-panel-direct__btn,
.dg-desktop-panel-direct__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 44px;
    padding: 0.75rem 1.6rem;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 9999px;
    color: #ffffff !important;
    background-color: #1a73e8 !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.20);
    transition: background-color 70ms ease-out, border-color 70ms ease-out, box-shadow 70ms ease-out, transform 70ms ease-out;
    cursor: pointer;
    white-space: nowrap;
    margin-top: 20px;
}

#wrapper-navbar .dg-desktop-panel-direct__btn:hover,
#wrapper-navbar .dg-desktop-panel-direct__btn:focus,
.dg-desktop-panel-direct__btn:hover,
.dg-desktop-panel-direct__btn:focus {
    color: #ffffff !important;
    background-color: #1557b0 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.30);
}

#wrapper-navbar .dg-desktop-panel-direct__btn:focus-visible,
.dg-desktop-panel-direct__btn:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: 3px;
}

#wrapper-navbar .dg-desktop-panel-direct__btn-icon,
.dg-desktop-panel-direct__btn-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: inherit;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#wrapper-navbar .dg-desktop-panel-direct__btn:hover .dg-desktop-panel-direct__btn-icon,
.dg-desktop-panel-direct__btn:hover .dg-desktop-panel-direct__btn-icon {
    transform: translateX(3px);
}

/* ==========================================================================
   5. CUSTOMER UTILITY LINKS IN #secNavbar
   ========================================================================== */

.dg-nav-utility-links .nav-link {
    font-size: 13px;
    padding: 0.35rem 0.65rem;
    color: #ffffff;
    opacity: 0.9;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.dg-nav-utility-links .nav-link:hover {
    opacity: 1;
    color: #6ba3ed;
}

.dg-nav-utility-links .nav-link.enRed {
    color: #7eace8 !important;
    font-weight: 600;
}

/* ==========================================================================
   6. RESPONSIVE BOUNDARIES (< 992px)
   ========================================================================== */

@media (max-width: 991.98px) {
    #secNavbar,
    .dg-desktop-catalogue {
        display: none !important;
    }
}

/* ==========================================================================
   7. MOBILE HEADER (< 992px) TOUCH TARGETS & REFINEMENTS
   ========================================================================== */

@media (max-width: 991.98px) {
    /* Ensure primary navbar elements don't cause horizontal overflow */
    #main-nav {
        overflow-x: clip;
    }

    #main-nav > .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Mobile hamburger toggler: touch target >= 44x44px */
    #main-nav .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 6px;
        border-radius: 6px;
        color: #ffffff;
        background: transparent;
        transition: background-color 0.15s ease;
    }

    #main-nav .navbar-toggler:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    #main-nav .navbar-toggler:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 2px;
        background-color: rgba(255, 255, 255, 0.15);
    }

    /* Mobile toolbar clickable items: minimum 44x44px touch targets */
    #main-nav .toolbar {
        margin-right: 4px;
        gap: 2px;
    }

    #main-nav .toolbar-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #main-nav .toolbar .centradivnav {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #main-nav .toolbar .centradivnav > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        border-radius: 6px;
        position: relative;
        text-decoration: none;
        color: #ffffff;
        transition: background-color 0.15s ease;
    }

    #main-nav .toolbar .centradivnav > a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    #main-nav .toolbar .centradivnav > a:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 2px;
        background-color: rgba(255, 255, 255, 0.15);
    }
}

/* ==========================================================================
   8. MOBILE OFFCANVAS DRAWER (#menumovil) REFINEMENTS
   ========================================================================== */

#menumovil {
    width: min(380px, 88vw);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Offcanvas header */
#menumovil .dg-mobile-menu-header {
    background-color: #0065AA;
    padding: 14px 16px;
    min-height: 72px;
}

#menumovil .dg-mobile-menu-header__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 10px;
    margin-left: -8px;
    margin-bottom: 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #cfe2fb;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#menumovil .dg-mobile-menu-header__back:hover,
#menumovil .dg-mobile-menu-header__back:focus-visible {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

#menumovil .dg-mobile-menu-header__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#menumovil .dg-mobile-menu-header__close:hover,
#menumovil .dg-mobile-menu-header__close:focus-visible {
    background-color: rgba(255, 255, 255, 0.15);
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

/* Category drilldown list & panel */
#menumovil .dg-mobile-cat-row {
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#menumovil .dg-mobile-cat-row:focus-visible {
    outline: 2px solid #0065AA;
    outline-offset: -2px;
}

#menumovil .dg-mobile-cat-panel {
    padding: 12px 14px;
}

#menumovil .dg-mobile-cat-panel__all {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    background-color: #f0f7ff;
    color: #0065AA !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 12px;
    border: 1px solid #cce3f8;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#menumovil .dg-mobile-cat-panel__all:hover,
#menumovil .dg-mobile-cat-panel__all:focus-visible {
    background-color: #e0effe;
    border-color: #99c7f1;
    color: #004c80 !important;
    outline: 2px solid #0065AA;
    outline-offset: 1px;
}

#menumovil .dg-mobile-cat-child {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

#menumovil .dg-mobile-menu-utility-row {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

#menumovil .dg-mobile-menu-utility-row:focus-visible {
    outline: 2px solid #0065AA;
    outline-offset: -2px;
}

/* ==========================================================================
   9. SIDEBAR NAVIGATION & CATEGORY UTILITIES (Phase 4)
   ========================================================================== */

.dg-sidebar-widget {
    background: transparent;
    margin-bottom: 24px;
}

.dg-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: none;
    letter-spacing: -0.2px;
}

.dg-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dg-sidebar-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dg-sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #003366;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dg-sidebar-link:hover {
    background-color: #f1f5f9;
    color: #0065AA;
    text-decoration: none;
}

.dg-sidebar-link:focus-visible {
    outline: 2px solid #0065AA;
    outline-offset: 1px;
}

.dg-sidebar-link.is-current,
.dg-sidebar-item.is-current > .dg-sidebar-link {
    background-color: #e0effe;
    color: #004c80;
    font-weight: 700;
}

.dg-sidebar-icon {
    flex-shrink: 0;
    color: #0065AA;
    transition: transform 0.15s ease;
}

.dg-sidebar-link:hover .dg-sidebar-icon {
    transform: translateX(2px);
}

.dg-sidebar-utility {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.dg-sidebar-utility-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    color: #003366;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dg-sidebar-utility-link:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0065AA;
    text-decoration: none;
}

.dg-sidebar-utility-link:focus-visible {
    outline: 2px solid #0065AA;
    outline-offset: 2px;
}

.dg-sidebar-utility-icon {
    flex-shrink: 0;
    color: #0065AA;
}

/* ==========================================================================
   10. REDUCED MOTION ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

