/* ── Aristom Custom Header ── */
:root {
    --ar-red:  #A81E24;
    --ar-ink:  #0F0F10;
    --ar-muted:#7A7B80;
    --ar-line: #ECECEE;
    --ar-bg:   #fff;
}

/* Kill Porto header */
.header-main, .porto-header, .header-top,
header.header, #header, .porto-header-builder,
.elementor-location-header, nav.nav-container,
.main-nav, .porto-nav, #main-nav,
.header-container, .header-top-container { display: none !important; }

/* Reset */
body, .page-wrapper, #page-wrapper, .wrapper { padding-top: 0 !important; margin-top: 0 !important; }

/* ── Header ── */
.ar-header {
    background: #fff;
    border-bottom: 1px solid var(--ar-line);
    font-family: 'Inter', sans-serif;
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Main bar */
.ar-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    height: 64px;
    box-sizing: border-box;
}

.ar-logo img { height: 38px; width: auto; display: block; }
.ar-logo { flex-shrink: 0; text-decoration: none; }

/* Search */
.ar-search-wrap { flex: 1; position: relative; }
.ar-search-field {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--ar-line);
    border-radius: 999px;
    background: #FAFAFA;
    padding: 0 6px 0 14px;
    gap: 8px;
}
.ar-search-field:focus-within { border-color: var(--ar-ink); background: #fff; }
.ar-search-icon { color: var(--ar-muted); flex-shrink: 0; }
.ar-search-input {
    flex: 1; border: none; background: transparent;
    font-family: 'Inter', sans-serif; font-size: 14px;
    color: var(--ar-ink); padding: 10px 0; outline: none; min-width: 0;
}
.ar-search-input::placeholder { color: var(--ar-muted); }
.ar-search-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--ar-ink); color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.ar-search-btn:hover { background: var(--ar-red); }

/* Search results */
.ar-search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--ar-line);
    border-radius: 14px; box-shadow: 0 8px 32px rgba(15,15,16,.1);
    z-index: 1000; overflow: hidden; display: none;
}
.ar-search-results.open { display: block; }
.ar-sr-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--ar-line); transition: background .12s;
}
.ar-sr-item:last-child { border-bottom: none; }
.ar-sr-item:hover { background: #FAFAFA; }
.ar-sr-img { width: 46px; height: 46px; border-radius: 8px; background: #F6F7F9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.ar-sr-img img { width: 90%; height: 90%; object-fit: contain; }
.ar-sr-info { flex: 1; min-width: 0; }
.ar-sr-name { font-size: 13.5px; font-weight: 600; color: var(--ar-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-sr-meta { font-size: 11.5px; color: var(--ar-muted); margin-top: 2px; }
.ar-sr-price { font-size: 13px; font-weight: 700; color: var(--ar-ink); flex-shrink: 0; }
.ar-sr-empty, .ar-sr-loading { padding: 16px 14px; color: var(--ar-muted); text-align: center; font-size: 13px; }

/* Actions */
.ar-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ar-action-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: none; background: transparent; color: var(--ar-ink);
    cursor: pointer; transition: background .15s; position: relative; text-decoration: none;
}
.ar-action-btn:hover { background: #F4F4F4; }
.ar-search-toggle { display: none; }
.ar-cart-count {
    position: absolute; top: 4px; right: 4px;
    background: var(--ar-red); color: #fff; font-size: 9px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; line-height: 1; font-family: 'Inter', sans-serif;
}
.ar-cart-count:empty { display: none; }

/* Desktop nav */
.ar-nav { border-bottom: 1px solid var(--ar-line); }
.ar-nav-inner {
    display: flex; align-items: center;
    padding: 0 28px; overflow-x: auto; scrollbar-width: none; box-sizing: border-box;
}
.ar-nav-inner::-webkit-scrollbar { display: none; }
.ar-nav-link {
    display: inline-block; padding: 13px 0; margin-right: 28px;
    font-size: 13.5px; font-weight: 500; color: var(--ar-muted);
    text-decoration: none; border-bottom: 2px solid transparent;
    white-space: nowrap; transition: .15s; flex-shrink: 0;
}
.ar-nav-link:hover  { color: var(--ar-ink); }
.ar-nav-link.active { color: var(--ar-ink); font-weight: 600; border-bottom-color: var(--ar-red); }
.ar-nav-link:last-child { margin-right: 0; }

/* Mobile search bar */
.ar-mobile-search { display: none; padding: 10px 16px 12px; position: relative; border-top: 1px solid var(--ar-line); }
.ar-mobile-search.open { display: block; }

/* ── MOBILE ── */
@media (max-width: 768px) {
    .ar-header-inner  { padding: 0 16px; height: 56px; gap: 8px; }
    .ar-logo img      { height: 32px; }
    .ar-search-wrap   { display: none; }
    .ar-search-toggle { display: flex; }
    .ar-nav           { overflow-x: auto; }
    .ar-nav-inner     { padding: 0 16px; }
    .ar-nav-link      { font-size: 12.5px; padding: 11px 0; margin-right: 20px; }
}

/* ── MOBILE OVERRIDES ── */
@media (max-width: 768px) {
    /* Full width — override Porto container */
    .ar-header {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Logo left, gap fills space, icons stack right */
    .ar-header-inner {
        padding: 0 16px !important;
        height: 56px !important;
        gap: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Logo pushes everything else to the right */
    .ar-logo { margin-right: auto; }

    /* Hide desktop search bar */
    .ar-search-wrap { display: none !important; }

    /* Show mobile search toggle */
    .ar-search-toggle { display: flex !important; }

    .ar-logo img { height: 32px; }

    /* Nav scrolls horizontally on mobile */
    .ar-nav { overflow-x: auto; width: 100%; }
    .ar-nav-inner { padding: 0 16px; }
    .ar-nav-link { font-size: 12.5px; padding: 11px 0; margin-right: 20px; }
}
