/* ============================================================
   HOREKA QUICK OS — PREMIUM DESKTOP REDESIGN (Scratch)
   Active for viewport >= 1024px
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --hqd-primary: #ff1e56;
    --hqd-navy: #0a1c3d;
    --hqd-bg: #f8fafc;
    --hqd-surface: #ffffff;
    --hqd-text: #1e293b;
    --hqd-text-light: #64748b;
    --hqd-border: #e2e8f0;
    --hqd-radius: 12px;
    --hqd-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hqd-header-h: 72px;
}

/* ── Reset & Visibility ── */
.hqd-shell {
    display: none;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--hqd-bg);
    min-height: 100vh;
}

@media (min-width: 1024px) {
    /* Hide Default Theme Elements */
    header.site-header, 
    .elementor-location-header, 
    .et-main-header, 
    #header-main,
    .hq-app-container .hq-app-header { 
        display: none !important; 
    }

    .hqd-shell { display: block; }
    .hq-app-container { display: none !important; }
}

/* ── Header ── */
.hqd-header {
    background: var(--hqd-navy);
    height: var(--hqd-header-h);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hqd-header-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.hqd-header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.hqd-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.hqd-brand-logo {
    height: 32px;
    width: auto;
}

.hqd-brand-tag {
    background: #ffb400;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-top: 4px;
}

.hqd-header-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 8px 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.hqd-header-pill:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hqd-pill-text {
    font-size: 13px;
    font-weight: 600;
}

/* Header Center: Search */
.hqd-header-center {
    flex: 1;
    max-width: 600px;
}

.hqd-search-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
}

.hqd-search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--hqd-text);
}

/* Header Right: Actions */
.hqd-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.hqd-mode-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 100px;
}

.hqd-mode-pill {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.hqd-mode-pill.active {
    background: #ffb400;
    color: #000;
}

.hqd-action-icon {
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    line-height: 1;
}

.hqd-cart-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: var(--hqd-primary);
    padding: 8px 18px;
    border-radius: 8px;
    color: #fff;
}

.hqd-cart-icon-wrap {
    position: relative;
    font-size: 20px;
}

.hqd-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fff;
    color: var(--hqd-primary);
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hqd-cart-badge.visible { display: flex; }

.hqd-cart-label {
    font-size: 13px;
    font-weight: 700;
}

/* ── Body Layout ── */
.hqd-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.hqd-sidebar {
    position: sticky;
    top: calc(var(--hqd-header-h) + 40px);
}

.hqd-sidebar-content {
    background: var(--hqd-surface);
    border-radius: var(--hqd-radius);
    padding: 24px;
    box-shadow: var(--hqd-shadow);
}

.hqd-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hqd-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hqd-side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--hqd-text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.hqd-side-link:hover {
    background: #f1f5f9;
}

.hqd-side-link.active {
    background: #ffeef2;
    color: var(--hqd-primary);
    font-weight: 700;
}

.hqd-side-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hqd-side-icon img { width: 100%; height: 100%; object-fit: contain; }

.hqd-sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--hqd-border);
}

.hqd-promise {
    display: flex;
    gap: 12px;
}

.hqd-promise-bolt { font-size: 24px; }

.hqd-promise-text strong { display: block; font-size: 13px; color: #16a34a; }
.hqd-promise-text span { font-size: 11px; color: var(--hqd-text-light); }

/* Main Content */
.hqd-content {
    min-width: 0;
}

.hqd-filter-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.hqd-filter-pills::-webkit-scrollbar { display: none; }

.hqd-filter-pill {
    padding: 8px 20px;
    background: var(--hqd-surface);
    border: 1px solid var(--hqd-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hqd-text-light);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.hqd-filter-pill:hover {
    border-color: var(--hqd-primary);
    color: var(--hqd-primary);
}

.hqd-filter-pill.active {
    background: var(--hqd-primary);
    border-color: var(--hqd-primary);
    color: #fff;
}

/* Product Grid */
.hqd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.hqd-section-header h2 { font-size: 22px; font-weight: 800; margin: 0; }
.hqd-section-header p { font-size: 14px; color: var(--hqd-text-light); margin: 4px 0 0 0; }

.hqd-link-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--hqd-primary);
    text-decoration: none;
}

.hqd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (min-width: 1440px) { .hqd-grid { grid-template-columns: repeat(5, 1fr); } }

/* Product Card */
.hqd-card {
    background: var(--hqd-surface);
    border-radius: var(--hqd-radius);
    box-shadow: var(--hqd-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.hqd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.hqd-card-image {
    aspect-ratio: 1;
    background: #f8fafc;
    position: relative;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hqd-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hqd-card-oos {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ef4444;
}

.hqd-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hqd-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hqd-card-price {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hqd-card-meta {
    font-size: 11px;
    color: #16a34a;
    font-weight: 700;
    background: #f0fdf4;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 16px;
}

.hqd-add-btn {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1.5px solid var(--hqd-primary);
    color: var(--hqd-primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.hqd-add-btn:hover {
    background: var(--hqd-primary);
    color: #fff;
}

/* Empty State */
.hqd-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--hqd-surface);
    border-radius: var(--hqd-radius);
    box-shadow: var(--hqd-shadow);
}

.hqd-empty-icon { font-size: 64px; margin-bottom: 24px; }
.hqd-empty-state h2 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.hqd-empty-state p { color: var(--hqd-text-light); margin-bottom: 30px; }

.hqd-btn-primary {
    background: var(--hqd-primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* Modal */
.hqd-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hqd-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.hqd-modal-container {
    position: relative;
    background: #fff;
    width: 440px;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hqd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.hqd-modal-header h3 { font-size: 20px; font-weight: 800; margin: 0; }
.hqd-modal-close { background: none; border: none; font-size: 28px; cursor: pointer; }

.hqd-input-group {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.hqd-input-group input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--hqd-border);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
}

.hqd-input-group input:focus { border-color: var(--hqd-primary); }

.hqd-modal-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.hqd-modal-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--hqd-border);
}

.hqd-modal-divider span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    font-size: 12px;
    color: var(--hqd-text-light);
    font-weight: 600;
}

.hqd-btn-detect {
    width: 100%;
    background: #f1f5f9;
    border: 2px solid var(--hqd-border);
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.hqd-btn-detect:hover {
    background: #e2e8f0;
}

/* ── Talk to Expert Floating Button ── */
.hq-expert-wrap {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1001;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hq-expert-label {
    background: #fff;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--hqd-navy);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.hq-expert-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.hq-expert-btn__inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.hq-expert-btn__pulse {
    position: absolute;
    inset: -4px;
    border: 2px solid var(--hqd-primary);
    border-radius: 50%;
    animation: hqd-pulse 2s infinite;
    opacity: 0;
}

@keyframes hqd-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.hq-expert-wrap--visible {
    display: flex !important;
}
