/* ==========================================================================
   Brand Studio v2.1 — Display Components CSS
   Public Web (Jaspr SSR) — petfi.io

   Variables, responsive layout, and lightweight styles for:
   - Brand Section (inline landing section)
   - Sponsored Badge (inline badge)
   - Brand Banner (pre-footer)
   - Pet Card Sponsor Badge (card overlay)
   - Sponsor Section (pet profile placement)
   - Foundation Sponsor Badge (inline hero badge)
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --brand-primary: #2F5233;
  --brand-secondary: #D6C4A1;
  --brand-accent: #6B4F3A;
  --brand-soft: #6E8B6B;
}

/* ==========================================================================
   Brand Section — inline landing section (mockup 8.4)
   ========================================================================== */

.brand-section {
  padding: 48px 24px;
  margin: 0;
  font-family: 'Roboto', system-ui, sans-serif;
}

.brand-section__inner {
  max-width: 1024px;
  margin: 0 auto;
}

.brand-section__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9CA3AF;
  margin-bottom: 24px;
}

.brand-section__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.brand-section__logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-section__message {
  font-size: 15px;
  line-height: 1.5;
  color: #4B5563;
  margin: 0;
}

/* Product grid */
.brand-section__products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.brand-section__product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.brand-section__product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.brand-section__product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.brand-section__product-name {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1F2937;
  text-align: center;
}

/* Copy block */
.brand-section__copy {
  margin-bottom: 24px;
}

.brand-section__headline {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.brand-section__benefit {
  font-size: 14px;
  color: #6B7280;
  margin: 0 0 4px;
}

.brand-section__coupon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  border: 1.5px dashed;
  background: transparent;
  margin-top: 10px;
}

.brand-section__coupon:hover {
  opacity: 0.85;
}

.brand-section__coupon-icon {
  font-size: 16px;
}

/* CTA */
.brand-section__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.brand-section__cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ==========================================================================
   Sponsored Badge — inline badge (mockup 8.5)
   ========================================================================== */

.sponsored-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-family: 'Roboto', system-ui, sans-serif;
  transition: opacity 0.2s ease;
}

.sponsored-badge:hover {
  opacity: 0.85;
}

.sponsored-badge__logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.sponsored-badge__text {
  font-size: 12px;
  font-weight: 600;
  color: #4B5563;
  white-space: nowrap;
}

/* ==========================================================================
   Pet Card Sponsor Badge — card overlay (spec 9.1)
   ========================================================================== */

.pet-card__sponsor-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 5;
  pointer-events: none;
  font-family: 'Roboto', system-ui, sans-serif;
}

/* ==========================================================================
   Sponsor Section — pet profile placement (spec 9.2)
   ========================================================================== */

.sponsor-section {
  font-family: 'Roboto', system-ui, sans-serif;
}

.sponsor-section__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9CA3AF;
  margin-bottom: 16px;
}

.sponsor-section__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sponsor-section__logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.sponsor-section__name {
  font-size: 15px;
  font-weight: 700;
  color: #1F2937;
}

.sponsor-section__tagline {
  font-size: 12px;
  color: #6B7280;
}

.sponsor-section__headline {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.sponsor-section__subtitle {
  font-size: 14px;
  color: #4B5563;
  line-height: 1.5;
  margin: 0 0 16px;
}

.sponsor-section__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sponsor-section__coupon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  border: 1.5px dashed;
  background: transparent;
}

.sponsor-section__coupon:hover {
  opacity: 0.85;
}

.sponsor-section__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.sponsor-section__cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sponsor-section__extra {
  font-size: 12px;
  font-style: italic;
  color: #9CA3AF;
  margin: 16px 0 0;
}

/* ==========================================================================
   Foundation Sponsor Badge — inline hero badge (spec 9.3)
   ========================================================================== */

.foundation-sponsor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  font-family: 'Roboto', system-ui, sans-serif;
}

/* ==========================================================================
   Brand Banner — pre-footer (mockup 8.6)
   ========================================================================== */

.brand-banner {
  width: 100%;
  font-family: 'Roboto', system-ui, sans-serif;
}

.brand-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-banner__logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-banner__text {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.brand-banner__coupon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px dashed;
  background: transparent;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.brand-banner__coupon:hover {
  opacity: 0.85;
}

.brand-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.brand-banner__cta:hover {
  opacity: 0.9;
}

/* ==========================================================================
   Responsive: Mobile (< 768px)
   ========================================================================== */

@media (max-width: 767px) {
  /* Brand Section */
  .brand-section {
    padding: 32px 16px;
  }

  .brand-section__products {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .brand-section__product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .brand-section__product-img {
    width: 80px;
    height: 80px;
    aspect-ratio: auto;
    flex-shrink: 0;
  }

  .brand-section__product-name {
    flex: 1;
    text-align: left;
    padding: 8px 12px;
  }

  .brand-section__headline {
    font-size: 18px;
  }

  /* Pet Card Sponsor Badge */
  .pet-card__sponsor-badge {
    bottom: 6px;
    right: 6px;
    padding: 3px 6px;
  }

  .pet-card__sponsor-badge span {
    font-size: 9px;
  }

  /* Sponsor Section */
  .sponsor-section {
    padding: 20px 16px;
  }

  .sponsor-section__headline {
    font-size: 16px;
  }

  .sponsor-section__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sponsor-section__cta {
    justify-content: center;
  }

  /* Brand Banner */
  .brand-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .brand-banner__text {
    font-size: 13px;
  }

  .brand-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .brand-banner__cta {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   Responsive: Small mobile (< 375px)
   ========================================================================== */

@media (max-width: 374px) {
  .brand-section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sponsor-section__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .foundation-sponsor-badge {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-banner__actions {
    flex-direction: column;
  }

  .brand-banner__cta {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Responsive: Desktop (>= 1200px)
   ========================================================================== */

@media (min-width: 1200px) {
  .brand-section {
    padding: 56px 48px;
  }

  .brand-section__products {
    gap: 24px;
  }
}

/* ==========================================================================
   Animations & Utility
   ========================================================================== */

/* ==========================================================================
   Brand Strip — responsive
   ========================================================================== */

.brand-strip__inner {
  /* Default: 2 columns on desktop (set inline), override below for mobile */
}

@media (max-width: 768px) {
  .brand-strip__inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 374px) {
  .brand-strip__inner {
    gap: 24px !important;
  }
}

/* Product card hover */
.brand-strip a[href]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1) !important;
}

.brand-coupon-copied {
  animation: brand-pulse 0.3s ease;
}

@keyframes brand-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
