/* ========================================================
   Ecommerce Product Carousel — Frontend CSS v2.0.0
   TechReview | Premium Edition
   Prefix: eprc-
======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
    --eprc-accent:       #e8181a;
    --eprc-accent-glow:  rgba(232,24,26,.18);
    --eprc-dark:         #0a0a0f;
    --eprc-card-bg:      #ffffff;
    --eprc-card-border:  rgba(0,0,0,.07);
    --eprc-card-hover-border: rgba(232,24,26,.22);
    --eprc-surface:      #f7f8fc;
    --eprc-muted:        #9098b1;
    --eprc-text:         #12141a;
    --eprc-radius:       18px;
    --eprc-gap:          18px;
    --eprc-font-display: 'Inter', sans-serif;
    --eprc-font-body:    'DM Sans', sans-serif;
}

/* ---- WRAP ---- */
.eprc-wrap {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 0;
    font-family: var(--eprc-font-body);
    user-select: none;
    -webkit-user-select: none;
    overflow: visible; /* shadow kesmesini engelle */
}

/* ================================================================
   SECTION HEADER
================================================================ */
.eprc-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 0 28px;
    margin-bottom: 24px;
    position: relative;
}
.eprc-section-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.03) 70%, transparent 100%);
}

.eprc-header-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eprc-section-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--eprc-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--eprc-accent);
    line-height: 1;
}
.eprc-section-label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--eprc-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.eprc-section-title {
    margin: 0;
    line-height: 1.15;
    font-family: var(--eprc-font-display);
    font-size: 28px !important;
    font-weight: 700;
    color: var(--eprc-dark);
    letter-spacing: -.03em;
}

/* ---- NAV ARROWS ---- */
.eprc-nav-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.eprc-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.1);
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .22s, box-shadow .22s, transform .22s, background .22s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    position: relative;
    overflow: hidden;
}
.eprc-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--eprc-accent);
    opacity: 0;
    z-index: 0;
    transform: scale(0);
    transition: opacity .22s, transform .28s cubic-bezier(.34,1.56,.64,1);
}
.eprc-nav-btn svg {
    display: block;
    flex-shrink: 0;
    pointer-events: none;
    position: relative;
    z-index: 1;
    stroke: #333;
    fill: none;
    transition: stroke .22s;
}
.eprc-nav-btn:hover {
    border-color: var(--eprc-accent);
    box-shadow: 0 4px 16px var(--eprc-accent-glow);
    transform: scale(1.06);
}
.eprc-nav-btn:hover svg {
    stroke: #fff !important;
}
.eprc-nav-btn:hover::before {
    opacity: 1;
    transform: scale(1);
}
.eprc-nav-btn:focus-visible {
    outline: 2px solid var(--eprc-accent);
    outline-offset: 3px;
}
.eprc-nav-btn:disabled {
    opacity: .25;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}
.eprc-nav-btn:disabled::before { display: none; }
/* shortcode inline override — ensure stroke always white on hover */
.eprc-nav-btn:hover svg polyline,
.eprc-nav-btn:hover svg line,
.eprc-nav-btn:hover svg path {
    stroke: #fff !important;
}

/* ================================================================
   CAROUSEL
================================================================ */
.eprc-carousel-viewport {
    overflow: hidden;
    position: relative;
    cursor: grab;
    /* Box shadow için: kart hover'da translateY(-6px) + büyük shadow var.
       Yeterli padding bırak, clip-path negatif → shadow kesilmez. */
    padding-top: 12px;
    margin-top: -12px;
    padding-bottom: 28px;
    margin-bottom: -28px;
    /* inset() negatif → dışarı taşmaya izin ver: üst/alt 28px, sol/sağ 8px */
    clip-path: inset(-28px -8px);
}
.eprc-carousel-viewport.eprc-dragging {
    cursor: grabbing;
}
.eprc-carousel-track {
    display: flex;
    gap: var(--eprc-gap);
    transition: transform .48s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    align-items: stretch;
}
.eprc-carousel-track.eprc-no-transition {
    transition: none;
}

/* ================================================================
   CARDS
   5.5 visible @ 1920px wide container
================================================================ */
.eprc-card {
    /* 5.5 per row formula: (100% - 4.5 * gap) / 5.5  */
    flex: 0 0 calc((100% - 4.5 * var(--eprc-gap)) / 5.5);
    min-width: 0;
    background: var(--eprc-card-bg);
    border: 1px solid var(--eprc-card-border);
    border-radius: var(--eprc-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color .28s, transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

/* Shimmer glow effect on hover */
.eprc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity .3s, transform .5s;
    pointer-events: none;
    z-index: 10;
}

.eprc-card:hover {
    border-color: var(--eprc-card-hover-border);
    transform: translateY(-6px) scale(1.012);
    box-shadow:
        0 8px 12px rgba(0,0,0,.04),
        0 12px 26px rgba(0,0,0,.13),
        0 0 0 1px rgba(232,24,26,.10),
        inset 0 1px 0 rgba(255,255,255,.9);
}
.eprc-card:hover::before {
    opacity: 1;
    transform: translateX(100%);
}

/* Drag state — disable hover effects */
.eprc-dragging .eprc-card {
    transform: none !important;
    transition: none !important;
}
.eprc-dragging .eprc-card::before { display: none; }

/* ================================================================
   CARD IMAGE
================================================================ */
.eprc-card-img-link {
    display: block;
    text-decoration: none;
    flex-shrink: 0;
    overflow: hidden;
}
.eprc-card-img-wrap {
    width: 100%;
    height: 170px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f1f6 0%, #e8eaf2 100%);
}
/* Subtle overlay gradient on image for premium feel */
.eprc-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0,0,0,.18) 100%
    );
    opacity: 0;
    transition: opacity .32s;
    pointer-events: none;
    z-index: 2;
}
.eprc-card:hover .eprc-card-img-wrap::after {
    opacity: 1;
}

.eprc-card-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
    transform-origin: center center;
    transition: transform .65s cubic-bezier(.22,1,.36,1);
    will-change: transform;
}
.eprc-card:hover .eprc-card-img {
    transform: scale(1.1) translateY(-2px);
}
.eprc-dragging .eprc-card-img {
    transform: none !important;
}

.eprc-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f1f6 0%, #e8eaf2 100%);
}

/* ---- BADGE ---- */
.eprc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    font-family: var(--eprc-font-body);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 10px 3px;
    border-radius: 30px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ================================================================
   CARD BODY
================================================================ */
.eprc-card-body {
    padding: 13px 15px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.eprc-card-brand {
    font-family: var(--eprc-font-body);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--eprc-muted);
    margin-bottom: 4px;
    line-height: 2.6;
}

.eprc-card-title-link {
    text-decoration: none;
    display: block;
    margin-bottom: 9px;
}
.eprc-card-title-link:hover .eprc-card-title {
    color: var(--eprc-accent) !important;
}
.eprc-card-title {
    font-family: var(--eprc-font-display);
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--eprc-text);
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s;
    letter-spacing: -.01em;
}

/* ---- STARS ---- */
.eprc-stars-row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 9px;
    flex-wrap: nowrap;
}
.eprc-star { flex-shrink: 0; }
.eprc-score-val {
    font-family: var(--eprc-font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--eprc-text);
    margin-left: 5px;
    line-height: 1;
}
.eprc-score-max {
    font-size: 10.5px;
    color: var(--eprc-muted);
    line-height: 1;
}

/* Divider */
.eprc-card-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,.06) 0%, transparent 100%);
    margin-bottom: 9px;
    flex-shrink: 0;
}

.eprc-card-note {
    font-size: 11.5px;
    color: #666;
    line-height: 1.6;
    /*display: -webkit-box;*/
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ================================================================
   CARD FOOTER
================================================================ */
.eprc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 14px;
    border-top: 1px solid rgba(0,0,0,.05);
    flex-shrink: 0;
    gap: 8px;
}

.eprc-author-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

/* Avatar — initials fallback */
.eprc-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8eaf5 0%, #d4d8f0 100%);
    color: #4a55a2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: .02em;
    border: 1.5px solid rgba(74,85,162,.12);
    font-family: var(--eprc-font-display);
    overflow: hidden;
}

/* Author photo image inside avatar */
.eprc-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
}

.eprc-author-name {
    font-size: 11px;
    color: #667;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--eprc-font-body);
}

/* ---- READ BUTTON ---- */
.eprc-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px 11px 20px;
    background: var(--eprc-accent);
    color: #000000;
    font-family: var(--eprc-font-body);
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 30px;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .22s cubic-bezier(.4,0,.2,1);
    line-height: 1;
    letter-spacing: .01em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(232,24,26,.28);
}
.eprc-read-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.15);
    opacity: 0;
    transition: opacity .2s;
}
.eprc-read-btn:hover {
   transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(213 213 213 / 38%);
    color: #fff !important;
background: #d51212 !important;
    text-decoration: none;
}
.eprc-read-btn:hover::before { opacity: 1; }
.eprc-read-btn svg { pointer-events: none; flex-shrink: 0; }

/* ================================================================
   DOTS
================================================================ */
.eprc-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 22px;
    padding: 6px 0;
}
.eprc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0d4e4;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .22s, width .22s, border-radius .22s;
    flex-shrink: 0;
}
.eprc-dot.eprc-dot--active {
    background: var(--eprc-accent);
    width: 22px;
    border-radius: 3px;
}
.eprc-dot:hover:not(.eprc-dot--active) {
    background: #a0a8c4;
}

/* ================================================================
   RESPONSIVE
================================================================ */

/* 1440–1680px: 5.5 visible */
@media (max-width: 1680px) {
    .eprc-card {
        flex: 0 0 calc((100% - 4.5 * var(--eprc-gap)) / 5.5);
    }
}

/* 1200–1440px: 4.5 visible */
@media (max-width: 1440px) {
    .eprc-card {
        flex: 0 0 calc((100% - 3.5 * var(--eprc-gap)) / 4.5);
    }
}

/* 992–1200px: 3.5 visible */
@media (max-width: 1200px) {
    .eprc-card {
        flex: 0 0 calc((100% - 2.5 * var(--eprc-gap)) / 3.5);
        .eprc-section-title { font-size: 24px; }
    }
}

/* 768–992px: 2.5 visible */
@media (max-width: 992px) {
    .eprc-card {
        flex: 0 0 calc((100% - 1.5 * var(--eprc-gap)) / 2.5);
    }
}

/* Mobile ≤768px: tam 2 kart yan yana */
@media (max-width: 768px) {
    .eprc-wrap { padding: 0 16px; }
    .eprc-card {
        flex: 0 0 calc((100% - 1 * var(--eprc-gap)) / 2);
    }
    .eprc-card-img-wrap { height: 140px; }
    .eprc-section-title { font-size: 21px; }
    .eprc-card-title { font-size: 12.5px; }
    .eprc-card-body { padding: 11px 13px 7px; }
    .eprc-card-footer { padding: 8px 13px 12px; }
}

/* Small mobile ≤480px: tam 2 kart yan yana */
@media (max-width: 480px) {
    .eprc-card {
        flex: 0 0 calc((100% - 1 * 14px) / 2);
    }
    .eprc-wrap { padding: 0 12px; }
    .eprc-card-img-wrap { height: 130px; }
    .eprc-nav-btns { display: none; }
}

/* Empty */
.eprc-empty {
    text-align: center;
    color: var(--eprc-muted);
    padding: 40px 0;
    font-family: var(--eprc-font-body);
}
