/* ==========================================================================
   Product Pages Shared Styles
   ========================================================================== */

/* Tab Styles */
.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.product-tab {
  padding: 1rem 2rem;
  background: var(--bg-alt);
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: -2px;
}
.product-tab:hover {
  background: #e8f5ef;
  color: var(--primary-dark);
}
.product-tab.active {
  background: #fff;
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}
.product-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* MPPT Inverter Tab Styles (alternative) */
.mppt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.mppt-tab {
  padding: 0.75rem 1.5rem;
  border: 2px solid #1E3A5F;
  background: #fff;
  color: #1E3A5F;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s;
}
.mppt-tab:hover {
  background: #f0f4f8;
}
.mppt-tab.active {
  background: #1E3A5F;
  color: #fff;
}
.mppt-tab-content {
  display: none;
}
.mppt-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Series Badge */
.series-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.specs-table th {
  background: var(--secondary);
  color: #fff;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}
.specs-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}
.specs-table tr:nth-child(even) {
  background: var(--bg-alt);
}
.specs-table tr:hover {
  background: #f0fdf4;
}

/* Model Cards */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.model-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.model-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.15);
  border-color: var(--primary);
}
.model-card h4 {
  color: var(--secondary);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}
.model-card .capacity {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.model-card .spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}
.model-card .spec-item:last-child {
  border-bottom: none;
}
.model-card .spec-label {
  color: var(--text-light);
}
.model-card .spec-value {
  color: var(--secondary);
  font-weight: 600;
}

/* MPPT Model Cards */
.model-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1E3A5F, #2d5a87);
  color: #fff;
  border-radius: 12px;
}
.model-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.model-header p {
  opacity: 0.9;
}
.model-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.model-card-spec {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}
.model-card-spec h4 {
  color: #1E3A5F;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #10B981;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.spec-row:last-child {
  border-bottom: none;
}
.spec-label {
  color: #6b7280;
  font-size: 0.9rem;
}
.spec-value {
  color: #1E3A5F;
  font-weight: 600;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 0.9rem;
}
.spec-table th, .spec-table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}
.spec-table th {
  background: #1E3A5F;
  color: #fff;
}
.spec-table .section-row td {
  background: #f0f4f8;
  font-weight: 600;
  color: #1E3A5F;
}
.spec-table tr:nth-child(even) td {
  background: #f9fafb;
}

/* Feature List */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.feature-item {
  display: grid;
  grid-template-columns: 40px 1fr; 
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: 8px;
  text-align: left;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}
.feature-item span {
  color: var(--text);
  font-weight: 500;
}

/* Voltage Badge */
.voltage-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.voltage-eu {
  background: #dbeafe;
  color: #1e40af;
}
.voltage-us {
  background: #fee2e2;
  color: #991b1b;
}
.voltage-51v {
  background: #dbeafe;
  color: #1e40af;
}
.voltage-25v {
  background: #f3e8ff;
  color: #6b21a8;
}
.voltage-12v {
  background: #dbeafe;
  color: #1e40af;
}
.voltage-hv {
  background: #dbeafe;
  color: #1e40af;
}
.voltage-lv {
  background: #fee2e2;
  color: #991b1b;
}
.voltage-premium {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
}

/* Power Badge */
.power-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.power-6kw {
  background: #dbeafe;
  color: #1e40af;
}
.power-12kw {
  background: #fee2e2;
  color: #991b1b;
}

/* Specs Highlights */
.spec-highlight {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    padding: 30px;
    background: #eef6ff;
    border-radius: 12px;
}

.spec-highlight-item {
    text-align: center;
}

.spec-highlight-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.spec-highlight-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}


/* Comparison Highlights */
.compare-highlights {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}
.compare-highlights h3 {
  color: var(--secondary);
  margin-bottom: 1rem;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.highlight-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--primary);
}
.highlight-box h4 {
  color: var(--secondary);
  margin-bottom: 0.75rem;
}
.highlight-box ul {
  list-style: none;
  padding: 0;
}
.highlight-box li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.highlight-box li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.table-scroll::-webkit-scrollbar {
  height: 4px;
}
.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}
.table-scroll .specs-table {
  min-width: 560px;
}

.specs-table .section-header-row td {
  background: var(--secondary) !important;
  color: #fff;
  font-weight: 700;
  text-align: center;
}
/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
  .product-tabs {
    flex-direction: column;
    border-bottom: none;
    gap: 0.25rem;
  }
  .product-tab {
    border-radius: 8px;
    text-align: center;
    margin-bottom: 0;
  }
  .product-tab.active {
    border-bottom: none;
    background: var(--primary);
    color: #fff;
  }
  .mppt-tabs {
    flex-direction: column;
    border-bottom: none;
    gap: 0.25rem;
  }
  .mppt-tab {
    border-radius: 8px;
    text-align: center;
    margin-bottom: 0;
  }
  .mppt-tab.active {
    background: #1E3A5F;
    color: #fff;
  }
  .specs-table {
    font-size: 0.85rem;
  }
  .specs-table th, .specs-table td {
    padding: 0.625rem 0.75rem;
    white-space: nowrap;
  }
  .model-cards {
    grid-template-columns: 1fr;
  }
  .spec-table {
    font-size: 0.8rem;
  }
  .spec-table th, .spec-table td {
    padding: 0.5rem;
  }
}