/**
 * Horeka Quick OS - Frontend Styles
 * Version: 1.0.1
 */

:root {
    --hq-primary: #1a237e;
    /* Deep Blue */
    --hq-accent: #ffc107;
    /* Amber/Yellow from screenshots */
    --hq-bg: #f9f9f9;
    --hq-white: #ffffff;
    --hq-text: #1d2327;
    --hq-text-muted: #666;
    --hq-border: #eee;
    --hq-success: #4caf50;
    --hq-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --hq-radius: 12px;
}

/* Remove Elementor container padding */
.elementor-element {
    padding: 0 !important;
}

/* Base Reset */
body {
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--hq-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
}

/* App Container */
.hq-app-container {
    max-width: 100%;
    margin: 0;
    background: var(--hq-white);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 1. Header Styles */
.hq-app-header {
    background: #FFCB4C;
    /* Exact Yellow Match */
    color: var(--hq-text);
    padding: 2px 10px;
    /* Reduced padding for smaller height */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Delivery Bar */
.hq-delivery-bar {
    background: transparent;
    color: var(--hq-text);
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.hq-location-row {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hq-delivering-text {
    font-size: 15px;
    font-weight: 700;
    color: #0A2240;
    /* Navy Blue */
}

.hq-delivering-text strong {
    color: #783C00;
    /* Dark Brown */
    font-size: 15px;
    text-decoration: none;
    font-weight: 800;
}

/* 2. Search Bar - Icon Inside, No White Background */
.hq-search-wrapper {
    position: relative;
    padding: 0;
    background: white;
}

.hq-search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    gap: 10px;
}

.hq-search-bar:focus-within {
    border-color: #4c8515;
    box-shadow: 0 2px 8px rgba(76, 133, 21, 0.15);
}

.hq-search-icon {
    font-size: 18px;
    color: #000;
    background: #ffbb85;
    flex-shrink: 0;
    line-height: 1;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hq-search-input {
    border: none;
    flex: 1;
    outline: none;
    font-size: 16px;
    /* Prevents zoom on iOS */
    background: transparent;
    color: #333;
    padding: 0;
    margin: 0;
    min-width: 0;
    width: 100%;
}

.hq-search-input::placeholder {
    color: #999;
    transition: opacity 0.3s ease;
}

.hq-search-input {
    transition: opacity 0.3s ease;
}

/* Mobile optimization */
@media (max-width: 480px) {
    .hq-search-wrapper {
        padding: 10px 12px;
    }

    .hq-search-icon {
        font-size: 18px;
    }

    .hq-search-bar {
        padding: 8px 12px;
        gap: 8px;
    }
}

/* 3. Section Headers */
.hq-section-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hq-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--hq-primary);
}

.hq-section-subtitle {
    font-size: 12px;
    color: var(--hq-text-muted);
    margin: 4px 0 0 0;
}

.hq-section-link {
    font-size: 13px;
    color: var(--hq-primary);
    text-decoration: none;
    font-weight: 600;
}

/* 4. Horizontal Scroll Areas */
.hq-horizontal-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 15px 20px 15px;
    /* Bottom padding for shadow cutoff */
    gap: 15px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.hq-horizontal-scroll::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

/* 5. Product Cards */
.hq-product-card {
    min-width: 160px;
    max-width: 160px;
    background: var(--hq-white);
    border-radius: var(--hq-radius);
    border: 1px solid var(--hq-border);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
    cursor: pointer;
}

.hq-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hq-product-grid .hq-product-card {
    max-width: 100%;
}

.hq-card-image {
    position: relative;
    height: 140px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.hq-product-img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.hq-wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.hq-wishlist-btn:hover {
    background: white;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.hq-wishlist-btn.active,
.hq-wishlist-btn.active:hover {
    color: #e91e63;
}

/* iOS-Friendly Icon Styling */
.hq-icon {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.hq-wishlist-btn .hq-icon {
    font-size: 18px;
}

.hq-card-details {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Explicit gap between stack items */
    position: relative;
    z-index: 1;
}

.hq-product-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 !important;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: ellipsis;
    min-height: 50px;
    max-height: 60px !important;
    color: var(--hq-text);
}

.hq-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--hq-text);
    margin: 0;
    line-height: 1.2;
}

.hq-delivery-meta {
    font-size: 10px;
    color: #e67e22;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff3e0;
    padding: 3px 6px;
    border-radius: 4px;
    align-self: flex-start;
    line-height: normal;
}

.hq-seller-meta {
    font-size: 10px;
    color: var(--hq-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.hq-cart-controls {
    margin-top: auto;
    /* Push to bottom */
    position: relative;
    width: 100%;
    padding-top: 4px;
}

.hq-add-cart-btn {
    width: 100%;
    background: var(--hq-accent);
    color: var(--hq-primary);
    border: 1px solid var(--hq-accent);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.hq-add-cart-btn:hover {
    background: #ffb300;
    border-color: #ffb300;
    transform: translateY(-1px);
}

.hq-add-cart-btn:active {
    transform: translateY(0);
}

.hq-add-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Product Grid for Shop Page */
.hq-product-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 480px) {
    .hq-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Category Cards */
.hq-category-card {
    min-width: 100px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hq-category-card:hover {
    transform: translateY(-2px);
}

.hq-category-icon {
    background: #f0f0f0;
    height: 80px;
    width: 80px;
    border-radius: 12px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hq-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hq-category-name {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
    color: var(--hq-text);
}

.hq-category-count {
    font-size: 10px;
    color: var(--hq-text-muted);
    display: block;
}

/* Trusted Sellers Section */
.hq-trusted-sellers {
    margin: 20px 15px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 12px;
}

.hq-sellers-title {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #1565c0;
    font-size: 14px;
}

.hq-sellers-actions {
    display: flex;
    gap: 10px;
}

.hq-whatsapp-btn {
    border: none;
    background: #25d366;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hq-whatsapp-btn:hover {
    background: #20ba5a;
}

.hq-help-btn {
    border: 1px solid #1565c0;
    background: white;
    color: #1565c0;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hq-help-btn:hover {
    background: #1565c0;
    color: white;
}

/* 6. Bottom Navigation */
.hq-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--hq-white);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.hq-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--hq-text-muted);
    font-size: 10px;
    gap: 4px;
    transition: color 0.2s ease;
}

.hq-nav-item.active {
    color: var(--hq-primary);
}

.hq-nav-item .hq-icon {
    font-size: 20px;
    margin-bottom: 4px;
    width: 20px;
}

.hq-nav-spacer {
    height: 70px;
}

/* Interactive Cards */
.hq-product-card,
.hq-list-item {
    cursor: pointer;
}

/* Quick Filters */
.hq-filter-section {
    padding: 0;
    background: #fff;
}

.hq-section-header-small {
    padding: 0 15px 10px 15px;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

/* Brand Scroll - Horizontal scroll, no wrapping */
.hq-brand-scroll {
    display: flex;
    flex-wrap: nowrap;
    padding: 10px 15px 35px 15px;
    gap: 10px;
    margin-bottom: -20px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.hq-brand-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Circular Categories */
.hq-cat-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 70px;
    cursor: pointer;
}

.hq-cat-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.hq-cat-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hq-cat-circle-item.active .hq-cat-circle {
    border-color: var(--hq-primary);
    background: #fff8e1;
    /* Light yellow tint */
}

.hq-cat-name {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    color: #333;
    max-width: 70px;
}

/* Brand Pills */
.hq-brand-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 36px;
    box-sizing: border-box;
}

.hq-brand-pill:hover {
    background: #eee;
    transform: scale(1.02);
}

.hq-brand-pill.active {
    transform: scale(1.08);
    border: 2px solid #4c8515 !important;
    box-shadow: 0 4px 8px rgba(76, 133, 21, 0.2) !important;
    background: #f0f8e8 !important;
}

.hq-brand-icon {
    width: auto;
    max-width: 100px;
    height: 20px;
    object-fit: contain;
    border-radius: 0;
    display: block;
}

/* Search Overlay */
.hq-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 999999;
    display: none;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hq-search-overlay.active {
    display: flex;
    transform: translateY(0);
}

.hq-search-overlay-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hq-search-overlay-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    color: #666;
}

.hq-search-overlay-input-wrapper {
    flex: 1;
    position: relative;
}

.hq-search-overlay-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.hq-search-overlay-input:focus {
    border-color: #4c8515;
}

.hq-search-overlay-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    padding: 16px;
    overscroll-behavior: contain;
    /* Prevent pull-to-refresh */
    height: 100%;
    max-height: calc(100vh - 80px);
}

.hq-search-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hq-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.hq-search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 12px;
}

.hq-search-result-item:hover {
    background: #f9fafb;
}

.hq-search-result-item:active {
    background: #f0f0f0;
}

.hq-search-result-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f9fafb;
}

.hq-search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hq-search-result-info {
    flex: 1;
    min-width: 0;
}

.hq-search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.hq-search-result-price {
    font-size: 14px;
    font-weight: 600;
    color: #4c8515;
}

.hq-search-result-arrow {
    font-size: 18px;
    color: #999;
    flex-shrink: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hq-search-overlay-header {
        padding: 12px;
    }

    .hq-search-overlay-close {
        font-size: 28px;
        padding: 4px;
        margin-right: 8px;
    }

    .hq-search-overlay-input {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 10px 14px;
    }

    .hq-search-overlay-content {
        padding: 12px;
    }

    .hq-search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hq-search-section-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .hq-search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hq-search-overlay-content {
        padding: 10px;
    }
}

.hq-search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.hq-search-loading-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.hq-search-loading-subtext {
    font-size: 14px;
    color: #999;
}

.hq-search-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.hq-search-skeleton-item {
    height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.hq-search-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.hq-search-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.hq-search-empty-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hq-search-empty-subtext {
    font-size: 14px;
    color: #999;
}

/* Empty Category State */
.hq-empty-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    width: 100%;
}

.hq-empty-message {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

.hq-request-product-btn {
    display: inline-block;
    background: #4c8515;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(76, 133, 21, 0.3);
}

.hq-request-product-btn:hover {
    background: #3d6a11;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 133, 21, 0.4);
}

.hq-request-product-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 133, 21, 0.3);
}

/* Out of Stock Products */
.hq-product-card.hq-out-of-stock {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

.hq-product-card.hq-out-of-stock .hq-product-img {
    filter: grayscale(100%);
}

.hq-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.5px;
    z-index: 10;
    text-align: center;
}

/* Floating Checkout Button */
.hq-floating-checkout {
    position: fixed;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 2147483647;
    /* Maximum z-index */
    width: 75px;
    height: 75px;
    background: #ffdb15;
    /* Brand Yellow/Gold */
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.1s;
    /* Faster response */
    cursor: grab;
    touch-action: none;
    /* Prevent scroll when dragging */
    user-select: none;
}

.hq-floating-checkout:active {
    transform: translateY(-50%) scale(0.95);
    cursor: grabbing;
}

.hq-circular-text-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hq-circular-text-container svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: hq-spin 10s linear infinite;
    fill: #000;
}

.hq-center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

@keyframes hq-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ================================================
   Talk-to-Expert Floating Button
   - Mutually exclusive with .hq-floating-checkout
     (shows when cart is EMPTY, checkout shows when cart has items)
   ================================================ */

/* Outer wrapper — this is what gets shown/hidden & slides in */
.hq-expert-wrap {
    position: fixed;
    bottom: 88px;           /* above the bottom navigation bar */
    right: 15px;
    z-index: 2147483646;    /* one below the yellow checkout button */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    /* Starts off-screen to the right; JS slides it in by adding --visible */
    transform: translateX(130%);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;   /* restored on the inner <a> */
}

/* Slide-in state added by JavaScript */
.hq-expert-wrap.hq-expert-wrap--visible {
    transform: translateX(0) !important;
}

/* Label above the circle button */
.hq-expert-label {
    background: rgba(255, 255, 255, 0.93);
    color: #6b7280;             /* soft gray */
    font-family: -apple-system, 'Inter', 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 11px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    pointer-events: none;
    margin: 0;
    line-height: 1.4;
}

/* The circular button itself */
.hq-expert-btn {
    position: relative;
    width: 62px;
    height: 62px;
    background: #4c8515;        /* brand green */
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(76, 133, 21, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    overflow: visible;
    pointer-events: all;        /* re-enable clicks on the link */
}

.hq-expert-btn:active {
    transform: scale(0.93);
}

/* Inner wrapper — stacks SVG and icon */
.hq-expert-btn__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Spinning circular text */
.hq-expert-btn__svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: hq-spin 9s linear infinite;
    fill: rgba(255, 255, 255, 0.9);
}

/* Centre chat icon */
.hq-expert-btn__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 21px;
    line-height: 1;
}

/* Expanding pulse ring */
.hq-expert-btn__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.6);
    animation: hq-expert-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes hq-expert-pulse {
    0%   { transform: scale(1);    opacity: 0.8; }
    100% { transform: scale(1.85); opacity: 0;   }
}


.hq-page-transition {
    transition: opacity 0.3s ease-in-out;
}

.hq-page-loading {
    opacity: 0;
    pointer-events: none;
}

.hq-ajax-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.hq-ajax-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.hq-ajax-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--hq-primary);
    border-radius: 50%;
    animation: hq-spin 0.8s linear infinite;
}

@keyframes hq-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ======================
   Location Popup Styles
   ====================== */
.hq-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    /* Toggled by JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.hq-popup-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: hq-popup-up 0.3s ease-out;
}

@keyframes hq-popup-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hq-popup-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
}

.hq-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.hq-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

.hq-popup-body {
    padding: 20px;
}

.hq-btn-full {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--hq-primary);
    border-radius: 8px;
    background: white;
    color: var(--hq-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.hq-btn-full:hover {
    background: #f0f7ff;
}

.hq-divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.hq-divider span {
    background: white;
    padding: 0 10px;
    position: relative;
    z-index: 1;
    color: #999;
    font-size: 12px;
}

.hq-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
}

.hq-input-group {
    display: flex;
    gap: 10px;
}

.hq-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.hq-btn-primary {
    background: var(--hq-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* 
 * ----------------------------------------------------
 * CART PAGE STYLES 
 * ----------------------------------------------------
 */

/* Cart Header */
/* Cart Header */
.hq-cart-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    padding: 15px;
    /* Added spacing to avoid overlap */
    position: relative;
    justify-content: center;
    /* Center the title */
}

.hq-cart-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--hq-primary);
    text-align: center;
}

.hq-back-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    /* Increase tap area */
    margin-left: -10px;
    /* Offset the padding */
}

/* Coupon Section */
.hq-coupon-section {
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #fff;
}

.hq-coupon-row {
    display: flex;
    align-items: center;
    background: #fff8e1;
    /* Light yellow bg for coupon */
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px dashed #ffa000;
}

.hq-coupon-icon {
    font-size: 18px;
    margin-right: 10px;
}

.hq-coupon-text {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    color: #333;
}

.hq-chevron {
    color: #999;
    font-size: 18px;
    font-weight: 300;
}

/* Cart Items List */
.hq-cart-items {
    background: #fff;
    margin-bottom: 10px;
}

.hq-cart-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    gap: 12px;
}

.hq-cart-item:last-child {
    border-bottom: none;
}

.hq-cart-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hq-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hq-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hq-cart-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.hq-cart-item-meta {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.hq-stock-status.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.hq-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.hq-cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

/* Quantity Control */
.hq-qty-control {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #e0e0e0;
}

.hq-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--hq-primary);
    cursor: pointer;
}

.hq-qty-value {
    width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.hq-remove-btn {
    background: none;
    border: none;
    font-size: 16px;
    padding: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.hq-remove-btn:hover {
    opacity: 1;
    color: #d32f2f;
}

/* Delivery Progress Section */
.hq-delivery-progress-section {
    background: #fff8e1;
    /* Light yellow background */
    padding: 15px;
    margin: 10px 15px;
    border-radius: 12px;
    border: 1px solid #ffe082;
}

.hq-delivery-progress-header {
    display: flex;
    align-items: flex-start;
    /* Align to top for multiline text */
    gap: 8px;
    margin-bottom: 12px;
}

.hq-truck-icon {
    font-size: 20px;
}

.hq-progress-text {
    font-size: 13px;
    color: #5d4037;
    /* Brownish text */
    line-height: 1.4;
    flex: 1;
}

.hq-progress-text strong {
    font-weight: 700;
    color: #000;
}

.hq-progress-text.success {
    color: #2e7d32;
    font-weight: 600;
}

.hq-progress-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.hq-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.hq-progress-values {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #795548;
    font-weight: 600;
}

/* Bill Details */
.hq-bill-details {
    background: #fff;
    padding: 15px;
    margin-bottom: 100px;
    /* Space for fixed footer */
}

.hq-bill-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}

.hq-bill-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-weight: 700;
    font-size: 16px;
    color: #000;
}

/* Cart Footer (Checkout Button) */
.hq-cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    box-sizing: border-box;
    padding-bottom: 20px;
    /* Safe area for modern phones */
}

.hq-cart-footer {
    bottom: 0;
}

.hq-checkout-btn {
    display: block;
    width: 100%;
    background: #ffc107;
    /* Yellow */
    color: #000;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(255, 193, 7, 0.4);
    transition: transform 0.2s;
}

.hq-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 193, 7, 0.5);
    background: #ffca28;
}

.hq-secure-text {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin: 8px 0 0 0;
}

/* Empty State */
.hq-empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    min-height: 60vh;
}

.hq-empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.hq-empty-cart-state h2 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #333;
}

.hq-empty-cart-state p {
    color: #666;
    margin-bottom: 25px;
}

.hq-start-shopping-btn {
    background: var(--hq-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* Applied Coupon Row */
.hq-coupon-applied-row {
    display: flex;
    align-items: center;
    background: #e8f5e9;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px dashed #4caf50;
    margin-bottom: 8px;
}

.hq-coupon-applied-row .hq-coupon-text {
    color: #2e7d32;
    font-size: 13px;
}

.hq-remove-coupon {
    font-size: 18px;
    color: #999;
    padding: 0 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Coupon Modal */
.hq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Bottom sheet style */
}

.hq-modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.hq-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.hq-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.hq-modal-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.hq-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.hq-coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.hq-coupon-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.hq-coupon-input-group button {
    background: var(--hq-primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.hq-coupon-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hq-coupon-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
}

.hq-coupon-left {
    flex: 1;
}

.hq-coupon-code {
    font-weight: 700;
    font-size: 14px;
    background: #fff8e1;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    border: 1px dashed #ffa000;
    color: #333;
}

.hq-coupon-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 2px;
}

.hq-coupon-meta {
    font-size: 11px;
    color: #999;
}

.hq-coupon-btn {
    background: transparent;
    color: var(--hq-primary);
    border: 1px solid var(--hq-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.hq-coupon-btn.applied {
    background: #e0e0e0;
    color: #777;
    border-color: #ddd;
    cursor: default;
}

.hq-loading-text {
    text-align: center;
    color: #999;

    padding: 20px;
}

/* 
 * ----------------------------------------------------
 * INTERACTION FIXES
 * ----------------------------------------------------
 */

/* Ensure cart interaction layer is top */
.hq-qty-control,
.hq-remove-btn,
.hq-coupon-row,
.hq-coupon-applied-row,
.hq-coupon-btn,
.hq-modal-close,
.hq-coupon-card {
    cursor: pointer;
    position: relative;
    z-index: 10;
}

/* Modal interactions */
#hq-apply-coupon-btn,
.hq-coupon-btn {
    pointer-events: auto;
}

/* Ensure no overlay is blocking unexpectedly */
.hq-app-container {
    background: #fff;
    /* Reset to solid background */
    position: relative;
    z-index: 1;
}

/* Buttons must be tappable */
button,
.hq-btn {
    touch-action: manipulation;
    /* Improves touch responsiveness */
}

/* Product Page Header Adjustment */
/* Force correct layout ONLY on product page */
.hq-product-page .hq-header-row {
    position: relative !important;
    /* Neutralizes sticky if present */
    top: auto !important;
    z-index: 100 !important;
    background: #ffffff !important;

    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;

    width: 100% !important;
    padding: 12px 15px !important;
    box-sizing: border-box !important;
}

/* Fix icon grouping */
.hq-product-page .hq-header-row .hq-left,
.hq-product-page .hq-header-row .hq-right {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

/* Neutralize parent flex interference */
.hq-product-page .elementor-widget-container {
    display: block !important;
}

.hq-product-page .hq-back-btn {
    z-index: 25;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.hq-product-page .hq-back-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hq-product-page .hq-back-btn .hq-icon {
    font-size: 20px;
    line-height: 1;
}

.hq-product-page .hq-action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hq-product-page .hq-share-btn,
.hq-product-page .hq-wishlist-btn-large {
    z-index: 25;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #333;
    transition: transform 0.2s ease;
}

.hq-product-page .hq-share-btn:hover,
.hq-product-page .hq-wishlist-btn-large:hover {
    transform: scale(1.1);
}

.hq-product-page .hq-share-btn .hq-icon,
.hq-product-page .hq-wishlist-btn-large .hq-icon {
    font-size: 24px;
    line-height: 1;
}