/* =============================================================================
   Service Quote Manager – Front-end Stylesheet  v1.1.0
   All colours/sizes that admins control via meta boxes are applied as
   inline styles. These rules handle layout, spacing, transitions, and
   any property not overridden inline.
   ============================================================================= */

/* ── Design tokens (global defaults — overridden by inline styles per card) ── */
:root {
    --sqm-primary:        #1a73e8;
    --sqm-primary-hover:  #1558b0;
    --sqm-text:           #2d2d2d;
    --sqm-text-muted:     #666666;
    --sqm-border:         #e0e0e0;
    --sqm-bg-card:        #ffffff;
    --sqm-bg-tab:         #f5f5f5;
    --sqm-bg-tab-active:  #1a73e8;
    --sqm-tab-text:       #2d2d2d;
    --sqm-tab-text-active:#ffffff;
    --sqm-radius:         8px;
    --sqm-radius-sm:      4px;
    --sqm-shadow:         0 2px 8px rgba(0,0,0,0.10);
    --sqm-shadow-hover:   0 6px 18px rgba(0,0,0,0.16);
    --sqm-transition:     0.22s ease;
    --sqm-banner-bg:      #f8f9fa;
}

/* ── Utility ── */
.sqm-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* =============================================================================
   COMPANY TAB STRIP
   ============================================================================= */
.sqm-tabs-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 0 16px;
    margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--sqm-primary) var(--sqm-border);
}
.sqm-tabs-wrapper::-webkit-scrollbar { height: 4px; }
.sqm-tabs-wrapper::-webkit-scrollbar-track { background: var(--sqm-border); border-radius: 2px; }
.sqm-tabs-wrapper::-webkit-scrollbar-thumb { background: var(--sqm-primary); border-radius: 2px; }

.sqm-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: var(--sqm-bg-tab);
    color: var(--sqm-tab-text);
    border: 1px solid var(--sqm-border);
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--sqm-transition), color var(--sqm-transition), border-color var(--sqm-transition);
    white-space: nowrap;
    line-height: 1.4;
}
.sqm-tab:hover,
.sqm-tab:focus-visible {
    background: var(--sqm-primary);
    color: var(--sqm-tab-text-active);
    border-color: var(--sqm-primary);
    outline: none;
}
.sqm-tab--active {
    background: var(--sqm-bg-tab-active);
    color: var(--sqm-tab-text-active);
    border-color: var(--sqm-bg-tab-active);
}

/* =============================================================================
   CARD GRID
   ============================================================================= */
.sqm-cards-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(260px, 1fr) );
    gap: 24px;
}

/* =============================================================================
   SERVICE CARD
   Inline styles from meta box override: background, border, border-radius.
   CSS handles layout, shadow, hover.
   ============================================================================= */
.sqm-card {
    /* Fallback values — overridden by inline styles when saved. */
    background: var(--sqm-bg-card);
    border: 1px solid var(--sqm-border);
    border-radius: var(--sqm-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--sqm-shadow);
    transition: box-shadow var(--sqm-transition), transform var(--sqm-transition);
}
.sqm-card:hover {
    box-shadow: var(--sqm-shadow-hover);
    transform: translateY(-3px);
}

/* Card image wrapper */
.sqm-card__image {
    position: relative;
    width: 100%;
    background: #f0f0f0;
    aspect-ratio: 16 / 10;   /* overridden when img_height is set inline */
    overflow: hidden;
}
.sqm-card__image a { display: block; width: 100%; height: 100%; }
.sqm-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    /* object-fit, border-radius set via inline styles from meta box */
    transition: transform var(--sqm-transition);
}
.sqm-card:hover .sqm-card__image img { transform: scale(1.04); }

.sqm-card__no-image {
    width: 100%;
    min-height: 160px;
    background: linear-gradient(135deg, #e8edf2 0%, #d1d9e0 100%);
}

/* Card body */
.sqm-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.sqm-card__company {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sqm-primary);
}
.sqm-card__title {
    /* font-size, color, text-align set via inline styles */
    margin: 0;
    line-height: 1.4;
    flex: 1;
}
.sqm-card__title a {
    color: inherit;
    text-decoration: none;
}
.sqm-card__title a:hover { opacity: 0.8; }

/* =============================================================================
   BUTTONS
   background, color, border-radius, border-color set via inline styles.
   CSS handles padding, font, transition, focus ring.
   ============================================================================= */
.sqm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border: 2px solid transparent;
    border-radius: var(--sqm-radius-sm); /* fallback */
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: filter var(--sqm-transition), box-shadow var(--sqm-transition);
    line-height: 1.4;
    /* background / color / border-radius come from inline styles */
}
.sqm-btn:hover,
.sqm-btn:focus-visible {
    filter: brightness(0.88);
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.sqm-btn--primary {
    background: var(--sqm-primary);
    color: #fff;
    border-color: var(--sqm-primary);
}
.sqm-btn--lg {
    padding: 13px 32px;
    font-size: 1rem;
}

/* =============================================================================
   EMPTY STATE
   ============================================================================= */
.sqm-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--sqm-text-muted);
    padding: 40px 20px;
    font-size: 1rem;
}
.sqm-card--hidden { display: none !important; }

/* =============================================================================
   COMPANY LOGOS GRID  [sqm_company_logos]
   ============================================================================= */
.sqm-company-logos-grid {
    display: grid;
    grid-template-columns: repeat( var(--sqm-logo-cols, 4), 1fr );
    gap: 20px;
    margin: 24px 0;
}
@media (max-width: 900px) {
    .sqm-company-logos-grid { grid-template-columns: repeat( 3, 1fr ); }
}
@media (max-width: 600px) {
    .sqm-company-logos-grid { grid-template-columns: repeat( 2, 1fr ); }
}

.sqm-company-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid var(--sqm-border);
    border-radius: var(--sqm-radius);
    background: #fff;
    box-shadow: var(--sqm-shadow);
    text-decoration: none;
    transition: box-shadow var(--sqm-transition), transform var(--sqm-transition), border-color var(--sqm-transition);
    aspect-ratio: 3 / 2;
    overflow: hidden;
}
.sqm-company-logo-item:hover,
.sqm-company-logo-item:focus-visible {
    box-shadow: var(--sqm-shadow-hover);
    transform: translateY(-3px);
    border-color: var(--sqm-primary);
    outline: none;
}
.sqm-company-logo-item__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform var(--sqm-transition);
}
.sqm-company-logo-item:hover .sqm-company-logo-item__img {
    transform: scale(1.05);
}
.sqm-company-logo-item__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sqm-text);
    text-align: center;
    line-height: 1.4;
}

/* =============================================================================
   SINGLE SERVICE PAGE
   ============================================================================= */

/* Banner — kept for any legacy templates */
.sqm-banner {
    background: var(--sqm-banner-bg);
    border-bottom: 1px solid var(--sqm-border);
    padding: 60px 0 50px;
    margin-bottom: 40px;
}
.sqm-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.sqm-banner__content { flex: 1 1 320px; }
.sqm-banner__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.25;
}
.sqm-banner__company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sqm-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
}
.sqm-banner__logo { flex: 0 0 auto; max-width: 200px; }
.sqm-banner__logo-img { width: 100%; height: auto; display: block; object-fit: contain; }

/* ── SECTION 1: Company Banner (company name left, logo right) ──────────────── */
.sqm-company-banner {
    background: var(--sqm-banner-bg);
    border-bottom: 1px solid var(--sqm-border);
    padding: 52px 0 44px;
}
.sqm-company-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.sqm-company-banner__text { flex: 1 1 280px; }
.sqm-company-banner__name {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.sqm-company-banner__sub {
    font-size: 1rem;
    color: var(--sqm-text-muted);
    margin: 0;
    line-height: 1.6;
}
.sqm-company-banner__logo {
    flex: 0 0 auto;
    max-width: 200px;
}
.sqm-company-banner__logo-img {
    width: 100%;
    height: auto;
    max-height: 110px;
    display: block;
    object-fit: contain;
}

/* ── SECTION 2: Service Detail (image left, info right) ─────────────────────── */
.sqm-service-detail {
    padding: 60px 0;
}
.sqm-service-detail__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}
.sqm-service-detail__image {
    border-radius: var(--sqm-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}
.sqm-service-detail__img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}
.sqm-service-detail__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sqm-service-detail__title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0;
    line-height: 1.25;
    color: var(--sqm-text);
}
.sqm-service-detail__desc {
    font-size: 1rem;
    color: var(--sqm-text-muted);
    line-height: 1.8;
}
.sqm-service-detail__desc h2,
.sqm-service-detail__desc h3 {
    margin-top: 1.2em;
    margin-bottom: 0.4em;
    font-weight: 700;
    color: var(--sqm-text);
}
.sqm-service-detail__size-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sqm-service-detail__cta { margin-top: 4px; }

/* Quote form fields (reused in section 2) */
.sqm-quote-form__label { font-size: 0.9rem; font-weight: 600; color: var(--sqm-text); }
.sqm-quote-form__select {
    padding: 10px 14px;
    border: 1.5px solid var(--sqm-border);
    border-radius: var(--sqm-radius-sm);
    font-size: 0.95rem;
    color: var(--sqm-text);
    background: #fff;
    width: 100%;
    max-width: 320px;
    cursor: pointer;
    -webkit-appearance: auto;
}
.sqm-quote-form__select:focus {
    outline: 2px solid var(--sqm-primary);
    outline-offset: 1px;
    border-color: var(--sqm-primary);
}
.sqm-quote-form__select.sqm--error { border-color: #d32f2f; }
.sqm-quote-form__qty {
    padding: 10px 14px;
    border: 1.5px solid var(--sqm-border);
    border-radius: var(--sqm-radius-sm);
    font-size: 0.95rem;
    color: var(--sqm-text);
    background: #fff;
    width: 100px;
    text-align: center;
    -moz-appearance: textfield;
}
.sqm-quote-form__qty::-webkit-inner-spin-button,
.sqm-quote-form__qty::-webkit-outer-spin-button { opacity: 1; }
.sqm-quote-form__qty:focus {
    outline: 2px solid var(--sqm-primary);
    outline-offset: 1px;
    border-color: var(--sqm-primary);
}
.sqm-quote-form__qty.sqm--error { border-color: #d32f2f; }
.sqm-service-detail__qty-wrap { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.sqm-field-error { font-size: 0.82rem; color: #d32f2f; margin-top: 4px; display:block; }

/* =============================================================================
   SECTION 3 — Content Section (left text / right image)
   ============================================================================= */
.sqm-content-section {
    padding: 60px 0;
    border-top: 1px solid var(--sqm-border);
}
.sqm-content-section__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.sqm-content-section__left {
    font-size: 1rem;
    color: var(--sqm-text);
    line-height: 1.8;
}
.sqm-content-section__left h2,
.sqm-content-section__left h3 {
    margin-top: 0;
    margin-bottom: 0.6em;
    font-weight: 700;
    color: var(--sqm-text);
}
.sqm-content-section__right {
    border-radius: var(--sqm-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}
.sqm-content-section__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
@media (max-width: 768px) {
    .sqm-content-section__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* =============================================================================
   ORDER NOW MODAL
   ============================================================================= */
body.sqm-modal-open { overflow: hidden; }
body.sqm-name-gate-open { overflow: hidden; }

.sqm-name-gate {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.sqm-name-gate__dialog {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
    padding: 30px 28px 28px;
    box-sizing: border-box;
    border: 1px solid rgba(26, 115, 232, 0.12);
}

.sqm-name-gate__header {
    margin-bottom: 20px;
}

.sqm-name-gate__title {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.2;
    color: var(--sqm-text);
    font-weight: 800;
}

.sqm-name-gate__form {
    display: grid;
    gap: 12px;
}

.sqm-name-gate__label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--sqm-text);
}

.sqm-name-gate__input {
    width: 100%;
    min-height: 50px;
    border: 1.5px solid var(--sqm-border);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 1rem;
    color: var(--sqm-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color var(--sqm-transition), box-shadow var(--sqm-transition);
}

.sqm-name-gate__input:focus {
    outline: none;
    border-color: var(--sqm-primary);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.14);
}

.sqm-name-gate__input--error {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.sqm-name-gate__error {
    margin: 0;
    color: #c62828;
    font-size: 0.9rem;
    font-weight: 600;
}

.sqm-name-gate__button {
    margin-top: 8px;
    min-height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sqm-primary) 0%, #0f5ed7 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--sqm-transition), box-shadow var(--sqm-transition);
    box-shadow: 0 12px 24px rgba(26, 115, 232, 0.24);
}

.sqm-name-gate__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(26, 115, 232, 0.28);
}

/* ── Identity-confirm modal ─────────────────────────────────────── */
.sqm-identity-confirm {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(15, 23, 42, 0.60);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.sqm-identity-confirm__dialog {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.28);
    padding: 32px 28px 24px;
    box-sizing: border-box;
    text-align: center;
    animation: sqmSlideUp 0.22s ease;
}

.sqm-identity-confirm__label {
    margin: 0 0 6px;
    font-size: 0.92rem;
    color: var(--sqm-text-muted, #64748b);
    font-weight: 500;
}

.sqm-identity-confirm__name {
    margin: 0 0 28px;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--sqm-text, #0f172a);
    word-break: break-word;
    line-height: 1.2;
}

.sqm-identity-confirm__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sqm-identity-confirm__ok {
    min-height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sqm-primary, #1a73e8) 0%, #0f5ed7 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.22);
}

.sqm-identity-confirm__ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(26, 115, 232, 0.32);
}

.sqm-identity-confirm__change {
    min-height: 44px;
    border: 1.5px solid var(--sqm-border, #e2e8f0);
    border-radius: 12px;
    background: none;
    color: var(--sqm-text-muted, #64748b);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.sqm-identity-confirm__change:hover {
    border-color: var(--sqm-text, #0f172a);
    color: var(--sqm-text, #0f172a);
}

@media (max-width: 640px) {
    .sqm-identity-confirm__dialog {
        padding: 24px 18px 20px;
    }
    .sqm-identity-confirm__name {
        font-size: 1.3rem;
    }
}

.sqm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: sqmFadeIn 0.18s ease;
}
@keyframes sqmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sqm-modal-overlay > .sqm-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 520px;
    padding: 40px 36px 32px;
    animation: sqmSlideUp 0.22s ease;
    box-sizing: border-box;
}
@keyframes sqmSlideUp {
    from { transform: translateY(28px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.sqm-modal-overlay > .sqm-modal .sqm-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--sqm-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--sqm-transition), color var(--sqm-transition);
}
.sqm-modal-overlay > .sqm-modal .sqm-modal__close:hover { background: #f0f0f0; color: var(--sqm-text); }

.sqm-modal__header { margin-bottom: 24px; }
.sqm-modal__title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--sqm-text);
}
.sqm-modal__subtitle {
    font-size: 0.9rem;
    color: var(--sqm-text-muted);
    margin: 0;
}

.sqm-modal__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.sqm-modal__table th,
.sqm-modal__table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--sqm-border);
}
.sqm-modal__table th {
    font-weight: 700;
    color: var(--sqm-text);
    white-space: nowrap;
    width: 40%;
    background: #f9f9f9;
}
.sqm-modal__table td { color: var(--sqm-text-muted); }
.sqm-modal__table tr:last-child th,
.sqm-modal__table tr:last-child td { border-bottom: none; }

.sqm-modal__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.sqm-modal__cancel {
    background: none;
    border: 1.5px solid var(--sqm-border);
    border-radius: var(--sqm-radius-sm);
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sqm-text-muted);
    cursor: pointer;
    transition: border-color var(--sqm-transition), color var(--sqm-transition);
}
.sqm-modal__cancel:hover { border-color: var(--sqm-text); color: var(--sqm-text); }

.sqm-modal__success {
    text-align: center;
    padding: 20px 0 4px;
}
.sqm-modal__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    animation: sqmPop 0.3s ease;
}
@keyframes sqmPop {
    0%   { transform: scale(0.6); opacity: 0; }
    80%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}
.sqm-modal__success-msg {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2e7d32;
    margin: 0;
}

/* =============================================================================
   FLOATING "MY ORDERS" FAB BUTTON
   ============================================================================= */
.sqm-orders-fab {
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    z-index: 2147483647 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 20px 13px 16px;
    background: var(--sqm-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(26,115,232,0.38);
    transition: background var(--sqm-transition), transform var(--sqm-transition), box-shadow var(--sqm-transition);
    line-height: 1;
    white-space: nowrap;
}
.sqm-orders-fab:hover {
    background: var(--sqm-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,115,232,0.46);
}
.sqm-orders-fab__label { letter-spacing: 0.01em; }
.sqm-orders-fab__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #e53935;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    line-height: 1;
}

/* =============================================================================
   ORDERS SHEET / RIGHT-SIDE DRAWER
   ============================================================================= */
.sqm-sheet-overlay {
    position: fixed !important;
    inset: 0;
    z-index: 2147483645 !important;
    background: rgba(0,0,0,.40);
    animation: sqmFadeIn 0.18s ease;
}

.sqm-orders-sheet {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2147483646 !important;
    width: 420px;
    max-width: 95vw;
    height: 100vh !important;
    max-height: 100vh !important;
    background: #fff;
    box-shadow: -6px 0 32px rgba(0,0,0,.16);
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.sqm-orders-sheet--open { transform: translateX(0); }

body.sqm-sheet-open { overflow: hidden; }

/* Sheet header */
.sqm-orders-sheet__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 20px 16px;
    border-bottom: 1px solid var(--sqm-border);
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    min-height: 0;
    box-sizing: border-box;
}
.sqm-orders-sheet__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 3px;
    color: var(--sqm-text);
}
.sqm-orders-sheet__count {
    font-size: 0.8rem;
    color: var(--sqm-text-muted);
    margin: 0;
}
.sqm-orders-sheet__header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.sqm-sheet-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--sqm-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--sqm-transition);
}
.sqm-sheet-close:hover { background: #f0f0f0; color: var(--sqm-text); }
.sqm-sheet-clear {
    background: none;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #d32f2f;
    cursor: pointer;
    transition: background var(--sqm-transition), border-color var(--sqm-transition);
}
.sqm-sheet-clear:hover { background: #fce4e4; border-color: #d32f2f; }

.sqm-sheet-switch-user {
    background: none;
    border: 1.5px solid #d7e4fb;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a73e8;
    cursor: pointer;
    transition: background var(--sqm-transition), border-color var(--sqm-transition), color var(--sqm-transition);
}
.sqm-sheet-switch-user:hover {
    background: #eef4ff;
    border-color: #1a73e8;
    color: #1257b8;
}

/* Sheet list (scrollable) */
.sqm-orders-sheet__list {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 16px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    box-sizing: border-box;
    /* Fade at top & bottom to hint more content */
    --fade-h: 24px;
    background:
        linear-gradient(to bottom, #fff var(--fade-h), transparent var(--fade-h)),
        linear-gradient(to top,    #fff var(--fade-h), transparent var(--fade-h)),
        linear-gradient(to bottom, rgba(0,0,0,.06) 0, transparent var(--fade-h)),
        linear-gradient(to top,    rgba(0,0,0,.06) 0, transparent var(--fade-h));
    background-attachment: local, local, scroll, scroll;
}
/* Thin branded scrollbar (WebKit) */
.sqm-orders-sheet__list::-webkit-scrollbar {
    width: 5px;
}
.sqm-orders-sheet__list::-webkit-scrollbar-track {
    background: transparent;
}
.sqm-orders-sheet__list::-webkit-scrollbar-thumb {
    background: var(--sqm-primary);
    border-radius: 99px;
    opacity: 0.6;
}
.sqm-orders-sheet__list::-webkit-scrollbar-thumb:hover {
    opacity: 1;
    background: var(--sqm-primary-dark, #0d47a1);
}
/* Firefox */
.sqm-orders-sheet__list {
    scrollbar-width: thin;
    scrollbar-color: var(--sqm-primary) transparent;
}

/* Empty state */
.sqm-orders-sheet__empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--sqm-text-muted);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.95rem;
}
.sqm-orders-sheet__empty-icon {
    font-size: 2.8rem;
    margin-bottom: 14px;
    opacity: 0.5;
}

/* Individual order card inside the sheet */
.sqm-order-card {
    background: #f9f9f9;
    border: 1px solid var(--sqm-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sqm-order-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    background: var(--sqm-primary);
    color: #fff;
}
.sqm-order-card__num {
    font-size: 0.82rem;
    font-weight: 700;
    flex: 1;
}
.sqm-order-card__date {
    font-size: 0.75rem;
    opacity: 0.85;
}
.sqm-order-card__del {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.sqm-order-card__del:hover { color: #fff; background: rgba(255,255,255,0.2); }

.sqm-order-card__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.sqm-order-card__table th,
.sqm-order-card__table td {
    padding: 7px 12px;
    text-align: left;
    border-bottom: 1px solid #ebebeb;
}
.sqm-order-card__table th {
    font-weight: 700;
    color: var(--sqm-text);
    width: 42%;
    white-space: nowrap;
}
.sqm-order-card__table td { color: var(--sqm-text-muted); }
.sqm-order-card__table tr:last-child th,
.sqm-order-card__table tr:last-child td { border-bottom: none; }

.sqm-submitted-order {
    background: #fff;
    border: 1px solid #c7e4ca;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sqm-submitted-order__head {
    padding: 12px 14px;
    background: #e8f5e9;
    border-bottom: 1px solid #c7e4ca;
}
.sqm-submitted-order__title {
    margin: 0;
    color: #2e7d32;
    font-size: 0.98rem;
    line-height: 1.3;
}
.sqm-submitted-order__meta {
    margin: 4px 0 0;
    color: #315c35;
    font-size: 0.82rem;
    line-height: 1.4;
}
.sqm-submitted-order__table-wrap {
    overflow-x: auto;
}
.sqm-submitted-order__table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.sqm-submitted-order__table th,
.sqm-submitted-order__table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #edf2ed;
    vertical-align: top;
}
.sqm-submitted-order__table th {
    background: #f6fbf6;
    color: var(--sqm-text);
    font-weight: 700;
    white-space: nowrap;
}
.sqm-submitted-order__table td {
    color: var(--sqm-text-muted);
}
.sqm-submitted-order__table tr:last-child td {
    border-bottom: none;
}

/* ── Submit All Orders button + message ─────────────────────────────── */
.sqm-orders-sheet__submit-wrap {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--sqm-border);
    background: #fff;
    flex-shrink: 0;
}
.sqm-sheet-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}
.sqm-sheet-submit-btn:hover:not(:disabled) { background: #2a5080; }
.sqm-sheet-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.sqm-orders-sheet__submit-msg {
    margin: 10px 0 0;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.4;
}
.sqm-orders-sheet__submit-msg--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.sqm-orders-sheet__submit-msg--error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

@media (max-width: 640px) {
    .sqm-name-gate {
        padding: 14px;
    }

    .sqm-name-gate__dialog {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }

    .sqm-name-gate__title {
        font-size: 1.3rem;
    }

    .sqm-modal-overlay {
        padding: 14px;
        align-items: flex-end;
    }

    .sqm-modal-overlay > .sqm-modal {
        max-width: none;
        padding: 28px 18px 22px;
        border-radius: 18px;
    }

    .sqm-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .sqm-modal__footer > * {
        width: 100%;
    }
}

/* =============================================================================
   CUSTOM CONTACT / QUOTE FORM  [sqm_contact_form]
   ============================================================================= */
.sqm-contact-wrap {
    max-width: 680px;
    margin: 0 auto;
}

.sqm-contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Two-column row */
.sqm-form-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sqm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sqm-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sqm-text);
}

.sqm-required {
    color: #d32f2f;
    margin-left: 3px;
}

/* All inputs, selects, textarea share this base */
.sqm-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--sqm-border);
    border-radius: var(--sqm-radius-sm);
    font-size: 0.95rem;
    color: var(--sqm-text);
    background: #fff;
    transition: border-color var(--sqm-transition), box-shadow var(--sqm-transition);
    box-sizing: border-box;
    font-family: inherit;
}
.sqm-input:focus {
    outline: none;
    border-color: var(--sqm-primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}
.sqm-input.sqm--error {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211,47,47,0.12);
}

.sqm-select { cursor: pointer; -webkit-appearance: auto; }

.sqm-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.sqm-input-hint {
    font-size: 0.78rem;
    color: var(--sqm-primary);
    margin: 0;
    font-style: italic;
}

/* Submit row */
.sqm-form-row--submit { margin-top: 6px; }

.sqm-submit-btn {
    /* inherits sqm-btn sqm-btn--primary sqm-btn--lg */
    min-width: 200px;
}

/* Notice banners (success / error) */
.sqm-form-notice {
    padding: 14px 18px;
    border-radius: var(--sqm-radius-sm);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 20px;
}
.sqm-form-notice--success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}
.sqm-form-notice--error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}

/* Responsive: stack 2-col on mobile */
@media (max-width: 600px) {
    .sqm-form-row--2col {
        grid-template-columns: 1fr;
    }
    .sqm-submit-btn {
        width: 100%;
    }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
    .sqm-banner { padding: 36px 0 30px; }
    .sqm-banner__inner { flex-direction: column; gap: 24px; }
    .sqm-banner__logo { max-width: 140px; order: -1; }
    .sqm-company-banner { padding: 36px 0 28px; }
    .sqm-company-banner__inner { flex-direction: column; gap: 20px; }
    .sqm-company-banner__logo { max-width: 140px; order: -1; }
    .sqm-service-detail__inner { grid-template-columns: 1fr; gap: 32px; }
    .sqm-service-detail__img { height: 260px; }
    .sqm-cards-grid { grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
}
@media (max-width: 480px) {
    .sqm-cards-grid { grid-template-columns: 1fr; }
    .sqm-btn--lg { width: 100%; padding: 14px 20px; }
    .sqm-service-detail__img { height: 200px; }
    .sqm-quote-form__select { max-width: 100%; }
}

/* =============================================================================
   COMPANY PRODUCTS PAGE  (taxonomy-sqm_company.php)
   ============================================================================= */
.sqm-company-products {
    padding: 52px 0 64px;
}

/* Product card flex row */
.sqm-company-products .sqm-products-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 28px;
}

/* Single product card */
.sqm-company-products .sqm-product-card {
    flex: 0 0 calc(25% - 21px) !important;   /* 4 per row on wide screens */
    min-width: 200px;
    max-width: 100%;
    display: flex !important;
    flex-direction: column;
    border-radius: var(--sqm-radius);
    overflow: hidden;
    box-shadow: var(--sqm-shadow);
    transition: box-shadow var(--sqm-transition), transform var(--sqm-transition);
}
.sqm-company-products .sqm-product-card:hover {
    box-shadow: var(--sqm-shadow-hover);
    transform: translateY(-4px);
}

/* Card image — top */
.sqm-product-card__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}
.sqm-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--sqm-transition);
}
.sqm-product-card:hover .sqm-product-card__img { transform: scale(1.04); }
.sqm-product-card__no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8edf2 0%, #d1d9e0 100%);
}

/* Card body — bottom */
.sqm-product-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.sqm-product-card__title {
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    min-height: calc(1.3em * 2);
}

.sqm-product-card__ref {
    margin: 0;
    font-size: 0.82rem;
    color: var(--sqm-text-muted);
}
.sqm-product-card__ref-label {
    font-weight: 700;
    color: var(--sqm-text);
    margin-right: 3px;
}

/* Qty + Size side by side */
.sqm-product-card__fields {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}
.sqm-product-card__field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sqm-product-card__field-group--grow { flex: 1; }
.sqm-product-card__field-group .sqm-quote-form__select { max-width: 100%; width: 100%; }

/* =============================================================================
   ORDER PLACED TOAST  (bottom-right, auto-hides)
   ============================================================================= */
.sqm-modal {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 99999;
    display: flex;          /* toggled by JS */
    align-items: stretch;
    pointer-events: none;
}

/* No overlay for toast style */
.sqm-modal__overlay { display: none; }

.sqm-modal__box {
    pointer-events: all;
    position: relative;
    background: linear-gradient(135deg, #14532d 0%, #22c55e 100%);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(34,197,94,0.40), 0 2px 8px rgba(0,0,0,0.18);
    padding: 22px 28px 20px;
    min-width: 280px;
    max-width: 340px;
    width: calc(100vw - 64px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: sqmToastIn 0.38s cubic-bezier(.34,1.46,.64,1) both;
}

/* Progress bar that drains in 2.5 s */
.sqm-modal__box::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255,255,255,0.55);
    border-radius: 0 0 14px 14px;
    width: 100%;
    animation: sqmToastBar 2.5s linear forwards;
    transform-origin: left;
}

@keyframes sqmToastIn {
    from { opacity: 0; transform: translateY(60px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes sqmToastOut {
    from { opacity: 1; transform: translateY(0)    scale(1); }
    to   { opacity: 0; transform: translateY(60px) scale(0.92); }
}

@keyframes sqmToastBar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Toast header row: icon + title */
.sqm-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sqm-modal__icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
}

.sqm-modal__icon svg { stroke: #fff; }

.sqm-modal__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.sqm-modal__message {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
    line-height: 1.55;
    padding-left: 50px;   /* align under title */
}

/* Hide close button — toast auto-dismisses */
.sqm-modal__close { display: none; }

/* =============================================================================
   RESPONSIVE — Company Products Page + Toast
   ============================================================================= */
@media (max-width: 1100px) {
    .sqm-company-products .sqm-product-card { flex: 0 0 calc(33.33% - 19px) !important; }  /* 3 per row */
}

@media (max-width: 760px) {
    .sqm-company-products .sqm-product-card { flex: 0 0 calc(50% - 14px) !important; }      /* 2 per row */
}

@media (max-width: 480px) {
    .sqm-company-products .sqm-products-grid { gap: 16px; }
    .sqm-company-products .sqm-product-card { flex: 0 0 100% !important; }                   /* 1 per row */
    .sqm-modal { bottom: 16px; right: 16px; }
    .sqm-modal__box { min-width: unset; max-width: unset; width: calc(100vw - 32px); }
}

/* Order Status Badges */
.sqm-order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.sqm-order-status--pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.sqm-order-status--submitted {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* Submitted order card styling */
.sqm-order-card--submitted {
    opacity: 0.92;
    border-left: 4px solid #22c55e;
}

.sqm-order-card--submitted .sqm-order-card__table {
    color: #555;
}
