/* =========================
   GRID LAYOUT
========================= */

.cart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 5px;
    justify-content: center;
}

/* =========================
   CARD BASE
========================= */

.cart-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    direction: rtl;

    /* Arrow color (default) */
    --arrow-color: #777;
}

/* کارت‌ها هم‌ارتفاع */
.cart-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s ease, transform .25s ease;
    width: 90%;
}

.cart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,.12);
    --arrow-color: #444;
}

/* =========================
   IMAGE
========================= */

.cart-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: filter .3s ease;
}

.cart-card:hover .cart-image img {
    filter: brightness(0.95);
}

/* =========================
   BODY
========================= */

.cart-body {
    position: relative;
    padding: 16px 56px 16px 16px;
    text-align: center;

    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* =========================
   TRAIN NUMBER (VERTICAL)
========================= */

.cart-train-no {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 100%;
    background: linear-gradient(25deg, #F7C221 0%, #BB951D 100%);

    writing-mode: vertical-rl;
    transform: rotate(180deg);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 700;
    color: #444;
}

/* =========================
   ROUTE LINE
========================= */

.cart-route-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cart-city {
    font-size: 15px;
    font-weight: 600;
}

.cart-time {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #666;
}

/* =========================
   ARROW – 3 SVG ARROWS (FLOW)
========================= */

/* SVG arrow (RTL) */
:root {
    --arrow-svg: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'>\
<polyline points='8,2 4,6 8,10' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/>\
</svg>");
}

.cart-icon {
    position: relative;
    width: 54px;
    height: 16px;
    margin: 0 12px;
}

/* سه فلش */
.cart-icon::before,
.cart-icon::after,
.cart-icon i {
    content: "";
    position: absolute;
    top: 0;
    width: 14px;
    height: 14px;

    background-color: var(--arrow-color);

    -webkit-mask-image: var(--arrow-svg);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: var(--arrow-svg);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    animation: cart-arrow-flow 1.8s infinite ease-in-out;
    opacity: 0;
}

/* فلش اول */
.cart-icon::before {
    right: 40px;
    animation-delay: 0s;
}

/* فلش دوم */
.cart-icon i {
    right: 20px;
    animation-delay: .2s;
}

/* فلش سوم */
.cart-icon::after {
    right: 0;
    animation-delay: .4s;
}

/* انیمیشن حرکت */
@keyframes cart-arrow-flow {
    0% {
        opacity: 0;
        transform: translateX(6px);
    }
    30% {
        opacity: 1;
        transform: translateX(0);
    }
    60% {
        opacity: .6;
        transform: translateX(-4px);
    }
    100% {
        opacity: 0;
        transform: translateX(-8px);
    }
}

/* =========================
   META INFO
========================= */

.cart-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.cart-days {
    font-weight: 600;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.cart-days::after {
    content: "";
    display: block;
    margin: 10px 0;
    border-bottom: 1px dashed #ddd;
}

.cart-salon {
    color: #666;
}

/* =========================
   STATUS COLORS
========================= */

.cart-card.is-vip {
    --arrow-color: #c9a227;
}

.cart-card.is-economy {
    --arrow-color: #2b7cff;
}

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

@media (max-width: 1200px) {
    .cart-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
}

@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 640px) {

    .cart-grid {
        grid-template-columns: 1fr;
    }

    .cart-image img {
        height: 150px;
    }

    .cart-city {
        font-size: 14px;
    }

    .cart-time {
        font-size: 12px;
    }

    .cart-body {
        padding: 14px 52px 14px 14px;
    }
    
    .cart-card {


  width: 100%;
  
}

    .cart-icon {
        width: 42px;
    }
}

.cart-title{
	display: none;
}