/**
 * Core stylesheet for VapeCart Theme
 * Built by MsalaH
 */

/* Responsive Product Grid */
.vapecart-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

@media (max-width: 1024px) {
    .vapecart-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .vapecart-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* AJAX Search Suggestion Panel */
.vapecart-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 999;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.vapecart-search-suggestions.active {
    display: block;
}

.vapecart-search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #1e293b;
}

.vapecart-search-item:hover {
    background: #f8fafc;
}

.vapecart-search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.vapecart-search-item .info {
    flex-grow: 1;
}

.vapecart-search-item .title {
    font-weight: 600;
    font-size: 14px;
}

.vapecart-search-item .price {
    font-size: 12px;
    color: #64748b;
}

/* Age Gate Modal Dialog */
.vapecart-age-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.vapecart-age-gate-dialog {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
}

.vapecart-age-gate-logo {
    font-size: 28px;
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 16px;
}

.vapecart-age-gate-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

.vapecart-age-gate-desc {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.vapecart-age-gate-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.vapecart-age-gate-btn {
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: background 0.2s;
}

.vapecart-age-gate-btn.yes {
    background: #2563eb;
    color: #ffffff;
}

.vapecart-age-gate-btn.yes:hover {
    background: #1d4ed8;
}

.vapecart-age-gate-btn.no {
    background: #f1f5f9;
    color: #64748b;
}

.vapecart-age-gate-btn.no:hover {
    background: #e2e8f0;
}

/* Mobile Bottom Navigation Bar */
.vapecart-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    z-index: 999;
    padding: 8px 16px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .vapecart-mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
}

.vapecart-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}

.vapecart-mobile-nav-item svg {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

.vapecart-mobile-nav-item.active {
    color: #2563eb;
}

/* Cross-Sell Popup */
.vapecart-cross-sell-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.vapecart-cross-sell-popup.active {
    opacity: 1;
    pointer-events: auto;
}

.vapecart-cross-sell-popup .cross-sell-inner {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.vapecart-cross-sell-popup.active .cross-sell-inner {
    transform: translateY(0);
}

.vapecart-cross-sell-popup .close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.vapecart-cross-sell-popup h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
}

.vapecart-cross-sell-popup .cross-sell-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .vapecart-cross-sell-popup .cross-sell-list {
        grid-template-columns: 1fr;
    }
}

/* Infinite Scroll Sentinel */
.vapecart-scroll-sentinel {
    height: 20px;
    width: 100%;
}

.loading-products {
    opacity: 0.6;
    pointer-events: none;
}
