/* Compact Modern External Product CSS for 14" screens */

/* Reset spacing for compact view */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

/* Compact Hero Section */
.hero-section {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: white;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 0.75rem;
}

/* Compact Trust Indicators */
.trust-indicators {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.trust-badge-icon {
  width: 14px;
  height: 14px;
}

/* Compact Hero Price */
.hero-price-preview {
  text-align: right;
  padding: 0.5rem 0;
}

.hero-price-label {
  font-size: 11px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
}

.hero-price-currency {
  font-size: 1rem;
  margin-left: 0.25rem;
}

/* Compact Main Container */
.container {
  max-width: 1200px;
  padding: 0 1rem !important;
  margin: 0 auto !important;
}

.container.my-5 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

/* Compact Gallery */
.product-gallery-wrapper {
  margin-bottom: 1rem;
}

.gallery-main {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.main-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 300px;
  overflow: hidden;
}

.main-product-image {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  transition: opacity 0.2s;
}

.gallery-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #ff3b30;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.zoom-icon {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

/* Compact Thumbnails */
.gallery-thumbnails {
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.thumbnails-container {
  display: flex;
  gap: 0.4rem;
}

.thumbnail-item {
  width: 50px;
  height: 50px;
  border: 2px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.thumbnail-item:hover {
  border-color: #4caf50;
}

.thumbnail-item.active {
  border-color: #2e7d32;
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Compact Product Description Card */
.product-description-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.product-description-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-description-card p {
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
  margin: 0;
}

/* Compact Datasheet Section */
.datasheet-section {
  margin-top: 0.75rem;
}

.datasheet-section .btn {
  padding: 0.4rem 0.75rem;
  font-size: 13px;
}

/* Compact Configurator */
.configurator-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.configurator-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.configurator-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.configurator-subtitle {
  font-size: 13px;
  color: #6b7280;
}

/* Compact Loading Spinner */
.loading-spinner-premium {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

#loadingIndicator {
  padding: 2rem 1rem;
}

/* Compact Price Display - Sticky */
.price-display-card {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 1rem;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.price-main {
  text-align: center;
}

.price-label-premium {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.price-value-premium {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.price-breakdown-premium {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.price-breakdown-item {
  text-align: center;
}

.price-breakdown-label {
  display: block;
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 0.2rem;
}

.price-breakdown-value {
  font-size: 13px;
  font-weight: 600;
}

/* Compact Config Sections */
.config-section-premium {
  margin-bottom: 1rem;
}

.config-label-premium {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.config-help-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 50%;
  text-align: center;
  line-height: 14px;
  font-size: 10px;
  margin-left: 0.25rem;
  cursor: help;
}

/* Compact Option Cards */
.option-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.option-card-premium {
  position: relative;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  display: block;
  text-align: center;
}

.option-card-premium:hover {
  border-color: #4caf50;
  background: #f1f8e9;
}

.option-card-premium.selected {
  border-color: #2e7d32;
  background: #e8f5e9;
}

.option-card-premium input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card-title {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  line-height: 1.3;
}

/* Compact Pricing Table */
.pricing-table-premium {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pricing-table-premium thead {
  background: #f8f9fa;
}

.pricing-table-premium th,
.pricing-table-premium td {
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #e5e7eb;
}

.pricing-table-premium th {
  font-weight: 600;
  font-size: 12px;
  color: #4b5563;
}

.pricing-table-premium tbody tr:hover {
  background: #f1f8e9;
}

.pricing-table-premium tbody tr.table-primary {
  background: #e8f5e9;
}

.btn-select-price {
  padding: 0.3rem 0.75rem;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-select-price:hover {
  background: #388e3c;
  transform: translateY(-1px);
}

.copy-link-btn {
  padding: 0.25rem 0.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-link-btn:hover {
  background: #f8f9fa;
  border-color: #4caf50;
}

/* Compact Features Grid */
.product-features-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.feature-card-premium {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.feature-icon-premium {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.feature-content-premium h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.feature-content-premium p {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

/* Compact Dialog Styles */
.ui-dialog {
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
  border: none !important;
  background: white !important;
  max-width: 90% !important;
}

.ui-dialog-titlebar {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: white;
  border: none !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 1rem 1.5rem !important;
  font-size: 16px;
  font-weight: 600;
}

.ui-dialog-titlebar-close {
  background: transparent !important;
  border: none !important;
  color: white !important;
  opacity: 0.8;
  font-size: 20px;
  right: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.ui-dialog-titlebar-close:hover {
  opacity: 1;
}

.ui-dialog-content {
  padding: 1.5rem !important;
  font-size: 14px;
  background: white;
  border-radius: 0 0 12px 12px;
}

/* Dialog specific elements */
#deliveryDialog {
  font-family: 'Inter', -apple-system, sans-serif !important;
}

#dialogQuantityLabel {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem !important;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

#deliveryLinesContainer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delivery-option-premium {
  background: #f8f9fa;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
  cursor: pointer;
}

.delivery-option-premium:hover {
  background: #f1f8e9;
  border-color: #4caf50;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.delivery-title-premium {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.delivery-details-premium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.delivery-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.delivery-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.05em;
}

.delivery-detail-value {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.delivery-price-premium {
  font-size: 20px;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 0.75rem;
  text-align: center;
  padding: 0.5rem;
  background: #e8f5e9;
  border-radius: 6px;
}

.btn-add-to-cart {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-add-to-cart:hover {
  background: linear-gradient(135deg, #1b5e20 0%, #388e3c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-add-to-cart:before {
  content: '\f217';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
}

#popupQtyId {
  display: block;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* Dialog button bar */
.ui-dialog-buttonpane {
  background: #f8f9fa !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 1rem !important;
  margin: 0 !important;
  border-radius: 0 0 12px 12px !important;
}

.ui-dialog-buttonset button {
  background: white !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.ui-dialog-buttonset button:hover {
  background: #f8f9fa !important;
  border-color: #9ca3af !important;
}

/* Responsive adjustments for 14" screen */
@media (max-width: 1440px) {
  .hero-section {
    padding: 1rem 0;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .container {
    max-width: 100%;
    padding: 0 0.75rem !important;
  }
  
  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
  
  .col-lg-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .product-features-premium {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Ensure sticky price box works well */
  .price-display-card {
    top: 0.5rem;
  }
}

/* For mobile/tablet - disable sticky on smaller screens */
@media (max-width: 991px) {
  .price-display-card {
    position: relative;
    top: auto;
  }
}

/* Ultra compact for smaller viewports */
@media (max-height: 800px) {
  .hero-section {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
  }
  
  .main-image-container {
    max-height: 200px;
  }
  
  .price-value-premium {
    font-size: 1.5rem;
  }
  
  .product-features-premium {
    display: none; /* Hide features on very small screens */
  }
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar styling for compact view */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}