/* ═══════════════════════════════════════════════
   DEALER WIDGET — Shared across homepage,
   bayi-servis-agi, and product detail pages
   ═══════════════════════════════════════════════ */

.dw-section { background: #f5f5f5; padding: 40px 0; }
.dw-header { text-align: center; margin-bottom: 24px; }
.dw-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #ae0018; border-radius: 50%; margin-bottom: 10px; }
.dw-icon i { color: #fff; font-size: 17px; }
.dw-title { margin: 0 0 6px; font-size: 22px; font-weight: bold; color: #111; }
.dw-desc { color: #666; margin: 0; font-size: 14px; }

/* Tabs */
.dw-tabs { display: flex; border-bottom: 2px solid #ddd; margin-bottom: 16px; gap: 6px; flex-wrap: wrap; }
.dw-tab { flex: 1; padding: 10px 8px; font-weight: bold; font-size: 14px; border: none; border-radius: 6px 6px 0 0; cursor: pointer; transition: all 0.2s; background: #e8e8e8; color: #555; }
.dw-tab--active { background: #ae0018; color: #fff; }

/* Form */
.dw-form { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.dw-form select { flex: 1; min-width: 180px; height: 44px; padding: 0 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; background: #fff; }
.dw-form select:disabled { background-color: #eaeaea; }

/* Grid */
.dw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* Card */
.dw-card { border: 1px solid #eee; padding: 16px; border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.03); display: flex; flex-direction: column; justify-content: space-between; }
.dw-card-name { margin: 0 0 8px; font-size: 14px; color: #111; font-weight: 600; }
.dw-card-addr { font-size: 12px; color: #555; line-height: 1.5; margin-bottom: 3px; }
.dw-card-addr i, .dw-card-tel i { width: 14px; color: #999; text-align: center; }
.dw-card-loc { font-size: 11px; color: #888; line-height: 1.4; margin-bottom: 6px; padding-left: 18px; }
.dw-card-tel { font-size: 12px; color: #555; line-height: 1.5; }
.dw-card-actions { margin-top: 8px; }
.dw-btn-call, .dw-btn-map { display: inline-block; margin-top: 8px; padding: 5px 10px; border-radius: 4px; font-size: 12px; text-decoration: none; color: #fff; }
.dw-btn-call { background: #ae0018; margin-right: 6px; }
.dw-btn-map { background: #4CAF50; }

/* Messages */
.dw-msg { grid-column: 1 / -1; text-align: center; padding: 15px; color: #ae0018; font-size: 14px; }
.dw-msg--warn { grid-column: 1 / -1; padding: 12px 15px; background: #fff3f3; color: #ae0018; border-radius: 6px; border: 1px solid #ffdcdc; margin-bottom: 5px; font-size: 13px; text-align: left; }
.dw-msg--loading { grid-column: 1 / -1; text-align: center; padding: 20px; }
.dw-msg--loading i { font-size: 20px; color: #ae0018; }
.dw-more { grid-column: 1 / -1; text-align: center; padding: 14px; background: #fff; border: 1px dashed #ccc; border-radius: 6px; font-size: 13px; color: #555; }
.dw-more a { color: #ae0018; font-weight: 600; text-decoration: none; }
.dw-more a:hover { text-decoration: underline; }

/* CTA */
.dw-cta { display: inline-block; padding: 10px 28px; background: #ae0018; color: #fff; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.dw-cta:hover { background: #8c0014; color: #fff; }

/* ═══════════════════════════════════════════════
   VARIANT: Standalone (bayi-servis-agi)
   ═══════════════════════════════════════════════ */
.dw--standalone .dw-tabs { gap: 8px; margin-bottom: 20px; }
.dw--standalone .dw-tab { padding: 12px 10px; font-size: 15px; }
.dw--standalone .dw-form { gap: 15px; margin-bottom: 25px; }
.dw--standalone .dw-form select { min-width: 200px; height: 50px; padding: 0 15px; font-size: 16px; }
.dw--standalone .dw-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.dw--standalone .dw-card { padding: 20px; }
.dw--standalone .dw-card-name { font-size: 16px; margin-bottom: 10px; }
.dw--standalone .dw-card-addr { font-size: 13px; margin-bottom: 4px; }
.dw--standalone .dw-card-addr i, .dw--standalone .dw-card-tel i { width: 16px; }
.dw--standalone .dw-card-loc { font-size: 12px; margin-bottom: 8px; padding-left: 20px; }
.dw--standalone .dw-card-tel { font-size: 13px; }
.dw--standalone .dw-btn-call, .dw--standalone .dw-btn-map { margin-top: 10px; padding: 6px 12px; font-size: 13px; }

/* ═══════════════════════════════════════════════
   VARIANT: Hybrid combobox (homepage + product detail + standalone)
   ═══════════════════════════════════════════════ */
.dw--combo .dw-combos { display:flex; gap:10px; flex-wrap:wrap; width:100%; margin-bottom:10px; }
.dw--combo .dw-combo { position: relative; flex:1; min-width: 200px; }
.dw--combo .dw-combo-label{ display:block; font-size:12px; color:#666; margin: 0 0 6px; font-weight: 600; }
.dw--combo .dw-combo-inputWrap{ display:flex; align-items:center; background:#fff; border:1px solid #e5e7eb; border-radius: 10px; overflow:hidden; }
.dw--combo .dw-combo-input{ width:100%; height:44px; border:0; outline:none; padding: 0 12px; font-size: 14px; }
.dw--combo .dw-combo-btn{ width:44px; height:44px; border:0; background:#f8fafc; color:#666; cursor:pointer; display:flex; align-items:center; justify-content:center; border-left: 1px solid #eef2f7; }
.dw--combo .dw-combo-clear{ width:38px; height:44px; border:0; background:#fff; color:#9aa3af; cursor:pointer; display:none; align-items:center; justify-content:center; border-left: 1px solid #eef2f7; }
.dw--combo .dw-combo-clear:hover{ color:#6b7280; }
.dw--combo .dw-combo-clear.show{ display:flex; }
.dw--combo .dw-combo-btn[disabled]{ opacity:.45; cursor:not-allowed; }
.dw--combo .dw-combo-inputWrap:focus-within{ border-color:#c41e3a; box-shadow: 0 0 0 3px rgba(196,30,58,0.12); }
.dw--combo .dw-combo-list{ display:none; position: absolute; z-index: 50; left: 0; right: 0; max-height: 260px; overflow:auto; background:#fff; border:1px solid #e5e7eb; border-radius: 12px; margin-top: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; }
.dw--combo .dw-combo-list.open{ display:block; }
.dw--combo .dw-combo-opt{ padding: 10px 10px; border-radius: 10px; cursor:pointer; font-size: 14px; color:#111; }
.dw--combo .dw-combo-opt:hover{ background:#f1f5f9; }
.dw--combo .dw-combo-opt.active{ background: rgba(196,30,58,0.10); color:#8a1226; }

/* Legacy selects: keep for logic, hide for UI */
.dw--combo select { display:none; }

/* ═══════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════ */
@media screen and (max-width: 1023px) {
    .dw-section { padding: 28px 0; }
    .dw-header { margin-bottom: 16px; }
    .dw-icon { width: 32px; height: 32px; margin-bottom: 8px; }
    .dw-icon i { font-size: 14px; }
    .dw-title { font-size: 17px; }
    .dw-desc { font-size: 12px; }
    .dw-tabs { gap: 4px; margin-bottom: 12px; }
    .dw-tab { padding: 8px 6px; font-size: 12px; }
    .dw-form { gap: 8px; margin-bottom: 14px; }
    .dw-form select { height: 40px; font-size: 13px; min-width: 0; }
    .dw-grid { grid-template-columns: 1fr; gap: 10px; }
    .dw-card { padding: 14px; }
    .dw-card-name { font-size: 13px; margin-bottom: 6px; }
    .dw-card-addr { font-size: 11px; }
    .dw-card-loc { font-size: 10px; margin-bottom: 4px; padding-left: 16px; }
    .dw-card-tel { font-size: 11px; }
    .dw-btn-call, .dw-btn-map { font-size: 11px; padding: 4px 8px; margin-top: 6px; }
    .dw-msg { font-size: 13px; padding: 12px; }
    .dw-msg--warn { font-size: 12px; padding: 10px 12px; }
    .dw-more { font-size: 12px; padding: 10px; }
    .dw-cta { padding: 9px 20px; font-size: 12px; }

    /* Standalone: slightly larger on mobile than base */
    .dw--standalone .dw-tab { padding: 9px 6px; font-size: 13px; }
    .dw--standalone .dw-form select { height: 44px; font-size: 14px; min-width: 0; }
    .dw--standalone .dw-card { padding: 16px; }
    .dw--standalone .dw-card-name { font-size: 14px; }
    .dw--standalone .dw-card-addr { font-size: 12px; }
    .dw--standalone .dw-card-tel { font-size: 12px; }
    .dw--standalone .dw-btn-call, .dw--standalone .dw-btn-map { font-size: 12px; padding: 5px 10px; }

    .dw--combo .dw-combos{ gap: 8px; }
    .dw--combo .dw-combo-input, .dw--combo .dw-combo-btn{ height: 42px; }
    .dw--combo .dw-combo-clear{ height: 42px; }
    .dw--combo .dw-combo-input{ font-size: 13px; }
}
