/* ==============================================
   Base Styles
   ============================================== */
#section-one {
  padding: 220px 0 80px 0;
}

#section-one h1 {
  text-align: center;
  font-size: 82px;
  font-weight: 700;
  line-height: 100%;
  color: #FFFFFF;
  margin: 0 0 30px 0;
}

#section-one p {
  text-align: center;
  max-width: 1200px;
  width: 100%;
  font-size: 21px;
  font-weight: 400;
  color: #94969D;
  margin: 0 auto;
}

#section-two {
  background-color: #FFFFFF;
  padding: 80px 0;
}

/* ==============================================
   Configurator Steps
   ============================================== */
.configurator-steps .step {
  display: none;
}

.configurator-steps .step.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.alarm-configurator-form h3 {
  font-size: 28px;
  line-height: 110%;
  color: #0D0E12;
  margin: 0 0 10px 0;
}
.alarm-configurator-form h3 span {
  color: #47B0F2;
}
.configurator-steps p.subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #0D0E12;
  margin: 0 0 40px 0;
}

/* ==============================================
   Category filters - camera video configurator
   ============================================== */
.camera-category-filter button.category-btn {
  display: inline-block;
  background-color: #ECEFF2;
  font-size: 14px;
  font-weight: 600;
  line-height: 100%;
  color: #0D0E12;
  text-decoration: none;
  cursor: pointer;
  padding: 14px 26px;
  border: 1px solid #ECEFF2;
  border-radius: 26px;
  transition: all 0.15s linear;
}
.camera-category-filter button.category-btn.active {
  background-color: #47B0F2;
  border: 1px solid #47B0F2;
}
.camera-category-filter button.category-btn:hover {
  background-color: #47B0F2;
  border: 1px solid #47B0F2;
}

/* ==============================================
   Product Options
   ============================================== */
.product-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.product-option {
  position: relative;
  text-align: center;
  border: 2px solid #ddd;
  padding: 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: slideUp 0.5s ease-out;
  animation-fill-mode: both;
}
.product-option input[type="radio"],
.product-option input[type="checkbox"] {
  display: none;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}

/* Delay animations for each product option */
.product-option:nth-child(1) { animation-delay: 0.1s; }
.product-option:nth-child(2) { animation-delay: 0.2s; }
.product-option:nth-child(3) { animation-delay: 0.3s; }
.product-option:nth-child(4) { animation-delay: 0.4s; }

.product-option:hover {
  border-color: #999;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-option.selected {
  border: 2px solid #47B0F2;
  box-shadow: 0 0 10px rgba(71, 176, 242, 0.3);
  transform: translateY(-5px);
}

.product-info {
  width: 100%;
  display: inline-block;
  vertical-align: middle;
}

.product-info h4 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #0D0E12;
}

.product-info .price {
  display: block;
  margin: 0 0 20px 0;
}
.product-info .price .amount {
  font-weight: 700;
}

.product-image {
  margin: 0 0 20px 0;
}
.product-image img {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 150px;
  height: auto;
  margin: 0 auto;
  transition: transform 0.3s ease;
}
.product-option:hover .product-image img {
  transform: scale(1.05);
}

/* ==============================================
   Product Description Toggle
   ============================================== */
.product-short-description {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 13px;
  overflow: hidden;
  padding: 20px 10px;
}
.product-short-description p {
  font-size: 14px;
  font-weight: 400;
  color: #94969D;
  margin: 0;
}
.read-more, .read-less {
  display: block;
  color: #47B0F2;
  cursor: pointer;
  text-align: center;
  padding: 10px 0;
  font-weight: 600;
  font-size: 14px;
}
.read-less {
  padding: 5px 0;
}
.read-more:hover, .read-less:hover {
  text-decoration: underline;
}
/* Animation for description toggle */
.product-short-description.active {
  display: flex;
  flex-wrap: wrap;
  animation: slideDown 0.3s ease-in-out;
}
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Enhanced Product Quantity Animation */
.product-quantity {
    display: flex;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px);
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0 20px;
    background: rgba(255,255,255,0);
    border-radius: 8px;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition:
        opacity 0.4s ease-out,
        transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        max-height 0.6s ease-in-out,
        margin 0.4s ease,
        padding 0.4s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}
.product-option.selected .product-quantity {
    max-height: 120px; /* Adjust as needed */
    opacity: 1;
    transform: translateY(0) scale(1);
    margin: 15px 0 0 0;
    padding: 15px 20px;
}
/* Optional: Add bounce effect */
@keyframes gentleBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.02); }
}
.product-option.selected .product-quantity {
    animation: gentleBounce 0.6s ease 0.3s 1;
}
.product-quantity input {
  width: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #94969d1a;
  padding: 18px 6px 17px 18px;
  border: 0;
}
.product-quantity button {
    width: 50px;
    height: 50px;
    background: #47B0F2;
    color: #0D0E12;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-quantity button:hover {
    background: #3a9ad9;
}
.product-quantity button.quantity-minus {
  border-top-left-radius: 26px;
  border-bottom-left-radius: 26px;
}
.product-quantity button.quantity-plus {
  border-top-right-radius: 26px;
  border-bottom-right-radius: 26px;
}


/* ==============================================
   Navigation Buttons
   ============================================== */
.step-navigation {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
}
.button.next-step,
.button.add-to-cart {
  display: inline-block;
  background-color: #47B0F2;
  font-size: 14px;
  font-weight: 600;
  line-height: 100%;
  color: #0D0E12;
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid #47B0F2;
  border-radius: 26px;
  cursor: pointer;
  transition: all 0.15s linear;
}
.button.next-step:hover,
.button.add-to-cart:hover {
  background-color: #FFFFFF;
}
.button.skip-step:hover {
  background-color: #FFFFFF !important;
}
.button.prev-step:hover {
  color: #ECEFF2;
  background-color: #FFFFFF;
}
.button.prev-step {
  display: inline-block;
  background-color: #ECEFF2;
  font-size: 14px;
  font-weight: 600;
  line-height: 100%;
  color: #0D0E12;
  text-decoration: none;
  cursor: pointer;
  padding: 14px 26px;
  border: 1px solid #ECEFF2;
  border-radius: 26px;
  transition: all 0.15s linear;
}
.button.prev-step:hover {
  background-color: #FFFFFF;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==============================================
   Configurator Summary (Sidebar)
   ============================================== */
.configurator-summary {
  position: sticky;
  top: 140px;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.configurator-summary h3 {
  font-size: 28px;
  line-height: 110%;
  color: #0D0E12;
  margin: 0 0 40px 0;
}
.selected-products-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.configurator-summary .selected-products-list li {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  animation: fadeSlideIn 0.5s ease-out forwards;
}
.configurator-summary .selected-products-list li ul {
  padding: 0;
  margin: 10px 0 0 0;
}
.configurator-summary .selected-products-list li ul li {
  display: flex;
  justify-content: space-between;
}
.selected-products-list li:last-of-type {
  border-bottom: none;
}
.configurator-summary .product-price {
  display: block;
  font-weight: bold;
  color: #47B0F2;
  margin: 0 0 0 10px;
}
.price-summary {
  margin-top: 10px;
}
.price-summary div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.price-summary .total-price {
  color: #47B0F2;
  font-weight: 700;
}
.grand-total {
  font-size: 1.1em;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  margin-top: 10px;
}

/* ==============================================
   Animations
   ============================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes highlight {
  0% { background-color: transparent; }
  50% { background-color: rgba(71, 176, 242, 0.2); }
  100% { background-color: transparent; }
}

.price-updated {
  animation: highlight 1s ease-out;
}


/* ==============================================
   Notification Styles
   ============================================== */
#configurator-message {
  margin: 40px 0 0 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #0D0E12;
}


/* ==============================================
   Responsive Styles
   ============================================== */
@media only screen and (max-width: 1440px) {
  #section-one h1 {
    font-size: 48px;
  }

  .product-options {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media only screen and (max-width: 768px) {
  #section-one {
    padding: 140px 0 40px 0;
  }
  #section-one h1 {
    font-size: 36px;
    margin: 0 0 20px 0;
  }
  #section-one p {
    font-size: 18px;
  }

  #section-two {
    padding: 40px 0 80px 0;
  }
  .button.prev-step,
  .button.next-step,
  .button.add-to-cart {
    font-size: 12px;
    padding: 12px;
  }
   button.button.skip-step {
     font-size: 12px !important;
     padding: 12px !important;
   }

  .camera-category-filter button.category-btn {
    font-size: 12px;
    padding: 12px;
  }

  .product-options {
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .configurator-summary {
    position: static;
    padding: 0;
    margin-top: 40px;
  }
  .configurator-steps .step {
    text-align: center;
  }

  .product-option {
    padding: 10px;
  }
  .product-info h4 {
    font-size: 14px;
  }
  .product-image img {
    max-height: 100px;
  }
  .product-options .product-info .price .amount {
    font-size: 12px;
  }
  .product-options .product-info .price small {
    font-size: 12px;
  }

}
