/**
 * QuickKart Widgets & Stepper Styling
 */

/* Category Chips Roster */
.category-chips {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 14px;
    margin-bottom: 30px;
    scrollbar-width: none;
}
.category-chips::-webkit-scrollbar {
    display: none;
}
.category-chip {
    padding: 10px 22px;
    background: var(--qk-blue-soft);
    border: 1px solid rgba(13, 71, 201, 0.15);
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition, all 0.3s ease);
    color: var(--qk-blue);
    text-decoration: none;
}
.category-chip:hover {
    background: linear-gradient(135deg, var(--qk-orange) 0%, var(--qk-orange-dark) 100%);
    color: var(--qk-card);
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(255, 90, 31, 0.25);
    transform: translateY(-1px);
}

/* Category Grid Cards */
.categories-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--qk-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 71, 201, 0.2);
    box-shadow: var(--shadow-md);
}
.category-card span {
    font-weight: 800;
    font-size: 1rem;
    color: var(--qk-text);
    margin-top: 10px;
}
.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--qk-blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Cards & Shelves */
.product-shelf-section {
    margin-bottom: 50px;
}
.shelf-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--qk-text);
    margin-bottom: 20px;
}
.product-shelf {
    display: grid;
    gap: 24px;
}
.product-card {
    background: var(--qk-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 90, 31, 0.15);
}
.product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, var(--qk-orange) 0%, var(--qk-orange-dark) 100%);
    color: var(--qk-card);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 900;
    z-index: 2;
    text-transform: uppercase;
}
.product-image-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.product-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.product-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--qk-text);
    margin-bottom: 6px;
    line-height: 1.3;
}
.product-unit {
    font-size: 0.85rem;
    color: var(--qk-muted);
    font-weight: 500;
    margin-bottom: 10px;
}
.product-card .badge {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}
.badge-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--qk-green);
}
.badge-danger {
    background-color: rgba(244, 63, 94, 0.12);
    color: var(--qk-coral);
}
.product-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.product-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--qk-text);
}
.product-price del {
    font-size: 0.85rem;
    color: var(--qk-muted);
    margin-left: 5px;
}

/* Stepper and Add Buttons */
.quickkart-stepper-wrapper {
    position: relative;
    min-width: 80px;
}
.add-btn {
    border: 2px solid var(--qk-orange);
    background: var(--qk-card);
    color: var(--qk-orange);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}
.add-btn:hover {
    background: linear-gradient(135deg, var(--qk-orange) 0%, var(--qk-orange-dark) 100%);
    color: var(--qk-card);
    border-color: transparent;
    transform: scale(1.05);
}
.qty-control {
    display: flex;
    align-items: center;
    background: var(--qk-orange);
    color: var(--qk-card);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 8px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 90, 31, 0.2);
    justify-content: space-between;
    width: 90px;
}
.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: var(--qk-card);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 900;
    transition: all 0.3s ease;
}
.qty-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}
.qty-val {
    font-size: 0.9rem;
    min-width: 14px;
    text-align: center;
}

/* Floating Bottom Cart Bar */
.mobile-cart-bar {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: 24px !important;
    width: min(420px, calc(100% - 32px)) !important;
    height: 56px !important;
    border-radius: 999px !important;
    z-index: 900 !important;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px !important;
    background: linear-gradient(135deg, var(--qk-orange) 0%, var(--qk-orange-dark) 100%) !important;
    box-shadow: 0 10px 30px rgba(255, 90, 31, 0.3) !important;
}
.cart-bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--qk-card);
}
.cart-bar-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
}
.cart-bar-total {
    font-weight: 900;
    font-size: 1rem;
}
.cart-bar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--qk-card);
    text-decoration: none;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--qk-card);
    height: 64px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
    z-index: 850;
    display: none;
}
.mobile-nav-grid {
    display: grid;
    height: 100%;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--qk-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}
.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}
.mobile-nav-item.active {
    color: var(--qk-orange);
}

/* WhatsApp Floating Support */
.whatsapp-support {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: #25D366;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 800;
    text-decoration: none;
}
.whatsapp-support:hover {
    background: #20ba59;
    transform: translateY(-2px);
}

/* Search bar styling */
.nav-search {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}
.search-input {
    width: 100%;
    background: var(--qk-bg);
    padding: 12px 16px 12px 42px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.search-input:focus {
    border-color: var(--qk-orange);
    background: var(--qk-card);
    box-shadow: 0 4px 12px rgba(255, 90, 31, 0.1);
    outline: none;
}
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qk-muted);
}
.header-search-chips {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
}
.search-chip {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--qk-blue-soft);
    color: var(--qk-blue);
    font-weight: 600;
    cursor: pointer;
}

/* Location Selector styling */
.nav-location {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--qk-blue-soft);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(13, 71, 201, 0.1);
    align-self: flex-start;
}
.nav-location select {
    background: transparent;
    font-weight: 700;
    color: var(--qk-blue);
    font-size: 0.9rem;
    border: none;
    outline: none;
    cursor: pointer;
}

/* Responsiveness overrides */
@media (max-width: 768px) {
    .product-shelf {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .categories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }
    .mobile-bottom-nav {
        display: block;
    }
    .mobile-cart-bar {
        bottom: 76px !important;
        width: calc(100% - 24px) !important;
        border-radius: 12px !important;
    }
    .whatsapp-support {
        bottom: 140px;
    }
}
