/* ═══════════════════════════════════════════════════════
   TIBS Shop Navigation & Customer Panel — v2.2.2
   addon-style.css · Mobile-first · Premium dashboard
   v2.2.2: sub-tab card grid + sliding inner panel for parent tabs
═══════════════════════════════════════════════════════ */

:root {
    --tibsa-purple:    #6366f1;
    --tibsa-purple-dk: #4f46e5;
    --tibsa-blue:      #3b82f6;
    --tibsa-green:     #10b981;
    --tibsa-yellow:    #f59e0b;
    --tibsa-red:       #ef4444;
    --tibsa-text:      #111827;
    --tibsa-muted:     #6b7280;
    --tibsa-border:    #e5e7eb;
    --tibsa-white:     #ffffff;
    --tibsa-surface:   #f8fafc;
    --tibsa-shadow-sm: 0 1px 4px rgba(0,0,0,.06);
    --tibsa-shadow-md: 0 8px 32px rgba(0,0,0,.11);
    --tibsa-shadow-lg: 0 20px 60px rgba(0,0,0,.15);
    --tibsa-radius:    16px;
    --tibsa-trans:     .22s cubic-bezier(.4,0,.2,1);
    --tibsa-nav-h:     64px;
}

*, *::before, *::after { box-sizing: border-box; }

/* ══════════════════════════════════════════
   FOOTER NAV
══════════════════════════════════════════ */
.tibsa-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tibsa-nav-h);
    background: var(--tibsa-white);
    box-shadow: 0 -2px 20px rgba(0,0,0,.08);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 99990;
    padding: 0 4px;
    border-top: 1px solid var(--tibsa-border);
}

body { padding-bottom: var(--tibsa-nav-h) !important; }

.tibsa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    position: relative;
    text-decoration: none;
    transition: all var(--tibsa-trans);
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    outline: none;
}

.tibsa-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: #374151;
    fill: none;
    flex-shrink: 0;
    transition: stroke var(--tibsa-trans), transform var(--tibsa-trans);
    pointer-events: none;
}

.tibsa-nav-item:hover svg,
.tibsa-nav-item.active svg { stroke: var(--tibsa-purple); transform: translateY(-2px); }

.tibsa-nav-item .tibsa-label {
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    letter-spacing: .3px;
    white-space: nowrap;
    transition: color var(--tibsa-trans);
    pointer-events: none;
}

.tibsa-nav-item:hover .tibsa-label,
.tibsa-nav-item.active .tibsa-label { color: var(--tibsa-purple); }

.tibsa-nav-item.active::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--tibsa-purple);
}

.tibsa-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge */
.tibsa-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    background: var(--tibsa-red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    border: 2px solid #fff;
}

/* ══════════════════════════════════════════
   OVERLAY
══════════════════════════════════════════ */
.tibsa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99991;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--tibsa-trans);
}
.tibsa-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ══════════════════════════════════════════
   PANEL (shared)
══════════════════════════════════════════ */
.tibsa-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: var(--tibsa-white);
    border-radius: var(--tibsa-radius) var(--tibsa-radius) 0 0;
    box-shadow: var(--tibsa-shadow-lg);
    z-index: 99992;
    display: flex;
    flex-direction: column;
    transform: translateY(102%);
    transition: transform .32s cubic-bezier(.32,0,.67,0);
    will-change: transform;
    overflow: hidden;
}
.tibsa-panel.open {
    transform: translateY(0);
    transition: transform .32s cubic-bezier(.33,1,.68,1);
}

@media (min-width: 768px) {
    .tibsa-panel {
        left: auto;
        right: 0;
        top: 0;
        bottom: 0;
        max-height: 100vh;
        width: 440px;
        border-radius: var(--tibsa-radius) 0 0 var(--tibsa-radius);
        transform: translateX(102%);
    }
    .tibsa-panel.open { transform: translateX(0); }
}

/* Panel Header */
.tibsa-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--tibsa-border);
    background: linear-gradient(135deg, #fafbff 0%, #fff 100%);
    flex-shrink: 0;
}
.tibsa-panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--tibsa-text);
    display: flex;
    align-items: center;
    gap: 9px;
}
.tibsa-panel-title svg { stroke: var(--tibsa-purple); }

.tibsa-panel-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--tibsa-border);
    background: var(--tibsa-white);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tibsa-muted);
    transition: all var(--tibsa-trans);
    padding: 0;
    flex-shrink: 0;
}
.tibsa-panel-close:hover {
    background: #fee2e2;
    border-color: var(--tibsa-red);
    color: var(--tibsa-red);
    transform: rotate(90deg);
}

/* Panel Body */
.tibsa-panel-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.tibsa-panel-body::-webkit-scrollbar { width: 4px; }
.tibsa-panel-body::-webkit-scrollbar-track { background: #f1f5f9; }
.tibsa-panel-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Panel Footer */
.tibsa-panel-footer {
    padding: 14px 20px 18px;
    border-top: 1px solid var(--tibsa-border);
    background: var(--tibsa-white);
    flex-shrink: 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,.05);
}

/* Loading / empty */
.tibsa-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 0;
}
.tibsa-spinner-lg {
    width: 36px;
    height: 36px;
    border: 3px solid var(--tibsa-border);
    border-top-color: var(--tibsa-purple);
    border-radius: 50%;
    animation: tibsa-spin .7s linear infinite;
    display: block;
}
@keyframes tibsa-spin { to { transform: rotate(360deg); } }

.tibsa-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--tibsa-muted);
}
.tibsa-empty-state svg {
    width: 52px; height: 52px;
    stroke: #d1d5db;
    margin: 0 auto 14px;
    display: block;
}
.tibsa-empty-state h3 { font-size: 15px; font-weight: 600; color: #374151; margin: 0 0 6px; }
.tibsa-empty-state p  { font-size: 13px; margin: 0 0 18px; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.tibsa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--tibsa-trans);
    text-decoration: none;
    letter-spacing: .2px;
}
.tibsa-btn--primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-color: #4f46e5;
    box-shadow: 0 3px 12px rgba(99,102,241,.4);
}
.tibsa-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,.5);
    color: #fff;
    text-decoration: none;
}
.tibsa-btn--full { width: 100%; }

/* ══════════════════════════════════════════
   CART PANEL ITEMS  (v1.1 redesign)
══════════════════════════════════════════ */
.tibsa-cart-list { padding: 6px 0; list-style: none; margin: 0; }

.tibsa-cart-item {
    display: grid;
    grid-template-columns: 68px 1fr;
    grid-template-rows: auto auto;
    gap: 0 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background var(--tibsa-trans);
    position: relative;
}
.tibsa-cart-item:last-child { border-bottom: none; }
.tibsa-cart-item:hover { background: #fafbff; }

/* Image spans 2 rows */
.tibsa-cart-item__img {
    grid-row: 1 / 3;
    width: 68px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    border: 1.5px solid var(--tibsa-border);
    background: var(--tibsa-surface);
    display: block;
    flex-shrink: 0;
}

/* Row 1: title + remove */
.tibsa-cart-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.tibsa-cart-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tibsa-text);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
.tibsa-cart-item__name:hover { color: var(--tibsa-purple); }

.tibsa-cart-item__remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #fecaca;
    background: #fff5f5;
    color: var(--tibsa-red);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tibsa-trans);
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.tibsa-cart-item__remove:hover { background: #fee2e2; transform: scale(1.12); }

/* Row 2: price + qty */
.tibsa-cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.tibsa-cart-item__price-wrap { display: flex; flex-direction: column; gap: 1px; }
.tibsa-cart-item__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--tibsa-purple);
    line-height: 1.2;
}
.tibsa-cart-item__regular {
    font-size: 11px;
    color: var(--tibsa-muted);
    text-decoration: line-through;
    line-height: 1.2;
}
.tibsa-cart-item__line {
    font-size: 11px;
    color: var(--tibsa-muted);
}

/* Qty control — compact row */
.tibsa-cart-item__qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--tibsa-border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--tibsa-white);
}
.tibsa-cart-item__qty button {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--tibsa-purple);
    transition: background var(--tibsa-trans);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tibsa-cart-item__qty button:hover { background: #ede9fe; }
.tibsa-cart-item__qty span {
    width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--tibsa-text);
    border-left: 1px solid var(--tibsa-border);
    border-right: 1px solid var(--tibsa-border);
    line-height: 30px;
    display: block;
}

/* Cart total row */
.tibsa-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tibsa-text);
}
.tibsa-cart-total-amt { font-size: 18px; font-weight: 800; color: var(--tibsa-purple); }

/* ══════════════════════════════════════════
   WISHLIST PANEL ITEMS  (v1.1 redesign)
══════════════════════════════════════════ */
.tibsa-wl-list { padding: 6px 0; list-style: none; margin: 0; }

.tibsa-wl-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background var(--tibsa-trans);
    align-items: start;
}
.tibsa-wl-item:last-child { border-bottom: none; }
.tibsa-wl-item:hover { background: #fafbff; }

.tibsa-wl-item__img {
    grid-row: 1 / 3;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    border: 1.5px solid var(--tibsa-border);
    background: var(--tibsa-surface);
    display: block;
}

.tibsa-wl-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.tibsa-wl-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tibsa-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.tibsa-wl-item__name:hover { color: var(--tibsa-purple); }

.tibsa-wl-item__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--tibsa-purple);
}
.tibsa-wl-item__regular {
    font-size: 11px;
    color: var(--tibsa-muted);
    text-decoration: line-through;
    margin-left: 4px;
}

/* Actions column — spans both rows */
.tibsa-wl-item__actions {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    align-self: stretch;
}
.tibsa-wl-remove {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #fecaca;
    background: #fff5f5;
    color: var(--tibsa-red);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tibsa-trans);
    padding: 0;
    line-height: 1;
}
.tibsa-wl-remove:hover { background: #fee2e2; transform: scale(1.1); }

.tibsa-wl-atc {
    padding: 6px 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--tibsa-trans);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(16,185,129,.3);
}
.tibsa-wl-atc:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.4); }
.tibsa-wl-atc:disabled { opacity: .6; pointer-events: none; }

.tibsa-wl-oos {
    font-size: 10px;
    color: var(--tibsa-red);
    font-weight: 600;
    padding: 4px 8px;
    background: #fef2f2;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
}

/* ══════════════════════════════════════════
   ORDER HISTORY PANEL
══════════════════════════════════════════ */
.tibsa-orders-list { padding: 8px 0; }

.tibsa-order-card {
    margin: 8px 14px;
    border: 1.5px solid var(--tibsa-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow var(--tibsa-trans);
}
.tibsa-order-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }

.tibsa-order-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #fafafa, #fff);
    transition: background var(--tibsa-trans);
    user-select: none;
}
.tibsa-order-card__header:hover { background: #f5f3ff; }

.tibsa-order-card__meta { flex: 1; min-width: 0; }
.tibsa-order-num { font-size: 13px; font-weight: 700; color: var(--tibsa-text); margin: 0 0 2px; }
.tibsa-order-date-pay { font-size: 11px; color: var(--tibsa-muted); margin: 0; }

.tibsa-order-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.tibsa-order-total { font-size: 14px; font-weight: 700; color: var(--tibsa-text); }

.tibsa-status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.tibsa-order-chevron {
    color: var(--tibsa-muted);
    font-size: 16px;
    transition: transform var(--tibsa-trans);
    flex-shrink: 0;
    line-height: 1;
}
.tibsa-order-card.expanded .tibsa-order-chevron { transform: rotate(180deg); }

/* Order detail body */
.tibsa-order-detail {
    display: none;
    padding: 0 14px 14px;
    border-top: 1px solid var(--tibsa-border);
}
.tibsa-order-card.expanded .tibsa-order-detail {
    display: block;
    animation: tibsa-fade-in .2s ease;
}

.tibsa-detail-section { margin-top: 14px; }
.tibsa-detail-section h4 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--tibsa-muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tibsa-detail-section h4::after { content: ''; flex: 1; height: 1px; background: var(--tibsa-border); }

/* Product rows inside order */
.tibsa-order-product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.tibsa-order-product:last-child { border-bottom: none; }
.tibsa-order-product img {
    width: 42px; height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--tibsa-border);
    flex-shrink: 0;
}
.tibsa-order-product__info { flex: 1; min-width: 0; }
.tibsa-order-product__name {
    font-size: 12px; font-weight: 600; color: var(--tibsa-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tibsa-order-product__qty { font-size: 11px; color: var(--tibsa-muted); margin-top: 2px; }
.tibsa-order-product__price { font-size: 13px; font-weight: 700; color: var(--tibsa-purple); flex-shrink: 0; }

/* Info rows — dl/dt/dd grid */
.tibsa-info-dl { margin: 0; }
.tibsa-info-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 3px 10px;
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px solid #f9fafb;
    align-items: baseline;
}
.tibsa-info-row:last-child { border-bottom: none; }
.tibsa-info-row dt { color: var(--tibsa-muted); font-weight: 600; }
.tibsa-info-row dd { margin: 0; color: var(--tibsa-text); font-weight: 500; word-break: break-word; }

/* Order total summary */
.tibsa-order-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 6px;
}
.tibsa-order-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 0;
    color: var(--tibsa-text);
}
.tibsa-order-summary-row span:last-child { color: var(--tibsa-purple); }

/* Customer note */
.tibsa-order-note {
    background: #fffbeb;
    border-left: 3px solid var(--tibsa-yellow);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 8px;
    line-height: 1.5;
}
.tibsa-order-note__date { font-size: 10px; color: var(--tibsa-muted); margin-top: 4px; }

/* Tracking */
.tibsa-tracking {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: #065f46;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}

/* Login prompt */
.tibsa-login-prompt {
    text-align: center;
    padding: 50px 24px;
}
.tibsa-login-prompt svg {
    width: 52px; height: 52px;
    stroke: #d1d5db;
    margin: 0 auto 14px;
    display: block;
}
.tibsa-login-prompt h3 { font-size: 16px; font-weight: 700; color: var(--tibsa-text); margin: 0 0 8px; }
.tibsa-login-prompt p  { font-size: 13px; color: var(--tibsa-muted); margin: 0 0 20px; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.tibsa-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    padding: 11px 18px 11px 14px;
    background: var(--tibsa-text);
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .28s ease, transform .28s ease;
    pointer-events: none;
    max-width: 300px;
    border-left: 4px solid var(--tibsa-purple);
}
.tibsa-toast.visible { opacity: 1; transform: translateX(0); }
.tibsa-toast.success { border-left-color: var(--tibsa-green); }
.tibsa-toast.error   { border-left-color: var(--tibsa-red);   }
.tibsa-toast.warning { border-left-color: var(--tibsa-yellow);}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes tibsa-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (min-width: 768px) {
    .tibsa-footer-nav { height: 60px; }
    body { padding-bottom: 60px !important; }
    .tibsa-nav-item svg { width: 20px; height: 20px; }
    .tibsa-cart-item { padding: 16px 20px; }
    .tibsa-wl-item   { padding: 14px 20px; }
    .tibsa-order-card { margin: 8px 18px; }
}
@media (max-width: 380px) {
    :root { --tibsa-nav-h: 58px; }
    .tibsa-nav-item svg { width: 20px; height: 20px; }
    .tibsa-nav-item .tibsa-label { font-size: 9px !important; }
}

/* ══════════════════════════════════════════
   v2.1.1 — WISHLIST HEART BUTTON (shop loop + single product)
══════════════════════════════════════════ */
.tibsa-heart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--tibsa-border);
    background: var(--tibsa-white);
    color: var(--tibsa-muted);
    cursor: pointer;
    transition: var(--tibsa-trans);
    box-shadow: var(--tibsa-shadow-sm);
    flex-shrink: 0;
}
.tibsa-heart-btn svg { width: 18px; height: 18px; stroke: currentColor; transition: var(--tibsa-trans); }
.tibsa-heart-btn:hover { border-color: var(--tibsa-red); color: var(--tibsa-red); transform: translateY(-1px); }
.tibsa-heart-btn.is-wished { background: var(--tibsa-red); border-color: var(--tibsa-red); color: var(--tibsa-white); }
.tibsa-heart-btn.is-wished svg { fill: currentColor; }
.tibsa-heart-btn.is-loading { opacity: .55; pointer-events: none; }

.tibsa-heart-btn--loop {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}
ul.products li.product { position: relative; }

.tibsa-heart-btn--single {
    margin-left: 12px;
    vertical-align: middle;
}

/* ══════════════════════════════════════════
   v2.1.1 — CUSTOM TAB CONTENT PANEL (page / shortcode tabs)
   Reuses the same slide-up panel pattern as Cart/Wishlist/Orders.
══════════════════════════════════════════ */
.tibsa-custom-content {
    padding: 4px 2px;
    animation: tibsa-fade-in .25s ease;
}
.tibsa-custom-content img { max-width: 100%; height: auto; border-radius: 8px; }
.tibsa-custom-content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tibsa-custom-content p { margin: 0 0 12px; line-height: 1.6; color: var(--tibsa-text); }

/* ══════════════════════════════════════════
   v2.2.2 — PARENT TAB SUB-TAB CARDS + INNER PANEL
══════════════════════════════════════════ */
.tibsa-subtab-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 2px;
    animation: tibsa-fade-in .25s ease;
}
@media (max-width: 420px) {
    .tibsa-subtab-cards { grid-template-columns: 1fr; }
}
.tibsa-subtab-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--tibsa-white);
    border: 1.5px solid var(--tibsa-border);
    border-radius: 14px;
    padding: 20px 14px;
    cursor: pointer;
    transition: var(--tibsa-trans);
    text-align: center;
    text-decoration: none;
    color: var(--tibsa-text);
}
.tibsa-subtab-card:hover {
    border-color: var(--tibsa-purple);
    box-shadow: var(--tibsa-shadow-sm);
    transform: translateY(-2px);
}
.tibsa-subtab-card svg {
    width: 26px;
    height: 26px;
    stroke: var(--tibsa-purple);
    flex-shrink: 0;
}
.tibsa-subtab-card__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tibsa-text);
    line-height: 1.3;
}
.tibsa-subtab-card__hint {
    font-size: 10px;
    color: var(--tibsa-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Inner panel — slides in on top of the main panel when a sub-tab opens
   in "panel" mode, so the parent's card grid stays underneath and a Back
   button returns to it without re-fetching anything. */
.tibsa-inner-panel {
    position: absolute;
    inset: 0;
    background: var(--tibsa-white);
    transform: translateX(100%);
    transition: transform var(--tibsa-trans);
    display: flex;
    flex-direction: column;
    z-index: 2;
}
.tibsa-inner-panel.open { transform: translateX(0); }
.tibsa-inner-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--tibsa-border);
    flex-shrink: 0;
}
.tibsa-inner-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--tibsa-surface);
    color: var(--tibsa-text);
    cursor: pointer;
    flex-shrink: 0;
}
.tibsa-inner-back-btn:hover { background: var(--tibsa-border); }
.tibsa-inner-back-btn svg { width: 16px; height: 16px; }
.tibsa-inner-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tibsa-text);
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tibsa-inner-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
}

/* The main panel already has position:fixed and overflow:hidden from the
   base .tibsa-panel rule, which is exactly what's needed to clip the inner
   panel's slide-in transform. The body just needs relative positioning so
   the inner panel (absolute) stacks correctly within it. */
#tibsa-custom-panel .tibsa-panel-body { position: relative; }
