/* Base Styles */
* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

.page-section {
   background-color: #f4f4f4;
}

.specials-wrapper {
   font-family: Arial, sans-serif;
   line-height: 1.6;
   background-color: #f4f4f4;
}

.specials-wrapper a {
   text-decoration: none !important;
}

.specials-container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 5px;
}

/* Carousel Styles */
.specials-carousel {
   position: relative;
   overflow: hidden;
   margin-bottom: 30px;
   background-color: #fff;
   padding: 20px 60px;
   box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.specials-carousel-container {
   display: flex;
   transition: transform 0.3s ease-in-out;
   margin-left: 0;
}

.specials-carousel-item {
   flex: 0 0 calc(100% / 5);
   padding: 10px;
   text-align: center;
   color: #333;
   cursor: pointer;
}

.specials-carousel-item img {
   max-width: 100%;
   height: auto;
   margin-bottom: 10px;
}

.specials-carousel-item p {
   font-size: 14px;
   font-weight: bold;
}

.specials-carousel-arrow {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   background: rgba(0, 0, 0, 0.5);
   color: white;
   border: none;
   padding: 10px 15px;
   cursor: pointer;
   font-size: 18px;
   z-index: 1;
   width: 40px;
   text-align: center;
}

.specials-carousel-arrow.disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

.specials-carousel-arrow.specials-prev {
   left: 10px;
}

.specials-carousel-arrow.specials-next {
   right: 10px;
}

/* Offer Styles */
.specials-offer {
   border: 1px solid #ddd;
   margin-bottom: 20px;
   padding: 10px;
   background-color: #fff;
   box-shadow: 0 2px 5px rgba(0,0,0,0.1);
   background-size: cover;
   background-position: center;
}

.specials-offer-header {
   position: relative;
   margin-bottom: 10px;
   display: flex;
   align-items: flex-start;
   padding: 0;
}

.specials-logo {
   max-width: 100px;
   margin-right: 15px;
}

.specials-header-text {
   flex-grow: 1;
   padding-top: 0;
}

.specials-offer-header h2 {
   font-size: 24px;
   color: #333;
   margin: 0 0 5px 0;
}

.specials-vehicle-specs {
   font-size: 18px;
   color: #666;
   font-weight: 600;
   margin: 0;
}

.specials-price-container {
   text-align: right;
}

.specials-msrp {
   font-size: 18px;
   font-weight: bold;
   color: #666;
   margin: 0;
}

.specials-offer-subheader {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-top: 10px;
   margin-bottom: 15px;
}

.specials-callout {
   font-size: 18px;
   font-weight: bold;
   color: #1A1A1A;
   margin: 0;
}

.specials-offer-main-content {
   display: flex;
   justify-content: space-between;
   margin-bottom: 20px;
}

.specials-offer-image-section {
   flex: 0 0 45%;
   text-align: center;
}

.specials-offer-image-section img {
   width: 100%;
   height: auto;
   margin-bottom: 10px;
}

.specials-offer-details {
   flex: 0 0 50%;
}

/* Payment Section Styles */
.specials-payment-section {
   background-color: #f8f8f8;
   border: 1px solid #e0e0e0;
   padding: 15px;
   margin-bottom: 20px;
   display: flex;
   flex-wrap: wrap;
   align-items: center;
}

.specials-payment-label {
   background-color: #fff;
   color: #1A1A1A;
   font-size: 12px;
   font-weight: bold;
   padding: 3px 8px;
   border: 1px solid #1A1A1A;
   display: inline-block;
   margin-right: 15px;
}

.specials-payment-amount {
   font-size: 36px;
   font-weight: bold;
   color: #1A1A1A;
   margin-right: 5px;
}

.specials-payment-period {
   font-size: 14px;
   color: #666;
   align-self: flex-end;
   margin-bottom: 5px;
}

.specials-payment-details {
   flex-basis: 100%;
   margin-top: 10px;
   font-size: 14px;
   color: #333;
}

.specials-payment-details p {
   margin: 0;
   line-height: 1.4;
}

/* Save Section Styles */
.specials-save-section {
    margin-bottom: 20px;
    padding-right: 30px;
}

.specials-save-section .specials-payment-details {
    flex-basis: 100%;
    margin-top: 10px;
    text-align: right;
}

.specials-save-section .specials-msrp-display {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.specials-save-section .specials-payment-label {
    float: right;
    margin-bottom: 10px;
}

.specials-save-section .specials-sale-price,
.specials-save-section .specials-save-amount {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
    margin: 5px 0;
}

.specials-price-label {
    font-size: 16px;
    color: #666;
}

/* Button Styles */
.specials-offer-actions {
   display: flex;
   justify-content: space-between;
   flex-wrap: wrap;
}

.specials-button,
#specials-leadForm button[type="submit"] {
   display: inline-block;
   padding: 10px 20px;
   color: white;
   text-decoration: none;
   border-radius: 5px;
   font-size: 16px;
   font-weight: bold;
   text-align: center;
   margin-bottom: 10px;
   flex: 1 0 calc(33.33% - 10px);
   max-width: calc(33.33% - 10px);
   transition: background-color 0.3s ease;
}

.specials-button:hover,
#specials-leadForm button[type="submit"] {
   color: white;
}

.specials-button.specials-claim-special,
#specials-leadForm button[type="submit"] {
    background-color: #1A1A1A;
}

.specials-button.specials-claim-special:hover,
#specials-leadForm button[type="submit"]:hover {
    background-color: #AAA8A6;
}

.specials-button.specials-view-inventory,
.specials-button.specials-value-trade {
    background-color: #333333;
}

.specials-button.specials-view-inventory:hover,
.specials-button.specials-value-trade:hover {
    background-color: #AAA8A6;
}

.specials-offer-disclaimer {
   font-size: 12px;
   color: #666;
   margin-top: 15px;
}

/* Modal Styles */
.specials-modal {
   display: none;
   position: fixed;
   z-index: 10000;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.5);
   overflow-y: auto;
}

.specials-modal-content {
   background-color: #fefefe;
   margin: 5% auto;
   padding: 20px;
   border: 1px solid #888;
   width: 50%;
   max-width: 500px;
   max-height: 90vh;
   overflow-y: auto;
   position: relative;
}

#specials-closeModal {
   display: block;
   margin: 20px auto;
   padding: 10px 20px;
   background-color: #1A1A1A;
   color: white;
   border: none;
   border-radius: 5px;
   font-size: 16px;
   font-weight: bold;
   cursor: pointer;
   transition: background-color 0.3s ease;
}

#specials-closeModal:hover {
   background-color: #AAA8A6;
}

.specials-close {
   color: #aaa;
   float: right;
   font-size: 28px;
   font-weight: bold;
   cursor: pointer;
}

.specials-close:hover,
.specials-close:focus {
   color: #000;
   text-decoration: none;
   cursor: pointer;
}

.specials-thank-you-message {
   padding-top: 40px;
}

/* Form Styles */
.specials-form-group {
   margin-bottom: 15px;
}

.specials-form-group label {
   display: block;
   margin-bottom: 5px;
   font-weight: bold;
}

.specials-form-group input,
.specials-form-group textarea {
   width: 100%;
   padding: 8px;
   border: 1px solid #ddd;
   border-radius: 4px;
}

.specials-form-group textarea {
   height: 100px;
}

.specials-form-group input.specials-error,
.specials-form-group textarea.specials-error {
   border-color: #1A1A1A;
}

.specials-error-message {
   color: #1A1A1A;
   font-size: 12px;
   margin-top: 5px;
}

.specials-form-message {
   padding: 10px;
   margin-top: 15px;
   border-radius: 4px;
   display: none;
}

.specials-form-message.specials-success {
   background-color: #d4edda;
   color: #155724;
   border: 1px solid #c3e6cb;
}

.specials-form-message.specials-error {
   background-color: #f8d7da;
   color: #721c24;
   border: 1px solid #f5c6cb;
}

/* Lazy loading styles */
.specials-lazy {
   opacity: 0;
   transition: opacity 0.3s;
}

.specials-lazy.specials-loaded {
   opacity: 1;
}

/* Loading indicator */
.specials-loading-indicator {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   background: rgba(0, 0, 0, 0.7);
   color: white;
   padding: 5px 10px;
   border-radius: 3px;
   font-size: 12px;
   z-index: 1000;
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
  .specials-carousel-item {
      flex: 0 0 calc(100% / 3);
  }

  .specials-modal-content {
      width: 70%;
  }
}

@media screen and (max-width: 768px) {
  .specials-container {
      padding: 5px;
  }

  .specials-carousel {
      padding: 0;
      margin-bottom: 15px;
  }

  .specials-carousel-item {
      padding: 5px;
  }

  .specials-carousel-arrow {
      padding: 5px 10px;
  }

  .specials-carousel-arrow.specials-prev {
      left: 5px;
  }

  .specials-carousel-arrow.specials-next {
      right: 5px;
  }

  .specials-offer {
      width: calc(100% - 10px);
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 15px;
      padding: 10px;
  }

  .specials-offer-header {
      flex-wrap: wrap;
      position: relative;
  }

  .specials-logo {
      order: 1;
      margin-bottom: 10px;
  }

  .specials-header-text {
      order: 2;
      width: 100%;
  }

  .specials-price-container {
      position: absolute;
      top: 24px;
      right: 0;
      width: auto;
      text-align: right;
      margin-top: 0;
  }

  .specials-msrp {
      font-size: 14px;
      display: inline-block;
      margin-left: 0;
  }

  .specials-save-section {
      padding-right: 5px;
  }

  .specials-offer-main-content {
      flex-direction: column;
  }

  .specials-offer-image-section,
  .specials-offer-details {
      flex: 0 0 100%;
  }

  .specials-offer-details {
      margin-top: 20px;
  }

  .specials-button {
      flex: 1 0 100%;
      max-width: 100%;
  }

  .specials-modal-content {
      width: 90%;
      margin: 10% auto;
  }

  .specials-offer-subheader {
      flex-direction: column;
      align-items: flex-start;
      text-align: left;
      margin-top: 5px;
  }

  .specials-callout {
      margin-bottom: 10px;
  }

  .specials-vehicle-specs {
      font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .specials-container {
      padding: 5px;
  }

  .specials-carousel {
      padding: 0 40px;
      margin-bottom: 10px;
  }

  .specials-carousel-item {
      flex: 0 0 100%;
      padding: 2px;
  }

  .specials-carousel-arrow {
      padding: 3px 8px;
      font-size: 16px;
  }

  .specials-carousel-arrow.specials-prev {
      left: 2px;
  }

  .specials-carousel-arrow.specials-next {
      right: 2px;
  }

  .specials-offer {
      width: calc(100% - 5px);
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 10px;
      padding: 10px;
  }

  .specials-offer-header h2 {
      font-size: 20px;
  }

  .specials-header-text {
      width: 100%;
  }

  .specials-price-container {
      position: absolute;
      top: 42px;
      right: 0;
      width: auto;
  }

  .specials-msrp {
      font-size: 14px;
      display: inline-block;
      margin-left: 0;
  }

  .specials-callout {
      font-size: 16px;
  }

  .specials-vehicle-specs {
      font-size: 16px;
  }

  .specials-button {
      font-size: 14px;
      padding: 8px 15px;
  }

  .specials-save-section {
      padding-right: 5px;
  }
}

@media screen and (max-height: 600px) {
   .specials-modal-content {
       margin: 2% auto;
       max-height: 96vh;
   }
}

/* Tablet landscape orientation */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
   .specials-carousel-item {
       flex: 0 0 calc(100% / 4);
   }
}

/* Hide buttons on print */
@media print {
   .specials-button,
   .specials-carousel-arrow {
       display: none;
   }
}