/**
 * 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;
}

/* 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-bottom: 70px;
    /* Space for bottom nav */
}

/* App Container */
.hq-app-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--hq-white);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 1. Header Styles */
.hq-app-header {
    background: var(--hq-primary);
    color: var(--hq-white);
    padding: 15px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.hq-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hq-brand {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hq-logo-text small {
    color: var(--hq-accent);
    font-size: 0.8em;
}

.hq-header-actions {
    display: flex;
    gap: 15px;
}

.hq-icon-btn {
    color: var(--hq-white);
    text-decoration: none;
    font-size: 20px;
    position: relative;
}

.hq-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--hq-accent);
    color: var(--hq-primary);
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
}

/* Delivery Bar */
.hq-delivery-bar {
    background: var(--hq-accent);
    color: var(--hq-primary);
    border-radius: var(--hq-radius);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hq-location-row {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hq-promise-row {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.hq-more-btn {
    background: none;
    border: none;
    color: var(--hq-primary);
    font-size: 18px;
    cursor: pointer;
}

/* 2. Search Bar */
.hq-search-container {
    padding: 15px;
    margin-top: -10px;
    /* Slight overlap effect */
    position: relative;
    z-index: 10;
}

.hq-search-box {
    background: var(--hq-white);
    border-radius: 30px;
    /* Rounded pill shape */
    padding: 10px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Floating effect */
    border: 1px solid var(--hq-border);
}

.hq-search-input {
    border: none;
    flex: 1;
    margin: 0 10px;
    outline: none;
    font-size: 14px;
}

.hq-search-btn {
    background: var(--hq-accent);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

/* 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;
}

.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;
}

.hq-wishlist-btn .dashicons {
    font-size: 18px;
}

.hq-card-details {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hq-product-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
    color: var(--hq-text);
}

.hq-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--hq-text);
    margin-bottom: 8px;
}

.hq-delivery-meta {
    font-size: 10px;
    color: #e67e22;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff3e0;
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

.hq-seller-meta {
    font-size: 10px;
    color: var(--hq-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.hq-add-cart-btn {
    margin-top: auto;
    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;
}

.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 .dashicons {
    font-size: 20px;
    height: 20px;
    width: 20px;
}

.hq-nav-spacer {
    height: 70px;
}