/* =============================================================
   WC Variation Table — Frontend Styles
   ============================================================= */

/* ---------- CSS Variables ---------- */
:root {
    --wcvt-blue:        #3b9dd2;
    --wcvt-blue-dark:   #2980b9;
    --wcvt-blue-light:  #e8f4fb;
    --wcvt-header-bg:   #4a9fc7;
    --wcvt-header-text: #ffffff;
    --wcvt-border:      #d0e8f5;
    --wcvt-row-even:    #f7fbfe;
    --wcvt-row-hover:   #eaf5fb;
    --wcvt-text:        #333333;
    --wcvt-text-muted:  #666666;
    --wcvt-radius:      6px;
    --wcvt-font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- TABLE WRAPPER ---------- */
.wcvt-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--wcvt-radius);
    box-shadow: 0 2px 12px rgba(59,157,210,.15);
    font-family: var(--wcvt-font);
}

/* ---------- TABLE ---------- */
.wcvt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--wcvt-text);
}

/* ---------- HEADER ---------- */
.wcvt-table thead tr {
    background: var(--wcvt-header-bg);
}

.wcvt-th {
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--wcvt-header-text);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: relative;
    border-right: 1px solid rgba(255,255,255,.15);
    transition: background .2s;
}

.wcvt-th:last-child { border-right: none; }

.wcvt-th:hover {
    background: var(--wcvt-blue-dark);
}

.wcvt-th.wcvt-sorted-asc  .wcvt-sort-icon::after { content: ' ↑'; }
.wcvt-th.wcvt-sorted-desc .wcvt-sort-icon::after { content: ' ↓'; }
.wcvt-sort-icon { font-size: 11px; opacity: .7; }

/* ---------- ROWS ---------- */
.wcvt-table tbody tr {
    border-bottom: 1px solid var(--wcvt-border);
    transition: background .15s;
    cursor: pointer;
}

.wcvt-table tbody tr:nth-child(even) {
    background: var(--wcvt-row-even);
}

.wcvt-table tbody tr:hover {
    background: var(--wcvt-row-hover);
}

/* ---------- CELLS ---------- */
.wcvt-td {
    padding: 11px 16px;
    border-right: 1px solid var(--wcvt-border);
    vertical-align: middle;
    white-space: nowrap;
}

.wcvt-td:last-child { border-right: none; }

/* ---------- CATALOG NO LINK ---------- */
.wcvt-sku-link {
    color: var(--wcvt-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}

.wcvt-sku-link:hover {
    color: var(--wcvt-blue-dark);
    text-decoration: underline;
}

/* ---------- ACTION BUTTON ---------- */
.wcvt-btn-dist {
    display: inline-block;
    padding: 7px 14px;
    background: var(--wcvt-blue);
    color: #fff !important;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s, transform .1s;
}

.wcvt-btn-dist:hover {
    background: var(--wcvt-blue-dark);
    transform: translateY(-1px);
}

/* =============================================================
   VARIATION DETAIL PAGE
   ============================================================= */

.wcvt-variation-detail {
    font-family: var(--wcvt-font);
    color: var(--wcvt-text);
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

/* Breadcrumb */
.wcvt-breadcrumb {
    margin-bottom: 20px;
}

.wcvt-breadcrumb a {
    color: var(--wcvt-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}

.wcvt-breadcrumb a:hover { color: var(--wcvt-blue-dark); }

/* Layout grid */
.wcvt-detail-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .wcvt-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Image panel */
.wcvt-detail-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcvt-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    box-sizing: border-box;
}

/* Info panel */
.wcvt-parent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wcvt-blue);
    letter-spacing: .05em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.wcvt-variation-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    line-height: 1.25;
}

.wcvt-sku {
    font-size: 14px;
    color: var(--wcvt-text-muted);
    margin: 0 0 10px;
}

.wcvt-price {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
}

/* Stock badge */
.wcvt-stock {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.wcvt-stock--instock {
    background: #d4edda;
    color: #155724;
}

.wcvt-stock--outofstock {
    background: #f8d7da;
    color: #721c24;
}

/* Description */
.wcvt-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--wcvt-text-muted);
    margin-bottom: 20px;
}

/* Spec table */
.wcvt-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: var(--wcvt-radius);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    margin-bottom: 24px;
}

.wcvt-spec-table thead tr {
    background: var(--wcvt-header-bg);
    color: #fff;
}

.wcvt-spec-table th,
.wcvt-spec-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--wcvt-border);
    text-align: left;
}

.wcvt-spec-table th {
    font-weight: 600;
}

.wcvt-spec-table tbody tr:nth-child(even) {
    background: var(--wcvt-row-even);
}

.wcvt-spec-table tbody tr:last-child td {
    border-bottom: none;
}

/* Actions */
.wcvt-actions {
    margin-top: 4px;
}

.wcvt-actions .button,
.wcvt-actions .single_add_to_cart_button {
    background: var(--wcvt-blue) !important;
    border-color: var(--wcvt-blue) !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: background .2s, transform .1s !important;
}

.wcvt-actions .button:hover,
.wcvt-actions .single_add_to_cart_button:hover {
    background: var(--wcvt-blue-dark) !important;
    border-color: var(--wcvt-blue-dark) !important;
    transform: translateY(-1px);
}
