/* ============================================
   WC VARIATION TABLE PRO — BASE STYLES
   NO SCROLL / NO SLIDER — SAME ON ALL DEVICES
   ============================================ */

/* ── Reset ── */
.wcvtp-wrap { width:100%; margin:20px 0; position:relative }
.wcvtp-wrap * { box-sizing:border-box }

/* ── TABLE — fixed layout prevents overflow ── */
.wcvtp-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    overflow: hidden;
}

/* ── Column Widths ── */
.wcvtp-c1 { width: 25% }  /* Tablet */
.wcvtp-c2 { width: 20% }  /* Price */
.wcvtp-c3 { width: 17% }  /* Price/Unit */
.wcvtp-c4 { width: 13% }  /* Qty */
.wcvtp-c5 { width: 25% }  /* Cart */

/* ── Header ── */
.wcvtp-th {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .6px;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wcvtp-th.wcvtp-c1 { text-align:left }
.wcvtp-th:first-child { border-radius:var(--wcvtp-br,8px) 0 0 0 }
.wcvtp-th:last-child { border-radius:0 var(--wcvtp-br,8px) 0 0 }

/* ── Responsive header text: full / short ── */
.wcvtp-hs { display:none }

/* ── Rows ── */
.wcvtp-row {
    transition: background .2s, transform .15s;
    cursor: pointer;
}
.wcvtp-row:last-child .wcvtp-td:first-child { border-radius:0 0 0 var(--wcvtp-br,8px) }
.wcvtp-row:last-child .wcvtp-td:last-child { border-radius:0 0 var(--wcvtp-br,8px) 0 }

/* ── Cells ── */
.wcvtp-td {
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wcvtp-td.wcvtp-c1 { text-align:left }

/* ── Tablet Label ── */
.wcvtp-label {
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Prices ── */
.wcvtp-reg {
    font-size: 11px;
    display: block;
    margin-bottom: 1px;
    white-space: nowrap;
}
.wcvtp-price, .wcvtp-unit {
    display: inline-block;
    white-space: nowrap;
}

/* ── Quantity Dropdown ── */
.wcvtp-qty {
    width: 100%;
    max-width: 58px;
    padding: 5px 2px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: auto;
    appearance: auto;
}
.wcvtp-qty:focus {
    border-color: #3498db;
    outline: none;
}

/* ── Add to Cart Button ── */
.wcvtp-btn {
    border: none;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 14px;
    line-height: 1.2;
    width: auto;
    max-width: 100%;
}
.wcvtp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
.wcvtp-btn:active { transform:translateY(0) }

/* SVG icon */
.wcvtp-icon { flex-shrink:0 }

/* Responsive button text */
.wcvtp-bs { display:none }

/* ── Loading state ── */
.wcvtp-btn.wcvtp-loading {
    opacity: .65;
    pointer-events: none;
}
.wcvtp-btn.wcvtp-loading::after {
    content: '';
    width: 12px; height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wcvtp-spin .6s linear infinite;
    margin-left: 4px;
}

/* ── Added state ── */
.wcvtp-btn.wcvtp-done {
    pointer-events: none;
}

@keyframes wcvtp-spin { to{transform:rotate(360deg)} }

/* ── Out of stock ── */
.wcvtp-stock { color:#c0392b; font-size:11px; font-weight:600; text-transform:uppercase }
.wcvtp-oos { opacity:.45; cursor:not-allowed }
.wcvtp-na { color:#bbb }

/* ── Error ── */
.wcvtp-err { color:#c0392b; padding:10px 14px; background:#fef5f5; border-left:4px solid #c0392b; border-radius:4px; font-size:13px }

/* ── Shortcode ── */
.wcvtp-sc { margin:20px 0 }
.wcvtp-ptitle { margin:22px 0 6px; font-size:17px }
.wcvtp-ptitle a { text-decoration:none; color:#2c3e50 }

/* ── Toast Notification ── */
.wcvtp-toast {
    position: fixed;
    top: 20px; right: 20px;
    padding: 13px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    z-index: 999999;
    box-shadow: 0 5px 24px rgba(0,0,0,.22);
    color: #fff;
    transform: translateX(130%);
    transition: transform .4s cubic-bezier(.68,-.55,.27,1.55);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 320px;
}
.wcvtp-toast.wcvtp-show { transform:translateX(0) }
.wcvtp-toast svg { flex-shrink:0 }

/* ── Hide default WooCommerce variation form ── */
.wcvtp-wc-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

/* ============================================
   RESPONSIVE — tablet
   ============================================ */
@media (max-width:768px) {
    .wcvtp-th, .wcvtp-td { font-size:12px !important; padding:9px 7px !important }
    .wcvtp-btn { padding:7px 10px; font-size:11px !important }
    .wcvtp-qty { max-width:48px; padding:4px 2px; font-size:12px }
    .wcvtp-reg { font-size:10px }
}

/* ============================================
   RESPONSIVE — mobile
   ============================================ */
@media (max-width:576px) {
    .wcvtp-wrap { margin:12px 0 }

    .wcvtp-th, .wcvtp-td { font-size:11px !important; padding:7px 4px !important }
    .wcvtp-th { letter-spacing:0 }

    /* show short headers, hide full */
    .wcvtp-hf { display:none }
    .wcvtp-hs { display:inline }

    /* show short button text */
    .wcvtp-bf { display:none }
    .wcvtp-bs { display:inline }

    .wcvtp-label { font-size:11px }
    .wcvtp-price { font-size:12px !important }
    .wcvtp-unit { font-size:11px !important }
    .wcvtp-reg { font-size:9px }

    .wcvtp-btn { padding:6px 8px; font-size:10px !important; gap:3px }
    .wcvtp-icon { width:11px; height:11px }

    .wcvtp-qty { max-width:40px; padding:3px 1px; font-size:11px; border-width:1px; border-radius:3px }

    /* Adjust column widths for mobile */
    .wcvtp-c1 { width:24% }
    .wcvtp-c2 { width:18% }
    .wcvtp-c3 { width:18% }
    .wcvtp-c4 { width:12% }
    .wcvtp-c5 { width:28% }
}

/* ============================================
   RESPONSIVE — very small
   ============================================ */
@media (max-width:380px) {
    .wcvtp-th, .wcvtp-td { font-size:10px !important; padding:5px 3px !important }
    .wcvtp-btn { padding:5px 6px; font-size:9px !important }
    .wcvtp-qty { max-width:34px; font-size:10px }
    .wcvtp-icon { width:10px; height:10px }
    .wcvtp-c1 { width:23% }
    .wcvtp-c5 { width:29% }
}