/* Soviterenkaat.fi — Uusi ulkoasu 2026
 * Mockup v6 → tuotanto-CSS
 */

/* Reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
}
a { color: #e37119; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* === HEADER === */
.site-header { background: #1a1a2e; color: white; padding: 0; border-bottom: 3px solid #e37119; clear: both; }
.site-header-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; gap: 8px; max-width: 1100px; margin: 0 auto; position: relative; }
.site-logo { cursor: pointer; flex-shrink: 0; text-decoration: none; }
.site-logo img { height: 32px; }
.site-logo-text { font-family: 'Libre Franklin', 'Franklin Gothic Heavy', 'Arial Black', sans-serif; font-size: 1.5rem; font-weight: 900; color: #e37119; letter-spacing: -0.5px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex: 1; min-width: 0; }
.site-nav a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; padding: 6px 8px; border-radius: 6px; white-space: nowrap; transition: all 0.15s; }
.site-nav a:hover, .site-nav a.active { color: white; background: rgba(255,255,255,0.1); }


.site-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cart-link { color: white; text-decoration: none; position: relative; font-size: 1.5rem; width: 40px; height: 40px; border-radius: 8px; transition: background 0.15s; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); }
.cart-link:hover { background: rgba(255,255,255,0.15); }
.cart-badge { position: absolute; top: -4px; right: -2px; background: #e53935; color: white; font-size: 0.65rem; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #1a1a2e; }

@media(max-width:768px) {
  input, select, textarea { font-size: 16px !important; }
  .cart-text { display: none; }
  .page-wrap { padding: 0; gap: 4px; }
  .content-section, .sp-section, .product-buy, .product-details, .product-custom-banner { padding: 6px 0; border-radius: 0; border-left: none; box-shadow: none; margin: 0; } .search-card { border-radius: 0; border-width: 3px 0; margin: 0; box-shadow: none; }
}
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; padding: 4px; }
@media (max-width: 767px) {
  .site-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .site-logo { flex-shrink: 1; min-width: 0; overflow: hidden; }
  .site-logo img { height: auto; max-width: 180px; }
  .site-nav.open { display: flex; position: absolute; top: 48px; left: 0; right: 0; background: #1a1a2e; flex-direction: column; padding: 8px 16px 12px; z-index: 50; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
  .site-nav.open a { padding: 10px 12px 18px; }
}

/* === LAYOUT: Two-column === */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) {
  .page-wrap { display: grid; grid-template-columns: minmax(340px, 400px) 1fr; gap: 28px; padding: 24px 0; }
}
.left-col { }
@media (min-width: 768px) {
  .left-col { position: sticky; top: 16px; align-self: start; }
}
.right-col { display: flex; flex-direction: column; gap: 16px; }

/* Layout: plain (no search widget) */
.page-wrap.plain { display: block; max-width: 800px; }

/* Layout: checkout (no search widget, narrow, centered) */
.page-wrap.checkout-wrap { display: block; max-width: 680px; padding: 24px 16px; }

/* === SEARCH WIDGET === */
.search-card { background: white; border-radius: 16px; box-shadow: 0 6px 32px rgba(0,0,0,0.12); overflow: hidden; border: 4px solid #e37119; }
.search-card-header { background: linear-gradient(135deg, #1a1a2e, #2a2040); padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.search-card-header img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(227,113,25,0.4); }
.search-card-header-text { color: white; font-size: 0.92rem; font-weight: 700; }
.search-card-header-sub { color: rgba(255,255,255,0.5); font-size: 0.73rem; }
.search-area { padding: 20px 20px 0; }
.search-area h2 { font-size: 0.95rem; color: #1a1a2e; margin-bottom: 12px; font-weight: 800; }
.search-input-row { display: flex; gap: 10px; }
.search-input-group { flex: 1; }
.search-input-group label { display: block; font-size: 0.72rem; color: #e37119; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.search-input-group input { width: 100%; padding: 12px 14px; border: 2.5px solid #1a1a2e; border-radius: 10px; font-size: 1.15rem; font-weight: 700; text-align: center; transition: all 0.2s; background: #fafafa; }
.search-input-group input:focus { outline: none; border-color: #e37119; background: #fff; box-shadow: 0 0 0 3px rgba(227,113,25,0.15); }
.search-input-group input::placeholder { color: #aaa; font-weight: 400; }
.search-mm-label { font-size: 0.7rem; color: #888; text-align: center; margin-top: 2px; font-weight: 500; }
.search-help-row { display: flex; justify-content: space-between; padding: 8px 0 0; }
.search-help-row a { font-size: 0.76rem; text-decoration: none; }
.search-help-link { color: #e37119; }
.search-car-link { color: #666; }
.search-divider { height: 2px; background: linear-gradient(to right, #e37119, #f0e0d0, transparent); margin: 14px 0 0; }
.search-results-area { padding: 0 20px 4px; min-height: 40px; }
.search-results-placeholder { padding: 20px 0; text-align: center; color: #ccc; font-size: 1rem; }
.search-results-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 6px; }
.search-results-header h3 { font-size: 1rem; color: #1a1a2e; font-weight: 700; }

/* Compact search (mobile, non-home pages) */
.search-compact-bar { display: none; }
@media (max-width: 767px) {
  .search-card.compact .search-card-header,
  .search-card.compact .search-area,
  .search-card.compact .search-divider,
  .search-card.compact .search-results-area,
  .search-card.compact .search-custom-banner { display: none; }
  .search-card.compact .search-compact-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; }
  .search-compact-bar .compact-text { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; }
  .search-compact-bar .compact-sub { font-size: 0.72rem; color: #888; }
  .search-compact-bar .compact-arrow { font-size: 1.2rem; color: #e37119; transition: transform 0.2s; }
  .search-card.compact.expanded .search-card-header,
  .search-card.compact.expanded .search-area,
  .search-card.compact.expanded .search-divider,
  .search-card.compact.expanded .search-results-area,
  .search-card.compact.expanded .search-custom-banner { display: block; }
  .search-card.compact.expanded .compact-arrow { transform: rotate(180deg); }
}

/* Product row in search results */
.product-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; margin-bottom: 6px; cursor: pointer; border: 2px solid #e8e8e8; transition: all 0.15s; text-decoration: none; color: inherit; }
.product-row:hover { background: #fef8f3; border-color: #e37119; box-shadow: 0 2px 8px rgba(227,113,25,0.1); text-decoration: none; }
.product-row.exact { border-color: #e37119; background: #fef3eb; box-shadow: 0 2px 8px rgba(227,113,25,0.12); }
.product-left { display: flex; align-items: center; gap: 10px; }
.match-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.match-dot.exact { background: #e37119; }
.match-dot.close { background: #ff9800; }
.product-size { font-size: 0.92rem; font-weight: 700; color: #1a1a2e; }
.product-material { font-size: 0.7rem; color: #999; }
.product-right { display: flex; align-items: center; gap: 10px; }
.product-price { font-size: 0.92rem; font-weight: 700; color: #e37119; white-space: nowrap; }
.add-btn { width: 30px; height: 30px; border-radius: 8px; border: none; background: #1a1a2e; color: white; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; flex-shrink: 0; }
.add-btn:hover { background: #e37119; }

/* Custom order banner in search widget */
.search-custom-banner { background: linear-gradient(135deg, #1a1a2e, #16213e); border-radius: 12px; padding: 14px 16px; margin: 8px 20px 12px; color: white; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: all 0.2s; border: 2px solid #e37119; text-decoration: none; }
.search-custom-banner:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(227,113,25,0.25); text-decoration: none; }
.search-custom-banner-title { font-size: 0.88rem; font-weight: 700; color: white; }
.search-custom-banner-sub { font-size: 0.72rem; color: rgba(255,255,255,0.6); margin-top: 2px; }
.search-custom-banner-price { font-size: 0.88rem; font-weight: 700; color: #e37119; }
.search-custom-banner-arrow { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* === CONTENT SECTIONS === */
.content-section { background: white; border-radius: 12px; padding: 20px 24px; box-shadow: 0 3px 12px rgba(0,0,0,0.07); border-left: 4px solid #e37119; }
.content-section h1 { font-size: 1.2rem; color: #1a1a2e; margin-bottom: 10px; font-weight: 800; border-bottom: 2px solid #f0e0d0; padding-bottom: 8px; }
.content-section h2 { font-size: 1.1rem; color: #1a1a2e; margin-bottom: 10px; font-weight: 800; border-bottom: 2px solid #f0e0d0; padding-bottom: 8px; }
.content-section h3 { font-size: 1rem; color: #1a1a2e; margin-bottom: 8px; font-weight: 700; }
.content-section p { font-size: 0.86rem; color: #555; line-height: 1.6; margin-bottom: 6px; }
.content-section ul, .content-section ol { font-size: 0.86rem; color: #555; line-height: 1.7; padding-left: 20px; margin-bottom: 6px; }
.content-section table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.content-section table th { text-align: left; font-size: 0.75rem; color: #888; padding: 6px 8px; border-bottom: 2px solid #eee; text-transform: uppercase; }
.content-section table td { padding: 8px; border-bottom: 1px solid #f0f0f0; font-size: 0.86rem; }
.content-section table tr:hover { background: #fafafa; }
.content-section img { border-radius: 8px; }

/* Product specs */
.product-specs { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.spec-item { background: #f8f8f8; border-radius: 8px; padding: 10px; text-align: center; }
.spec-label { font-size: 0.68rem; color: #888; text-transform: uppercase; }
.spec-value { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-top: 2px; }
.big-price { font-size: 1.8rem; font-weight: 700; color: #e37119; }
.price-note { font-size: 0.78rem; color: #999; }
.stock-ok { color: #2e7d32; font-size: 1rem; font-weight: 500; margin-top: 6px; }
.stock-no { color: #c62828; font-size: 1rem; font-weight: 500; margin-top: 6px; }

/* Buy button */
.buy-btn { display: inline-block; padding: 14px 28px; background: #e37119; color: white; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 12px; text-align: center; text-decoration: none; transition: background 0.15s; }
.buy-btn:hover { background: #c5600f; text-decoration: none; }

/* Sizes grid */
.sizes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; margin: 8px 0; }
.size-tag { display: block; padding: 8px; background: #f8f8f8; border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: #1a1a2e; cursor: pointer; text-align: center; border: 2px solid #e0e0e0; transition: all 0.15s; text-decoration: none; }
.size-tag:hover { border-color: #e37119; color: #e37119; background: #fef3eb; box-shadow: 0 2px 6px rgba(227,113,25,0.12); text-decoration: none; }

/* Brand tags */
.brand-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.brand-tag { display: inline-block; padding: 5px 12px; background: #f0f0f0; border-radius: 20px; font-size: 0.78rem; color: #555; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.brand-tag:hover { background: #1a1a2e; color: white; text-decoration: none; }

/* Custom features grid */
.custom-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.feature { background: #f8f8f8; border-radius: 8px; padding: 10px; text-align: center; font-size: 0.8rem; border: 1.5px solid #e8e8e8; }
.feature .icon { font-size: 1.3rem; margin-bottom: 4px; }
.feature .label { color: #555; }

/* Form elements */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-group { flex: 1; }
.form-group label { display: block; font-size: 0.75rem; color: #888; margin-bottom: 3px; font-weight: 600; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 0.95rem; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #e37119; }

/* FAQ */
/* vanhat faq-tyylit poistettu — uudet alla rivillä 272+ */
/* vanhat faq-q/faq-a tyylit poistettu */

/* Breadcrumb */
.breadcrumb { font-size: 0.78rem; color: #999; margin-bottom: 12px; }
.breadcrumb a { color: #e37119; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Trust bar */
.trust-bar { display: flex; justify-content: center; gap: 18px; padding: 14px; flex-wrap: wrap; }
.trust-item { font-size: 0.75rem; color: #1a1a2e; display: flex; align-items: center; gap: 5px; background: white; padding: 7px 14px; border-radius: 20px; border: 1.5px solid #e0d5c8; font-weight: 600; }

/* === FOOTER === */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,0.6); padding: 40px 20px 24px; margin-top: 16px; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer-col h4 { color: white; font-size: 0.85rem; margin-bottom: 10px; }
.footer-col a { display: block; color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.8rem; padding: 3px 0; transition: color 0.15s; }
.footer-col a:hover { color: #e37119; }
.footer-col p { font-size: 0.8rem; line-height: 1.6; }
.footer-bottom { max-width: 1100px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.footer-payments { display: flex; gap: 8px; align-items: center; font-size: 0.75rem; }

/* Messages / alerts */
.messages { list-style: none; padding: 0; }
.messages li { padding: 12px 16px; margin-bottom: 8px; border-radius: 8px; font-size: 0.86rem; }
.caution { color: #c62828; }

/* Legacy compatibility */
.lisaysnappi { display: inline-block; padding: 10px 20px; background: #e37119; color: white; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.lisaysnappi:hover { background: #c5600f; }
.vehinta { font-size: 1.5rem; font-weight: 700; color: #e37119; margin: 8px 0; }
.clearing { clear: both; height: 5px; }

/* Mobile table → cards */
@media (max-width: 767px) {
  .content-section table thead { display: none; }
  .content-section table:not(#ostoskoritaulukko), .content-section table:not(#ostoskoritaulukko) tbody, .content-section table:not(#ostoskoritaulukko) tr, .content-section table:not(#ostoskoritaulukko) td { display: block; width: 100%; }
  .content-section table tr { background: #f8f8f8; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; border: 1.5px solid #e8e8e8; }
  .content-section table tr:hover { border-color: #e37119; }
  .content-section table td { padding: 2px 0; border: none; font-size: 0.84rem; }
  .content-section table td:first-child { font-weight: 700; font-size: 0.95rem; color: #1a1a2e; margin-bottom: 4px; }
  .content-section table td[data-label]:before { content: attr(data-label); font-size: 0.68rem; color: #888; text-transform: uppercase; font-weight: 600; margin-right: 6px; }
}

/* === Sizes page === */
.sizes-intro { font-size: 0.9rem; color: #555; line-height: 1.6; margin-bottom: 8px; }
.sizes-intro a { color: #e37119; text-decoration: none; font-weight: 600; }
.sizes-intro a:hover { text-decoration: underline; }

.sizes-group { margin-bottom: 20px; }
.sizes-group-title { font-size: 0.95rem; font-weight: 800; color: #1a1a2e; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 2px solid #f0e0d0; }

.sizes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }

.size-tag { display: flex; flex-direction: column; align-items: center; padding: 10px 8px; background: #f8f8f8; border: 1.5px solid #e0e0e0; border-radius: 10px; text-decoration: none; transition: all 0.15s; cursor: pointer; }
.size-tag:hover { border-color: #e37119; background: #fef3eb; box-shadow: 0 2px 8px rgba(227,113,25,0.12); transform: translateY(-1px); }
.size-tag-size { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; }
.size-tag-price { font-size: 0.75rem; color: #e37119; font-weight: 600; margin-top: 2px; }
.size-tag.out-of-stock .size-tag-stock { color: #999; }

.sizes-footer-cta { text-align: center; margin-top: 24px; padding: 24px; background: linear-gradient(135deg, #1a1a2e, #16213e); border-radius: 12px; color: white; }
.sizes-footer-cta h2 { font-size: 1.1rem; margin-bottom: 8px; color: white; border: none; }
.sizes-footer-cta p { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.cta-button { display: inline-block; padding: 12px 28px; background: #e37119; color: white; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: all 0.2s; }
.cta-button:hover { background: #d06015; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(227,113,25,0.3); }

@media (max-width: 768px) {
  .sizes-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

.sizes-grid-break { grid-column: 1 / -1; height: 8px; }

/* === Car models pages === */
.breadcrumbs { font-size: 0.78rem; color: #888; margin-bottom: 12px; }
.breadcrumbs a { color: #e37119; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
.brand-card { display: block; padding: 16px; background: #f8f8f8; border: 1.5px solid #e0e0e0; border-radius: 10px; text-decoration: none; transition: all 0.15s; }
.brand-card:hover { border-color: #e37119; background: #fef3eb; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(227,113,25,0.12); }
.brand-card-name { font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.brand-card-country { font-size: 0.72rem; color: #999; margin-top: 2px; }
.brand-card-info { font-size: 0.78rem; color: #e37119; margin-top: 6px; font-weight: 600; }

.brand-models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; }
.car-model-card { display: block; padding: 14px 16px; background: #f8f8f8; border: 1.5px solid #e0e0e0; border-radius: 10px; text-decoration: none; transition: all 0.15s; }
.car-model-card:hover { border-color: #e37119; background: #fef3eb; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(227,113,25,0.12); }
.car-model-name { font-size: 0.95rem; font-weight: 700; color: #1a1a2e; }
.car-model-info { font-size: 0.78rem; color: #555; margin-top: 4px; }
.car-model-gens { font-size: 0.75rem; color: #e37119; margin-top: 6px; font-weight: 600; }

.search-link { color: #e37119; text-decoration: none; font-weight: 600; font-size: 1rem; }
.search-link:hover { text-decoration: underline; }

/* === FAQ === */
.faq-list { margin: 8px 0; }
.faq-item { border: 1.5px solid #e8e8e8; border-radius: 10px; margin-bottom: 6px; overflow: hidden; transition: all 0.15s; }
.faq-item:hover { border-color: #e37119; }
.faq-item[open] { border-color: #e37119; background: #fef8f3; }
.faq-question { padding: 12px 16px; font-size: 0.88rem; font-weight: 700; color: #1a1a2e; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 1.2rem; color: #e37119; font-weight: 700; flex-shrink: 0; margin-left: 12px; }
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer { padding: 0 16px 14px; }
.faq-answer p { font-size: 0.84rem; color: #555; line-height: 1.6; margin: 0; }
.faq-anchor { font-size: 0.75rem; color: #ccc; text-decoration: none; margin-left: 6px; }
.faq-anchor:hover { color: #e37119; }
.faq-item:target { border-color: #e37119; background: #fef8f3; }

/* === Custom order page === */
.jscad-container { background: #f8f8f8; border-radius: 12px; border: 1.5px solid #e0e0e0; overflow: hidden; margin: 16px 0; }
#viewerContext { min-height: 280px; }
#priceArea { background: linear-gradient(135deg, #1a1a2e, #16213e); color: white; padding: 16px 20px; border-radius: 12px; margin: 16px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; font-size: 0.95rem; }
#customPrice { color: #e37119; font-size: 1.3rem; }
#priceArea .lisaysnappi, #priceArea button { background: #e37119; color: white; border: none; padding: 10px 24px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
#priceArea button:hover { background: #d06015; transform: translateY(-1px); }

/* Override JSCAD form inputs to match our style */
.jscad-container input[type="number"], .jscad-container input[type="text"] { padding: 8px 12px; border: 2px solid #1a1a2e; border-radius: 8px; font-size: 0.95rem; font-weight: 600; transition: border-color 0.2s; }
.jscad-container input:focus { border-color: #e37119; outline: none; box-shadow: 0 0 0 3px rgba(227,113,25,0.15); }
.jscad-container label { font-size: 1rem; font-weight: 600; color: #1a1a2e; }

/* Custom form (Formi2) styling */
.content-section form input[type="number"] { padding: 8px 12px; border: 2px solid #1a1a2e; border-radius: 8px; font-size: 0.95rem; font-weight: 600; width: 100px; }
.content-section form input[type="number"]:focus { border-color: #e37119; outline: none; box-shadow: 0 0 0 3px rgba(227,113,25,0.15); }
.content-section form input[type="submit"] { background: #e37119; color: white; border: none; padding: 12px 28px; border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; margin-top: 8px; }
.content-section form input[type="submit"]:hover { background: #d06015; transform: translateY(-1px); }

.custom-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.custom-feature { background: #f8f8f8; border-radius: 8px; padding: 10px 12px 18px; text-align: center; font-size: 0.8rem; color: #555; border: 1px solid #e8e8e8; }
.custom-feature strong { display: block; font-size: 0.9rem; color: #1a1a2e; margin-bottom: 2px; }

@media (max-width: 768px) {
  .custom-features { grid-template-columns: 1fr; }
  #priceArea { flex-direction: column; text-align: center; }
}

/* === Custom order page === */
.custom-order-stacked { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.custom-order-form { display: flex; flex-direction: column; gap: 10px; }
.custom-intro { color: #555; font-size: 0.85rem; line-height: 1.4; margin: 0; }

/* Compact field rows */
.custom-fields { display: flex; flex-direction: column; gap: 8px; }

.custom-row-main { display: flex; align-items: flex-end; gap: 6px; }
.custom-row-main .cf-arrow { font-size: 1.2rem; color: #e37119; font-weight: 700; padding-bottom: 8px; }
.cf-group { flex: 1; }
.cf-group label { display: block; font-size: 0.7rem; color: #e37119; text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 2px; }
.cf-input { display: flex; align-items: center; gap: 4px; }
.cf-input input { flex: 1; padding: 10px 8px; border: 2.5px solid #1a1a2e; border-radius: 8px; font-size: 1.1rem; font-weight: 700; text-align: center; background: #fafafa; transition: all 0.2s; width: 100%; min-width: 0; }
.cf-input input:focus { border-color: #e37119; background: white; box-shadow: 0 0 0 3px rgba(227,113,25,0.15); outline: none; }
.cf-input input:disabled { background: #eee; color: #999; border-color: #ccc; }
.cf-input span { font-size: 0.75rem; color: #888; font-weight: 600; }

.custom-row-secondary { display: flex; gap: 6px; align-items: flex-end; }
.cf-group-sm { flex: 1; }
.cf-group-sm label { display: block; font-size: 0.62rem; color: #888; text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 2px; }
.cf-input-sm { display: flex; align-items: center; gap: 3px; }
.cf-input-sm input { flex: 1; padding: 7px 5px; border: 2px solid #ccc; border-radius: 6px; font-size: 0.9rem; font-weight: 600; text-align: center; background: #fafafa; transition: all 0.2s; width: 100%; min-width: 0; }
.cf-input-sm input:focus { border-color: #e37119; background: white; box-shadow: 0 0 0 2px rgba(227,113,25,0.15); outline: none; }
.cf-input-sm span { font-size: 0.68rem; color: #aaa; font-weight: 600; }

/* (removed custom-row-links) */
.cf-tesla { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: #555; cursor: pointer; }
.cf-tesla input { accent-color: #e37119; width: 16px; height: 16px; }

/* Notices */
.custom-notice { padding: 8px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.custom-notice-info { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; }
.custom-notice-info a { color: #166534; font-weight: 700; }
.custom-notice-error { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }

/* Price bar */
.custom-price-bar { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #1a1a2e, #16213e); padding: 14px 18px; border-radius: 12px; border: 2px solid #e37119; gap: 12px; }
.custom-price-left { display: flex; flex-direction: column; gap: 2px; }
.custom-price-label { color: rgba(255,255,255,0.6); font-size: 0.78rem; font-weight: 600; }
.custom-price-amount { color: #e37119; font-size: 1.5rem; font-weight: 800; }
.custom-price-detail { color: rgba(255,255,255,0.5); font-size: 0.72rem; }
.custom-add-btn { background: #e37119; color: white; border: none; padding: 14px 28px; border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.custom-add-btn:hover { background: #d06015; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(227,113,25,0.3); }
.custom-add-btn:disabled { background: #999; cursor: not-allowed; transform: none; box-shadow: none; }

.custom-delivery-note { font-size: 0.78rem; color: #888; text-align: center; }

/* 3D Preview (JSCAD) */
.custom-order-preview { background: white; border: 1.5px solid #e0e0e0; border-radius: 12px; overflow: hidden; }
.custom-order-preview { position: relative; }
.custom-preview-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(26,26,46,0.75); color: white; padding: 4px 14px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; backdrop-filter: blur(4px); }
.custom-order-preview .jscad-container { border: none; border-radius: 0; margin: 0; background: white; min-width: 0; width: 100%; }
.custom-order-preview #viewerContext { min-height: 300px; height: 300px; border: none; margin: 0; }
.custom-order-preview .jscad-container > div:not(#viewerContext):not(#tail) { display: none !important; }
.custom-preview-tip { text-align: center; padding: 6px; font-size: 0.7rem; color: #999; }

/* Features grid */
.custom-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.custom-feature { background: #f8f8f8; border-radius: 8px; padding: 10px 12px 18px; text-align: center; font-size: 0.8rem; color: #555; border: 1px solid #e8e8e8; }
.custom-feature strong { display: block; font-size: 0.9rem; color: #1a1a2e; margin-bottom: 2px; }
.custom-feature span { font-size: 0.75rem; }

/* Pricing table */
.custom-pricing-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.custom-pricing-table th { background: #1a1a2e; color: white; padding: 8px 12px; text-align: left; font-weight: 700; }
.custom-pricing-table td { padding: 8px 12px; border-bottom: 1px solid #e8e8e8; }
.custom-pricing-table tr:last-child td { border-bottom: none; }
.custom-pricing-table tr:hover td { background: #fef8f3; }

/* Mobiili: piilota hakuwidgetti mittatilaussivulla */
@media (max-width: 768px) {
  body:has(.custom-order-stacked) .left-col { display: none !important; }
}

/* Mobiili: kompakti */
@media (max-width: 768px) {
  .custom-order-stacked { gap: 8px; }
  .custom-order-stacked h1 { font-size: 1.1rem; margin-bottom: 2px; }
  .custom-order-form { gap: 6px; }
  .custom-intro { font-size: 0.72rem; line-height: 1.3; margin: 0; }
  .custom-fields { gap: 5px; }
  .cf-group label { font-size: 0.62rem; }
  .cf-input input { padding: 7px 4px; font-size: 16px; border-width: 2px; border-radius: 6px; }
  .cf-group-sm label { font-size: 0.58rem; }
  .cf-input-sm input { padding: 4px 3px; font-size: 16px; border-radius: 5px; }
  .cf-input span, .cf-input-sm span { font-size: 0.62rem; }
  .cf-tesla { font-size: 0.68rem; }
  .custom-row-main .cf-arrow { font-size: 1rem; padding-bottom: 6px; }
  .custom-order-preview #viewerContext { min-height: 200px; height: 200px; }
  .custom-preview-badge { font-size: 0.62rem; padding: 3px 10px; top: 6px; left: 6px; }
  .custom-preview-tip { padding: 3px; font-size: 0.62rem; }
  .custom-price-bar { padding: 8px 10px; }
  .custom-price-amount { font-size: 1.1rem; }
  .custom-price-label { font-size: 0.68rem; }
  .custom-add-btn { padding: 8px 14px; font-size: 0.8rem; }
  .custom-delivery-note { font-size: 0.65rem; }
  .custom-features { gap: 4px; }
  .custom-feature { padding: 4px 6px; font-size: 0.65rem; }
  .custom-feature strong { font-size: 0.7rem; }
}

/* === Product page === */
/* === Product page === */
.product-title { font-size: 1.4rem; color: #1a1a2e; margin: 0 0 4px 0; border: none; padding: 0; }
.product-breadcrumb { font-size: 0.75rem; color: #888; margin-bottom: 16px; }
.product-breadcrumb a { color: #e37119; text-decoration: none; }
.product-breadcrumb a:hover { text-decoration: underline; }
.product-alu-label { font-size: 0.75rem; background: #7c8a96; color: white; padding: 2px 8px; border-radius: 8px; vertical-align: middle; }

.product-hero { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 16px; }
.product-image { position: relative; flex-shrink: 0; width: 260px; }
.ring-svg { width: 100%; height: auto; }
.product-badge { position: absolute; top: 8px; right: 8px; background: #1a1a2e; color: white; padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }
.product-badge-alu { background: #7c8a96; }
.product-info { flex: 1; }

.product-specs-vertical { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.product-spec { background: #f8f8f8; padding: 5px 8px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.product-spec-label { font-size: 0.7rem; color: #888; text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; }
.product-spec-value { font-size: 0.95rem; font-weight: 700; color: #1a1a2e; }

.product-stock { padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.product-stock-ok { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; }
.product-stock-order { background: #fef8f3; border: 1.5px solid #f5c78e; color: #92400e; }
.product-stock-none { background: #f8f8f8; border: 1.5px solid #ddd; color: #666; }

.product-buy { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #1a1a2e, #16213e); padding: 14px 18px; border-radius: 12px; border: 2px solid #e37119; gap: 12px; }
.product-price { color: #e37119; font-size: 1.5rem; font-weight: 800; }
.product-price-unit { font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 600; }
.product-cart-form { margin: 0; }
.product-add-btn { background: #e37119; color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: all 0.2s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.product-add-btn:hover { background: #d06015; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(227,113,25,0.3); }

.product-alt { margin-top: 8px; }
.product-alt a { font-size: 0.8rem; color: #e37119; font-weight: 600; text-decoration: none; }
.product-alt a:hover { text-decoration: underline; }

.product-custom-cta { margin-top: 12px; }
.product-custom-cta a { display: inline-block; background: #e37119; color: white; padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.product-custom-cta a:hover { background: #d06015; }

.product-details { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.product-detail-card { background: #f8f8f8; border: 1px solid #e8e8e8; border-radius: 10px; padding: 12px; }
.product-detail-card strong { display: block; font-size: 1rem; color: #1a1a2e; margin-bottom: 4px; }
.product-detail-card p { font-size: 0.75rem; color: #666; line-height: 1.4; margin: 0; }
.product-detail-card a { color: #e37119; font-weight: 600; text-decoration: none; }
.product-detail-card a:hover { text-decoration: underline; }

.product-cars { margin-top: 16px; }
.product-cars h2 { font-size: 1.1rem; color: #1a1a2e; margin-bottom: 12px; }
.product-cars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.product-cars-brand { background: #f8f8f8; border-radius: 8px; padding: 10px 12px 18px; }
.product-cars-brand strong { font-size: 0.85rem; color: #1a1a2e; }
.product-cars-brand ul { margin: 4px 0 0 0; padding-left: 16px; }
.product-cars-brand li { font-size: 0.75rem; color: #555; line-height: 1.5; }
.product-cars-note { font-size: 0.75rem; color: #888; margin-top: 8px; }
.product-cars-note a { color: #e37119; font-weight: 600; text-decoration: none; }

.product-custom-banner { display: flex; align-items: center; gap: 12px; background: #fef8f3; border: 1.5px solid #f5c78e; border-radius: 10px; padding: 12px 16px; margin-top: 12px; flex-wrap: wrap; }
.product-custom-banner strong { font-size: 0.85rem; color: #1a1a2e; }
.product-custom-banner span { font-size: 0.78rem; color: #666; flex: 1; }
.product-custom-banner a { font-size: 1rem; color: #e37119; font-weight: 700; text-decoration: none; white-space: nowrap; }
.product-custom-banner a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .product-title { font-size: 1.1rem; }
  .product-hero { flex-direction: column; gap: 12px; }
  .product-image { width: 100%; max-width: 220px; margin: 0 auto; }
  .product-spec-value { font-size: 0.85rem; }
  .product-buy { flex-direction: column; gap: 8px; text-align: center; padding: 10px 14px; }
  .product-price { font-size: 1.3rem; }
  .product-details { grid-template-columns: 1fr; gap: 6px; }
  .product-detail-card { padding: 8px 10px; }
  .product-cars-grid { grid-template-columns: 1fr 1fr; }
  .product-custom-banner { flex-direction: column; text-align: center; gap: 6px; }
}

/* === Size/Product page (sp-*) === */
.sp-breadcrumbs { font-size: 0.75rem; color: #888; margin-bottom: 12px; }
.sp-breadcrumbs a { color: #e37119; text-decoration: none; }
.sp-breadcrumbs a:hover { text-decoration: underline; }
.sp-breadcrumb-current { color: #555; }

.sp-hero { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.sp-hero-image { flex-shrink: 0; width: 200px; position: relative; }
.sp-hero-image .ring-svg { width: 100%; height: auto; }
.sp-hero-info { flex: 1; min-width: 0; }
.sp-hero-info h1 { font-size: 1.4rem; color: #1a1a2e; margin: 0 0 4px 0; border: none; padding: 0; }
.sp-hero-subtitle { font-size: 0.8rem; color: #888; margin: 0 0 12px 0; }

.sp-section { margin-top: 20px; }
.sp-section h2 { font-size: 1.1rem; color: #1a1a2e; margin-bottom: 10px; }
.sp-section-intro { font-size: 0.8rem; color: #666; margin-bottom: 12px; }

.sp-specs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.sp-specs-table td { padding: 8px 12px; border-bottom: 1px solid #eee; }
.sp-specs-table td:first-child { color: #888; font-weight: 600; width: 40%; }
.sp-specs-table td:last-child { color: #1a1a2e; font-weight: 700; }

.sp-cars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sp-car-brand { background: #f8f8f8; border-radius: 8px; padding: 10px 12px 18px; }
.sp-car-brand strong { font-size: 0.85rem; color: #1a1a2e; display: block; margin-bottom: 4px; }
.sp-car-gens { font-size: 0.72rem; color: #888; }

.sp-install-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sp-install-step { background: #f8f8f8; border-radius: 10px; padding: 12px; }
.sp-step-num { display: inline-block; background: #e37119; color: white; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; font-weight: 700; font-size: 0.8rem; margin-bottom: 6px; }
.sp-install-step strong { display: block; font-size: 1rem; color: #1a1a2e; margin-bottom: 2px; }
.sp-install-step p { font-size: 0.75rem; color: #666; line-height: 1.4; margin: 0; }

@media (max-width: 768px) {
  .sp-hero { gap: 6px; } .sp-hero-image { width: 45%; }
  .sp-hero-image { width: 45%; }
  .sp-hero-info h1 { font-size: 1.1rem; }
  .sp-cars-grid { grid-template-columns: 1fr; }
  .sp-install-steps { grid-template-columns: 1fr; }
  .sp-specs-table { font-size: 0.8rem; }
}

@media(max-width:768px) {
  input, select, textarea { font-size: 16px !important; }
  .page-wrap { padding: 8px 0 !important; gap: 8px !important; }
}

/* === Ostoskoritaulukko mobiili === */
#ostoskoritaulukko { width: 100%; border-collapse: collapse; }
@media (max-width: 768px) {
  #ostoskoritaulukko { font-size: 11px; }
  #ostoskoritaulukko td, #ostoskoritaulukko th { padding: 4px 3px !important; font-size: 11px !important; }
  #ostoskoritaulukko td:first-child { max-width: 100px; word-break: break-word; }
  #ostoskoritaulukko .shoppingcart_thumb { max-width: 30px; height: auto; }
  .content-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sc-spinner { width: 45px; }
  .sc-spinner input { font-size: 16px !important; }
}


/* === Ostoskori quickfix mobiili === */
@media (max-width: 768px) {
  #ostoskoritaulukko tr.header_row { display: none !important; }
  #ostoskoritaulukko td { font-size: 13px !important; padding: 5px 3px !important; }
  #ostoskoritaulukko td:nth-child(2) { display: none !important; }
  #ostoskoritaulukko td:nth-child(5) { display: none !important; }
  #ostoskoritaulukko td:nth-child(6) { display: none !important; }
  #ostoskoritaulukko td:first-child { max-width: 140px; word-break: break-word; font-size: 12px !important; }
  #ostoskoritaulukko .shoppingcart_thumb { max-width: 35px; height: auto; }
}

/* Piilota hakuwidget ostoskorissa mobiilissa */
@media (max-width: 768px) {
  body.page-ostoskori .left-col { display: none !important; }
}

/* Language switcher - inside nav */
.lang-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  padding-left: 16px;
}
.lang-switcher a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}
.lang-switcher a:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
}
.lang-switcher a.current {
  color: #fff;
  background: rgba(255,255,255,0.2);
  font-weight: 600;
}

/* Mobile: lang-switcher inside hamburger menu */
@media (max-width: 768px) {
  .lang-switcher {
    margin-left: 0;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(255,255,255,0.15);
    justify-content: center;
    width: 100%;
  }
}

/* GeoIP Banner */
#geobanner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: #2a4a7f;
  color: #fff;
  font-size: 14px;
  text-align: center;
  flex-wrap: wrap;
}
.geobanner-text {
  flex: 1 1 auto;
  color: #fff;
  text-decoration: none;
}
a.geobanner-text:hover {
  text-decoration: underline;
}
.geobanner-btn {
  color: #fff;
  background: rgba(255,255,255,0.2);
  padding: 6px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
}
.geobanner-btn:hover {
  background: rgba(255,255,255,0.35);
}
.geobanner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.geobanner-close:hover {
  color: #fff;
}
@media (max-width: 768px) {
  #geobanner {
    font-size: 13px;
    padding: 8px 12px;
    gap: 8px;
  }
}

/* Search result add-to-cart button */
.search-add-btn {
  background: #e37119;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}
.search-add-btn:hover {
  background: #c85f10;
}
.product-right {
  display: flex;
  align-items: center;
}

/* Search widget result price - smaller */
.search-card .product-price,
#searchResults .product-price {
  font-size: 1rem;
}

/* Trust banner under search widget */
.trust-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.1);
  border-radius: 0 0 16px 16px;
  margin: 0 -20px -20px -20px;
  padding-bottom: 20px;
}
.trust-banner-item {
  font-size: 0.78rem;
  color: #444;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .trust-banner {
    gap: 4px 12px;
    padding: 10px 12px 18px;
  }
  .trust-banner-item {
    font-size: 0.72rem;
  }
}

/* Search title row - h2 + measuring guide on same line */
.search-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.search-title-row h2 {
  margin: 0;
}

.search-title-row .search-help-link {
  font-size: 0.75rem;
}

/* Header logo icon */
.site-logo-icon {
  height: 28px;
  width: 28px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.site-logo {
  display: flex;
  align-items: center;
}

/* === RESELLER BAR === */
.reseller-bar {
  background: #fff8f0;
  border-bottom: 1px solid #f0d4b8;
  padding: 8px 16px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.reseller-bar a { color: #e37119; font-weight: 600; }
.reseller-bar .reseller-user { color: #555; }

/* === ONE-PAGE CHECKOUT === */
.checkout-page { max-width: 640px; margin: 0 auto; }

.checkout-heading {
  font-size: 1.1rem;
  color: #1a1a2e;
  margin: 20px 0 12px 0;
  padding: 0;
}
.checkout-heading:first-child { margin-top: 0; }

/* Cart items */
.cart-items { display: flex; flex-direction: column; gap: 8px; }

.cart-item {
  display: grid;
  grid-template-columns: 50px 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #eee;
}

.cart-item-img img { width: 50px; height: 50px; object-fit: contain; border-radius: 4px; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-price { color: #888; font-size: 0.8rem; }

.cart-item-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #ddd; border-radius: 4px;
  text-decoration: none; color: #333; font-size: 1rem;
}
.qty-btn:hover { background: #f0f0f0; text-decoration: none; }
.qty-value { font-weight: 600; min-width: 18px; text-align: center; font-size: 0.9rem; }

.cart-item-total { font-weight: 700; white-space: nowrap; font-size: 0.95rem; }
.cart-item-remove { color: #bbb; text-decoration: none; font-size: 1rem; padding: 2px; }
.cart-item-remove:hover { color: #e74c3c; text-decoration: none; }

/* Shipping & payment options */
.shipping-options { display: flex; flex-direction: column; gap: 6px; }
.shipping-option {
  border: 2px solid #eee; border-radius: 8px;
  transition: border-color 0.15s;
  background: white;
  overflow: hidden;
}
.shipping-option-label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.shipping-option:hover { border-color: #e37119; }
.shipping-option.selected, .shipping-option:has(input:checked) { border-color: #e37119; background: #fff8f0; }
.shipping-option-label input[type="radio"] { accent-color: #e37119; flex-shrink: 0; }
.shipping-name { flex: 1; font-weight: 500; font-size: 0.95rem; }
.shipping-price { font-weight: 600; color: #e37119; font-size: 0.95rem; }

/* Contact fields */
.checkout-fields { display: flex; flex-direction: column; gap: 10px; }
.field-row { display: flex; gap: 10px; }
.field-row .field-group { flex: 1; }
.field-group label {
  display: block; font-size: 0.8rem; font-weight: 600; color: #555; margin-bottom: 3px;
}
.field-group input, .field-group textarea, .field-group select {
  width: 100%; padding: 9px 11px;
  border: 2px solid #e0e0e0; border-radius: 6px;
  font-size: 16px; font-family: inherit;
  box-sizing: border-box; transition: border-color 0.15s;
}
.field-group input:focus, .field-group textarea:focus, .field-group select:focus {
  border-color: #e37119; outline: none;
}
.field-error input, .field-error textarea { border-color: #e74c3c; }

.checkout-errors {
  background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 12px;
}

/* Toggles */
.company-toggle, .billing-toggle {
  padding: 10px 12px; background: #f8f9fa; border-radius: 6px;
}
.company-toggle label, .billing-toggle label {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 0.9rem;
}
.company-toggle input[type="checkbox"], .billing-toggle input[type="checkbox"] { accent-color: #e37119; }

.company-fields, .billing-fields {
  padding: 12px; background: #fef9f5; border: 1px solid #f0d4b8; border-radius: 6px;
}

.checkout-terms {
  margin-top: 14px; padding: 10px 12px; background: #f8f9fa; border-radius: 6px;
}
.checkout-terms label {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 0.85rem;
}
.checkout-terms input[type="checkbox"] { margin-top: 3px; accent-color: #e37119; }

/* Summary */
.checkout-summary {
  display: flex; flex-direction: column; gap: 6px; margin-top: 20px;
}
.summary-row {
  display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.9rem;
}
.summary-total {
  border-top: 2px solid #1a1a2e; padding-top: 10px; margin-top: 4px;
  font-size: 1.15rem; font-weight: 700;
}

/* Checkout button */
.btn-checkout {
  width: 100%; padding: 14px; margin-top: 12px; margin-bottom: 20px;
  background: #e37119; color: white; border: none; border-radius: 8px;
  font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background 0.15s;
}
.btn-checkout:hover { background: #c9600f; }
.btn-checkout:disabled { background: #999; cursor: not-allowed; }

/* Free shipping notices */
.cart-free-shipping-notice {
  background: #fff8e1; border: 1px solid #ffc107; color: #856404;
  padding: 10px; border-radius: 8px; text-align: center; font-weight: 600;
  margin-bottom: 12px; font-size: 0.9rem;
}
.cart-free-shipping-success {
  background: #e8f5e9; border: 1px solid #4caf50; color: #2e7d32;
  padding: 10px; border-radius: 8px; text-align: center; font-weight: 600;
  margin-bottom: 12px; font-size: 0.9rem;
}

.cart-empty { text-align: center; padding: 40px 20px; }
.cart-empty p { font-size: 1.1rem; color: #666; margin-bottom: 20px; }
.btn-primary {
  display: inline-block; padding: 12px 24px; background: #e37119;
  color: white; text-decoration: none; border-radius: 8px; font-weight: 600;
}

/* Mobile checkout */
@media (max-width: 600px) {
  .checkout-page { padding: 0 6px; }
  .cart-item {
    grid-template-columns: 45px 1fr auto;
    gap: 6px;
  }
  .cart-item-qty { grid-column: 2; }
  .cart-item-total { grid-column: 3; }
  .cart-item-remove { position: absolute; right: 8px; top: 8px; }
  .cart-item { position: relative; padding-right: 28px; }
  .field-row { flex-direction: column; gap: 10px; }
  .reseller-bar { flex-direction: column; gap: 6px; text-align: center; }
}

/* === PAYMENT PAGE === */
.payment-page { padding-bottom: 40px; }

/* Hide framework's old order table and text on payment page */
.payment-methods-container > p { display: none; }
.payment-methods-container > br { display: none; }
.payment-order-items {
  background: white; border-radius: 8px; padding: 12px;
  border: 1px solid #eee; margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.payment-order-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f5f5f5;
}
.payment-order-item:last-child { border-bottom: none; }
.payment-item-name { flex: 1; font-weight: 500; font-size: 0.9rem; }
.payment-item-qty { color: #888; font-size: 0.85rem; white-space: nowrap; }
.payment-item-price { font-weight: 600; white-space: nowrap; }

.payment-order-summary {
  background: white; border-radius: 8px; padding: 14px 16px;
  border: 1px solid #eee; margin-bottom: 16px;
}
.payment-order-summary .summary-row {
  display: flex; justify-content: space-between; align-items: center;
}
.summary-total-value { font-size: 1.2rem; font-weight: 700; color: #1a1a2e; }

.payment-methods-container h2 {
  font-size: 1rem; color: #1a1a2e; margin: 20px 0 10px 0;
  padding-bottom: 6px; border-bottom: 1px solid #eee;
}
.payment-methods-container .paytrailProviderForm {
  display: inline-block; margin: 4px;
}
.payment-methods-container .paymentProviderButton {
  background: white; border: 2px solid #e0e0e0; border-radius: 8px;
  padding: 8px 12px; cursor: pointer; transition: all 0.15s;
  height: 52px;
}
.payment-methods-container .paymentProviderButton:hover {
  border-color: #e37119; box-shadow: 0 2px 8px rgba(227,113,25,0.15);
}
.payment-methods-container .paymentProviderButton img {
  height: 32px; max-width: 100px; object-fit: contain;
}

/* PayPal button styling (USHCR) */
.payment-methods-container input[type="image"] {
  border: 2px solid #e0e0e0; border-radius: 8px; padding: 8px 12px;
  transition: border-color 0.15s; cursor: pointer;
}
.payment-methods-container input[type="image"]:hover {
  border-color: #e37119;
}

/* Order summary (payment page) */

/* Cart item delivery time */
.cart-item-delivery { font-size: 13px; color: #27ae60; font-weight: 500; }

/* Shipping method extra (pickup points etc.) */
.shipping-extra { margin-top: 12px; padding: 16px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e0e0e0; }

/* Shipping extra compact */
.shipping-extra { padding: 8px 14px; border-top: 1px solid #eee; }

/* Pickup point search (CombinePupFI) */
.pup-extra { padding: 0; }
.pup-extra-info { color: #666; font-size: 0.85em; margin-bottom: 8px; }
.pup-search-section { display: flex; flex-direction: column; gap: 8px; }
.pup-search-row { display: flex; gap: 6px; }
.pup-search-input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 0; }
.pup-search-btn { padding: 8px 16px; background: #e37119; color: #fff; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pup-search-btn:hover { background: #c5600f; }
.pup-select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; }
.pup-selected-info { font-size: 0.9em; color: #333; padding: 6px 0; }
.pup-selected-info:empty { display: none; }
.pup-clear { color: #e74c3c; font-weight: bold; margin-left: 6px; text-decoration: none; font-size: 1.1em; }
.pup-toggle-link { color: #e37119; cursor: pointer; font-weight: 500; }
.pup-toggle-link:hover { text-decoration: underline; }
.shipping-extra-info { padding: 0; color: #666; font-size: 0.9em; }

/* ===================================
   MY ACCOUNT / Checkout page forms
   =================================== */

.checkout-page fieldset {
  border: 1px solid #e8e0d0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: #fff;
}

.checkout-page fieldset legend {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  padding: 0 8px;
}

.checkout-page .fh_element {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  width: 100%;
  float: none;
}

.checkout-page .fh_label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 3px;
  width: 100%;
  text-align: left;
  float: none;
}

.checkout-page .fh_input,
.checkout-page input[type="text"],
.checkout-page input[type="email"],
.checkout-page textarea {
  width: 100%;
  padding: 9px 11px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
  float: none;
}

.checkout-page .fh_input:focus,
.checkout-page input[type="text"]:focus,
.checkout-page input[type="email"]:focus {
  border-color: #e37119;
  outline: none;
}

.checkout-page input[type="submit"] {
  background: #e37119;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  transition: background 0.15s;
}

.checkout-page input[type="submit"]:hover { background: #c9600f; }

.checkout-page .fh_element_checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.checkout-page .fh_element_checkbox .fh_label {
  width: auto;
  margin-bottom: 0;
}

.checkout-page p {
  font-size: 0.85rem;
  color: #666;
  margin: 6px 0;
}

.checkout-page .clearing { clear: both; }
