/* 
   =========================================
   UNIFIED HEADER v6 (PREMIUM DARK REDESIGN)
   ========================================= 
*/

:root {
    --header-bg: #0b0c10;
    --header-height: 60px;
    --accent-cyan: #00ffff;
    --accent-red: #cc181e;
    --text-white: #ffffff;
    --text-dim: #c5c6c7;
}

header#main-header {
    height: auto !important;
    min-height: 28px !important;
    background: transparent !important;
    border-bottom: none !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5000 !important;
    overflow: visible !important;
    padding: 10px 0 6px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LOGO STYLING */
.logo-v5 {
    text-decoration: none;
    font-family: 'Syncopate', sans-serif;
    display: flex;
    align-items: center;
    position: relative;
    padding: 5px 0;
    transition: transform 0.3s ease;
}

.logo-v5:hover {
    transform: scale(1.02);
}

.logo-pc, .logo-builder {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    /* Metallic effect using linear gradient */
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 45%, #94a3b8 55%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1.5px #cbd5e1; /* Artificially thickens the font to match the heavy metallic look */
    margin: 0;
}

.logo-v5 {
    /* Cyan ambient glow using drop-shadow on the container to bypass background-clip limitations */
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 24px rgba(0, 255, 255, 0.4));
}

.logo-builder::after {
    display: none;
}

/* ACCOUNT CONTROL */
.account-control {
    position: relative;
}

.acc-pill-v4 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 6px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.acc-pill-v4 i.fas {
    font-size: 20px !important;
    color: var(--text-white) !important;
    line-height: 1 !important;
    transition: color 0.2s, filter 0.2s;
}

@media (max-width: 768px) {
    .acc-pill-v4 i.fas {
        font-size: 17px !important;
    }
}

.acc-pill-v4 .acc-initials {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--accent-cyan);
    line-height: 1;
    letter-spacing: 0.5px;
}

.acc-pill-v4:hover i.fas {
    color: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.6));
}

.acc-pill-v4:hover .acc-initials {
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.6));
}

.acc-pill-v4.menu-open i.fas {
    color: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.7));
}


/* CART CAPSULE */
.cart-capsule {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    padding: 8px 18px;
    height: 40px;
    position: relative;
    text-decoration: none;
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.cart-capsule:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-1px);
}

.cart-capsule i {
    font-size: 14px;
    color: var(--text-white);
}

#total-price {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* CART BADGE */
.cart-badge {
    position: absolute;
    top: -8px;
    right: 2px;
    background: var(--accent-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--header-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* BACK PILL */
.back-pill {
    text-decoration: none;
    color: var(--text-white);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.back-pill:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .back-pill .text {
        display: none;
    }
    .back-pill {
        padding: 8px 12px;
        border-radius: 50%;
    }
}

/* DROPDOWN PANEL */
.dropdown-v4 {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: rgba(10, 12, 18, 0.96);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 8px 0 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: all 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 5100;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,255,255,0.05), 0 4px 20px rgba(0,0,0,0.4);
    overflow: hidden;
}

.dropdown-v4.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* ── Control Rows (theme / language) ── */
.dd-row-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    gap: 10px;
}

.dd-control-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 500;
    color: #c8cdd8;
    font-family: 'Outfit', sans-serif;
}

.dd-ctrl-icon {
    font-size: 13px;
    color: var(--accent-cyan);
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Theme Toggle Switch ── */
.dd-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
    padding: 0;
}

.dd-toggle-switch.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.dd-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    display: block;
}

.dd-toggle-switch.active .dd-toggle-knob {
    transform: translateX(20px);
}

/* ── Language Pills ── */
.dd-lang-pills {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dd-lang-pill {
    background: transparent;
    border: none;
    color: #777;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dd-lang-pill:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.06);
}

.dd-lang-pill.active {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* ── Divider ── */
.dd-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 2px 0;
}

/* ── Navigation Items (Dashboard etc.) ── */
.dd-item {
    width: 100%;
    padding: 11px 16px;
    background: transparent;
    border: none;
    color: #c8cdd8;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.dd-item i:first-child {
    width: 14px;
    font-size: 13px;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.dd-item .dd-item-arrow {
    margin-left: auto;
    font-size: 10px;
    color: #444;
    transition: transform 0.2s, color 0.2s;
}

.dd-item:hover {
    background: rgba(0, 255, 255, 0.06);
    color: #fff;
}

.dd-item:hover .dd-item-arrow {
    transform: translateX(3px);
    color: var(--accent-cyan);
}

.dd-item.danger-text {
    color: #ff4d4d;
}
.dd-item.danger-text i:first-child {
    color: #ff4d4d;
}
.dd-item.danger-text:hover {
    background: rgba(255, 77, 77, 0.08);
}

.dd-item.primary-accent {
    color: var(--accent-cyan);
}
.dd-item.primary-accent i:first-child {
    color: var(--accent-cyan);
}

/* User header block */
.dd-user-header {
    padding: 12px 16px 10px;
    background: rgba(0, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 4px;
}
.dd-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Outfit', sans-serif;
}
.dd-user-badge {
    font-size: 9px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 800;
    margin-top: 3px;
    font-family: 'Outfit', sans-serif;
}

/* Isolate toggle switch from any global button resets */
.dd-toggle-switch,
.dd-toggle-switch:focus,
.dd-toggle-switch:focus-visible {
    outline: none !important;
    box-shadow: none;
}
.dd-toggle-switch.active {
    background: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4) !important;
}

/* SECOND ROW / CATEGORY HEADER */
.section-header-clean {
    padding: 20px 30px;
    background: transparent;
}

.section-header-content-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-section-left, .header-section-right {
    flex: 1;
}

.header-section-center {
    flex: 2;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title {
    font-size: 28px !important;
    font-weight: 400 !important;
    color: var(--text-white) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 !important;
    padding: 0 !important;
}

.section-path-info {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 1px solid #333;
    padding-left: 15px;
}

/* SEARCH BOX */
.category-search-wrapper {
    position: relative;
    max-width: 300px;
}

.category-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50px !important;
    padding: 10px 15px 10px 40px !important;
    color: #fff !important;
    font-size: 13px !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.3s;
}

.category-search-input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent-cyan) !important;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

/* FILTER TRIGGER */
.header-section-right {
    display: flex;
    justify-content: flex-end;
}

.filter-sort-trigger {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50px !important;
    padding: 8px 20px !important;
    color: var(--text-white) !important;
    font-size: 13px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.filter-sort-trigger:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent-cyan) !important;
}

.filter-count-badge {
    background: var(--accent-red);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .section-header-content-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .header-section-center {
        order: -1;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    .logo-v5 span {
        font-size: 16px;
    }
    .cart-capsule {
        padding: 6px 12px;
        height: 36px;
        gap: 8px;
    }
    #total-price {
        font-size: 12px;
    }
}
