/* Plumbix note: shared visual styling for panels layout. */
/* Pannelli e logo — dimensioni uniformi su tutte le pagine */

.logo-img {
  height: 44px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
}

.site-header .logo,
.header-container .logo {
  min-height: 44px;
  align-items: center;
}

/* Sidebar filtri catalogo / pannelli pubblici */
.filters-sidebar,
.account-sidebar,
.support-panel,
.checkout-panel {
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
}

.catalog-main,
.account-main,
.checkout-main {
  flex: 1;
  min-width: 0;
}

/* Card / pannelli stessa altezza minima nelle griglie */
.panel-grid-equal {
  display: grid;
  align-items: stretch;
}

.panel-card-equal {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.three-columns .card,
.admin-three-col .card {
  min-height: 300px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-card, 24px);
  align-items: stretch;
}

/* Offerte home */
.offers-section {
  background: linear-gradient(180deg, #fff 0%, #f4f7fc 100%);
  padding: var(--space-section, 56px) 0;
  border-bottom: 1px solid var(--gray-border);
}

.offers-section .section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.offer-flyer {
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-border);
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  height: 100%;
}

.offer-flyer:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #bdd4fc;
}

.offer-flyer:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.offer-flyer-featured {
  grid-column: span 1;
}

@media (min-width: 900px) {
  .offer-flyer-featured {
    grid-column: span 2;
    flex-direction: row;
    min-height: 320px;
  }
  .offer-flyer-featured .offer-flyer-image {
    flex: 1.2;
    min-height: 320px;
  }
}

.offer-flyer-image {
  min-height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--primary-light);
}

.offer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.offer-flyer-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.offer-flyer-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.offer-flyer-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  flex: 1;
}

.offer-cta {
  margin-top: 12px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

/* Chat supporto idraulica */
.chat-section.plumbing-chat {
  border: 1px solid #c2d9f0;
  background: linear-gradient(180deg, #fafdff 0%, #fff 100%);
}

.chat-section.plumbing-chat .chat-header {
  background: linear-gradient(90deg, #1a66d9 0%, #0e4ea8 100%);
  color: white;
  margin: -24px -24px 20px;
  padding: 16px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-section.plumbing-chat .chat-header h2,
.chat-section.plumbing-chat .chat-header i {
  color: white;
}

.chat-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-quick-prompts button {
  background: var(--primary-light);
  border: 1px solid #bdd4fc;
  color: var(--primary);
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.chat-quick-prompts button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.chat-quick-prompts button:hover {
  background: var(--primary);
  color: white;
}

.message.bot {
  align-items: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.message.bot .message-bubble {
  background: #e8f2ff;
  border: 1px solid #d0e4ff;
}

@media (min-width: 769px) and (max-width: 900px) {
  .filters-sidebar,
  .account-sidebar,
  .support-panel,
  .checkout-panel {
    width: 100%;
    min-width: 0;
    position: static;
    top: auto;
  }
  .catalog-wrapper { flex-direction: column; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 768px) {
  .offers-grid { gap: 18px; grid-template-columns: 1fr; }
  .offer-flyer { min-height: 280px; }
  .offer-flyer-image { min-height: 160px; }
  .panel-card-equal { min-height: auto; }
  .chat-quick-prompts button { min-height: 44px; }
}

@media (max-width: 480px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

/* Banner negozio venditore nel catalogo */
.catalog-seller-shop-mount { margin: 16px 0 8px; }
.catalog-seller-shop-card {
  background: linear-gradient(135deg, #ecfeff 0%, #fff 55%);
  border: 1px solid #a5f3fc;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.08);
}
.catalog-seller-shop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.catalog-seller-shop-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0891b2;
  margin-bottom: 4px;
}
.catalog-seller-shop-card h2 { font-size: 1.35rem; margin: 0; color: #0f172a; }
.catalog-seller-shop-bio { font-size: 0.88rem; color: #64748b; margin-top: 8px; max-width: 52ch; line-height: 1.5; }
.catalog-seller-shop-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #0891b2;
  color: #fff;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.catalog-seller-shop-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-width: 100%;
}
.catalog-seller-shop-photo {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #f1f5f9;
  aspect-ratio: 1;
}
.catalog-seller-shop-photo.is-cover { border-color: #0891b2; }
.catalog-seller-shop-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-seller-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.catalog-seller-lightbox img { max-width: min(96vw, 1100px); max-height: 90vh; object-fit: contain; border-radius: 8px; }
.catalog-seller-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
