/* ================================================
   Camppass Configurator - Elementor Customizable
   ================================================ */

:root {
  /* Default colors - overridden by Elementor controls */
  --cfg-text: #333;
  --cfg-light-bg: #f5f5f5;
  --cfg-dark: #333;
  --cfg-accent: #2563eb;
  --cfg-bg-white: #fff;
  --cfg-bg-beige: #f9f7f4;
}

/* Reset & Base */
.camppass-configurator * {
  box-sizing: border-box;
}

.camppass-configurator {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cfg-bg-beige);
  color: var(--cfg-text);
  width: 100%;
  min-height: 100vh;
}

/* ================================================
   SKELETON LOADING ANIMATION
   ================================================ */

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cfg-skeleton {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.cfg-skeleton-header {
  background: var(--cfg-bg-white);
  padding: 40px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cfg-skeleton-tabs {
  background: var(--cfg-bg-white);
  padding: 20px;
}

.cfg-skeleton-content {
  padding: 40px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.cfg-skeleton-box {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.cfg-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.cfg-skeleton-card {
  background: var(--cfg-bg-white);
  height: 320px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.cfg-skeleton-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes skeleton-shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* ================================================
   HEADER - 3 Column Layout
   ================================================ */

.cfg-header {
  background: var(--cfg-bg-white);
  padding: 40px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cfg-title-wrap {
  flex: 0 0 200px;
}

.cfg-build-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--cfg-text);
}

.cfg-title {
  font-size: 42px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  margin: 0;
  color: var(--cfg-text);
}

.cfg-gallery-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.cfg-gallery-btn {
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  display: inline-block;
  cursor: pointer;
  font-size: 24px;
  color: var(--cfg-text);
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
  text-align: center;
  line-height: 40px;
  vertical-align: middle;
}

.cfg-gallery-btn svg,
.cfg-gallery-btn i,
.cfg-gallery-btn span,
.cfg-gallery-btn span svg,
.cfg-gallery-btn span i {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
  pointer-events: none;
}

.cfg-gallery-btn:hover {
  color: var(--cfg-accent);
  transform: scale(1.1);
}

.cfg-gallery-btn:hover svg,
.cfg-gallery-btn:hover span svg {
  fill: currentColor;
}

.cfg-gallery {
  position: relative;
  max-width: 600px;
  height: 300px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.cfg-gallery:active {
  cursor: grabbing;
}

.cfg-gallery-track {
  display: flex;
  transition: transform 0.3s ease;
  height: 100%;
}

.cfg-gallery-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfg-gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.cfg-price-wrap {
  flex: 0 0 200px;
  text-align: right;
}

.cfg-header-price {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 4px 0;
  color: var(--cfg-text);
}

.cfg-price-label {
  font-size: 14px;
  color: var(--cfg-text);
  font-weight: 500;
  opacity: 0.7;
}

.cfg-option-price {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--cfg-text);
}

/* ================================================
   TAB NAVIGATION - Horizontal Groups
   ================================================ */

.cfg-tabs {
  background: var(--cfg-bg-white);
  display: flex;
}
.cfg-tab.is-active {
  background: var(--cfg-light-bg) !important;
  color: var(--cfg-text) !important;
}
.cfg-tab {
  position: relative;
  flex: 1;
  padding: 20px 24px;
  border: 3px solid var(--cfg-light-bg);
  background: var(--cfg-bg-white) !important;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cfg-text) !important;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  overflow: hidden;
}



.cfg-tab:hover {
  background: var(--cfg-light-bg) !important;
}



.cfg-tab.is-active::before {
  width: 100%;
}

.cfg-tab.is-summary {
  background: var(--cfg-dark) !important;
  color: #fff !important;
  flex: 0 0 auto;
  padding-left: 40px;
  padding-right: 40px;
  border-color: var(--cfg-dark);
}

.cfg-tab.is-summary:hover {
  background: var(--cfg-accent);
  border-color: var(--cfg-accent);
}

.cfg-tab.is-summary::before {
  display: none;
}

/* ================================================
   CONTENT AREA
   ================================================ */

.cfg-content {
  padding: 40px 60px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Substeps Horizontal Navigation */
.cfg-substeps-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.cfg-substep-btn {
  padding: 12px 24px;
  border: 1px solid var(--cfg-dark);
  background: transparent !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--cfg-text) !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.cfg-substep-btn:hover {
  background: var(--cfg-light-bg);
}

.cfg-substep-btn.is-active {
  background: var(--cfg-accent);
  color: #fff;
  border-color: var(--cfg-accent);
}

.cfg-substep-btn.is-completed {
  border-color: #10b981;
  color: #10b981;
}

/* Progress + Substep Title */
.cfg-substep-header {
  margin-bottom: 30px;
}

.cfg-progress-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--cfg-text);
  opacity: 0.7;
  margin-bottom: 6px;
}

.cfg-substep-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--cfg-text);
}

/* ================================================
   OPTIONS - Large Image Cards
   ================================================ */

.cfg-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.cfg-opt {
  position: relative;
  background: var(--cfg-bg-white);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.2s;
}

.cfg-opt:hover {
  border-color: var(--cfg-light-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cfg-opt.selected {
  border-color: var(--cfg-dark) !important;
}

.cfg-opt input[type="radio"],
.cfg-opt input[type="checkbox"] {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 10;
  margin: 0;
}

.cfg-card-media {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fafafa;
  position: relative;
}

.cfg-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cfg-zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 65px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  z-index: 15;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333;
  padding: 0;
  overflow: visible;
}

.cfg-zoom-btn svg,
.cfg-zoom-btn i,
.cfg-zoom-btn .e-font-icon-svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  fill: currentColor !important;
  color: #333 !important;
  display: block !important;
  pointer-events: none;
  margin: 0 !important;
  flex-shrink: 0;
}

.cfg-zoom-btn svg path {
  fill: currentColor !important;
}

.cfg-zoom-btn:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cfg-zoom-btn:hover svg,
.cfg-zoom-btn:hover svg path {
  fill: #000 !important;
}

.cfg-opt-info {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cfg-bg-white);
  gap: 12px;
}

.cfg-opt-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  color: var(--cfg-text);
}

/* Color swatches (if type=color) */
.cfg-swatch {
  width: 100%;
  height: 200px;
  display: block;
}

/* ================================================
   NAVIGATION BUTTONS
   ================================================ */

.cfg-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
}

.cfg-btn {
  padding: 16px 40px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  background: var(--cfg-accent);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cfg-btn svg,
.cfg-btn i,
.cfg-btn span,
.cfg-btn span svg,
.cfg-btn span i {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

.cfg-btn:hover svg,
.cfg-btn:hover span svg {
  fill: currentColor;
}

.cfg-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cfg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ================================================
   SUMMARY PANEL (Modal/Overlay Style)
   ================================================ */

.cfg-summary-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: none;
}

.cfg-summary-overlay.is-open {
  display: block;
}

.cfg-summary-panel {
  position: fixed;
  top: 0;
  right: -600px;
  width: 600px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  overflow-y: auto;
  transition: right 0.3s ease;
  padding: 40px;
}

.cfg-summary-panel.is-open {
  right: 0;
}

.cfg-summary-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  color: var(--cfg-text);
  opacity: 0.7;
}

.cfg-summary h3 {
  font-size: 28px;
  margin: 0 0 24px 0;
  padding-top: 20px;
  font-weight: 700;
  color: var(--cfg-text);
}

.cfg-summary-list {
  margin-bottom: 30px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.cfg-summary-mod {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cfg-light-bg);
}

.cfg-summary-mod strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--cfg-text);
}

.cfg-summary-lines div {
  font-size: 14px;
  color: var(--cfg-text);
  opacity: 0.7;
  margin-bottom: 4px;
}

.cfg-total {
  font-size: 24px;
  font-weight: 700;
  padding-top: 20px;
  border-top: 2px solid var(--cfg-accent);
  display: flex;
  justify-content: space-between;
  color: var(--cfg-text);
}

/* Form inside summary */
.cfg-form {
  margin-top: 40px;
}

.cfg-form > div {
  margin-bottom: 20px;
}

.cfg-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--cfg-text);
}

.cfg-form input[type="text"],
.cfg-form input[type="email"],
.cfg-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--cfg-light-bg);
  font-size: 14px;
  font-family: inherit;
  color: var(--cfg-text);
}

.cfg-form button[type="submit"] {
  width: 100%;
  padding: 16px;
  background: var(--cfg-accent);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.cfg-form button[type="submit"]:hover {
  opacity: 0.9;
}

/* ================================================
   LOADING & ERROR STATES
   ================================================ */

.cfg-loading,
.cfg-error {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: var(--cfg-text);
}

.cfg-error {
  color: #d32f2f;
}

.cfg-success {
  background: linear-gradient(135deg, #fea726 0%, #ffb84d 100%);
  padding: 40px;
  border-radius: 16px;
  color: #222222;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 40px rgba(254, 167, 38, 0.3);
  border: 3px solid #fff;
  position: relative;
  overflow: hidden;
  margin-top: 20px;
}

.cfg-success::before {
  content: '✓';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 120px;
  color: rgba(255, 255, 255, 0.15);
  font-weight: bold;
}

.cfg-success strong {
  display: block;
  font-size: 32px;
  margin-top: 12px;
  color: #161616;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ================================================
   IMAGE MODAL / LIGHTBOX
   ================================================ */

.cfg-image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.cfg-image-modal.is-open {
  opacity: 1;
}

.cfg-image-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cfg-image-modal-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.cfg-image-modal-title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.cfg-image-modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50% !important;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.cfg-image-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
  .cfg-header {
    flex-direction: column;
    text-align: center;
  }
  
  .cfg-title-wrap,
  .cfg-price-wrap {
    flex: 1 1 auto;
  }
  
  .cfg-price-wrap {
    text-align: center;
  }
  
  .cfg-options {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .cfg-header {
    padding: 16px;
    gap: 16px;
  }
  
  .cfg-title-wrap {
    flex: 0 0 auto;
  }
  
  .cfg-build-label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .cfg-title {
    font-size: 24px;
  }
  
  .cfg-gallery {
    max-width: 100%;
    height: 200px;
  }
  
  .cfg-price-wrap {
    flex: 0 0 auto;
    padding: 8px 0;
    text-align: center;
  }
  
  .cfg-content {
    padding: 16px;
  }
  
  .cfg-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .cfg-tab {
    flex: 1 1 calc(50% - 2px);
    font-size: 11px;
    padding: 12px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  
  .cfg-summary-panel {
    width: 100%;
    right: -100%;
  }
  
  .cfg-nav-buttons {
    flex-direction: column;
  }
  
  .cfg-btn {
    width: 100%;
  }
  
  .cfg-image-modal-close {
    top: 10px;
    right: 10px;
  }
  
  .cfg-image-modal-content {
    max-width: 95vw;
  }
}
