/**
 * BC Gymnastic Core Scoped CSS
 * Concept: Contemporary Gymnastics Editorial (2026-2027)
 * Scoped Prefix: bcg-
 */

:root {
  --bcg-color-bg: #F7F5F0;          /* Warm Ivory */
  --bcg-color-text: #202020;        /* Charcoal */
  --bcg-color-text-sec: #756F73;    /* Warm Gray (WCAG AA checked) */
  --bcg-color-plum: #4B3048;        /* Deep Plum */
  --bcg-color-plum-hover: #382336;  /* Deep Plum Darker */
  --bcg-color-plum-light: #F0E8EF;  /* Soft Plum Tint */
  --bcg-color-lilac: #E9E2ED;       /* Soft Lilac */
  --bcg-color-border: #E5E0D8;      /* Delicate Warm Border */
  --bcg-color-card: #FFFFFF;        /* Card Pure White */
  
  --bcg-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bcg-font-heading: 'Cormorant Garamond', Georgia, serif;
  
  --bcg-max-width: 1240px;
  --bcg-radius-sm: 4px;
  --bcg-radius-md: 8px;
  --bcg-radius-lg: 16px;
  --bcg-shadow-subtle: 0 4px 20px rgba(32, 32, 32, 0.04);
  --bcg-shadow-hover: 0 8px 30px rgba(75, 48, 72, 0.08);
  --bcg-transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   Base & Reset for BCG Elements
   ========================================================================== */
.bcg-catalogue-container,
.bcg-product-card,
.bcg-wa-cta,
.bcg-wa-form-card,
.bcg-product-gallery,
.bcg-product-meta-panel {
  box-sizing: border-box;
  font-family: var(--bcg-font-body);
  color: var(--bcg-color-text);
  -webkit-font-smoothing: antialiased;
}

.bcg-catalogue-container *,
.bcg-product-card *,
.bcg-wa-cta *,
.bcg-wa-form-card *,
.bcg-product-gallery *,
.bcg-product-meta-panel * {
  box-sizing: inherit;
}

/* Accessible Keyboard Focus Indicator */
.bcg-catalogue-container a:focus-visible,
.bcg-catalogue-container button:focus-visible,
.bcg-wa-cta:focus-visible,
.bcg-form-btn-submit:focus-visible,
.bcg-form-input:focus-visible,
.bcg-form-select:focus-visible,
.bcg-form-textarea:focus-visible,
.bcg-gallery-thumb-btn:focus-visible {
  outline: 2px solid var(--bcg-color-plum);
  outline-offset: 2px;
}

/* ==========================================================================
   Catalogue Controls (Search, Filters, Pills)
   ========================================================================== */
.bcg-catalogue-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .bcg-catalogue-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bcg-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bcg-pill {
  appearance: none;
  border: 1px solid var(--bcg-color-border);
  background: var(--bcg-color-card);
  color: var(--bcg-color-text);
  font-family: var(--bcg-font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--bcg-transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.bcg-pill:hover {
  border-color: var(--bcg-color-plum);
  color: var(--bcg-color-plum);
}

.bcg-pill.is-active {
  background: var(--bcg-color-plum);
  border-color: var(--bcg-color-plum);
  color: #ffffff;
}

.bcg-search-box {
  width: 100%;
  max-width: 340px;
}

.bcg-search-form {
  position: relative;
  width: 100%;
}

.bcg-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.bcg-search-icon {
  position: absolute;
  left: 14px;
  color: var(--bcg-color-text-sec);
  pointer-events: none;
}

.bcg-search-input {
  width: 100%;
  height: 44px;
  padding: 8px 36px 8px 40px;
  background: var(--bcg-color-card);
  border: 1px solid var(--bcg-color-border);
  border-radius: 30px;
  font-family: var(--bcg-font-body);
  font-size: 14px;
  color: var(--bcg-color-text);
  transition: var(--bcg-transition);
}

.bcg-search-input:focus {
  border-color: var(--bcg-color-plum);
  box-shadow: 0 0 0 3px var(--bcg-color-plum-light);
  outline: none;
}

.bcg-search-clear {
  position: absolute;
  right: 12px;
  font-size: 18px;
  color: var(--bcg-color-text-sec);
  text-decoration: none;
  padding: 4px;
  line-height: 1;
}

/* ==========================================================================
   Product Grid & Product Cards
   ========================================================================== */
.bcg-catalogue-grid,
.bcg-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 420px) {
  .bcg-catalogue-grid,
  .bcg-featured-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (min-width: 900px) {
  .bcg-catalogue-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .bcg-featured-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.bcg-product-card {
  background: var(--bcg-color-card);
  border: 1px solid var(--bcg-color-border);
  border-radius: var(--bcg-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--bcg-transition);
}

.bcg-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bcg-shadow-hover);
  border-color: rgba(75, 48, 72, 0.2);
}

.bcg-card-media-link {
  display: block;
  text-decoration: none;
}

.bcg-card-media-wrapper {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bcg-color-lilac);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bcg-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bcg-product-card:hover .bcg-card-img {
  transform: scale(1.04);
}

.bcg-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  width: 100%;
  height: 100%;
}

.bcg-placeholder-text {
  font-size: 13px;
  color: var(--bcg-color-plum);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bcg-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(247, 245, 240, 0.95);
  backdrop-filter: blur(4px);
  color: var(--bcg-color-plum);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(75, 48, 72, 0.15);
}

.bcg-card-info {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.bcg-card-code {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bcg-color-text-sec);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.bcg-card-title {
  font-family: var(--bcg-font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--bcg-color-text);
}

.bcg-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bcg-card-title a:hover {
  color: var(--bcg-color-plum);
}

.bcg-card-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--bcg-color-plum);
  margin: 0 0 16px;
}

.bcg-card-action {
  margin-top: auto;
}

.bcg-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bcg-color-text);
  text-decoration: none;
  transition: color 0.2s ease;
  min-height: 38px;
}

.bcg-card-btn:hover {
  color: var(--bcg-color-plum);
}

.bcg-card-btn svg {
  transition: transform 0.25s ease;
}

.bcg-card-btn:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Empty State & Pagination
   ========================================================================== */
.bcg-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: var(--bcg-color-card);
  border: 1px dashed var(--bcg-color-border);
  border-radius: var(--bcg-radius-md);
}

.bcg-empty-title {
  font-family: var(--bcg-font-heading);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--bcg-color-text);
}

.bcg-empty-desc {
  font-size: 15px;
  color: var(--bcg-color-text-sec);
  margin: 0 0 20px;
}

.bcg-btn-reset-filters {
  appearance: none;
  background: var(--bcg-color-plum);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--bcg-transition);
}

.bcg-btn-reset-filters:hover {
  background: var(--bcg-color-plum-hover);
}

.bcg-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.bcg-pagination ul.page-numbers {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  align-items: center;
}

.bcg-pagination a.page-numbers,
.bcg-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--bcg-radius-sm);
  border: 1px solid var(--bcg-color-border);
  background: var(--bcg-color-card);
  color: var(--bcg-color-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--bcg-transition);
}

.bcg-pagination a.page-numbers:hover {
  border-color: var(--bcg-color-plum);
  color: var(--bcg-color-plum);
}

.bcg-pagination span.page-numbers.current {
  background: var(--bcg-color-plum);
  border-color: var(--bcg-color-plum);
  color: #ffffff;
}

/* ==========================================================================
   WhatsApp CTA Buttons
   ========================================================================== */
.bcg-wa-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bcg-color-plum);
  color: #ffffff;
  border: 1px solid var(--bcg-color-plum);
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--bcg-font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--bcg-transition);
  min-height: 46px;
  line-height: 1;
}

.bcg-wa-cta:hover {
  background: var(--bcg-color-plum-hover);
  border-color: var(--bcg-color-plum-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 48, 72, 0.25);
}

.bcg-wa-cta svg {
  fill: currentColor;
  flex-shrink: 0;
}

.bcg-btn-large {
  padding: 16px 32px;
  font-size: 16px;
  min-height: 52px;
}

/* Secondary Button Style */
.bcg-btn-secondary {
  background: transparent;
  color: var(--bcg-color-text);
  border: 1px solid var(--bcg-color-border);
}

.bcg-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--bcg-color-text);
  color: var(--bcg-color-text);
}

/* ==========================================================================
   WhatsApp Consultation Form (/custom-leotard/)
   ========================================================================== */
.bcg-wa-form-card {
  background: var(--bcg-color-card);
  border: 1px solid var(--bcg-color-border);
  border-radius: var(--bcg-radius-lg);
  padding: 36px 32px;
  box-shadow: var(--bcg-shadow-subtle);
  margin: 0 auto;
}

@media (max-width: 480px) {
  .bcg-wa-form-card {
    padding: 24px 20px;
  }
}

.bcg-form-row {
  margin-bottom: 20px;
}

.bcg-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .bcg-form-grid-2 {
    grid-template-columns: 1.4fr 1fr;
  }
}

.bcg-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--bcg-color-text);
}

.bcg-req {
  color: #c93b2b;
}

.bcg-form-input,
.bcg-form-select,
.bcg-form-textarea {
  width: 100%;
  font-family: var(--bcg-font-body);
  font-size: 15px;
  color: var(--bcg-color-text);
  background: #fff;
  border: 1px solid var(--bcg-color-border);
  border-radius: var(--bcg-radius-sm);
  padding: 10px 14px;
  transition: var(--bcg-transition);
  min-height: 46px;
}

.bcg-form-textarea {
  min-height: 90px;
  resize: vertical;
}

.bcg-form-input:focus,
.bcg-form-select:focus,
.bcg-form-textarea:focus {
  border-color: var(--bcg-color-plum);
  box-shadow: 0 0 0 3px var(--bcg-color-plum-light);
  outline: none;
}

.bcg-form-help {
  display: block;
  font-size: 12px;
  color: var(--bcg-color-text-sec);
  margin-top: 4px;
}

.bcg-form-btn-submit {
  width: 100%;
  appearance: none;
  background: var(--bcg-color-plum);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 15px 24px;
  font-family: var(--bcg-font-body);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--bcg-transition);
  min-height: 52px;
}

.bcg-form-btn-submit:hover {
  background: var(--bcg-color-plum-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 48, 72, 0.25);
}

.bcg-form-disclaimer {
  font-size: 12px;
  line-height: 1.5;
  color: var(--bcg-color-text-sec);
  text-align: center;
  margin-top: 14px;
  margin-bottom: 0;
}

/* ==========================================================================
   Mobile Sticky Bottom CTA Bar (Landing Page)
   ========================================================================== */
.bcg-mobile-sticky-bar {
  display: none;
}

@media (max-width: 767px) {
  .bcg-mobile-sticky-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(247, 245, 240, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--bcg-color-border);
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  }

  .bcg-mobile-sticky-bar .bcg-wa-cta {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }

  /* Add padding bottom to body when sticky bar is active so content is not blocked */
  body.has-bcg-sticky-bar {
    padding-bottom: 80px;
  }
}

/* ==========================================================================
   Single Product Detail (Gallery & Meta)
   ========================================================================== */
.bcg-single-product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 860px) {
  .bcg-single-product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
  }
}

.bcg-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bcg-gallery-main {
  aspect-ratio: 3 / 4;
  background: var(--bcg-color-lilac);
  border-radius: var(--bcg-radius-md);
  overflow: hidden;
  border: 1px solid var(--bcg-color-border);
}

.bcg-gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bcg-gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.bcg-gallery-thumb-btn {
  appearance: none;
  background: none;
  border: 2px solid transparent;
  padding: 0;
  border-radius: var(--bcg-radius-sm);
  cursor: pointer;
  overflow: hidden;
  width: 72px;
  height: 96px;
  flex-shrink: 0;
  transition: var(--bcg-transition);
}

.bcg-gallery-thumb-btn.is-active,
.bcg-gallery-thumb-btn:hover {
  border-color: var(--bcg-color-plum);
}

.bcg-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bcg-product-meta-panel {
  display: flex;
  flex-direction: column;
}

.bcg-meta-category {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bcg-color-plum);
  margin-bottom: 8px;
}

.bcg-meta-title {
  font-family: var(--bcg-font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--bcg-color-text);
}

.bcg-meta-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--bcg-color-text-sec);
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  align-self: flex-start;
}

.bcg-meta-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bcg-color-border);
}

.bcg-meta-price-label {
  font-size: 14px;
  color: var(--bcg-color-text-sec);
}

.bcg-meta-price-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--bcg-color-plum);
}

.bcg-meta-notice-editorial {
  background: var(--bcg-color-lilac);
  border-left: 3px solid var(--bcg-color-plum);
  padding: 12px 16px;
  border-radius: 0 var(--bcg-radius-sm) var(--bcg-radius-sm) 0;
  margin-bottom: 24px;
}

.bcg-meta-notice-editorial p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--bcg-color-text);
}

.bcg-meta-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.bcg-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 480px) {
  .bcg-spec-item {
    flex-direction: row;
    gap: 16px;
  }
}

.bcg-spec-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bcg-color-text-sec);
  min-width: 140px;
}

.bcg-spec-val {
  font-size: 14px;
  color: var(--bcg-color-text);
  font-weight: 500;
}

.bcg-meta-cta-wrap {
  margin-top: 10px;
}

/* ==========================================================================
   Motion, Parallax & Reduced Motion
   ========================================================================== */
.bcg-parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .bcg-parallax-layer,
  .bcg-product-card,
  .bcg-card-img,
  .bcg-wa-cta,
  .bcg-form-btn-submit {
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
