/* Store-specific CSS additions */

/* Store Layout */
.store-layout {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    gap: 1.5rem;
    height: calc(100vh - 150px);
}

/* Category Sidebar */
.category-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
    border: 1px solid var(--glass-border);
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 0.875rem;
}

.search-box input:focus {
    border-color: var(--accent);
    outline: none;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 0.875rem;
}

.category-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.category-item:hover {
    background: var(--glass);
    color: var(--text-main);
}

.category-item.active {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    font-weight: 600;
}

/* Store Content */
.store-content {
    overflow-y: auto;
    padding-right: 1rem;
}

.featured-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-count {
    background: var(--glass);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.product-card.low-stock {
    border-color: var(--warning);
}

.product-card.out-of-stock {
    opacity: 0.6;
    border-color: var(--danger);
}

.product-image {
    width: 100%;
    height: 180px;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
}

.product-placeholder i {
    width: 64px;
    height: 64px;
    opacity: 0.3;
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.product-badge.popular {
    background: rgba(255, 195, 0, 0.9);
    color: var(--bg-dark);
}

.product-badge.low-stock {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.product-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    margin: 0 0 0.75rem 0;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-category {
    font-size: 0.75rem;
    background: var(--glass);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    color: var(--accent);
}

.product-stock {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
}

.product-stock.low-stock {
    color: var(--warning);
}

.product-stock.out-of-stock {
    color: var(--danger);
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.qty-selector {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 0.5rem;
    align-items: center;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}

.qty-input {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
}

.btn-add-cart {
    width: 100%;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-button);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-add-cart:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-add-cart.in-cart {
    background: var(--glass);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-add-cart:disabled {
    background: var(--glass);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Cart Sidebar */
.cart-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 2rem;
    height: fit-content;
    max-height: calc(100vh - 150px);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    margin: 0;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    min-height: 200px;
    max-height: 400px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-cart i {
    margin-bottom: 1rem;
}

.empty-cart p {
    margin: 0.5rem 0;
    font-weight: 600;
}

.empty-cart small {
    font-size: 0.75rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 50px 1fr 80px 40px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.cart-item:hover {
    background: var(--glass);
    border-radius: 0.5rem;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image i {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.cart-item-info h5 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.cart-item-sku {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
    font-family: 'Courier New', monospace;
}

.cart-item-qty input {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
}

.btn-remove {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.btn-remove:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

.cart-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.cart-summary {
    background: var(--glass);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.summary-row strong {
    color: var(--accent);
    font-size: 1.125rem;
}

.btn-checkout {
    width: 100%;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 1rem;
    border-radius: var(--radius-button);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-checkout:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(255, 195, 0, 0.3);
}

/* Responsive adjustments for store */
@media (max-width: 1400px) {
    .store-layout {
        grid-template-columns: 250px 1fr 320px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 1200px) {
    .store-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .category-sidebar,
    .cart-sidebar {
        position: relative;
        top: 0;
    }

    .cart-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {

    .product-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }
}