/* ==========================================================================
   Festival Tickets List — Card Grid
   ========================================================================== */

:root {
    --fpt-bg:           #ffffff;
    --fpt-surface:      #f5f5f5;
    --fpt-surface-2:    #eeeeee;
    --fpt-border:       #e0e0e0;
    --fpt-border-hover: #bdbdbd;
    --fpt-text:         #1a1a1a;
    --fpt-text-muted:   #757575;
    --fpt-accent:       #111111;
    --fpt-accent-hover: #333333;
    --fpt-radius:       6px;
    --fpt-radius-lg:    10px;
    --fpt-transition:   .2s cubic-bezier(.4,0,.2,1);
}

/* ---------- Widget wrapper ---------- */
.fpt-widget {
    background: var(--fpt-bg);
    color: var(--fpt-text);
    font-family: inherit;
}
.fpt-widget * { box-sizing: border-box; }

/* ---------- Grid ---------- */
.fpt-widget--grid {
    display: grid;
    grid-template-columns: repeat(var(--fpt-grid-cols, 3), 1fr);
    gap: 24px;
    align-items: start;
}

/* ---------- Empty state ---------- */
.fpt-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--fpt-text-muted);
    font-size: 14px;
}

/* ---------- Card ---------- */
.fpt-product-block--card {
    background: var(--fpt-bg);
    border: 1px solid var(--fpt-border);
    border-radius: var(--fpt-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fpt-product-block--card.is-sold-out { opacity: .55; }

/* Card image */
.fpt-card__image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--fpt-surface);
    flex-shrink: 0;
}
.fpt-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

/* Badge on image */
.fpt-card__image .fpt-stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

/* Card body */
.fpt-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.fpt-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--fpt-text);
    margin: 0;
    line-height: 1.3;
}

.fpt-card__variation {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fpt-accent);
    margin: 0;
    line-height: 1.4;
}

.fpt-card__date {
    font-size: 12px;
    color: var(--fpt-text-muted);
    margin: 0;
    line-height: 1.4;
}

.fpt-card__desc {
    font-size: 13px;
    color: var(--fpt-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Price */
.fpt-card__price { margin: 4px 0; }
.fpt-card__price .amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--fpt-text);
}
.fpt-card__price del .amount {
    font-size: 13px;
    font-weight: 400;
    color: var(--fpt-text-muted);
    text-decoration: line-through;
}
.fpt-card__price ins { text-decoration: none; }

/* Card footer — qty + buy btn */
.fpt-card__footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--fpt-border);
}
.fpt-card__footer .fpt-qty {
    width: 100%;
    justify-content: space-between;
}
.fpt-card__footer .fpt-buy-btn { width: 100%; }

/* ---------- Stock badge ---------- */
.fpt-stock-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 3px;
    line-height: 1.5;
}
.fpt-stock-badge--out { background: #fce4e4; color: #c62828; }
.fpt-stock-badge--low { background: #fff8e1; color: #e65100; }

/* ---------- Quantity ---------- */
.fpt-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--fpt-border);
    border-radius: var(--fpt-radius);
    overflow: hidden;
    background: var(--fpt-bg);
    flex-shrink: 0;
}
.fpt-qty__btn {
    background: transparent;
    border: none;
    color: var(--fpt-text);
    width: 32px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--fpt-transition);
    flex-shrink: 0;
}
.fpt-qty__btn:hover { background: var(--fpt-surface); }
.fpt-qty__btn:disabled { opacity: .35; cursor: not-allowed; }
.fpt-qty__input {
    background: transparent;
    border: none;
    border-left: 1px solid var(--fpt-border);
    border-right: 1px solid var(--fpt-border);
    color: var(--fpt-text);
    font-size: 13px;
    font-weight: 700;
    width: 34px;
    height: 36px;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}
.fpt-qty__input::-webkit-outer-spin-button,
.fpt-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- Buy button ---------- */
.fpt-buy-btn {
    background: var(--fpt-accent);
    color: #ffffff;
    border: none;
    border-radius: var(--fpt-radius);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 0 18px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: background var(--fpt-transition), transform var(--fpt-transition);
}
.fpt-buy-btn:hover { background: var(--fpt-accent-hover); transform: translateY(-1px); }
.fpt-buy-btn:active { transform: translateY(0); }
.fpt-buy-btn:disabled {
    background: var(--fpt-surface-2);
    color: var(--fpt-text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Button states */
.fpt-buy-btn .fpt-btn-loader { display: none; }
.fpt-buy-btn.is-loading .fpt-btn-text   { display: none; }
.fpt-buy-btn.is-loading .fpt-btn-icon   { display: none; }
.fpt-buy-btn.is-loading .fpt-btn-loader { display: block; }

.fpt-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.fpt-btn-icon svg,
.fpt-btn-icon i { width: 1em; height: 1em; fill: currentColor; }

.fpt-btn-loader {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fptSpin .6s linear infinite;
}
@keyframes fptSpin { to { rotate: 1turn; } }

/* ---------- Cart message ---------- */
.fpt-cart-msg {
    display: none;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    margin: 0 16px 12px;
}
.fpt-cart-msg.is-visible  { display: block; }
.fpt-cart-msg--error   { background: #fce4e4; color: #c62828; }
.fpt-cart-msg--success { background: #e8f5e9; color: #2e7d52; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .fpt-widget--grid { --fpt-grid-cols: 2; }
}
@media (max-width: 480px) {
    .fpt-widget--grid { --fpt-grid-cols: 1; }
}
