/* Shop feed — mobile-first layout aligned with TradenSell app mockup */

.ts-shop-anchor {
    scroll-margin-top: 5.5rem;
}

.ts-shop-page {
    --ts-shop-pad: clamp(0.75rem, 3vw, 1.25rem);
    padding-left: var(--ts-shop-pad);
    padding-right: var(--ts-shop-pad);
}

/* ----- Search strip ----- */
.ts-shop-search {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #1e1e1e;
    border-radius: 999px;
    border: 1px solid rgba(124, 252, 0, 0.12);
    padding: 0.2rem 0.25rem 0.2rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ts-shop-search .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ts-body);
    padding-left: 0.25rem;
}

.ts-shop-search .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.ts-shop-search .ts-shop-search-btn {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ts-shop-search .ts-shop-search-btn i {
    font-size: 1.1rem;
}

/* ----- Category rail ----- */
.ts-cat-rail-wrap {
    margin-left: calc(-1 * var(--ts-shop-pad));
    margin-right: calc(-1 * var(--ts-shop-pad));
    padding-left: var(--ts-shop-pad);
    padding-right: var(--ts-shop-pad);
}

.ts-cat-rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.ts-cat-rail::-webkit-scrollbar {
    height: 4px;
}

.ts-cat-rail::-webkit-scrollbar-thumb {
    background: rgba(124, 252, 0, 0.25);
    border-radius: 4px;
}

.ts-cat-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
    text-decoration: none;
    color: #fff;
    min-width: 4.25rem;
}

.ts-cat-item .ts-cat-icon-ring {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(124, 252, 0, 0.35);
    color: var(--ts-accent);
    font-size: 1.35rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ts-cat-item:hover .ts-cat-icon-ring,
.ts-cat-item:focus-visible .ts-cat-icon-ring {
    border-color: rgba(124, 252, 0, 0.65);
    box-shadow: 0 0 20px rgba(124, 252, 0, 0.15);
    transform: translateY(-1px);
}

.ts-cat-item.ts-cat-active .ts-cat-icon-ring {
    background: rgba(124, 252, 0, 0.12);
    border-color: var(--ts-accent);
    box-shadow: 0 0 24px rgba(124, 252, 0, 0.2);
}

.ts-cat-item small {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

/* ----- Recommended rail ----- */
.ts-shop-rail {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-left: calc(-1 * var(--ts-shop-pad));
    margin-right: calc(-1 * var(--ts-shop-pad));
    padding-left: var(--ts-shop-pad);
    padding-right: var(--ts-shop-pad);
}

.ts-shop-rail > * {
    flex: 0 0 min(42vw, 11.5rem);
    scroll-snap-align: start;
    max-width: 11.5rem;
}

@media (min-width: 768px) {
    .ts-shop-rail > * {
        flex-basis: 10.5rem;
    }
}

.ts-rail-card {
    background: #1a1a1a !important;
    border: 1px solid rgba(124, 252, 0, 0.1) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.ts-rail-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    font-size: 0.82rem !important;
    font-weight: 600;
}

.ts-rail-price {
    color: var(--ts-accent);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.ts-rail-add {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ----- CTA banner ----- */
.ts-shop-cta {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    background: radial-gradient(ellipse 90% 80% at 70% 50%, rgba(124, 252, 0, 0.14) 0%, transparent 55%),
        linear-gradient(145deg, #101010 0%, #0a0a0a 100%);
    border: 1px solid rgba(124, 252, 0, 0.18);
    box-shadow: 0 0 48px rgba(124, 252, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ts-shop-cta-visual {
    position: relative;
    min-height: 8rem;
}

.ts-shop-cta-bag,
.ts-shop-cta-box {
    position: absolute;
    border-radius: 0.65rem;
    transform: rotate(-8deg);
}

.ts-shop-cta-bag {
    width: 3.5rem;
    height: 4.25rem;
    right: 18%;
    top: 12%;
    background: linear-gradient(145deg, #5eead4 0%, #14b8a6 55%, #0d9488 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 20px rgba(20, 184, 166, 0.35);
}

.ts-shop-cta-bag::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -35%);
    width: 1.25rem;
    height: 0.55rem;
    background: #0f766e;
    border-radius: 0.2rem 0.2rem 0 0;
}

.ts-shop-cta-box {
    width: 4.25rem;
    height: 3.25rem;
    right: 6%;
    bottom: 10%;
    background: linear-gradient(145deg, #d4a574 0%, #a16207 45%, #713f12 100%);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
    transform: rotate(6deg);
}

.ts-shop-cta-box::before {
    content: "";
    position: absolute;
    inset: 22% 12%;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 0.2rem;
}

/* ----- All listings grid ----- */
.ts-shop-grid .ts-listing-card .card {
    border-radius: 1rem;
}

.ts-shop-section-title {
    font-size: clamp(1.1rem, 3.5vw, 1.35rem);
    font-weight: 700;
    color: #fff;
}

.ts-shop-see-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ts-accent);
    text-decoration: none;
}

.ts-shop-see-all:hover {
    color: #d4ff8a;
}
