/* B-04 / B-10: sideways rows. One row of cards that moves left and right
   inside the page (public/js/shopora-rows.js adds the ‹ › arrows). The next
   card always peeks in at the right edge; a card settles at the left edge. */

.sr-wrap { position: relative; }

.sr-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--sr-gap, 14px);
    margin: 0 !important;
    padding: 2px 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.sr-track::-webkit-scrollbar { display: none; }
.sr-track:focus { outline: none; }
.sr-track:focus-visible { outline: 2px solid #E8834A; outline-offset: 2px; }

.sr-track > * {
    flex-shrink: 0;
    min-width: 0;
    margin-bottom: 0 !important;
    scroll-snap-align: start;
}
/* Cards get the row's width; "own" rows (buttons, discount cards) keep theirs. */
:not(.sr-own) > .sr-track:not(.sr-own) > * {
    flex: 0 0 var(--sr-w) !important;
    width: var(--sr-w) !important;
    max-width: var(--sr-w) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Cards across: phone / tablet / desktop (the fraction is the peek). */
.sr-products { --sr-w: calc((100% - 2 * var(--sr-gap, 14px)) / 2.2); }
.sr-stores   { --sr-w: calc((100% - 1 * var(--sr-gap, 14px)) / 1.6); }
.sr-cats     { --sr-gap: 10px; --sr-w: calc((100% - 3 * var(--sr-gap)) / 3.6); }
.sr-own      { --sr-w: auto; }
@media (min-width: 768px) {
    .sr-products { --sr-w: calc((100% - 3 * var(--sr-gap, 14px)) / 3.3); }
    .sr-stores   { --sr-w: calc((100% - 2 * var(--sr-gap, 14px)) / 2.4); }
    .sr-cats     { --sr-w: calc((100% - 5 * var(--sr-gap)) / 5.6); }
}
@media (min-width: 992px) {
    .sr-products { --sr-w: calc((100% - 5 * var(--sr-gap, 14px)) / 5.3); }
    .sr-stores   { --sr-w: calc((100% - 3 * var(--sr-gap, 14px)) / 3.4); }
    .sr-cats     { --sr-w: calc((100% - 8 * var(--sr-gap)) / 8.5); }
}

/* Arrows: white circle, thin grey border, small shadow, orange ‹ ›.
   Phone 28 px in a 44 px tap area, desktop 40 px. Half over the row's edge. */
.sr-btn {
    position: absolute;
    top: var(--sr-arrow-y, 50%);
    z-index: 6;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sr-btn[hidden] { display: none !important; }
.sr-btn span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d9dde1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    color: #E8834A;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 3px;
}
.sr-btn:focus { outline: none; }
.sr-btn:focus-visible span { outline: 2px solid #E8834A; outline-offset: 2px; }
/* Half over the row's edge, pulled in when the screen edge is closer
   (shopora-rows.js sets --sr-edge) so the page never scrolls sideways. */
.sr-prev { left: var(--sr-edge, -14px); }
.sr-next { right: var(--sr-edge, -14px); }
@media (min-width: 768px) {
    .sr-btn span { width: 40px; height: 40px; font-size: 28px; }
}

/* Loading: grey shapes in the final layout, no "Loading..." text. */
.sk-card { border-radius: 12px; overflow: hidden; }
.sk-img, .sk-line {
    background: linear-gradient(90deg, #ececec 0%, #f5f5f5 50%, #ececec 100%);
    background-size: 200% 100%;
    animation: sk-shine 1.2s ease-in-out infinite;
}
.sk-img { aspect-ratio: 1 / 1; border-radius: 12px; }
.sr-stores .sk-img { aspect-ratio: 16 / 9; }
.sr-cats .sk-img { border-radius: 14px; }
.sk-line { height: 12px; border-radius: 6px; margin-top: 10px; width: 80%; }
.sk-line.sk-short { width: 50%; }
@keyframes sk-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sk-img, .sk-line { animation: none; } }

/* Category names show whole (two lines at most), never cut with "...". */
.sr-cats .top-cat-list .cat-link h4 {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px;
    line-height: 17px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
/* Phone product cards are two across: Buy and Add to Cart sit one above the
   other so neither label is cut. */
@media (max-width: 767px) {
    .sr-products .product-card-buttons { flex-direction: column; gap: 6px !important; }
    .sr-products .product-card-buttons .btn { flex: 0 0 auto !important; width: 100% !important; }
}

/* Rows driven by a slider library (Stories: Swiper; item pictures: Slick) use
   the same arrows; the library marks an arrow that cannot move. */
.sr-btn.swiper-button-disabled, .sr-btn.swiper-button-lock { display: none !important; }
.stories-wrap .sr-prev { left: 0; }
.stories-wrap .sr-next { right: 0; }
.rent-cardet-left .slick-arrow {
    z-index: 6; width: 44px; height: 44px; font-size: 0; background: none !important; border: 0;
    display: flex !important; align-items: center; justify-content: center;
}
.rent-cardet-left .slick-arrow::before {
    content: "\2039"; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding-bottom: 3px;
    border-radius: 50%; background: #fff; border: 1px solid #d9dde1; box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    color: #E8834A; font-size: 24px; font-weight: 700; line-height: 1; opacity: 1; font-family: inherit;
}
.rent-cardet-left .slick-next::before { content: "\203A"; }
.rent-cardet-left .slick-arrow.slick-disabled { display: none !important; }
.rent-cardet-left .slick-prev { left: 4px; }
.rent-cardet-left .slick-next { right: 4px; }
