/* JCustoms — shop.css */

/* ── Category page header ──────────────────────────────────────────────────── */
.cat-breadcrumb {
    font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px;
}
.cat-breadcrumb a { color: var(--text-muted); }
.cat-breadcrumb a:hover { color: var(--text); }
.cat-breadcrumb span { color: var(--text-sub); }
.cat-title { font-size: 2rem; font-weight: 800; margin-bottom: 32px; }

/* ── Shop cards grid ───────────────────────────────────────────────────────── */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.shop-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
    cursor: pointer;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.shop-card:hover {
    transform: translateY(-4px);
    border-color: rgba(147,51,234,.5);
    box-shadow: 0 10px 28px rgba(147,51,234,.2);
}
.shop-card img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    transition: transform .4s;
}
.shop-card:hover img { transform: scale(1.04); }
.shop-card__body { padding: 14px 16px; }
.shop-card__name { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.shop-card__price-row {
    display: flex; align-items: center; justify-content: space-between;
}
.shop-card__price { font-size: 15px; font-weight: 700; color: var(--primary); }
.shop-card__view {
    font-size: 12px; color: var(--text-muted);
    opacity: 0; transition: opacity .2s;
}
.shop-card:hover .shop-card__view { opacity: 1; }

.panel-empty {
    grid-column: 1 / -1; text-align: center; padding: 48px; color: var(--text-muted);
    font-size: 15px;
}

/* ── Basket FAB ────────────────────────────────────────────────────────────── */
.basket-fab {
    position: fixed; bottom: 28px; left: 28px; z-index: 1200;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 30px;
    background: var(--primary); color: #fff;
    border: none; cursor: pointer; font-size: 13.5px; font-weight: 700;
    box-shadow: 0 4px 20px rgba(147,51,234,.5);
    transition: background .2s, transform .2s;
}
.basket-fab:hover { background: var(--primary-h); transform: translateY(-2px); }
.basket-fab svg { width: 17px; height: 17px; }
.basket-count {
    background: #fff; color: var(--primary);
    border-radius: 10px; padding: 1px 7px;
    font-size: 11.5px; font-weight: 800;
    min-width: 20px; text-align: center;
}

/* ── Basket drawer ─────────────────────────────────────────────────────────── */
.basket-drawer {
    position: fixed; top: 0; right: -380px; bottom: 0;
    width: 360px; z-index: 1100;
    background: #0E0E1C; border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    padding: 24px;
}
.basket-drawer.is-open { right: 0; }
.basket-overlay {
    position: fixed; inset: 0; z-index: 1099;
    background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.basket-overlay.is-open { opacity: 1; visibility: visible; }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.drawer-title { font-size: 17px; font-weight: 700; }
.drawer-close {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px;
    transition: color .2s;
}
.drawer-close:hover { color: var(--text); }
.drawer-close svg { width: 18px; height: 18px; }

.basket-drawer-items { flex: 1; overflow-y: auto; }

.basket-drawer-item {
    display: grid; grid-template-columns: 48px 1fr auto auto;
    gap: 10px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid rgba(147,51,234,.1);
}
.drawer-item-img { width: 48px; height: 48px; object-fit: cover; border-radius: 5px; }
.drawer-item-info { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.drawer-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-item-price { font-size: 12.5px; color: var(--primary); font-weight: 600; }
.drawer-item-qty { display: flex; align-items: center; gap: 6px; }
.drawer-qty-btn {
    background: rgba(147,51,234,.15); border: 1px solid rgba(147,51,234,.25);
    color: var(--text); width: 24px; height: 24px; border-radius: 4px;
    cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1;
    transition: background .15s;
}
.drawer-qty-btn:hover { background: rgba(147,51,234,.3); }
.drawer-qty-val { font-size: 13px; font-weight: 600; min-width: 16px; text-align: center; }
.drawer-remove-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 13px; padding: 4px;
    transition: color .2s;
}
.drawer-remove-btn:hover { color: #f87171; }

.drawer-state { text-align: center; padding: 32px 0; color: var(--text-muted); font-size: 14px; }

/* Coupon / creator code rows */
.drawer-discount { margin-top: 16px; }
.drawer-discount-form { display: flex; gap: 8px; margin-bottom: 8px; }
.drawer-discount-input {
    flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--border);
    border-radius: 6px; padding: 8px 12px; color: var(--text); font-size: 13px;
    outline: none; transition: border-color .2s;
}
.drawer-discount-input:focus { border-color: var(--primary); }
.drawer-discount-apply {
    background: rgba(147,51,234,.2); border: 1px solid rgba(147,51,234,.35);
    color: var(--primary); border-radius: 6px; padding: 8px 14px;
    font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background .2s;
}
.drawer-discount-apply:hover { background: rgba(147,51,234,.35); }
.drawer-discount-tag {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(147,51,234,.1); border: 1px solid rgba(147,51,234,.2);
    border-radius: 6px; padding: 7px 12px; margin-bottom: 8px; font-size: 13px;
}
.drawer-discount-tag-code { font-weight: 700; color: var(--primary); }
.drawer-discount-remove {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 11px; padding: 2px 6px;
    border-radius: 4px; transition: background .15s;
}
.drawer-discount-remove:hover { background: rgba(248,113,113,.15); color: #f87171; }

/* Drawer footer */
.drawer-footer { padding-top: 16px; border-top: 1px solid var(--border); }
.drawer-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 16px; font-weight: 700; margin-bottom: 14px;
}
.drawer-total-label { color: var(--text-sub); }
.basket-checkout-btn {
    width: 100%; padding: 12px; border-radius: 8px;
    background: var(--primary); color: #fff;
    font-size: 15px; font-weight: 700; border: none; cursor: pointer;
    transition: background .2s, transform .15s;
}
.basket-checkout-btn:hover { background: var(--primary-h); transform: translateY(-1px); }

/* ── Product modal ─────────────────────────────────────────────────────────── */
.pkg-modal-overlay {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.pkg-modal-overlay[hidden] { display: none; }
.pkg-modal {
    background: #0E0E1C; border: 1px solid var(--border);
    border-radius: 12px; max-width: 560px; width: 100%;
    max-height: 90vh; overflow-y: auto;
}
.pkg-modal__gallery { border-radius: 12px 12px 0 0; overflow: hidden; }
.pkg-modal__gallery-main { position: relative; }
.pkg-modal__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.pkg-modal__gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.12);
    color: #fff; font-size: 28px; line-height: 1;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s; z-index: 2;
}
.pkg-modal__gallery-nav:hover { background: rgba(147,51,234,.75); }
.pkg-modal__gallery-prev { left: 10px; }
.pkg-modal__gallery-next { right: 10px; }
.pkg-modal__gallery-thumbs {
    display: flex; gap: 8px; padding: 8px 12px;
    background: rgba(0,0,0,.35);
    overflow-x: auto;
    scrollbar-width: thin; scrollbar-color: var(--primary) transparent;
}
.pkg-modal__gallery-thumbs::-webkit-scrollbar { height: 4px; }
.pkg-modal__gallery-thumbs::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }
.pkg-modal__thumb {
    flex: 0 0 72px; height: 48px;
    border: 2px solid transparent; border-radius: 5px;
    overflow: hidden; cursor: pointer; padding: 0; background: none;
    transition: border-color .15s;
}
.pkg-modal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pkg-modal__thumb.is-active { border-color: var(--primary); }
.pkg-modal__thumb:hover:not(.is-active) { border-color: rgba(147,51,234,.5); }
.pkg-modal__body { padding: 24px; }
.pkg-modal__name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.pkg-modal__price { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 14px; }
.pkg-modal__desc { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-bottom: 20px; }
.pkg-modal__desc p { margin-bottom: 10px; }
.pkg-modal__close {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,.6); border: 1px solid var(--border);
    color: var(--text); border-radius: 50%;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px;
}
.pkg-modal__close:hover { background: rgba(0,0,0,.9); }
.pkg-modal-wrap { position: relative; }
.pkg-modal__buy {
    width: 100%; padding: 12px; border-radius: 8px;
    background: var(--primary); color: #fff;
    font-size: 15px; font-weight: 700; border: none; cursor: pointer;
    transition: background .2s;
}
.pkg-modal__buy:hover:not(:disabled) { background: var(--primary-h); }
.pkg-modal__buy:disabled { opacity: .6; cursor: not-allowed; }
