@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

/* ═══════════════════════════════════════════
   BASE
═══════════════════════════════════════════ */
.wc-carousel-root * { box-sizing: border-box; margin: 0; padding: 0; }

.wc-carousel-root {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    padding: 16px 0 8px;
    position: relative;
    width: 100%;
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.wcc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}
.wcc-header-title { font-size: 18px; font-weight: 700; color: #1a1a2e; }
.wcc-header-arrows { display: flex; gap: 6px; }
@media (max-width: 768px) {
    .wcc-header-arrows { display: none; }
    .wcc-header-title  { font-size: 15px; }
}

/* ═══════════════════════════════════════════
   STAGE + TRACK
═══════════════════════════════════════════ */
.wcc-stage { overflow: hidden; width: 100%; }
.wcc-track {
    display: flex;
    gap: 10px;
    transition: transform .48s cubic-bezier(.16,1,.3,1);
    will-change: transform;
}

/* ═══════════════════════════════════════════
   CARD
═══════════════════════════════════════════ */
.wcc-card {
    flex: 0 0 calc(33.333% - 7px);
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    cursor: pointer;
    display: block;
    flex-shrink: 0;
   box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
}
.wcc-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.15); }

@media (max-width: 640px) { .wcc-card { flex: 0 0 calc(50% - 5px); } }
@media (max-width: 360px) { .wcc-card { flex: 0 0 100%; } }

/* ─── Image ─── */
.wcc-img-wrap { position: absolute; inset: 0; }
.wcc-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s ease;
}
.wcc-card:hover .wcc-img-wrap img { transform: scale(1.05); }

/* ─── Overlay ─── */
.wcc-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.5) 55%, transparent 100%);
    padding: 36px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* ─── Name ─── */
.wcc-name {
    font-size: 12px; font-weight: 700; color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
@media (min-width: 769px) { .wcc-name { font-size: 13px; } }

/* ─── Price ─── */
.wcc-price-row {
    display: flex; align-items: center;
    gap: 5px; flex-wrap: wrap; margin-bottom: 4px;
}
.wcc-price-row .current  { font-size: 13px; font-weight: 900; color: #fff; }
.wcc-price-row .current.sale { color: #ff6b6b; }
.wcc-price-row .original { font-size: 10px; color: rgba(255,255,255,.5); text-decoration: line-through; }

/* ─── Cart button ─── */
.wcc-btn-cart {
    width: 100%; background: #e91e8c; color: #fff;
    border: none; padding: 7px 6px; border-radius: 8px;
    font-size: 11px; font-weight: 700; font-family: 'Cairo', sans-serif;
    cursor: pointer; text-align: center; display: block;
    text-decoration: none; transition: background .2s, transform .1s;
    line-height: 1.4;
}
.wcc-btn-cart:hover { background: #c2185b; color: #fff; transform: translateY(-1px); }
.wcc-btn-cart:disabled,
.wcc-btn-cart.disabled { background: rgba(80,80,80,.6); pointer-events: none; }
@media (min-width: 769px) { .wcc-btn-cart { font-size: 12px; padding: 8px; } }

/* ─── Sale badge ─── */
.wcc-sale-badge {
    position: absolute; top: 8px; right: 8px;
    background: #e91e8c; color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
    z-index: 5; font-family: 'Cairo', sans-serif;
}

/* ═══════════════════════════════════════════
   ARROW BUTTONS
═══════════════════════════════════════════ */
.wcc-btn-arrow, .wcc-ctrl-arrow {
    width: 32px; height: 32px; border-radius: 50%;
    background: #fff; border: 1px solid #ddd; color: #333;
    font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    flex-shrink: 0;
}
.wcc-btn-arrow:hover,
.wcc-ctrl-arrow:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* ═══════════════════════════════════════════
   CONTROLS (desktop only)
═══════════════════════════════════════════ */
.wcc-controls {
    display: none;
    align-items: center; justify-content: center;
    margin-top: 12px; gap: 8px;
}
@media (min-width: 769px) { .wcc-controls { display: flex; } }

/* ═══════════════════════════════════════════
   SKELETON
═══════════════════════════════════════════ */
@keyframes wcc-shimmer { 0%,100%{opacity:1} 50%{opacity:.4} }
.wc-skeleton {
    height: 240px; border-radius: 14px; background: #f0f0f0;
    animation: wcc-shimmer 1.4s ease-in-out infinite;
}

/* ═══════════════════════════════════════════
   ERROR
═══════════════════════════════════════════ */
.wcc-error {
    background: #fff0f0; border: 1px solid #fcc;
    border-radius: 12px; padding: 20px;
    text-align: center; color: #c00;
    font-family: 'Cairo', sans-serif; direction: rtl;
}

/* ═══════════════════════════════════════════
   POPUP
═══════════════════════════════════════════ */
#wcc-popup {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.85);
    background: #fff; border-radius: 20px;
    padding: 30px 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,.22);
    z-index: 999999; text-align: center;
    min-width: 240px; max-width: 300px; width: 80vw;
    opacity: 0;
    transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s ease;
    font-family: 'Cairo', sans-serif; direction: rtl;
    border-top: 5px solid #4caf50;
    pointer-events: none;
}
#wcc-popup.wcc-popup-show { transform: translate(-50%,-50%) scale(1); opacity: 1; }

@keyframes wcc-draw { from{stroke-dashoffset:80} to{stroke-dashoffset:0} }
.wcc-popup-check { display: block; width: 64px; height: 64px; margin: 0 auto 14px; }
.wcc-popup-check polyline {
    fill: none; stroke: #4caf50; stroke-width: 5;
    stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 80; stroke-dashoffset: 80;
    animation: wcc-draw .6s ease-out .5s forwards;
}
.wcc-popup-text { font-size: 18px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.wcc-popup-name { font-size: 13px; color: #888; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 640px) {
    #wcc-popup { padding: 28px 32px; min-width: 260px; }
    .wcc-popup-text { font-size: 16px; }
    .wcc-popup-name { font-size: 12px; }
}
