/* Modern shopping-app product rails — flat, no heavy box shadows */

.home-shop-rail-section {
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 42%, #ffffff 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    overflow-x: clip;
    max-width: 100%;
}

.home-shop-rail-section .container {
    overflow-x: clip;
    max-width: 100%;
}

.tigule-shop-rail {
    margin: 0;
}

.tigule-shop-rail__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0 0.15rem;
}

.tigule-shop-rail__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #C8102E;
    margin-bottom: 0.25rem;
}

.tigule-shop-rail__emoji {
    font-size: 1rem;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
}

.tigule-shop-rail__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.2;
}

.tigule-shop-rail__see-all {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #C8102E;
    text-decoration: none;
    padding: 0.4rem 0;
}

.tigule-shop-rail__see-all:hover {
    color: #9f1239;
}

.tigule-shop-rail__viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.tigule-shop-rail__track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.15rem 1rem 0.5rem;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    max-width: 100%;
}

.tigule-shop-rail__track::-webkit-scrollbar {
    display: none;
}

.tigule-shop-rail__fade--end {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.5rem;
    height: calc(100% - 0.5rem);
    pointer-events: none;
    background: linear-gradient(90deg, transparent, #ffffff 85%);
}

.home-shop-rail-section .tigule-shop-rail__fade--end {
    background: linear-gradient(90deg, transparent, #fafbfc 70%, #ffffff 95%);
}

/* Desktop arrow controls for horizontal rails */
.tigule-shop-rail__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0f172a;
    transition: transform 0.15s ease, background 0.15s ease;
}

.tigule-shop-rail__arrow i {
    font-size: 0.92rem;
}

.tigule-shop-rail__arrow:hover {
    transform: translateY(-50%) scale(1.04);
    background: rgba(255, 255, 255, 1);
}

.tigule-shop-rail__arrow--left {
    left: 0.35rem;
}

.tigule-shop-rail__arrow--right {
    right: 0.35rem;
}

/* Product tile — flat, image-first */
.tigule-shop-tile {
    flex: 0 0 clamp(9.5rem, 42vw, 11.5rem);
    width: clamp(9.5rem, 42vw, 11.5rem);
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.tigule-shop-tile:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .tigule-shop-tile:hover {
        color: inherit;
        transform: translateY(-2px);
    }

    .tigule-shop-tile:hover .tigule-shop-tile__media img {
        transform: scale(1.03);
    }
}

.tigule-shop-tile__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
}

.tigule-shop-tile--promoted .tigule-shop-tile__media {
    outline: 2px solid rgba(200, 16, 46, 0.45);
    outline-offset: 0;
}

.tigule-shop-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.tigule-shop-tile__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.5rem;
}

.tigule-shop-tile__chip {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.22rem 0.5rem;
    border-radius: 0.35rem;
    line-height: 1;
}

.tigule-shop-tile__chip--promoted {
    background: #C8102E;
    color: #fff;
}

.tigule-shop-tile__chip--trending {
    background: #0f172a;
    color: #fff;
}

.tigule-shop-tile__chip--discount {
    background: #C8102E;
    color: #fff;
}

.tigule-shop-tile__chip--featured {
    background: #7c3aed;
    color: #fff;
}

.tigule-shop-tile__chip--urgent {
    background: #dc2626;
    color: #fff;
}

.tigule-shop-tile__chip--post {
    background: #0d9488;
    color: #fff;
}

.tigule-shop-tile__media--post {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #fef2f4 0%, #f1f5f9 100%);
}

.tigule-shop-tile__post-icon {
    font-size: 2rem;
    color: #C8102E;
    opacity: 0.35;
}

.tigule-shop-tile__body {
    padding: 0 0.1rem;
    min-width: 0;
}

.tigule-shop-tile__name {
    margin: 0 0 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tigule-shop-tile__price {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #C8102E;
    letter-spacing: -0.02em;
}

.tigule-shop-tile__price-old {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: line-through;
}

.tigule-shop-tile__meta {
    margin: 0.15rem 0 0;
    font-size: 0.68rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tigule-shop-rail__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding: 0;
    border: none;
}

.tigule-shop-rail__dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.tigule-shop-rail__dot.is-active {
    width: 1.25rem;
    background: #C8102E;
}

@media (max-width: 575.98px) {
    /* Keep cards compact and side-by-side on small screens */
    .tigule-shop-tile {
        flex: 0 0 calc(50vw - 1rem);
        width: calc(50vw - 1rem);
    }

    /* Many pages still use this bootstrap combo for listing cells */
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 576px) {
    .tigule-shop-tile {
        flex: 0 0 10.5rem;
        width: 10.5rem;
    }
}

@media (min-width: 768px) {
    .tigule-shop-rail__track {
        gap: 1rem;
    }

    .tigule-shop-tile {
        flex: 0 0 11.75rem;
        width: 11.75rem;
    }

    .tigule-shop-tile__name {
        font-size: 0.85rem;
    }

    .tigule-shop-tile__price {
        font-size: 1rem;
    }
}

@media (min-width: 1200px) {
    .tigule-shop-tile {
        flex: 0 0 12.5rem;
        width: 12.5rem;
    }

    /* Keep horizontal rails inside main column — do not slide under fixed sidebar */
    .desktop-main-column > main {
        overflow-x: clip;
    }

    .home-shop-rail-section {
        position: relative;
        z-index: 1;
    }
}

/* Legacy class aliases (community hub / search if old markup cached) */
.tigule-mkt-strip-pills { display: none !important; }

/* Community feed inline — flat */
.community-mkt-inline {
    margin: 0.75rem 0;
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(200, 16, 46, 0.12);
    background: #fafbfc;
}

.community-mkt-inline__label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9f1239;
    margin-bottom: 0.55rem;
}

.community-mkt-inline__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.community-mkt-inline__thumb {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 0.75rem;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.community-mkt-inline__title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.community-mkt-inline__price {
    font-weight: 800;
    color: #C8102E;
    font-size: 0.95rem;
}

.community-mkt-inline__badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.community-mkt-inline__badge--promoted {
    background: #C8102E;
    color: #fff;
}

.community-mkt-inline__badge--trending {
    background: #0f172a;
    color: #fff;
}

/* Grid sections (Latest Listings, Discover) — same tiles, no horizontal rail */
.home-shop-grid-section {
    overflow-x: clip;
    max-width: 100%;
}

.home-shop-grid-section .container {
    overflow-x: clip;
    max-width: 100%;
}

.home-shop-tile-grid {
    margin-left: 0;
    margin-right: 0;
}

.home-shop-tile-grid__cell {
    display: flex;
    min-width: 0;
}

.home-shop-tile-grid .tigule-shop-tile {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    scroll-snap-align: unset;
}

@media (min-width: 576px) {
    .home-shop-tile-grid .tigule-shop-tile {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (min-width: 768px) {
    .home-shop-tile-grid .tigule-shop-tile {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .home-shop-tile-grid .tigule-shop-tile {
        flex: 1 1 auto;
        width: 100%;
    }
}

/* Homepage latest listings — flat promoted highlight (no shadows) */
.home-promoted-highlight .listing-card.promoted {
    border: none;
    box-shadow: none;
    outline: 2px solid rgba(200, 16, 46, 0.35);
    outline-offset: 0;
}

.home-promoted-highlight .listing-card {
    box-shadow: none;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.home-promoted-highlight .badge-promoted {
    background: #C8102E !important;
    font-size: 0.68rem;
    padding: 0.28rem 0.55rem;
    border-radius: 0.35rem;
    animation: none;
    box-shadow: none;
}

/* Related listings — flat badges */
.related-listing-card .related-strip-badge {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 2;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.18rem 0.45rem;
    border-radius: 0.35rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.related-strip-badge--promoted {
    background: #C8102E;
}

.related-strip-badge--trending {
    background: #0f172a;
}

.related-listing-image {
    position: relative;
}

.search-mkt-fallback {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
}
