/* ============================================================
   RECIRCULA HEADER & FOOTER
   ============================================================ */

/* ---- TOP BAR (teal marquee, fixed above header) ---- */
.rc-top-bar {
    background: var(--rc-teal);
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10000;
    height: 36px;
}

.rc-top-bar__marquee {
    display: flex;
    width: max-content;
    animation: rc-marquee 25s linear infinite;
}

.rc-top-bar__marquee span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 0 48px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .2px;
}

.rc-top-bar__marquee span a {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

@keyframes rc-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Hide old top bar inner */
.rc-top-bar__inner { display: none; }
.rc-top-bar__left, .rc-top-bar__right { display: none; }

/* ---- MAIN HEADER (full-width, sticky) ---- */
.rc-header-main {
    background: var(--rc-white);
    border-bottom: 1px solid var(--rc-gray-200);
    position: fixed !important;
    top: 36px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
}
/* Push page content below fixed topbar + header */
body { padding-top: 116px; }

.rc-header-main__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 80px;
    width: 100%;
    padding: 0 40px;
}

/* Logo */
.rc-header__logo { flex-shrink: 0; }
.rc-logo-link { display: flex; align-items: center; text-decoration: none; }
.rc-logo-img { height: 72px; width: auto; max-width: 300px; object-fit: contain; }
.rc-logo-text { font-size: 24px; font-weight: 800; color: var(--rc-charcoal); }

/* ---- MAIN NAVIGATION ---- */
.rc-header__nav { flex: 1; display: flex; justify-content: center; }

.rc-main-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 0; }
.rc-main-menu > li { position: relative; }
.rc-main-menu > li > a {
    display: flex; align-items: center; padding: 24px 16px; font-size: 15px; font-weight: 500;
    color: var(--rc-charcoal) !important; text-decoration: none; transition: color .2s; white-space: nowrap;
    font-family: var(--rc-font-body);
}
.rc-main-menu > li > a:hover,
.rc-main-menu > li.current-menu-item > a,
.rc-main-menu > li.current-menu-ancestor > a { color: var(--rc-teal) !important; }
.rc-main-menu > li.current-menu-item > a { text-decoration: underline; text-underline-offset: 4px; }

/* ---- MEGA MENU for Catalog ---- */
.rc-mega-dropdown {
    position: fixed !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: 1100px;
    max-width: 95vw;
    background: var(--rc-white);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.1);
    padding: 28px 36px 24px;
    display: none !important;
    z-index: 1000;
    list-style: none;
    margin: 0;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 24px;
    border-top: 3px solid var(--rc-teal);
    /* On short laptop screens the full category list is taller than the
       viewport; without a height cap the bottom rows (Carte în limbi străine,
       Manuale, Colecții speciale) get clipped with no way to reach them.
       Cap to the visible area below the header (~111px) and scroll internally. */
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.rc-has-mega:hover > .rc-mega-dropdown {
    display: grid !important;
    animation: pmMegaIn .2s cubic-bezier(.16,1,.3,1);
}

@keyframes pmMegaIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* L2: Category headings in mega menu */
.rc-mega-l2-item {
    list-style: none;
    margin-bottom: 4px;
}

.rc-mega-l2-link {
    display: block !important;
    padding: 8px 0 6px !important;
    font-size: 15px;
    font-weight: 700;
    color: var(--rc-charcoal) !important;
    text-decoration: none !important;
    transition: color .2s;
    border-bottom: 1px solid var(--rc-gray-200);
    margin-bottom: 6px;
}

.rc-mega-l2-link:hover {
    color: var(--rc-teal) !important;
}

/* Hide thumbnail/arrow (not needed for book categories) */
.rc-mega-l2-thumb { display: none; }
.rc-mega-l2-arrow { display: none; }
.rc-mega-l2-text { font-size: inherit; font-weight: inherit; color: inherit; }

/* L3: Subcategory links */
.rc-mega-l3 {
    list-style: none; margin: 0; padding: 0;
    position: static !important; display: block !important; background: none !important;
    border: none !important; box-shadow: none !important; min-width: 0 !important;
}

.rc-mega-l3-item { list-style: none; }

.rc-mega-l3-link {
    display: block !important; font-size: 13px !important; font-weight: 400 !important;
    color: var(--rc-charcoal-light) !important; text-decoration: none !important;
    padding: 5px 0 !important; transition: all .15s;
}

.rc-mega-l3-link:hover {
    color: var(--rc-teal) !important;
    padding-left: 6px !important;
}

/* Grid: 4 columns for 7 categories (last row wraps) */
.rc-mega-dropdown { grid-template-columns: repeat(4, 1fr); }

/* No submenu items on non-mega items */
.rc-main-menu > li:not(.rc-has-mega) > .sub-menu { display: none !important; }

/* ---- HEADER ACTION BUTTONS (redesigned with labels) ---- */
.rc-header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.rc-hdr-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: var(--rc-radius);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rc-charcoal);
    text-decoration: none !important;
    transition: all .2s ease;
    position: relative;
    min-width: 52px;
}

.rc-hdr-btn:hover {
    background: var(--rc-gray-100);
    color: var(--rc-teal);
    transform: translateY(-2px);
}

.rc-hdr-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}

.rc-hdr-btn__icon svg { stroke-width: 1.5; }

/* Hover animations */
.rc-hdr-btn:hover .rc-hdr-btn__icon { transform: scale(1.1); }
.rc-hdr-btn--wishlist:hover svg { stroke: var(--rc-teal); }
.rc-hdr-btn--cart:hover .rc-hdr-btn__icon { transform: scale(1.1); }

.rc-hdr-btn__label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .2px;
    transition: color .2s;
}

/* Cart button - subtle highlight */
.rc-hdr-btn--cart {
    background: transparent;
    border: none;
}

.rc-hdr-btn--cart:hover {
    color: var(--rc-teal);
}
.rc-hdr-btn--cart:hover svg { stroke: var(--rc-white); }
.rc-hdr-btn--cart:hover svg path[fill] { fill: var(--rc-white); }

/* Badge */
.rc-badge {
    position: absolute;
    top: 0;
    right: 2px;
    background: var(--rc-teal);
    color: var(--rc-white);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--rc-white);
}

.rc-hdr-btn--cart .rc-badge { background: #E53935; }

/* Mobile toggle */
.rc-mobile-toggle { display: none; }

/* ---- SEARCH OVERLAY ---- */
.rc-search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; background: var(--rc-white);
    z-index: 2147483646; padding: 20px 0; box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.rc-search-overlay__inner {
    display: flex; align-items: center; gap: 16px; max-width: 900px; margin: 0 auto; padding: 0 20px;
}

/* FiboSearch in overlay */
.rc-search-overlay .dgwt-wcas-search-wrapp {
    flex: 1;
    max-width: 700px;
}

.rc-search-overlay .dgwt-wcas-search-input {
    font-size: 16px !important;
    padding: 14px 20px 14px 44px !important;
    border: 2px solid var(--rc-gray-300) !important;
    border-radius: var(--rc-radius) !important;
}

.rc-search-overlay .dgwt-wcas-search-input:focus {
    border-color: var(--rc-teal) !important;
}

/* Magnifier icon - fixed left position, not overlapping text */
.rc-search-overlay .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,
.rc-search-overlay .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier-handler {
    position: absolute !important;
    left: 14px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    opacity: 0.4;
    max-width: 18px !important;
}

/* Results dropdown - centered under input */
.rc-search-overlay .dgwt-wcas-suggestions-wrapp {
    left: 0 !important;
    right: auto !important;
    max-width: 100% !important;
}

/* Details panel */
.dgwt-wcas-details-wrapp {
    min-width: 300px !important;
}
.rc-search-overlay__inner .dgwt-wcas-search-wrapp,
.rc-search-overlay__inner .rc-search-form { flex: 1; }
.rc-search-form {
    display: flex; border: 2px solid var(--rc-gray-300); border-radius: var(--rc-radius); overflow: hidden;
}
.rc-search-form input[type="search"] { flex: 1; border: none; padding: 14px 20px; font-size: 16px; outline: none; }
.rc-search-form button { background: var(--rc-teal); border: none; padding: 14px 20px; cursor: pointer; color: #fff; }
.rc-search-close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--rc-charcoal); padding: 8px; line-height: 1; }

/* ---- CART SIDEBAR ---- */
/* z-index VERY high — must beat XStore's top bar / sticky header which can reach ~10000+.
   When moved to body via JS (see recircula.js), it escapes any parent stacking context. */
.rc-cart-sidebar {
    position: fixed; top: 0; right: -380px; width: 380px; max-width: 90vw; height: 100vh;
    background: var(--rc-white); z-index: 2147483646; display: flex; flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,.15); transition: right .3s cubic-bezier(.16,1,.3,1);
}
.rc-cart-sidebar.is-open { right: 0; }
/* Overlay sits just below the sidebar but above everything else */
.rc-overlay { z-index: 2147483645 !important; }
.rc-cart-sidebar__header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--rc-gray-200);
}
.rc-cart-sidebar__header h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--rc-charcoal); }
.rc-cart-sidebar__close {
    background: none; border: none; font-size: 28px; cursor: pointer; color: var(--rc-charcoal);
    line-height: 1; padding: 0; width: 36px; height: 36px; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; transition: background .2s;
}
.rc-cart-sidebar__close:hover { background: var(--rc-gray-100); }
.rc-cart-sidebar__body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.rc-cart-sidebar .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; }
.rc-cart-sidebar .woocommerce-mini-cart-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rc-gray-200);
}
.rc-cart-sidebar .woocommerce-mini-cart-item img {
    width: 60px; height: 60px; object-fit: contain; border-radius: var(--rc-radius); background: var(--rc-gray-100); flex-shrink: 0;
}
.rc-cart-sidebar .woocommerce-mini-cart-item a:not(.remove) {
    color: var(--rc-charcoal) !important; text-decoration: none; font-size: 14px; font-weight: 500;
}
.rc-cart-sidebar .woocommerce-mini-cart-item .quantity { display: block; font-size: 13px; color: var(--rc-charcoal-light); margin-top: 4px; }
.rc-cart-sidebar .woocommerce-mini-cart-item .remove { color: #E53935 !important; font-size: 18px; text-decoration: none; margin-left: auto; }
.rc-cart-sidebar__empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; gap: 16px; color: var(--rc-charcoal-light); }
.rc-cart-sidebar__footer { padding: 16px 24px; border-top: 1px solid var(--rc-gray-200); display: flex; flex-direction: column; gap: 10px; }
.rc-cart-sidebar__total { display: flex; justify-content: space-between; align-items: center; font-size: 16px; padding-bottom: 10px; }
.rc-cart-sidebar__total strong { font-size: 20px; color: var(--rc-teal); }
.rc-btn--full { width: 100%; text-align: center; display: block; }

/* Overlay */
.rc-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.4);
    z-index: 10001; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.rc-overlay.is-active { opacity: 1; visibility: visible; }

/* ---- MOBILE MENU ---- */
.rc-mobile-menu {
    position: fixed; top: 0; right: 0; width: 320px; max-width: 85vw; height: 100vh;
    background: var(--rc-white); z-index: 2147483646; display: flex; flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,.15); overflow-y: auto;
}
.rc-mobile-menu__header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--rc-gray-200); }
.rc-mobile-menu__title { font-weight: 700; font-size: 18px; color: var(--rc-charcoal); }
.rc-mobile-menu__close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--rc-charcoal); line-height: 1; }
.rc-mobile-menu__body { flex: 1; overflow-y: auto; padding: 12px 0; }
.rc-mobile-nav { list-style: none; margin: 0; padding: 0; }
.rc-mobile-nav li { list-style: none; }
.rc-mobile-nav > li > a { display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 700; font-size: 15px; color: var(--rc-charcoal) !important; text-decoration: none; border-bottom: 1px solid var(--rc-gray-100); }

/* Species emojis on mobile menu L1 items */
.rc-mobile-nav > li.menu-item-object-product_cat > a::before { font-size: 20px; line-height: 1; }
/* Mobile nav - no emoji prefixes */
.rc-mobile-nav > li > a:hover { color: var(--rc-teal) !important; background: var(--rc-gray-100); }
.rc-mobile-nav .sub-menu { list-style: none; margin: 0; padding: 0; display: none; }
.rc-mobile-nav .sub-menu.is-open { display: block; }
.rc-mobile-nav .sub-menu > li > a { display: block; padding: 8px 20px 8px 36px; font-size: 14px; font-weight: 600; color: var(--rc-charcoal-light) !important; text-decoration: none; }
.rc-mobile-nav .sub-menu .sub-menu > li > a { padding-left: 52px; font-weight: 400; font-size: 13px; }
.rc-mobile-menu__footer { border-top: 1px solid var(--rc-gray-200); padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.rc-mobile-menu__footer a { color: var(--rc-teal) !important; font-weight: 600; text-decoration: none; font-size: 14px; }

/* ============================================================
   FOOTER (WIX-style 4 columns)
   ============================================================ */
.rc-footer { background-color: var(--rc-charcoal); color: rgba(255,255,255,.75); font-family: var(--rc-font-body); }
.rc-footer a { color: rgba(255,255,255,.75) !important; text-decoration: none; transition: color .2s; }
.rc-footer a:hover { color: #fff !important; }

/* Main footer */
.rc-footer__main { padding: 60px 40px; }
.rc-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 48px; max-width: 1400px; margin: 0 auto; }

/* Col brand */
.rc-footer__logo { margin-bottom: 16px; }
.rc-footer-logo-img { max-width: 180px; height: auto; }
.rc-footer__about { font-size: 14px; line-height: 1.7; margin-bottom: 20px; color: rgba(255,255,255,.65); }
.rc-footer__anpc-badges { display: flex; gap: 8px; margin-bottom: 16px; }
.rc-footer__netopia-badge { margin-bottom: 16px; max-width: 240px; }
.rc-footer__netopia-badge img { max-width: 100%; height: auto; }
.rc-footer__badge-link img { display: block; }
.rc-footer__flags { display: flex; gap: 6px; }

/* Headings */
.rc-footer__heading {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 22px;
    font-family: var(--rc-font-body);
}

/* Links */
.rc-footer__links { list-style: none; margin: 0; padding: 0; }
.rc-footer__links li { margin-bottom: 10px; }
.rc-footer__links a { font-size: 15px; display: inline-block; transition: padding-left .2s; }
.rc-footer__links a:hover { padding-left: 4px; color: #fff !important; }

/* Contact */
.rc-footer__contact { list-style: none; margin: 0 0 20px; padding: 0; }
.rc-footer__contact li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 14px; line-height: 1.5; }
.rc-footer__contact svg { flex-shrink: 0; margin-top: 2px; }

/* Social icons in footer */
.rc-footer__social { display: flex; gap: 12px; }
.rc-social-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); transition: all .2s; color: rgba(255,255,255,.7); }
.rc-social-link:hover { background: var(--rc-teal); color: #fff; }
.rc-social-link svg { fill: currentColor; }

/* Newsletter */
.rc-footer__newsletter-desc { font-size: 14px; color: rgba(255,255,255,.65); margin-bottom: 16px; line-height: 1.5; }
.rc-footer__newsletter { display: flex; flex-direction: column; gap: 12px; }
.rc-footer__newsletter input[type="email"] {
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 14px;
    font-family: var(--rc-font-body);
    outline: none;
}
.rc-footer__newsletter input[type="email"]::placeholder { color: rgba(255,255,255,.4); }
.rc-footer__newsletter input[type="email"]:focus { border-color: var(--rc-teal); background: rgba(255,255,255,.12); }
.rc-footer__newsletter button {
    padding: 12px 24px;
    background: var(--rc-teal);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--rc-font-body);
    cursor: pointer;
    transition: background .2s;
}
.rc-footer__newsletter button:hover { background: var(--rc-teal-hover); }

/* Policy strip — full list of legal pages */
.rc-footer__policies {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 40px;
}
.rc-footer__policies-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
}
.rc-footer__policy-link {
    color: rgba(255,255,255,.65) !important;
    font-size: 13px;
    text-decoration: none;
    transition: color .2s;
    position: relative;
}
.rc-footer__policy-link:hover {
    color: #fff !important;
}
.rc-footer__policy-link:not(:last-child)::after {
    content: '·';
    position: absolute;
    right: -14px;
    top: 0;
    color: rgba(255,255,255,.3);
}

/* Bottom bar */
.rc-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 40px; }
.rc-footer__bottom-inner { display: flex; flex-direction: column; justify-content: center; align-items: center; max-width: 1400px; margin: 0 auto; font-size: 14px; gap: 6px; }
.rc-footer__credit { margin: 0; font-size: 12px; color: rgba(255,255,255,.4); }
.rc-footer__credit a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.rc-footer__credit a:hover { color: #fff; text-decoration: underline; }
.rc-footer__bottom p { margin: 0; color: rgba(255,255,255,.5); }
.rc-footer__bottom-links { display: flex; gap: 24px; }
.rc-footer__bottom-links a { color: rgba(255,255,255,.5) !important; font-size: 14px; }
.rc-footer__bottom-links a:hover { color: #fff !important; }

/* ---- RESPONSIVE ---- */
@media (max-width: 992px) {
    .rc-header__nav { display: none; }
    .rc-mobile-toggle { display: flex !important; }
    .rc-header-main__inner { height: 64px; padding: 0 16px; }
    .rc-logo-img { height: 48px; }
    body { padding-top: 100px; }
    .rc-hdr-btn__label { display: none; }
    .rc-hdr-btn { min-width: 40px; padding: 6px; }
}

@media (max-width: 768px) {
    .rc-footer__main { padding: 40px 20px; }
    .rc-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .rc-footer__bottom { padding: 16px 20px; }
}
@media (max-width: 480px) {
    .rc-footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .rc-footer__bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
}
