/* ============================================================
   Road5 Product Slider Plugin — Complete CSS v2.0
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   SHARED — Image Hover Swap
══════════════════════════════════════════════════════════ */
.r5ps-card-img-wrap,
.r5-product-img-wrap,
.r5cs-img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f2f2f2;
    text-decoration: none;
}

.r5ps-card-img-wrap  { aspect-ratio: 3 / 4; }
.r5-product-img-wrap { aspect-ratio: 3 / 4; }
.r5cs-img-wrap       { aspect-ratio: 1 / 1; }

.r5ps-card-img-wrap img,
.r5-product-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: opacity 0.45s ease, transform 0.5s ease;
}

.r5ps-img-main, .r5-img-main   { opacity: 1; z-index: 1; transform: scale(1); }
.r5ps-img-hover, .r5-img-hover { opacity: 0; z-index: 2; transform: scale(1.04); }

.r5ps-card-img-wrap:hover .r5ps-img-main,
.r5-product-img-wrap:hover .r5-img-main  { opacity: 0; transform: scale(1.04); }

.r5ps-card-img-wrap:hover .r5ps-img-hover,
.r5-product-img-wrap:hover .r5-img-hover { opacity: 1; transform: scale(1); }

/* ══════════════════════════════════════════════════════════
   CATEGORY SLIDER — r5cs
══════════════════════════════════════════════════════════ */
.r5cs-wrapper { position: relative; width: 100%; }
.r5cs-header  { margin-bottom: 40px; }

.r5cs-slider-outer { position: relative; width: 100%; }
.r5cs-slider-outer.has-arrows { padding: 0 64px; }

.r5cs-swiper { width: 100%; overflow: hidden; }
.r5cs-swiper .swiper-slide { height: auto; }

/* Category Card */
.r5cs-card {
    display: block;
    text-decoration: none;
    overflow: hidden;
    border-radius: 8px;
}

.r5cs-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.r5cs-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.r5cs-card:hover .r5cs-img-wrap img { transform: scale(1.06); }

/* Overlay */
.r5cs-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 1;
    transition: background 0.35s ease;
}

.r5cs-card:hover .r5cs-overlay { background: rgba(0, 0, 0, 0.55); }

/* Text on top of image */
.r5cs-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px;
    z-index: 2;
}

.r5cs-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
}

.r5cs-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    display: block;
}

/* Category Arrows */
.r5cs-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #111;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 18px rgba(0,0,0,0.14);
    transition: background 0.25s, color 0.25s;
    flex-shrink: 0;
    outline: none;
}

.r5cs-arrow:hover { background: var(--theme-color, #e63b2e); color: #fff; }
.r5cs-prev { left: 0; }
.r5cs-next { right: 0; }

/* Category Pagination */
.r5cs-pagination { margin-top: 20px; text-align: center; }
.r5cs-pagination .swiper-pagination-bullet { width: 8px; height: 8px; background: #ccc; opacity: 1; }
.r5cs-pagination .swiper-pagination-bullet-active { background: var(--theme-color, #e63b2e); width: 24px; border-radius: 4px; }

/* ══════════════════════════════════════════════════════════
   PRODUCT SLIDER — r5ps
══════════════════════════════════════════════════════════ */
.r5ps-wrapper { position: relative; width: 100%; }
.r5ps-section-header { margin-bottom: 40px; }

.r5ps-slider-outer { position: relative; width: 100%; }
.r5ps-slider-outer.has-arrows { padding: 0 64px; }

.r5ps-swiper { width: 100%; overflow: hidden; }
.r5ps-swiper .swiper-slide { height: auto; }

/* Product Card */
.r5ps-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
}

/* Card Body */
.r5ps-card-body { padding: 14px 2px 8px; }

.r5ps-card-sku {
    font-size: 11px;
    font-weight: 700;
    color: #111;
    margin: 0 0 3px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.r5ps-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.3;
}

.r5ps-card-title a { color: #111; text-decoration: none; transition: color 0.2s; }
.r5ps-card-title a:hover { color: var(--theme-color, #e63b2e); }

.r5ps-card-colors { font-size: 13px; color: #666; margin: 0; }

/* Slider Arrows */
.r5ps-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #111;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 18px rgba(0,0,0,0.13);
    transition: background 0.25s, color 0.25s;
    flex-shrink: 0;
    outline: none;
}

.r5ps-arrow:hover { background: var(--theme-color, #e63b2e); color: #fff; }
.r5ps-arrow.swiper-button-disabled { opacity: 0.35; pointer-events: none; }
.r5ps-prev { left: 0; }
.r5ps-next { right: 0; }

/* Dots */
.r5ps-pagination { margin-top: 24px; text-align: center; }
.r5ps-pagination .swiper-pagination-bullet { width: 8px; height: 8px; background: #ccc; opacity: 1; }
.r5ps-pagination .swiper-pagination-bullet-active { background: var(--theme-color, #e63b2e); width: 24px; border-radius: 4px; }

/* See All */
.r5ps-see-all { text-align: center; margin-top: 30px; font-size: 15px; }
.r5ps-see-all a { color: var(--theme-color, #e63b2e); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s; }
.r5ps-see-all a:hover { gap: 10px; }

/* ══════════════════════════════════════════════════════════
   ARCHIVE PAGE — Products Grid
══════════════════════════════════════════════════════════ */

/* Category Filter Tabs */
.r5-cat-filter { margin-bottom: 40px; }

.r5-cat-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.r5-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 30px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.r5-cat-btn:hover,
.r5-cat-btn.active {
    background: var(--theme-color, #e63b2e);
    border-color: var(--theme-color, #e63b2e);
    color: #fff;
}

.r5-cat-count {
    font-size: 12px;
    opacity: 0.75;
    font-weight: 400;
}

/* Category Group Header */
.r5-cat-group { margin-bottom: 60px; }

.r5-cat-group-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.r5-cat-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #eee;
    flex-shrink: 0;
}

.r5-cat-group-title { flex: 1; }

.r5-cat-group-title h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.2;
}

.r5-cat-group-title h3 a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.r5-cat-group-title h3 a:hover { color: var(--theme-color, #e63b2e); }

.r5-cat-total {
    font-size: 13px;
    color: #888;
    display: block;
}

.r5-cat-see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-color, #e63b2e);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: gap 0.2s;
    flex-shrink: 0;
}

.r5-cat-see-all:hover { gap: 8px; }

/* Product Card (archive) */
.r5-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
}

.r5-product-img-wrap { aspect-ratio: 3 / 4; }

.r5-product-body { padding: 14px 2px 8px; }

.r5-product-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.3;
}

.r5-product-title a { color: #111; text-decoration: none; transition: color 0.2s; }
.r5-product-title a:hover { color: var(--theme-color, #e63b2e); }

.r5-product-colors { font-size: 13px; color: #666; margin: 0; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media ( max-width: 991px ) {
    .r5ps-slider-outer.has-arrows,
    .r5cs-slider-outer.has-arrows { padding: 0 50px; }

    .r5ps-arrow,
    .r5cs-arrow { width: 40px; height: 40px; font-size: 13px; }

    .r5-cat-group-header { flex-wrap: wrap; }
}

@media ( max-width: 575px ) {
    .r5ps-slider-outer.has-arrows,
    .r5cs-slider-outer.has-arrows { padding: 0 40px; }

    .r5ps-arrow,
    .r5cs-arrow { width: 34px; height: 34px; font-size: 12px; }

    .r5-cat-btn { padding: 7px 14px; font-size: 13px; }
    .r5cs-name { font-size: 15px; }
}

/* ══════════════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════════════ */
@media ( prefers-reduced-motion: reduce ) {
    .r5ps-card-img-wrap img,
    .r5-product-img-wrap img,
    .r5cs-img-wrap img,
    .r5ps-arrow,
    .r5cs-arrow { transition: none; }
}
