/* Explain: Styling for various UI components including buttons, cards, product gallery, and forms. */
/* ---------- Buttons ---------- */
.btn-primary,
.btn-accent,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.btn-accent {
    background: var(--accent-color);
    color: #ffffff;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: var(--surface-color);
    color: var(--primary-color);
}

.btn-light {
    background: #ffffff;
    color: var(--primary-color);
}

.btn-light:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.btn-lg {
    padding: 0.95rem 1.75rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
}

/* ---------- Section helpers ---------- */
.section-eyebrow {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.section-title {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(20, 23, 26, 0.96) 0%, rgba(43, 47, 52, 0.88) 52%, rgba(43, 47, 52, 0.6) 100%);
}

.stat-card {
    border-left: 3px solid var(--accent-color);
    padding-left: 0.9rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.stat-label {
    font-size: 0.8rem;
    color: #c3c7cc;
}

/* ---------- Cards ---------- */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
    border-color: #c4d2de;
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.category-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.category-card img {
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-card-body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, rgba(20, 23, 26, 0) 0%, rgba(20, 23, 26, 0.92) 70%);
    color: #ffffff;
}

.value-card {
    height: 100%;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.industry-copy {
    white-space: pre-line;
}

.industry-copy br + br {
    content: "";
}

.icon-badge {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    color: var(--primary-color);
    font-size: 1.15rem;
}

/* ---------- Chips ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- Spec list ---------- */
.spec-list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.spec-row {
    display: grid;
    grid-template-columns: minmax(130px, 40%) 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.spec-row:last-child {
    border-bottom: 0;
}

.spec-row:nth-child(odd) {
    background: var(--surface-color);
}

.spec-row dt {
    font-weight: 600;
    color: var(--text-color);
}

.spec-row dd {
    margin: 0;
    color: var(--text-muted);
}

/* ---------- FAQ ---------- */
.faq-item {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.faq-item + .faq-item {
    margin-top: 0.7rem;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary i {
    color: var(--accent-color);
    transition: transform 0.25s ease;
}

.faq-item[open] summary i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.15rem 1.15rem;
    color: var(--text-body);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ---------- Prose (guides + product descriptions) ---------- */
.prose-guide {
    color: var(--text-body);
}

.prose-guide h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.prose-guide h2:first-child {
    margin-top: 0;
}

.prose-guide h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.prose-guide p {
    margin: 0 0 1rem;
    line-height: 1.75;
}

.prose-guide ul,
.prose-guide ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.prose-guide ul {
    list-style: disc;
}

.prose-guide ol {
    list-style: decimal;
}

.prose-guide li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.prose-guide strong {
    color: var(--text-color);
}

/* ---------- Forms ---------- */
.field {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 47, 52, 0.15);
}

.field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

/* ---------- Floating button ---------- */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background-color 0.25s ease;
}

.back-to-top:hover {
    background: var(--accent-color);
    color: #ffffff;
}

/* ---------- Quote list (cart) ---------- */
.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--primary-color);
    font-size: 1.05rem;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cart-btn:hover {
    border-color: var(--primary-color);
    background: var(--surface-color);
}

.cart-count {
    position: absolute;
    top: -0.4rem;
    right: -0.4rem;
    display: inline-block;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--accent-color);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.is-added {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: #ffffff !important;
}

.quote-list {
    display: grid;
    gap: 0.75rem;
}

.quote-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.quote-thumb {
    flex-shrink: 0;
    width: 84px;
    height: 63px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-color);
}

.quote-info {
    flex: 1 1 200px;
    min-width: 0;
}

.quote-name {
    margin: 0.35rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.quote-meta {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quote-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: underline;
}

.quote-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin-left: auto;
}

.quote-qty {
    display: flex;
    flex-direction: column;
}

.qty-input {
    width: 4.75rem;
    text-align: center;
}

.quote-remove {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--danger-color);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.quote-remove:hover {
    border-color: var(--danger-color);
    background: #fef2f2;
}

/* ---------- Video feature ---------- */
.video-frame {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #000000;
    box-shadow: var(--shadow-md);
}

.video-embed {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.video-poster {
    position: relative;
    display: block;
}

.video-poster img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.25);
    transition: background-color 0.25s ease;
}

.video-poster:hover .video-play {
    background: rgba(15, 23, 42, 0.4);
}

.video-play i {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    padding-left: 0.25rem;
    border-radius: 999px;
    background: var(--accent-color);
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
    transition: transform 0.25s ease;
}

.video-poster:hover .video-play i {
    transform: scale(1.08);
}

/* ---------- Product gallery ---------- */
.product-gallery {
    display: grid;
    gap: 0.75rem;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    aspect-ratio: 4 / 3;
}

.gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-spinner {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-color);
    font-size: 1.6rem;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.gallery-thumb {
    width: 5.25rem;
    height: 4rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    border-color: var(--accent-color);
}

.gallery-thumb.is-active {
    border-color: var(--primary-color);
}