/* ── Freeship label in checkout ──────────────────────── */
.ttp-freeship-text {
    color: #16a34a;
    font-weight: 700;
}

/* ── TT Promotions bar ───────────────────────────────── */
.ttp-promo-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.ttp-promo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
}

.ttp-promo-met {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.ttp-promo-cta {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.ttp-promo-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.ttp-promo-body {
    flex: 1;
}

.ttp-promo-text strong { font-weight: 700; }
.ttp-promo-text em     { font-style: normal; font-weight: 700; }

.ttp-gift-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.08);
    flex-shrink: 0;
}

/* Progress bar */
.ttp-progress-wrap {
    margin-top: 6px;
    height: 5px;
    background: rgba(0,0,0,.1);
    border-radius: 4px;
    overflow: hidden;
}
.ttp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 4px;
    transition: width .4s ease;
}

/* Hide gift rows in ALL cart templates (standard WC + custom theme drawers) */
.ttp-is-gift,
li.ttp-is-gift,
tr.ttp-is-gift {
    display: none !important;
}

/* CSS :has() fallback — targets any row that contains the gift lock icon */
li:has(.ttp-gift-lock),
tr:has(.ttp-gift-lock) {
    display: none !important;
}

/* Gift lock icon in cart */
.ttp-gift-lock {
    display: inline-block;
    font-size: 16px;
    cursor: default;
}
.ttp-gift-qty {
    display: inline-block;
    min-width: 32px;
    text-align: center;
    font-weight: 600;
}

/* ── Gift panel (checkout only) ──────────────────────── */
.ttp-gift-panel {
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
    border: 1.5px solid #fb923c;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.ttp-gift-panel-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ttp-gift-panel-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.ttp-gift-panel-title {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    color: #9a3412;
}

.ttp-gift-panel-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #ea580c;
    color: #fff !important;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    line-height: 1.4;
}

.ttp-gift-panel-btn:hover {
    background: #c2410c;
}

/* ── Overlay ─────────────────────────────────────────── */
.ttp-gift-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99998;
}

.ttp-gift-overlay.is-open {
    display: block;
}

/* ── Popup / drawer ──────────────────────────────────── */
.ttp-gift-popup {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 30px rgba(0,0,0,.18);
    z-index: 99999;
    overflow: hidden;
    flex-direction: column;
}

.ttp-gift-popup.is-open {
    display: flex;
}

@media (min-width: 640px) {
    .ttp-gift-popup {
        left: 50%;
        right: auto;
        width: 420px;
        transform: translateX(-50%);
        bottom: 0;
        border-radius: 16px 16px 0 0;
    }
}

.ttp-gift-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.ttp-gift-popup-title {
    font-weight: 700;
    font-size: 15px;
    color: #111;
}

.ttp-gift-popup-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .15s;
}

.ttp-gift-popup-close:hover {
    background: #f3f4f6;
    color: #111;
}

.ttp-gift-popup-list {
    overflow-y: auto;
    padding: 12px 18px 20px;
    flex: 1;
}

.ttp-gift-popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.ttp-gift-popup-item:last-child {
    border-bottom: none;
}

.ttp-gift-popup-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ttp-gift-popup-info {
    flex: 1;
    min-width: 0;
}

.ttp-gift-popup-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #111;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttp-gift-popup-cond {
    font-size: 11.5px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttp-gift-popup-qty {
    flex-shrink: 0;
    background: #ea580c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    padding: 2px 9px;
    min-width: 30px;
    text-align: center;
}
