/*
 * Theme overrides on top of the compiled design system (assets/css/static.css).
 * Keep this file small — most styling lives in static.css.
 */

/* WP admin bar offset */
html { scroll-padding-top: 80px; }

/* Primary nav (when WP menu is used) */
.naf-primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 32px;
}
.naf-primary-menu li { margin: 0; }
.naf-primary-menu a {
    font-weight: 500;
    font-size: 17px;
    color: #374151;
    text-decoration: none;
    transition: color .2s;
}
.naf-primary-menu a:hover,
.naf-primary-menu .current-menu-item > a,
.naf-primary-menu .current_page_item > a {
    color: #969674; /* logo / primary color */
}

/* ---------------------------------------------------------------------
 * Mobile menu — full-screen overlay with fade transition
 * Doesn't take page space when closed (position: fixed, no layout impact).
 * ------------------------------------------------------------------- */
.naf-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.28s ease,
        visibility 0s linear 0.28s;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.naf-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 0.28s ease,
        visibility 0s linear 0s;
}

.naf-mobile-menu__inner {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    padding: 88px 32px 48px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateY(-12px);
    transition: transform 0.28s ease;
}
.naf-mobile-menu.is-open .naf-mobile-menu__inner {
    transform: translateY(0);
}

/* Close X button — top-right of the overlay */
.naf-mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #374151;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.naf-mobile-close:hover { background: #f3f4f6; color: #969674; }
.naf-mobile-close:focus-visible { outline: 2px solid #969674; outline-offset: 2px; }

/* Menu items inside the overlay */
.naf-mobile-menu .naf-primary-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    list-style: none;
    margin: 24px 0 0 0;
    padding: 0;
}
.naf-mobile-menu .naf-primary-menu li { margin: 0; }
.naf-mobile-menu .naf-primary-menu a {
    display: block;
    padding: 18px 4px;
    font-size: 22px;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: color 0.2s, padding-left 0.2s;
}
.naf-mobile-menu .naf-primary-menu a:hover { color: #969674; padding-left: 8px; }
.naf-mobile-menu .naf-primary-menu .current-menu-item > a,
.naf-mobile-menu .naf-primary-menu .current_page_item > a { color: #969674; }

/* Lock the page when the overlay is open */
body.naf-menu-open { overflow: hidden; }

/* Always hide the overlay (and toggle) on desktop */
@media (min-width: 768px) {
    .naf-mobile-menu,
    .naf-mobile-menu.is-open { display: none !important; }
    .naf-mobile-toggle { display: none; }
}
@media (max-width: 767px) {
    .naf-mobile-toggle { display: inline-flex; }
}

/* Featured-category tile hover */
.naf-cat-tile:hover img { transform: scale(1.05); }
.naf-cat-tile img { transition: transform 0.5s; }

/* Specs table styling */
.naf-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.naf-specs-table th,
.naf-specs-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}
.naf-specs-table th {
    background: #f9fafb;
    width: 35%;
    font-weight: 600;
}

/* Product card */
.naf-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow .3s, transform .3s;
    display: flex;
    flex-direction: column;
}
.naf-product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.naf-product-card-img {
    aspect-ratio: 16/10;
    background: #f3f4f6;
    overflow: hidden;
}
.naf-product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.naf-product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.naf-product-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}
.naf-product-card p {
    margin: 0 0 16px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    flex-grow: 1;
}
.naf-product-card-link {
    color: #a52a2a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

/* Generic page wrapper (used by page.php) */
.naf-prose h2 { font-size: 1.75rem; margin: 1.5rem 0 1rem; font-weight: 700; }
.naf-prose h3 { font-size: 1.35rem; margin: 1.5rem 0 .75rem; font-weight: 700; }
.naf-prose p  { line-height: 1.7; margin: 0 0 1rem; color: #4b5563; }
.naf-prose ul { padding-left: 1.5rem; margin: 0 0 1rem; }
.naf-prose li { margin-bottom: .35rem; }
