/* ==========================================================================
   Global Header, Footer & Navigation
   Tasks A–G — Piston Tribe
   ========================================================================== */


/* ==========================================================================
   PRIMARY NAVIGATION — CENTRE ALIGN & CLEANUP
   ========================================================================== */

/* Hide GP's built-in cart & search bar items — replaced by our custom icons */
.menu-bar-items {
    display: none !important;
}

/* Hide GP's search form injected into the nav bar */
#site-navigation .navigation-search {
    display: none !important;
}

/* Hide GP's own hamburger toggles — we use pt-hamburger drawer */
#mobile-menu-control-wrapper .menu-toggle,
#site-navigation .menu-toggle {
    display: none !important;
}

/* Sticky header — applies at all screen sizes */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9000;
}

/* Prevent GP's JS-driven sticky navigation from creating a second fixed bar */
#site-navigation.sticky,
#site-navigation.generate-sticky-enabled,
body.fixed-nav #site-navigation {
    position: static !important;
    top: auto !important;
}

/* Centre the nav row */
#site-navigation .inside-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
}

#site-navigation .main-nav {
    display: flex;
    justify-content: center;
}

#site-navigation .main-nav ul.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Red underline hover — uses actual GP class (ul.menu, not ul.nav-menu) */
#site-navigation .main-nav ul.menu > li > a {
    position: relative;
    text-decoration: none !important;
}

#site-navigation .main-nav ul.menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #d00000;
    transition: width 0.2s ease;
}

#site-navigation .main-nav ul.menu > li > a:hover::after,
#site-navigation .main-nav ul.menu > li.current-menu-item > a::after,
#site-navigation .main-nav ul.menu > li.current-menu-ancestor > a::after {
    width: 100%;
}

@media (max-width: 768px) {
    #site-navigation .main-nav ul.menu > li > a::after {
        display: none;
    }
}


/* ==========================================================================
   TASK A — HEADER ICONS BAR
   ========================================================================== */

/* Track order icon removed from both desktop and mobile */
.pt-hdr-icon--track {
    display: none !important;
}

.pt-header-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
    order: 999; /* Force to end of .inside-header flex row — after logo + nav */
}

/* Individual icon buttons/links */
.pt-hdr-icon,
.pt-hamburger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity 150ms ease, background 150ms ease;
    padding: 0;
    flex-shrink: 0;
}

.pt-hdr-icon:hover,
.pt-hamburger:hover {
    opacity: 0.65;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    text-decoration: none;
}

.pt-hdr-icon svg,
.pt-hamburger svg {
    pointer-events: none;
    width: 26px;
    height: 26px;
}

/* Badge (cart count, bell count) */
.pt-header-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    background: #D00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    pointer-events: none;
}

/* Hamburger: mobile only */
.pt-hamburger {
    display: none;
}

@media (max-width: 768px) {
    .pt-hamburger {
        display: inline-flex;
    }
}

/* ==========================================================================
   TASK A — SEARCH OVERLAY
   ========================================================================== */

.pt-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 3px solid #111;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 8000;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
}

.pt-search-overlay.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.pt-search-overlay form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.pt-search-overlay input[type="search"] {
    flex: 1;
    border: none;
    border-bottom: 2px solid #111;
    padding: 8px 4px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.pt-search-overlay button[type="submit"] {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #111;
    display: inline-flex;
    align-items: center;
}

.pt-search-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #555;
    display: inline-flex;
    align-items: center;
    transition: color 150ms;
}

.pt-search-close:hover {
    color: #111;
}

/* The header itself must be position:relative for the overlay to anchor */
#site-header .inside-header,
.site-header .inside-header {
    position: relative;
}

/* Hide GP's default mobile menu toggle when our drawer is active */
@media (max-width: 768px) {
    .main-navigation .menu-toggle {
        display: none !important;
    }
    .main-navigation ul.sf-menu {
        display: none !important;
    }
}

/* ==========================================================================
   MOBILE HEADER LAYOUT — hamburger left | logo center | icons right
   ========================================================================== */

@media (max-width: 768px) {
    /* 3-column grid: [hamburger] [logo] [icons] — strictly ONE row */
    .site-header .inside-header {
        display: grid !important;
        grid-template-columns: 44px 1fr auto;
        grid-template-rows: auto; /* single explicit row */
        align-items: center;
        gap: 0;
        padding: 6px 10px !important;
        min-height: 0;
    }

    /* Hide EVERY direct child that isn't one of our three elements —
       catches GP nav wrappers, sticky clones, or anything else GP injects */
    .site-header .inside-header > *:not(.pt-hamburger):not(.site-logo):not(.pt-header-icons) {
        display: none !important;
    }

    /* Hamburger pinned to col 1, row 1 */
    .pt-hamburger {
        grid-column: 1;
        grid-row: 1;
    }

    /* Logo pinned to col 2, row 1 */
    .site-header .inside-header .site-logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        position: static;
        transform: none;
        overflow: hidden;
        max-width: 100%;
    }

    .site-header .inside-header .site-logo img {
        display: block;
        max-height: 36px;
        width: auto;
        max-width: 100%;
    }

    /* Icons pinned to col 3, row 1 — flush right */
    .pt-header-icons {
        grid-column: 3;
        grid-row: 1;
        margin-left: 0;
        gap: 10px;
        justify-self: end;
        align-self: center;
    }

    .pt-header-icons .pt-hdr-icon {
        width: 40px;
        height: 40px;
    }
}

/* Extra-small phones: if logo still tight, reduce further */
@media (max-width: 380px) {
    .site-header .inside-header .site-logo img {
        max-height: 24px;
    }
    .site-header .inside-header {
        grid-template-columns: 40px 1fr auto;
        padding: 4px 8px !important;
    }
}


/* ==========================================================================
   TASK B — MOBILE DRAWER NAVIGATION
   ========================================================================== */

/* Shared overlay backdrop */
.pt-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}

.pt-nav-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* Drawer panel */
.pt-nav-drawer {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;        /* fallback for older Safari */
    height: 100dvh;       /* dynamic viewport — excludes Safari toolbar */
    width: 320px;
    max-width: 85vw;
    background: #fff;
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-nav-drawer.is-open {
    transform: translateX(0);
}

/* Drawer header */
.pt-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eeeeee;
    flex-shrink: 0;
}

.pt-drawer-logo {
    max-height: 40px;
    width: auto;
}

.pt-drawer-site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
}

.pt-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    border-radius: 4px;
    transition: background 150ms;
}

.pt-drawer-close:hover {
    background: #f5f5f5;
    color: #111;
}

/* Drawer nav */
.pt-drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.pt-drawer-nav .pt-drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pt-drawer-nav .pt-drawer-menu li {
    border-bottom: 1px solid #f4f4f4;
    margin: 0;
}

.pt-drawer-nav .pt-drawer-menu li a {
    display: block;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 150ms, padding-left 150ms;
}

.pt-drawer-nav .pt-drawer-menu li a:hover {
    background: #f7f7f7;
    padding-left: 26px;
}

/* Sub-menus inside drawer */
.pt-drawer-nav .pt-drawer-menu li ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafafa;
}

.pt-drawer-nav .pt-drawer-menu li ul li a {
    padding: 11px 20px 11px 32px;
    font-size: 0.88rem;
    color: #444;
}

/* Drawer footer links */
.pt-drawer-footer-links {
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.pt-drawer-footer-links a {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    transition: color 150ms;
}

.pt-drawer-footer-links a:hover {
    color: #D00;
}


/* ==========================================================================
   TASK C — CART POPOVER
   ========================================================================== */

/* ── Slide-in panel ── */
.pt-cart-popover {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;        /* fallback for older Safari */
    height: 100dvh;       /* dynamic viewport — excludes Safari toolbar */
    width: 400px;
    max-width: 94vw;
    background: #fff;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-cart-popover.is-open {
    transform: translateX(0);
}

/* ── Header ── */
.pt-cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #ebebeb;
    flex-shrink: 0;
    background: #fff;
}

.pt-cp-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.pt-cp-count {
    font-weight: 400;
    color: #888;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.pt-cp-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: background 150ms, color 150ms;
    flex-shrink: 0;
}

.pt-cp-close:hover {
    background: #f5f5f5;
    color: #111;
}

/* ── Scrollable item list ── */
.pt-cp-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    min-height: 0; /* allows flex child to shrink and scroll */
    position: relative; /* stacking context — keeps content below the header */
}

.pt-cp-body::-webkit-scrollbar { width: 4px; }
.pt-cp-body::-webkit-scrollbar-track { background: transparent; }
.pt-cp-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.pt-cp-body::-webkit-scrollbar-thumb:hover { background: #bbb; }

/*
 * WooCommerce wraps woocommerce_mini_cart() output in
 * <div class="widget_shopping_cart_content">, which WC + themes
 * normally style as position:absolute (dropdown widget).
 * Hard-reset it so it flows naturally inside our panel body.
 */
.pt-cart-popover .widget_shopping_cart_content {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    transform: none !important;
}

/* ── Reset UL ──
   WC/themes often set position:absolute, list-style, padding on the cart UL */
.pt-cp-body .woocommerce-mini-cart,
.pt-cp-body .cart_list,
.pt-cp-body .product_list_widget {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    display: block !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ── Reset LI ──
   WooCommerce's woocommerce.css targets:
     .woocommerce ul.cart_list li { overflow:hidden; padding:4px 0; }
     .woocommerce .widget_shopping_cart .cart_list li { padding:1em 0; }
   overflow:hidden is the critical one — it clips our position:absolute image.
   All properties here mirror our item layout values so !important wins cleanly. */
.pt-cp-body .woocommerce-mini-cart li,
.pt-cp-body .cart_list li,
.pt-cp-body .product_list_widget li {
    overflow: visible !important;     /* must not clip position:absolute image */
    display: block !important;
    position: relative !important;    /* anchor for absolute children */
    padding: 16px 36px 16px 110px !important;
    min-height: 86px !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    box-sizing: border-box !important;
    background: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/*
 * Cart item layout: position:relative on <li>, image & remove button
 * absolutely placed, text content flows in the padded area.
 *
 * DOM order inside each <li>:
 *   1. <a class="remove">×</a>
 *   2. <a href="..."><img> Product Name</a>
 *   3. .pt-qty-control (injected by JS, replaces <span class="quantity">)
 *   4. .pt-qty-price   (injected by JS)
 */
.pt-cp-body .woocommerce-mini-cart-item {
    position: relative !important;
    display: block !important;
    overflow: visible !important;
    padding: 16px 36px 16px 110px !important;
    min-height: 86px !important;
    border-bottom: 1px solid #f2f2f2 !important;
    box-sizing: border-box !important;
    transition: background 120ms;
}

.pt-cp-body .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

.pt-cp-body .woocommerce-mini-cart-item:hover {
    background: #fafafa;
}

/* Thumbnail — pinned top-left of the item */
.pt-cp-body .mini_cart_item a:not(.remove) img {
    position: absolute !important;
    top: 16px !important;
    left: 20px !important;
    width: 70px !important;
    height: 70px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    border: 1px solid #ebebeb !important;
    background: #f7f7f7 !important;
    padding: 4px !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Product name link — block, fills the padded content area */
.pt-cp-body .mini_cart_item a:not(.remove) {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 4px;
    transition: color 150ms;
}

.pt-cp-body .mini_cart_item a:not(.remove):hover {
    color: #cc0000;
}

/* Remove × — pinned top-right
   WC uses `color: red !important` on a.remove. When two !important declarations
   clash, the higher specificity wins. ID selector (#pt-cart-popover = 1,0,0)
   beats any class-based WC rule so our styles always take precedence. */
#pt-cart-popover .mini_cart_item a.remove {
    position: absolute !important;
    top: 16px !important;
    right: 6px !important;
    left: auto !important;
    bottom: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    float: none !important;
    color: #ccc !important;
    font-size: 1.1rem !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    border-radius: 50% !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    transition: color 150ms, background 150ms;
}

#pt-cart-popover .mini_cart_item a.remove:hover {
    color: #cc0000 !important;
    background: #fff0f0 !important;
}

/* Quantity text (shown before JS injects the +/- control) */
.pt-cp-body .mini_cart_item .quantity {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* ── +/- Quantity Controls (injected by JS) ── */
.pt-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    height: 28px;
    background: #fff;
    margin-top: 8px;
    margin-right: 8px;
}

.pt-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 100%;
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    user-select: none;
    transition: background 120ms;
}

.pt-qty-btn:first-child { border-radius: 4px 0 0 4px; }
.pt-qty-btn:last-child  { border-radius: 0 4px 4px 0; }
.pt-qty-btn:hover       { background: #111; color: #fff; }
.pt-qty-btn:focus,
.pt-qty-btn:focus-visible { outline: none; box-shadow: none; background: none; }

.pt-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pt-qty-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 100%;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    padding: 0 4px;
}

/* Unit price shown inline beside the qty control */
.pt-qty-price {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #111;
    vertical-align: middle;
}

/* Loading state — visual only, never blocks interaction */
.pt-cp-body .woocommerce-mini-cart-item.pt-item-updating {
    opacity: 0.6;
}

/* Hide WC's own subtotal/buttons inside the body — we show subtotal in our fixed bar */
.pt-cp-body .woocommerce-mini-cart__total,
.pt-cp-body .woocommerce-mini-cart__buttons {
    display: none;
}

/* Empty cart message */
.pt-cp-body .woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 56px 24px;
    color: #999;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Subtotal bar — fixed above footer ── */
.pt-cp-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid #ebebeb;
    background: #fafafa;
    flex-shrink: 0;
}

.pt-cp-subtotal-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pt-cp-subtotal-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
}

/* ── Footer CTAs ── */
.pt-cp-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    border-top: 1px solid #ebebeb;
    flex-shrink: 0;
    background: #fff;
}

.pt-cp-btn-solid,
.pt-cp-btn-outline {
    display: block;
    width: 100%;
    padding: 13px 20px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 4px;
    text-decoration: none;
    transition: background 150ms, color 150ms, border-color 150ms;
    cursor: pointer;
    line-height: 1;
}

.pt-cp-btn-solid {
    background: #111;
    color: #fff !important;
    border: 2px solid #111;
}

.pt-cp-btn-solid:hover {
    background: #333;
    border-color: #333;
    color: #fff !important;
}

.pt-cp-btn-outline {
    background: transparent;
    color: #111 !important;
    border: 2px solid #ddd;
}

.pt-cp-btn-outline:hover {
    border-color: #111;
    background: #f5f5f5;
    color: #111 !important;
}


/* ==========================================================================
   TASK D — CUSTOM FOOTER
   ========================================================================== */

/* Hide the GeneratePress default footer */
.site-footer {
    display: none !important;
}

/* Custom footer */
.pt-site-footer {
    background: #111;
    color: #fff;
    padding: 52px 0 0;
    margin-top: 0;
}

.pt-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Top row */
.pt-footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 40px;
}

/* Brand */
.pt-footer-brand {
    flex: 0 0 auto;
    max-width: 200px;
}

.pt-footer-logo {
    max-height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
    margin-bottom: 10px;
}

.pt-footer-site-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.pt-footer-tagline {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* Nav links */
.pt-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pt-footer-links a {
    font-size: 0.875rem;
    color: #bbb;
    text-decoration: none;
    transition: color 150ms;
}

.pt-footer-links a:hover {
    color: #fff;
}

/* Social icons */
.pt-footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pt-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #888;
    text-decoration: none;
    transition: color 150ms;
    border-radius: 4px;
}

.pt-social-link:hover {
    color: #fff;
}

/* Payments bar */
.pt-footer-payments {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 -24px;
}

.pt-fp-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.pt-fp-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pt-fp-icon {
    height: 20px;
    width: auto;
    max-width: 44px;
    filter: brightness(0) invert(0.7);
    transition: filter 150ms;
}

.pt-fp-icon:hover {
    filter: brightness(0) invert(1);
}

/* Legal strip */
.pt-footer-legal {
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pt-footer-legal span,
.pt-footer-legal a {
    font-size: 0.78rem;
    color: #666;
    text-decoration: none;
    transition: color 150ms;
}

.pt-footer-legal a:hover {
    color: #aaa;
}

.pt-footer-legal-sep {
    color: #333;
}

/* Responsive footer */
@media (max-width: 768px) {
    .pt-footer-top {
        flex-direction: column;
        gap: 28px;
    }

    .pt-footer-brand {
        max-width: 100%;
    }

    .pt-footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .pt-footer-payments {
        padding: 14px 16px;
        margin: 0;
        flex-wrap: wrap;
        gap: 10px;
    }
}


/* ==========================================================================
   TASK E — WC ACCOUNT NOTIFICATIONS PAGE
   ========================================================================== */

.pt-notifications-page {
    max-width: 680px;
}

.pt-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #111;
}

.pt-notif-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.pt-notif-mark-read {
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 150ms, color 150ms;
}

.pt-notif-mark-read:hover {
    background: #f5f5f5;
    color: #111;
}

.pt-notif-empty {
    text-align: center;
    padding: 48px 20px;
    color: #999;
}

.pt-notif-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.pt-notif-empty p {
    margin: 0;
    font-size: 0.9rem;
}

.pt-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pt-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pt-notif-icon {
    width: 36px;
    height: 36px;
    background: #f4f4f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #555;
}

.pt-notif-icon svg {
    width: 16px;
    height: 16px;
}

.pt-notif-body {
    flex: 1;
}

.pt-notif-title {
    font-size: 0.875rem;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.pt-notif-excerpt {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 4px;
}

.pt-notif-time {
    font-size: 0.75rem;
    color: #aaa;
}

.pt-notif-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 10px;
    white-space: nowrap;
    align-self: center;
    flex-shrink: 0;
    transition: background 150ms;
}

.pt-notif-link:hover {
    background: #f5f5f5;
}

/* Account menu badge */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--notifications a .pt-menu-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #D00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    margin-left: 6px;
    vertical-align: middle;
}


/* ==========================================================================
   TASK F — GLOBAL PROFESSIONAL STYLING
   ========================================================================== */

/* Consistent border radius on all buttons */
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    border-radius: 4px;
}

/* Reduce heavy box shadows site-wide */
.woocommerce .product,
.woocommerce ul.products li.product,
.widget,
.wp-block-group,
[class*="shadow"] {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Remove gradient backgrounds on non-hero content blocks */
.entry-content [style*="background: linear-gradient"]:not(.pt-home-hero):not([class*="hero"]):not([class*="banner"]) {
    background: #f7f7f7 !important;
}

/* Typography base */
body {
    font-size: 15px;
    line-height: 1.65;
}

/* WooCommerce notices — clean style */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    border-radius: 4px !important;
    border-top: none !important;
    border-left: 4px solid currentColor !important;
}

.woocommerce-message {
    color: #28a745;
}

.woocommerce-error {
    color: #D00;
}

.woocommerce-info {
    color: #17a2b8;
}

/* Ensure header flex is explicit — required for order:999 on icons to work */
.site-header .inside-header {
    align-items: center;
}

/* Desktop: nav grows to fill space but never pushes icons off screen */
@media (min-width: 769px) {
    #site-navigation {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-header .inside-header .pt-header-icons {
        flex-shrink: 0;
        flex-grow: 0;
    }
}

/* Prevent Elementor cart popup — suppress until specific ID is confirmed */
.elementor-location-popup {
    /* Narrow this to the specific popup ID once known:
       .elementor-location-popup[data-elementor-id="XXXXX"] */
    display: none !important;
}


/* ==========================================================================
   TRACK MY ORDER — Account orders + single order page
   ========================================================================== */

/* "Track Order" button in My Account orders table */
.woocommerce-orders-table .button.track_order {
    background: #fff;
    color: #111;
    border: 1px solid #ccc;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 150ms, border-color 150ms;
}

.woocommerce-orders-table .button.track_order:hover {
    background: #f5f5f5;
    border-color: #aaa;
    color: #111;
}

/* Tracking placeholder card on order detail page */
.pt-tracking-placeholder {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    margin-top: 32px;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    background: #fafafa;
}

.pt-tracking-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: #f0f0f0;
    border-radius: 50%;
    flex-shrink: 0;
    color: #555;
}

.pt-tracking-icon svg {
    width: 26px;
    height: 26px;
}

.pt-tracking-body {
    flex: 1;
    min-width: 0;
}

.pt-tracking-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
}

.pt-tracking-message {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Progress steps */
.pt-tracking-steps {
    display: flex;
    align-items: flex-start;
}

.pt-track-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

/* Connector line — drawn as ::before on each step except the first */
.pt-track-step::before {
    content: '';
    position: absolute;
    top: 6px;          /* vertically centred with the 14px dot */
    left: -50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.pt-track-step:first-child::before {
    display: none;
}

/* Done and active steps have a dark connector INTO them */
.pt-track-step--done::before,
.pt-track-step--active::before {
    background: #111;
}

/* Step dot */
.pt-track-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    background: #fff;
    z-index: 1;
    position: relative;
    flex-shrink: 0;
    transition: background 200ms, border-color 200ms;
}

.pt-track-step--done .pt-track-dot {
    background: #111;
    border-color: #111;
}

.pt-track-step--active .pt-track-dot {
    background: #111;
    border-color: #111;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.12);
}

/* Step label */
.pt-track-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #bbb;
    text-align: center;
    margin-top: 7px;
    line-height: 1.3;
}

.pt-track-step--done .pt-track-label,
.pt-track-step--active .pt-track-label {
    color: #111;
}

/* Responsive: stack icon + body vertically on small screens */
@media (max-width: 480px) {
    .pt-tracking-placeholder {
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .pt-track-label {
        font-size: 9px;
    }
}

/* ==========================================================================
   SECONDARY NAV — hide in forum and marketplace sections
   ========================================================================== */
body.pt-no-secondary-nav .secondary-navigation,
body.pt-no-secondary-nav #secondary-navigation {
    display: none !important;
}

/* ==========================================================================
   SECONDARY NAV — sticky below the main header on shop pages
   --pt-header-h is set dynamically by JS (header-footer-global.js).
   Falls back to 0px so it still sticks even if JS hasn't run yet.
   ========================================================================== */
.secondary-navigation {
    position: sticky;
    top: var(--pt-header-h, 0px);
    z-index: 8990;
}
