/* Stone Product Widget v1.2 */

/* Screen reader only utility */
.spw-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.spw-wrap {
    font-family: inherit;
    max-width: 100%;
    padding: 8px 0 24px;
}

/* Breadcrumb */
.spw-breadcrumb {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.spw-breadcrumb a { color: #888; text-decoration: none; }
.spw-breadcrumb a:hover { color: #333; text-decoration: underline; }

/* Header */
.spw-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px;
    line-height: 1.25;
}
.spw-origin {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 14px;
}
.spw-origin svg { flex-shrink: 0; }

/* Tags */
.spw-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.spw-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    color: #666;
    background: #f7f7f7;
    line-height: 1.4;
}
.spw-tag--unit {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    font-weight: 500;
}

/* Card */
.spw-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
}
.spw-card-head {
    padding: 11px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.spw-card-head > span:first-child {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.spw-updated {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

/* Table */
.spw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spw-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* 3-col explicit widths */
.spw-table--3col th:nth-child(1) { width: 26%; }
.spw-table--3col th:nth-child(2) { width: 38%; }
.spw-table--3col th:nth-child(3) { width: 36%; }

/* 4-col explicit widths */
.spw-table--4col th:nth-child(1) { width: 22%; }
.spw-table--4col th:nth-child(2) { width: 26%; }
.spw-table--4col th:nth-child(3) { width: 26%; }
.spw-table--4col th:nth-child(4) { width: 26%; }

.spw-table th {
    padding: 9px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #999;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
}
.spw-table td {
    padding: 11px 16px;
    font-size: 14px;
    color: #1a1a1a;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
}
.spw-table tr:hover td { background: #f5f5f5; }
.spw-right { text-align: right !important; }
.spw-price { font-weight: 500; color: #1a1a1a; }
.spw-transport { color: #2563eb; }
.spw-total { font-weight: 500; color: #444; }
.spw-na { color: #ccc; }

/* Highlighted row */
.spw-row-highlight td { background-color: #fffbeb !important; }
.spw-row-highlight:hover td { background-color: #fef9c3 !important; }
.spw-highlight-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 7px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    vertical-align: middle;
    white-space: nowrap;
}

/* Footer note */
.spw-note {
    font-size: 12px;
    color: #999;
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    line-height: 1.5;
}
.spw-note svg { flex-shrink: 0; margin-top: 1px; }

/* CTA block */
.spw-cta {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: #fff;
}
.spw-cta-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}
.spw-cta-text p {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.5;
}
.spw-cta-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Buttons — base with transparent border so secondary can show its border */
.spw-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
}
.spw-btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.spw-btn:active { transform: translateY(0); opacity: 1; }
.spw-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.spw-btn--primary   { background-color: #2563eb; color: #fff !important; }
.spw-btn--secondary { background-color: #fff; color: #1a1a1a !important; border-color: #d5d5d5; }
.spw-btn--whatsapp  { background-color: #25d366; color: #fff !important; }

/* Back link */
.spw-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
    transition: color 0.15s;
}
.spw-back:hover { color: #444; text-decoration: none; }
.spw-back:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 2px; }

/* Mobile — match Elementor's standard mobile breakpoint */
@media (max-width: 767px) {
    .spw-title { font-size: 22px; }
    .spw-table th, .spw-table td { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 480px) {
    .spw-cta { flex-direction: column; align-items: flex-start; }
    .spw-cta-actions { width: 100%; flex-direction: column; }
    .spw-btn { width: 100%; justify-content: center; }
}

/* ── Unit toggle (v1.3) ──────────────────────────────────────── */
.spw-card-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.spw-unit-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.spw-unit-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 13px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}

.spw-unit-btn:hover:not(.is-active) {
    background: #ebebeb;
    color: #444;
}

.spw-unit-btn.is-active {
    background: #2563eb;
    color: #fff;
}

.spw-unit-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

/* Panels — hidden state uses HTML hidden attribute */
.spw-unit-panel[hidden] { display: none; }
