/* ThinTech Concrete Coating page — TIZ-248. Scoped styles for the blocks the
   standard product template does not provide: hero tagline, safety callout,
   choose-your-size table, size calculator, and the 6-step application grid.
   Brand blue #2f63e8 and greys match the rest of the site (TIZ-158). */

.product-tagline {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 16px;
    color: #5b6e88;
}
.product-tagline strong { color: #1b2430; }

/* Safety callout (warning box) */
.safety-callout {
    border: 2px solid #a4231b;
    border-radius: 8px;
    padding: 12px 16px;
    background: #fdf4f3;
    font-size: 14px;
    line-height: 1.5;
}
.safety-callout strong { color: #a4231b; }

/* Note text */
.note {
    color: #5b6e88;
    font-size: 13.5px;
    margin: 6px 0 0;
}

/* Choose your size */
.choose-size table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.choose-size th,
.choose-size td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid #d6dce4;
}
.choose-size th {
    background: #eef2f6;
    font-weight: 700;
}
.choose-size tbody tr:hover { background: #f7f9fb; }

/* Size calculator */
.cc-calc {
    border: 2px solid #2f63e8;
    border-radius: 10px;
    padding: 16px 18px;
    max-width: 560px;
}
.cc-calc label {
    display: block;
    font-weight: 600;
    margin: 10px 0 4px;
}
.cc-calc label:first-child { margin-top: 0; }
.cc-calc input,
.cc-calc select {
    width: 100%;
    padding: 9px 10px;
    font-size: 15px;
    border: 1px solid #d6dce4;
    border-radius: 6px;
    background: #fff;
}
.cc-calc .cc-out {
    margin-top: 14px;
    background: #eef2f6;
    border-radius: 6px;
    padding: 12px 14px;
    line-height: 1.6;
}
.cc-calc .cc-big {
    font-size: 20px;
    font-weight: 700;
    color: #1b2430;
}

/* 6-step application guide */
.apply-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.apply-step {
    border: 1px solid #d6dce4;
    border-radius: 10px;
    padding: 16px;
}
.apply-step .apply-n {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background: #2f63e8;
    color: #fff;
    font-weight: 700;
}
.apply-step h4 {
    margin: 10px 0 6px;
    font-size: 17px;
}
.apply-step p {
    margin: 0;
    font-size: 14.5px;
    color: #39434f;
    line-height: 1.5;
}

@media (max-width: 991px) {
    .apply-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
    .apply-steps { grid-template-columns: 1fr; }
}

/* Select chevron — match the site's add-to-cart variant select (product.css) */
.cc-calc select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M6 8 0 2 1.4.6 6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Lower sections: tighten the vertical rhythm and give the sizing block a subtle
   grey panel so each section reads as distinct (TIZ-248 review feedback). */
.thintech-page .ttc-sizing { background: #f3f6f9; }
.thintech-page .ttc-apply { background: #f7f9fb; }
.thintech-page .ttc-sizing,
.thintech-page .ttc-apply,
.thintech-page .ttc-faq {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* Single main product photo that swaps to the selected size/kit (TIZ-256, Sasha 2026-11-06).
   One fixed box holds both aspect ratios — portrait singles (~640×1200) and square kits
   (1200×1200) — via object-fit:contain, so the column height stays stable when the photo
   swaps. A short opacity fade (is-swapping) covers the load of the next photo. */
/* The buy box makes the right column tall (~1000px), so the photo alone left a large empty gap
   below it. The media column is a flex box and the figure is sticky + vertically centered: the
   photo sits centred in a tall panel and then rides along (pinned near the top) as the buy box
   is scrolled, so the left column reads as balanced instead of half-empty. */
.product-template .ttc-media-col { display: flex; }
.product-template .ttc-figure {
    position: sticky;
    top: 86px;                   /* clear the 70px fixed header + a small gap */
    align-self: flex-start;      /* required for sticky inside the flex column */
    width: 100%;
    margin: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 720px;           /* centres the (up to 640px) photo with air above/below */
}
.product-template .ttc-figure > img {
    width: auto;
    max-width: 100%;
    max-height: 640px;
    margin: 0 auto;
    object-fit: contain;
    transition: opacity 0.25s ease;
}
.product-template .ttc-figure > img.is-swapping { opacity: 0.35; }

@media (max-width: 767px) {
    /* Stacked layout: photo above the content — no sticky, smaller panel. */
    .product-template .ttc-figure {
        position: static;
        min-height: 320px;
    }
    .product-template .ttc-figure > img { max-height: 420px; }
}

/* ============================================================================
   TIZ-256 buy box (Katya redesign): coating/kit toggle, selectable size & kit
   cards, quantity stepper, dynamic CTA, and the "Complete the job" cross-sell.
   Values replicate the design mockup; accent uses the site brand blue #2f63e8.
   ============================================================================ */
.ttc-buybox {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Thin grey divider (matches the design) — used above "What do you need?" and "Complete the job".
   In the buy box it is a flex item, so the 16px column gap gives its spacing on both sides. */
.ttc-rule {
    height: 1px;
    background: #e6eaf0;
    border: 0;
    margin: 0;
}

/* Mode toggle (segmented control) */
.ttc-mode { display: flex; flex-direction: column; gap: 8px; }
.ttc-mode-q { font-size: 14px; font-weight: 700; color: #1b2430; }
.ttc-segment {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    background: #f1f4f8;
    padding: 4px;
    border-radius: 10px;
}
/* Sliding highlight: a single white pill that animates between the two segments
   instead of the active button repainting instantly. Position is driven by the
   data-active attribute (set by thintech-buy.js) so it matches the chosen tab. */
.ttc-segment::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 12px) / 2);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
    transform: translateX(0);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}
.ttc-segment[data-active="kit"]::before {
    transform: translateX(calc(100% + 4px));
}
.ttc-seg {
    position: relative;
    z-index: 1;
    border: 0;
    border-radius: 8px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #3b4657;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}
.ttc-seg.is-active {
    color: #1b2430;
    font-weight: 800;
}
.ttc-seg-sub { font-weight: 600; color: #5b6e88; }
.ttc-mode-note { margin: 0; font-size: 13px; color: #5b6e88; }

/* Card groups.
   Switching tabs cross-fades the leaving/entering group and smoothly resizes the
   wrapper between their two heights, so neither the cards nor the CTA panel below
   jump. thintech-buy.js overlaps the groups (is-leaving / is-entering) and animates
   the wrapper height; CSS here only declares the transitions. */
.ttc-groups {
    position: relative;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ttc-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.25s ease;
}
.ttc-group.is-leaving {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
}
.ttc-group.is-entering { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .ttc-segment::before { transition: none; }
    .ttc-groups { transition: none; }
    .ttc-group { transition: none; }
    .ttc-sel-frame { transition: none; }
    .ttc-card { transition: none; }
    .ttc-cta-total { transition: none; }
    .product-template .ttc-figure > img { transition: none; }
}
.ttc-group-label { font-size: 14px; font-weight: 700; color: #1b2430; }
.ttc-cards {
    position: relative; /* anchor for the sliding selection frame */
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.ttc-cards-kit { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Sliding selection frame: one overlay per card group that animates (moves + resizes)
   onto the selected card, so selection glides between cards instead of the blue border
   jumping. thintech-buy.js positions it from the selected card's box; CSS animates it.
   The cards themselves no longer draw the selected border — only this frame does. */
.ttc-sel-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    box-sizing: border-box;
    border: 2px solid #2f63e8;
    border-radius: 12px;
    box-shadow: 0 0 0 3px rgba(47, 99, 232, 0.12);
    background: transparent;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    transform: translate(0, 0);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
}
.ttc-sel-frame.is-ready { opacity: 1; }
.ttc-sel-frame.is-noanim { transition: none; }

.ttc-card {
    position: relative;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 2px solid #d6dce5;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 44px;
    transition: background-color 0.25s ease, border-color 0.2s ease;
}
.ttc-card:hover { border-color: #b9c2d0; }
/* The blue border + shadow are drawn by the sliding .ttc-sel-frame overlay (so selection
   can animate between cards); the selected card only gets the light tint, cross-faded. */
.ttc-card.is-selected {
    background: #f5f8ff;
}
.ttc-card.is-oos { cursor: default; opacity: 0.85; }
.ttc-card.is-oos:hover { border-color: #d6dce5; }

.ttc-badge {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 800;
    border-radius: 999px;
    padding: 3px 9px;
    margin-bottom: 2px;
}
.ttc-badge-green { color: #0f7a3d; background: #e8f5ee; }
.ttc-badge-blue { color: #2f63e8; background: #e8effe; }
.ttc-badge-grey { color: #3b4657; background: #eef1f5; }

.ttc-card-name { font-size: 15px; font-weight: 800; color: #1b2430; }
.ttc-card-price { font-size: 20px; font-weight: 800; color: #1b2430; }
.ttc-card-unit { font-size: 12.5px; color: #5b6e88; }
.ttc-card-oos {
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 700;
    color: #a4231b;
}

/* Kit card contents list */
.ttc-kit-items { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.ttc-kit-item {
    display: flex;
    gap: 6px;
    font-size: 13px;
    line-height: 1.3;
    color: #3b4657;
}
.ttc-kit-tick { color: #0f7a3d; font-weight: 800; }

/* Quantity + CTA panel */
.ttc-cta-panel {
    border: 1px solid #e6eaf0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ttc-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.ttc-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #c9d2de;
    border-radius: 10px;
}
.ttc-qty-btn {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #1b2430;
}
.ttc-qty-val { min-width: 28px; text-align: center; font-weight: 800; font-size: 16px; }
.ttc-cta-sel { flex: 1 1 150px; display: flex; flex-direction: column; min-width: 0; }
.ttc-cta-sellabel { font-size: 13px; color: #5b6e88; }
.ttc-cta-total {
    font-size: 22px;
    font-weight: 800;
    color: #1b2430;
    display: inline-block;
    transform-origin: left center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}
/* Brief emphasis while the amount counts up to its new value (thintech-buy.js). */
.ttc-cta-total.is-bump { transform: scale(1.08); color: #2f63e8; }
.ttc-cta {
    flex: 1 1 180px;
    min-height: 52px;
    font-size: 16px;
    font-weight: 800;
}
.ttc-cta.is-disabled,
.ttc-cta:disabled { background: #c9d2de; border-color: #c9d2de; cursor: default; }
.ttc-cta-note { margin: 0; font-size: 13px; color: #5b6e88; }

.ttc-toast {
    font-size: 14px;
    font-weight: 700;
    color: #0f7a3d;
    background: #e8f5ee;
    border-radius: 8px;
    padding: 10px 12px;
}
.ttc-toast.is-error { color: #a4231b; background: #fdf4f3; }
.ttc-toast a { color: inherit; text-decoration: underline; }

/* Trust row */
.ttc-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: #3b4657;
}

/* Preorder form: size+quantity on one row inside the modal. */
.preorder-intro {
    font-size: 14px;
    color: #5b6e88;
    margin-bottom: 14px;
}

@media (max-width: 575px) {
    .ttc-cards { grid-template-columns: 1fr 1fr; }
    .ttc-cards-kit { grid-template-columns: 1fr; }
    .ttc-cta { flex: 1 0 100%; }
}
