/**
 * Liberty Trailers — Dealer Landing Page Styles
 *
 * Place in child theme: /css/dealer-landing.css
 * Loaded only on wpsl_stores single posts.
 *
 * Uses Liberty brand colors:
 *   --liberty-red:    #C41230
 *   --liberty-blue:   #1B3A6B
 *   --liberty-white:  #F5F0E8
 *   --liberty-grey:   #4A4A4A
 */

:root {
  --liberty-red: #C41230;
  --liberty-red-hover: #a30f28;
  --liberty-blue: #1B3A6B;
  --liberty-blue-hover: #142d54;
  --liberty-white: #F5F0E8;
  --liberty-grey: #4A4A4A;
  --liberty-light-bg: #f8f8f8;
  --liberty-border: #e0e0e0;
}

/* ──────────────────────────────────────────── */
/* Product Catalog Section                       */
/* ──────────────────────────────────────────── */

.liberty-products {
  padding: 0;
}

.liberty-products-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--liberty-blue);
  margin-bottom: 24px;
  text-align: center;
}

.liberty-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.liberty-product-card {
  background: #fff;
  border: 1px solid var(--liberty-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.liberty-card-body {
  margin-top: auto;
}

.liberty-product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.liberty-card-image {
  overflow: hidden;
  background: #fff;
  padding: 16px 8px 0;
}

.liberty-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.liberty-card-body {
  padding: 16px;
  text-align: center;
}

.liberty-card-model {
  font-size: 1rem;
  font-weight: 700;
  color: var(--liberty-blue);
  margin: 0 0 4px;
}

.liberty-card-label {
  font-size: 0.85rem;
  color: var(--liberty-grey);
  margin: 0 0 4px;
}

.liberty-card-specs {
  font-size: 0.8rem;
  color: #888;
  margin: 0 0 8px;
}

.liberty-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--liberty-red);
  margin: 0 0 12px;
}

.liberty-check-avail-btn {
  display: block;
  background: var(--liberty-blue);
  color: #fff;
  padding: 5px 16px;
  margin: 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease;
}

.liberty-check-avail-btn:hover {
  background: var(--liberty-blue-hover);
  color: #fff;
  text-decoration: none;
}

/* ──────────────────────────────────────────── */
/* Category Cards                                */
/* ──────────────────────────────────────────── */

.liberty-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
}

.liberty-category-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--liberty-border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.liberty-category-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.liberty-cat-image {
  padding: 8px 4px 0;
  background: #fff;
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
}

.liberty-cat-image img {
  width: 100%;
  height: auto;
  display: block;
}

.liberty-cat-content {
  margin-top: auto;
  text-align: center;
}

.liberty-cat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--liberty-blue);
  margin: 0 0 4px;
}

.liberty-cat-specs {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 6px;
}

.liberty-cat-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--liberty-red);
  margin-top: auto;
}

.liberty-category-card:hover .liberty-cat-link {
  color: var(--liberty-red-hover);
}

@media (max-width: 768px) {
  .liberty-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .liberty-category-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────── */
/* HubSpot Form Section                          */
/* ──────────────────────────────────────────── */

.liberty-hubspot-form-wrapper {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  max-width: 100%;
  scroll-margin-top: 100px;
}

.liberty-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.liberty-form-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--liberty-blue);
  margin: 0 0 8px;
}

.liberty-form-header p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.liberty-form-placeholder {
  text-align: center;
  padding: 32px;
  background: var(--liberty-light-bg);
  border-radius: 8px;
}

/* HubSpot form overrides to match Liberty brand */
#liberty-hs-form-container .hs-form-field label {
  font-weight: 600;
  color: var(--liberty-grey);
  font-size: 0.85rem;
}

#liberty-hs-form-container .hs-input {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 0.9rem;
  width: 100%;
}

#liberty-hs-form-container .hs-input:focus {
  border-color: var(--liberty-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(27, 58, 107, 0.15);
}

#liberty-hs-form-container .hs-submit .actions {
  text-align: center;
}

#liberty-hs-form-container .hs-button {
  background: var(--liberty-red) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 32px !important;
  border-radius: 4px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  max-width: 400px;
}

#liberty-hs-form-container .hs-button:hover {
  background: var(--liberty-red-hover) !important;
}

/* Hide HubSpot branding on Starter */
#liberty-hs-form-container .hs-form .legal-consent-container .hs-form-booleancheckbox-display .hs-form-required {
  display: none;
}

/* ──────────────────────────────────────────── */
/* Dealer Info Shortcode Spacing                 */
/* ──────────────────────────────────────────── */

.liberty-dealer-address,
.liberty-dealer-address p,
.liberty-dealer-phone,
.liberty-dealer-phone p,
.liberty-dealer-phone a,
.wpsl-hours-wrapper,
.wpsl-hours-wrapper p,
[class*="wpsl"] table {
  margin: 0;
  padding: 0;
}

.wpsl-hours-wrapper hr,
.wpsl-hours hr,
[class*="wpsl"] hr {
  display: none;
}

[class*="wpsl"] table,
[class*="wpsl"] td,
[class*="wpsl"] tr {
  border: none !important;
}

.elementor-element-fbc0e31,
.elementor-element-fbc0e31 .elementor-widget-container,
.elementor-element-fbc0e31 .elementor-shortcode {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Kill any BeTheme separator between dealer info widgets */
.elementor-element-fbc0e31::before,
.elementor-element-fbc0e31::after,
.elementor-element-f591785::after {
  display: none !important;
}

/* Remove line above CTA buttons inner section */
.elementor-element-33d946e,
.elementor-element-33d946e::before,
.elementor-element-33d946e::after {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Kill borders/shadows on WPSL hours table only */
.wpsl-opening-hours,
.wpsl-opening-hours *,
.wpsl-opening-hours table {
  border: none !important;
  box-shadow: none !important;
}

/* Kill margin on dealer address and phone shortcode output only */
.elementor-widget-shortcode .elementor-shortcode > p,
.elementor-widget-shortcode .elementor-shortcode > a:not(.liberty-btn-secondary) {
  margin: 0 !important;
  padding: 0 !important;
}

/* Kill Elementor default 20px widget bottom margin on shortcode widgets */
.elementor-widget.elementor-widget-shortcode {
  margin-bottom: 0 !important;
}

/* Map height — fill container */
.liberty-dealer-map,
.liberty-dealer-map iframe {
  height: 100%;
  min-height: 300px;
}

/* ──────────────────────────────────────────── */
/* Newsletter Signup                             */
/* ──────────────────────────────────────────── */

.liberty-newsletter {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
}

.liberty-newsletter-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--liberty-blue);
  margin: 0 0 4px;
}

.liberty-newsletter-desc {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 16px;
}

/* Newsletter form — rendered in HubSpot iframe, minimal external styling */
#liberty-newsletter-container {
  max-width: 500px;
  margin: 0 auto;
}

/* ──────────────────────────────────────────── */
/* CTA Buttons (Browse Inventory, Directions)   */
/* ──────────────────────────────────────────── */

.liberty-btn-primary {
  display: inline-block;
  background: var(--liberty-red);
  color: #fff;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.liberty-btn-primary:hover {
  background: var(--liberty-red-hover);
  color: #fff;
}

.liberty-btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--liberty-blue);
  border: 2px solid var(--liberty-blue);
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.liberty-btn-secondary:hover {
  background: var(--liberty-blue);
  color: #fff;
  text-decoration: none;
}

/* ──────────────────────────────────────────── */
/* Value Proposition Bar                         */
/* ──────────────────────────────────────────── */

.liberty-value-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--liberty-white);
  padding: 16px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--liberty-grey);
  flex-wrap: wrap;
  gap: 12px;
}

.liberty-value-bar span {
  white-space: nowrap;
}

/* ──────────────────────────────────────────── */
/* Dealer Info Section                           */
/* ──────────────────────────────────────────── */

.liberty-dealer-info {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  align-items: flex-start;
}

.liberty-dealer-details {
  flex: 1;
}

.liberty-dealer-details h3 {
  font-size: 1.2rem;
  color: var(--liberty-blue);
  margin: 0 0 12px;
}

.liberty-dealer-details p {
  margin: 0 0 8px;
  color: var(--liberty-grey);
  font-size: 0.9rem;
}

.liberty-dealer-phone {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--liberty-blue);
}

.liberty-dealer-phone a {
  color: var(--liberty-blue);
  text-decoration: none;
}

.liberty-dealer-phone a:hover {
  color: var(--liberty-red);
}

.liberty-dealer-map {
  flex: 1;
  min-height: 250px;
  border-radius: 8px;
  overflow: hidden;
}

.liberty-dealer-map iframe {
  width: 100%;
  height: 100%;
  min-height: 250px;
  border: 0;
}

/* ──────────────────────────────────────────── */
/* Responsive                                    */
/* ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .liberty-products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .liberty-hubspot-form-wrapper {
    padding: 20px 16px;
    margin: 20px 0;
  }

  .liberty-dealer-info {
    flex-direction: column;
  }

  .liberty-dealer-map {
    width: 100%;
  }

  .liberty-value-bar {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .liberty-products-grid {
    grid-template-columns: 1fr;
  }

  .liberty-card-body {
    padding: 12px;
  }

  .liberty-form-header h3 {
    font-size: 1.1rem;
  }

  /* Make phone CTA prominent on mobile */
  .liberty-dealer-phone {
    font-size: 1.4rem;
  }

  .liberty-dealer-phone a {
    display: block;
    background: var(--liberty-blue);
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 6px;
    margin: 12px 0;
  }
}

/* ── Mobile: Hide secondary nav (wraps awkwardly on phones) ── */
@media (max-width: 768px) {
  #social-menu,
  .menu-secondary-menu-container {
    display: none !important;
  }
}
