/* ═══════════════════════════════════════════════════
   City Escape Carousel v5 — Premium Design
   ═══════════════════════════════════════════════════ */

/* ── Wrapper & viewport ──────────────────────────── */
.ce-carousel-wrap {
    position: relative;
    width: 100%;
    --ce-gap: 20px;
    --ce-cols: 3;
    --ce-radius: 16px;
    --ce-accent: #ff5c35;
    --ce-card-bg: #fff;
    --ce-shadow: 0 2px 12px rgba(0,0,0,.07), 0 8px 32px rgba(0,0,0,.06);
    --ce-shadow-hover: 0 8px 24px rgba(0,0,0,.10), 0 20px 48px rgba(0,0,0,.10);
    --ce-transition: 0.38s cubic-bezier(.4,0,.2,1);
}

.ce-carousel-viewport {
    overflow: hidden;
    border-radius: var(--ce-radius);
    cursor: grab;
    user-select: none;
}

.ce-carousel-viewport.is-dragging {
    cursor: grabbing;
}

.ce-carousel-track {
    display: flex;
    gap: var(--ce-gap);
    transition: transform var(--ce-transition);
    will-change: transform;
}

/* ── Slides ──────────────────────────────────────── */
.ce-slide {
    flex: 0 0 calc((100% - (var(--ce-cols) - 1) * var(--ce-gap)) / var(--ce-cols));
    min-width: 0;
}

/* ── Card ────────────────────────────────────────── */
.ce-card {
    background: var(--ce-card-bg);
    border-radius: var(--ce-radius);
    box-shadow: var(--ce-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition:
        box-shadow var(--ce-transition),
        transform  var(--ce-transition);
    position: relative;
}

.ce-card.is-clickable {
    cursor: pointer;
}

.ce-card.is-clickable:hover {
    box-shadow: var(--ce-shadow-hover);
    transform: translateY(-4px);
}

/* Custom card accent */
.ce-card--custom::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--ce-radius);
    border: 2px solid #f5a623;
    pointer-events: none;
}

/* ── Image ───────────────────────────────────────── */
.ce-card__image-wrap {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--ce-radius) var(--ce-radius) 0 0;
}

.ce-card__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(.25,.46,.45,.94);
}

.ce-card.is-clickable:hover .ce-card__image {
    transform: scale(1.06);
}

/* ── Badge ───────────────────────────────────────── */
.ce-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--ce-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255,92,53,.35);
}

/* ── Body ────────────────────────────────────────── */
.ce-card__body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* ── Title ───────────────────────────────────────── */
.ce-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a1a;
    letter-spacing: -.01em;
}

/* ── Description (line-clamp) ────────────────────── */
.ce-card__desc {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #555;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--ce-lines, 2);
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.ce-card__desc p { margin: 0; display: inline; }

/* ── Price ───────────────────────────────────────── */
.ce-card__price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ce-accent);
    letter-spacing: -.02em;
    margin-top: auto;
    padding-top: 4px;
}

.ce-card__price .woocommerce-Price-amount { color: inherit; font-size: inherit; font-weight: inherit; }
.ce-card__price del { opacity: .45; font-size: .85em; font-weight: 500; margin-right: 4px; }
.ce-card__price ins { text-decoration: none; }

/* ── Button ──────────────────────────────────────── */
.ce-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    padding: 11px 20px;
    background: var(--ce-accent);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
    width: 100%;
    box-sizing: border-box;
    transition: background .2s, transform .15s, box-shadow .2s;
    position: relative;
    z-index: 3;
    -webkit-appearance: none;
}

.ce-card__btn:hover {
    background: #e04820;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,92,53,.4);
    color: #fff !important;
}

.ce-card__btn:active { transform: translateY(0); }

.ce-card__btn.is-loading {
    opacity: .7;
    cursor: wait;
    pointer-events: none;
}

.ce-card__btn.is-added {
    background: #1e7a3e !important;
}

.ce-card__btn--link {
    background: #2a2a2a;
}

.ce-card__btn--link:hover {
    background: #111;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

/* ── Navigation arrows ───────────────────────────── */
.ce-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 20px));
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #1a1a1a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.12), 0 4px 24px rgba(0,0,0,.08);
    transition: background .2s, transform .2s, box-shadow .2s;
}

.ce-arrow:hover {
    background: var(--ce-accent);
    color: #fff;
    transform: translateY(calc(-50% - 20px)) scale(1.08);
    box-shadow: 0 4px 20px rgba(255,92,53,.4);
}

.ce-arrow--prev { left: -22px; }
.ce-arrow--next { right: -22px; }

@media (max-width: 900px) {
    .ce-arrow--prev { left: -10px; }
    .ce-arrow--next { right: -10px; }
}

/* ── Dots ────────────────────────────────────────── */
.ce-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 18px 0 2px;
}

.ce-dot {
    width: 8px;
    height: 8px;
    border-radius: 100px;
    background: #d0d0d0;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, width .25s, transform .2s;
}

.ce-dot.is-active {
    background: var(--ce-accent);
    width: 24px;
}

/* ── Responsive columns ──────────────────────────── */
/* Controlled by JS via CSS custom property --ce-cols on wrapper */

/* Fallback media queries if JS not loaded */
@media (max-width: 767px) {
    .ce-carousel-wrap { --ce-cols: 1; }
    .ce-arrow--prev { left: 2px; }
    .ce-arrow--next { right: 2px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ce-carousel-wrap { --ce-cols: 2; }
}

/* ── Drag-select prevention ──────────────────────── */
.ce-carousel-track img {
    pointer-events: none;
    -webkit-user-drag: none;
}
