/**
 * @file
 * Additional custom styles for Olivero Child theme.
 */

/* Custom utility classes */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--olivero-child-primary);
}

.bg-primary {
  background-color: var(--olivero-child-primary);
  color: white;
}

.rounded {
  border-radius: 0.375rem;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Custom components */
.custom-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.custom-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: var(--olivero-child-accent);
  color: white;
}

/* Form enhancements */
.form-item input,
.form-item textarea,
.form-item select {
  border: 2px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.75rem;
  transition: border-color 0.3s ease;
}

.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus {
  border-color: var(--olivero-child-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Animation utilities */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-cards .view-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.product-cards .view-content .views-row {
    flex: 1 1 calc(33.333333% - 1rem);
}

/* eBay Product Layout Styles */
.ebay-product-layout .product-container {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.product-images {
    flex: 1;
    max-width: 500px;
}

.product-details {
    flex: 1;
    padding-left: 1rem;
}

/* Main Swiper Styles */
.product-swiper {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.product-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
}

.product-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev {
    color: var(--olivero-child-primary);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.product-swiper .swiper-button-next:after,
.product-swiper .swiper-button-prev:after {
    font-size: 16px;
}

/* Thumbnail Swiper Styles */
.product-thumbs {
    width: 100%;
    height: 80px;
    margin-top: 10px;
}

.product-thumbs .swiper-slide {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.product-thumbs .swiper-slide:hover {
    border-color: var(--olivero-child-primary);
}

.product-thumbs .swiper-slide.swiper-slide-thumb-active {
    border-color: var(--olivero-child-primary);
}

.product-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details Styles */
.product-title h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--olivero-child-text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--olivero-child-primary);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 115, 170, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #555;
}

.product-additional-info {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.product-additional-info .field {
    margin-bottom: 1rem;
}

.product-additional-info .field__label {
    font-weight: 600;
    color: var(--olivero-child-text);
    margin-bottom: 0.5rem;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ebay-product-layout .product-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .product-details {
        padding-left: 0;
    }
    
    .product-swiper {
        height: 300px;
    }
    
    .product-title h1 {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
}
/* Expand Gallery Button */
.expand-gallery-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.expand-gallery-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.gallery-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
}

.gallery-close:hover {
  color: #ccc;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 60px 20px 20px;
}

.gallery-main-image {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  min-height: 400px;
  max-height: calc(100vh - 200px);
}

.gallery-main-image img {
  max-width: 90%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  font-size: 28px;
  font-weight: bold;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 1002;
  user-select: none;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
  left: 30px;
}

.gallery-next {
  right: 30px;
}

.gallery-thumbnails {
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 8px;
}

.gallery-thumbs-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-x: auto;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.gallery-thumb:hover {
  border-color: #fff;
  opacity: 0.8;
}

.gallery-thumb.active {
  border-color: #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.gallery-counter {
  text-align: center;
  color: #fff;
  font-size: 16px;
  margin-top: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-container {
    padding: 40px 10px 10px;
  }
  
  .gallery-main-image {
    min-height: 300px;
    max-height: calc(100vh - 150px);
  }
  
  .gallery-nav {
    font-size: 20px;
    width: 40px;
    height: 40px;
  }
  
  .gallery-prev {
    left: 15px;
  }
  
  .gallery-next {
    right: 15px;
  }
  
  .gallery-thumb {
    width: 60px;
    height: 60px;
  }
  
  .expand-gallery-btn {
    width: 35px;
    height: 35px;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-main-image {
    min-height: 250px;
  }
  
  .gallery-nav {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  .gallery-prev {
    left: 10px;
  }
  
  .gallery-next {
    right: 10px;
  }
  
  .gallery-main-image img {
    max-width: 95%;
  }
}

/* Shipping Calculator Styles */
.shipping-calculator-section {
  margin-top: 30px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.shipping-calculator-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.4em;
  font-weight: 600;
}

.shipping-form-container {
  max-width: 500px;
}

.shipping-form .form-group {
  margin-bottom: 15px;
}

.shipping-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.input-group {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.input-group input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* CAPTCHA Styles */
.captcha-group {
  margin-top: 15px;
}

.captcha-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.captcha-image-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  justify-content: center;
}

#captchaImage {
  max-width: 200px;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.captcha-refresh {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.captcha-refresh:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

#captcha_response {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  text-align: center;
  font-family: monospace;
  letter-spacing: 2px;
}

#captcha_response:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.calculate-btn {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.calculate-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.calculate-btn:active {
  transform: translateY(0);
}

.calculate-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.shipping-results {
  margin-top: 20px;
  padding: 20px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  animation: slideDown 0.3s ease;
}

.shipping-results h4 {
  margin: 0 0 15px 0;
  color: #155724;
  font-size: 1.2em;
}

.shipping-details-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #c3e6cb;
}

.shipping-details-item:last-child {
  border-bottom: none;
}

.shipping-method {
  font-weight: 500;
  color: #155724;
}

.shipping-cost {
  font-weight: 600;
  color: #155724;
}

.shipping-cost.free {
  color: #28a745;
  font-size: 1.1em;
}

.shipping-carrier {
  font-size: 0.85em;
  color: #007bff;
  margin-top: 2px;
  font-weight: 500;
}

.shipping-time {
  font-size: 0.9em;
  color: #6c757d;
  margin-top: 4px;
}

.shipping-error {
  margin-top: 20px;
  padding: 15px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  animation: slideDown 0.3s ease;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-icon {
  font-size: 1.2em;
}

.error-message {
  color: #721c24;
  font-weight: 500;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design for Shipping Calculator */
@media (max-width: 768px) {
  .shipping-calculator-section {
    margin-top: 20px;
    padding: 20px 15px;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .calculate-btn {
    width: 100%;
    margin-top: 10px;
  }
  
  .captcha-image-container {
    flex-direction: column;
    text-align: center;
  }
  
  #captchaImage {
    max-width: 150px;
  }
}
.shipping-option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 8px;
}

.company-name {
  font-weight: bold;
  font-size: 16px;
  color: #2c5aa0;
}

.service-name {
  font-size: 14px;
  color: #666;
}

.price-breakdown {
  text-align: right;
  min-width: 120px;
}

.shipping-cost {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.product-price {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.total-cost {
  font-size: 18px;
  font-weight: bold;
  color: #28a745;
  border-top: 1px solid #ddd;
  padding-top: 4px;
  margin-top: 4px;
}