/**
 * @license
 * Copyright (c) 2026 Elson Lleshi
 * All Rights Reserved.
 * SPDX-License-Identifier: UNLICENSED
 */

/* ── Layout ───────────────────────────────────────────────────────────────── */
.shop-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 60px;
    align-items: start;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.shop-sidebar {
    position: sticky;
    top: 90px;
    background: #1a1d25;
    border-radius: 10px;
    padding: 22px 18px;
    border: 1px solid rgba(255,255,255,0.07);
}

.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}

.cat-list {
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-filter {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.cat-filter:hover { background: rgba(255,255,255,0.06); color: #fff; }
.cat-filter.active { background: #f97316; color: #fff; font-weight: 700; }

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 18px 0;
}

.sidebar-info {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin-bottom: 12px;
}

.sidebar-info i {
    color: #f97316;
    width: 16px;
}

.sidebar-contact-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    padding: 9px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 4px;
    transition: box-shadow 0.2s;
}

.sidebar-contact-btn:hover {
    box-shadow: 0 6px 18px rgba(249,115,22,0.4);
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.product-count {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.shop-search-wrap {
    position: relative;
    flex: 0 0 240px;
}

.shop-search-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

.shop-search {
    width: 100%;
    background: #1a1d25;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 8px 12px 8px 32px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.shop-search:focus { border-color: #f97316; }
.shop-search::placeholder { color: rgba(255,255,255,0.3); }

/* ── Product grid ─────────────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Product card ─────────────────────────────────────────────────────────── */
.product-card {
    background: #1a1d25;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.18s;
}

.product-card:hover {
    border-color: #f97316;
    transform: translateY(-3px);
}

.product-img {
    aspect-ratio: 4 / 3;
    background: #111318;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-img .product-icon {
    font-size: 48px;
    color: rgba(255,255,255,0.08);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f97316;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-img-wrap {
    position: relative;
}

.product-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f97316;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.product-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    flex: 1;
}

.product-footer {
    padding: 0 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-price {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}

.product-price .currency {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-left: 2px;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.2s, opacity 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    box-shadow: 0 4px 14px rgba(249,115,22,0.45);
}

.add-to-cart-btn:active { opacity: 0.85; }

.out-of-stock-badge {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
}

/* ── Cart bar ─────────────────────────────────────────────────────────────── */
.cart-bar {
    position: sticky;
    top: 72px;
    z-index: 200;
    background: #111318;
    border-bottom: 2px solid #f97316;
    padding: 10px 0;
    display: none;
}

.cart-bar.visible { display: block; }

.cart-bar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-bar-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    flex: 1;
}

.cart-bar-label i { color: #f97316; margin-right: 6px; }

.cart-bar-total {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.cart-bar-total strong { color: #f97316; }

.cart-bar-btn {
    background: #f97316;
    color: #fff;
    border: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ── Cart drawer ──────────────────────────────────────────────────────────── */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
}

.cart-overlay.open { display: block; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100dvh;
    background: #1a1d25;
    z-index: 600;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.cart-drawer.open { right: 0; }

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cart-drawer-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.cart-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.cart-close:hover { color: #fff; }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-empty {
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 13px;
    margin-top: 40px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 10px 12px;
}

.cart-item-icon {
    width: 40px;
    height: 40px;
    background: #111318;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
}

.qty-btn:hover { background: #f97316; }

.qty-num {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

.cart-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
}

.cart-summary strong { color: #f97316; }

.cart-checkout-btn {
    display: block;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.cart-checkout-btn:hover {
    box-shadow: 0 6px 20px rgba(249,115,22,0.45);
}

.cart-clear-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}

.cart-clear-btn:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }

/* ── No products found ────────────────────────────────────────────────────── */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.3);
    font-size: 15px;
}

.no-products i { font-size: 40px; display: block; margin-bottom: 14px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }

    .sidebar-title { width: 100%; margin-bottom: 0; }

    .cat-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cat-filter { width: auto; }

    .sidebar-divider,
    .sidebar-info,
    .sidebar-contact-btn { display: none; }

    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .product-grid { grid-template-columns: 1fr; }
    .cart-drawer { width: 100%; right: -100%; }
}

/* Per-item sale styling on the public menu */
.product-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e74c3c;
    color: #fff;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.product-price-base {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.product-price-sale {
    color: #e67e22;
}
.product-card.is-on-sale {
    border-color: #f97316;
}
