/* =============================================================
   price-table-module.css
   Animated interactive price table for expansion product pages.
   ============================================================= */

/* ---- Container ------------------------------------------------ */
.ptm-wrap {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 0 16px;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.ptm-card {
    background: #ffffff;
    border: 1px solid #e9d5ff;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(109,40,217,0.10), 0 4px 12px rgba(109,40,217,0.05);
    overflow: hidden;
}

/* ---- Header -------------------------------------------------- */
.ptm-header {
    background: linear-gradient(135deg, #1e0a3c 0%, #4c1d95 55%, #6d28d9 100%);
    padding: 28px 28px 0;
    position: relative;
    overflow: hidden;
}
.ptm-header::after {
    content: "";
    position: absolute;
    width: 340px; height: 340px;
    border-radius: 50%;
    top: -140px; right: -100px;
    background: radial-gradient(circle, rgba(167,139,250,0.25) 0%, transparent 70%);
    pointer-events: none;
}
.ptm-eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(250,240,255,0.18);
    color: #e9d5ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 10px;
}
.ptm-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    position: relative;
    z-index: 1;
}
.ptm-subtitle {
    color: #ddd6fe;
    font-size: 0.92rem;
    margin: 0 0 22px;
    position: relative;
    z-index: 1;
}

/* ---- Size Tabs ----------------------------------------------- */
.ptm-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    padding-bottom: 0;
}
.ptm-tab {
    padding: 9px 16px;
    border-radius: 12px 12px 0 0;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-bottom: none;
    color: #ddd6fe;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.14s;
    white-space: nowrap;
    user-select: none;
}
.ptm-tab:hover {
    background: rgba(255,255,255,0.22);
    color: #ffffff;
    transform: translateY(-2px);
}
.ptm-tab.ptm-active {
    background: #f5f3ff;
    color: #4c1d95;
    border-color: #ddd6fe;
    box-shadow: 0 -4px 14px rgba(109,40,217,0.12);
}

/* ---- Body ---------------------------------------------------- */
.ptm-body {
    padding: 0 28px 28px;
    background: #f5f3ff;
}

/* ---- Controls row -------------------------------------------- */
.ptm-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 0 14px;
    border-bottom: 1px solid #ede9fe;
    margin-bottom: 18px;
}
.ptm-control-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6d28d9;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ptm-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1.5px solid #c4b5fd;
    background: #ffffff;
    color: #4c1d95;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
    white-space: nowrap;
}
.ptm-toggle-btn:hover,
.ptm-toggle-btn.ptm-on {
    background: #ede9fe;
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(109,40,217,0.14);
}
.ptm-toggle-dot {
    width: 28px; height: 16px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.ptm-toggle-dot::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.2s;
}
.ptm-toggle-btn.ptm-on .ptm-toggle-dot { background: #7c3aed; }
.ptm-toggle-btn.ptm-on .ptm-toggle-dot::after { transform: translateX(12px); }

/* ---- Panel --------------------------------------------------- */
.ptm-panel { display: none; }
.ptm-panel.ptm-panel-active { display: block; }

/* ---- Table --------------------------------------------------- */
.ptm-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #ede9fe;
    box-shadow: 0 4px 18px rgba(109,40,217,0.06);
}
.ptm-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.93rem;
}
.ptm-table thead tr {
    background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%);
}
.ptm-table thead th {
    padding: 13px 16px;
    text-align: left;
    color: #4c1d95;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 2px solid #ddd6fe;
    white-space: nowrap;
}
.ptm-table thead th:not(:first-child) { text-align: right; }
.ptm-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}
.ptm-table tbody tr:last-child { border-bottom: none; }
.ptm-table tbody tr:hover { background: #faf5ff; }
.ptm-table td {
    padding: 13px 16px;
    vertical-align: middle;
}
.ptm-table td:not(:first-child) { text-align: right; }

/* ---- Cells --------------------------------------------------- */
.ptm-material-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #111827;
}
.ptm-material-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.ptm-price-our {
    font-weight: 800;
    font-size: 1.05rem;
    color: #4c1d95;
}
.ptm-price-comp {
    color: #9ca3af;
    font-size: 0.88rem;
    text-decoration: line-through;
}
.ptm-save-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}
.ptm-popular-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: linear-gradient(90deg,#6d28d9,#a78bfa);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}
.ptm-ship-cell { color: #374151; font-size: 0.88rem; }

/* ---- Animated number counter --------------------------------- */
@keyframes ptm-count-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ptm-price-our.ptm-animate {
    animation: ptm-count-up 0.4s cubic-bezier(0.22,0.61,0.36,1) both;
}

/* ---- Competitor note ----------------------------------------- */
.ptm-comp-note {
    margin-top: 14px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.5;
}
.ptm-comp-note strong { color: #4c1d95; }

/* ---- Volume discount strip ----------------------------------- */
.ptm-volume-strip {
    margin-top: 18px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #faf5ff 0%, #f0fdf4 100%);
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.ptm-volume-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: #4c1d95;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.ptm-volume-tiers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.ptm-vol-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    min-width: 60px;
    transition: border-color 0.16s, box-shadow 0.16s, transform 0.14s;
    cursor: default;
}
.ptm-vol-tier:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(109,40,217,0.12);
    transform: translateY(-2px);
}
.ptm-vol-qty {
    font-size: 0.78rem;
    font-weight: 800;
    color: #6d28d9;
    text-transform: uppercase;
}
.ptm-vol-disc {
    font-size: 0.95rem;
    font-weight: 900;
    color: #065f46;
    margin-top: 2px;
}

/* ---- CTA row ------------------------------------------------- */
.ptm-cta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #ede9fe;
}
.ptm-cta-note {
    font-size: 0.85rem;
    color: #6b7280;
    flex: 1;
    min-width: 220px;
}
.ptm-cta-note strong { color: #111827; }
.ptm-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d28d9 0%, #a78bfa 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(109,40,217,0.28);
    transition: filter 0.16s, transform 0.14s, box-shadow 0.16s;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}
.ptm-order-btn:hover {
    filter: brightness(1.07);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(109,40,217,0.36);
    color: #ffffff;
    text-decoration: none;
}

/* ---- Responsive ---------------------------------------------- */
@media (max-width: 640px) {
    .ptm-header { padding: 22px 18px 0; }
    .ptm-title { font-size: 1.2rem; }
    .ptm-body { padding: 0 14px 22px; }
    .ptm-tabs { gap: 4px; }
    .ptm-tab { padding: 7px 11px; font-size: 0.79rem; }
    .ptm-table { font-size: 0.85rem; }
    .ptm-table td, .ptm-table thead th { padding: 10px 10px; }
    .ptm-volume-strip { flex-direction: column; align-items: flex-start; }
    .ptm-cta-row { flex-direction: column; align-items: stretch; }
    .ptm-order-btn { justify-content: center; }
}
