/* configurator-optimized.css - Zoptymalizowane style */

/* Variables */
:root {
  --primary-color: #0F3124;
  --secondary-color: #d4af37;
  --text-color: #2C3E50;
  --light-gray: #f5f5f5;
  --border-color: #ddd;
  --success-color: #1e5a3f;
  --white: #fff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --radius: 4px;
  --radius-lg: 8px;
  --transition: all 0.3s;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
body {
  font-family: 'Raleway', sans-serif;
  background-color: var(--white);
  color: var(--text-color);
  line-height: 1.6;
}

/* Utility Classes */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.m-0 { margin: 0 !important; }
.m-5 { margin: 5px !important; }
.m-10 { margin: 10px !important; }
.m-15 { margin: 15px !important; }
.m-20 { margin: 20px !important; }

.mt-5 { margin-top: 5px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }

.mb-5 { margin-bottom: 5px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }

.p-0 { padding: 0 !important; }
.p-5 { padding: 5px !important; }
.p-10 { padding: 10px !important; }
.p-15 { padding: 15px !important; }
.p-20 { padding: 20px !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

.radius { border-radius: var(--radius) !important; }
.radius-lg { border-radius: var(--radius-lg) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }

.transition { transition: var(--transition) !important; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Layout */
.header {
  background-color: var(--primary-color);
  text-align: center;
  padding: 30px 20px;
  color: var(--secondary-color);
}

.header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--secondary-color);
}

.navigation {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.container {
  max-width: 1600px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Configurator Grid */
.configurator-grid {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.configurator-options {
  flex: 1;
  min-width: 400px;
  margin-right: 30px;
  border-right: 1px solid #ddd;
  padding-right: 30px;
}

.window-specification {
  flex: 0 0 400px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  background-color: var(--white);
  border: 2px solid var(--secondary-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-right: 30px;
  margin-top: 19px;
}

.configurator-preview {
  flex: 0 0 550px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 20px 20px;
  background-color: var(--light-gray);
  border-radius: var(--radius);
}

.window-specification h2 {
  font-family: 'Playfair Display', serif;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 14px;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 7px;
}

.spec-section {
  margin-bottom: 10px;
  padding: 7px 10px;
  background-color: var(--light-gray);
  border-radius: var(--radius);
  border-bottom: 1px solid #e0e0e0;
}

.spec-section:last-child {
  border-bottom: none;
}

.spec-section h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.95rem;
}

.spec-label {
  font-weight: 500;
  color: #555;
}

.spec-value {
  font-weight: 600;
  color: var(--primary-color);
}

/* Window Visualization */
.svg-window-visualization {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-top: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.svg-window-visualization .view {
  width: 240px;
  text-align: center;
}

.svg-window-visualization h3 {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--primary-color);
}

.window-container {
  position: relative;
  width: 240px;
  height: 400px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid #ccc;
/* --- POCZĄTEK ZMIAN --- */
  
  /* Grubsza, zielona ramka główna */
  border: 0px solid var(--primary-color); 
  
  /* Cienka, złota obwódka na zewnątrz */
  box-shadow: 0 0 0 2px var(--secondary-color); 
  
  /* --- KONIEC ZMIAN --- */
}


.window-container img.base {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.window-container canvas,
.window-container .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* Price Summary - ANIMATED */
.price-summary {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 18px;
  border-radius: 15px;
  text-align: center;
  width: 90%;
  position: sticky;
  bottom: 20px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-summary:hover {
  transform: translateY(-2px);
  box-shadow: 0 -6px 28px rgba(0,0,0,0.35);
}

.price-summary h3 {
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
  color: var(--secondary-color);
}

.total-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.total-price.updating {
  opacity: 0.6;
  transform: scale(0.95);
}

/* Config Sections - PREMIUM LOOK with gold accent */
.config-section {
  margin-bottom: 28px;
  padding: 24px 20px;
  border-bottom: none;
  border-left: 4px solid var(--secondary-color);
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.config-section:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

.config-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.config-section h3 {
  font-family: 'Playfair Display', serif;
  color: var(--primary-color);
  margin-bottom: 16px;
  font-size: 1.3rem;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

/* Form Elements - MORE BREATHING ROOM */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--primary-color);
}

.input-group input[type="number"],
.input-group select,
.dimension-select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  background-color: var(--white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus,
.input-group select:focus,
.dimension-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Checkbox Styling - COMPRESSED */
.input-group input[type="checkbox"] {
  width: 50px;
  height: 24px;
  margin-right: 8px;
  cursor: pointer;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--white);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  transition: var(--transition);
  vertical-align: middle;
}

.input-group input[type="checkbox"]:checked {
  background-color: var(--primary-color);
  border: 2px solid var(--secondary-color);
}

.input-group input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--secondary-color);
  font-size: 12px;
  font-weight: bold;
}

/* Radio Groups - COMPRESSED */
.radio-group {
  display: flex;
  gap: 10px;
  margin-bottom: 11px;
}

.radio-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.radio-option input {
  position: absolute;
  opacity: 0;
}

.radio-label {
  display: block;
  padding: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 0.85rem;
}

.radio-option input:checked + .radio-label {
  background-color: var(--primary-color);
  color: var(--white);
  border: 2px solid var(--secondary-color);
}

/* Color Options */
.color-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 18px;
  margin: 18px 0 24px;
}

.color-option-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.color-option {
  width: 60px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 2px solid transparent;
  position: relative;
}

.color-option:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.color-option.selected {
  border: 2px solid var(--secondary-color);
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--secondary-color), 0 6px 16px rgba(212, 175, 55, 0.3);
}

.color-name {
  font-size: 0.78rem;
  text-align: center;
  color: var(--text-color);
}

/* Buttons */
.btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  margin-top: 18px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background-color: #0a231a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: #c19b2e;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-apply {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  margin-top: 16px;
  font-size: 0.95rem;
  padding: 12px 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-apply:hover {
  background-color: #c9a227;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.btn-apply:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-apply.applied {
  background-color: var(--success-color);
  border: 2px solid var(--secondary-color);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--secondary-color);
  animation: pulse-success 0.5s ease;
}

@keyframes pulse-success {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.btn-apply.btn-locked {
  background-color: #ccc !important;
  color: #888 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  transform: none !important;
  box-shadow: none !important;
  transition: none;
}

.btn-apply.btn-locked:hover {
  background-color: #ccc !important;
  transform: none !important;
}

.btn-apply.btn-locked::after {
  content: ' 🔒';
}

/* Ironmongery Gallery Button - OUTLINE STYLE */
.btn-ironmongery-gallery {
  background: transparent !important;
  color: var(--primary-color) !important;
  border: 1px solid #dc3545 !important;
  padding: 10px 15px;
  font-size: 0.9rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-ironmongery-gallery:hover {
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
}

/* PAS24 Info Button - SUBTLE RED BORDER */
.btn-pas24-info {
  background: transparent !important;
  color: var(--primary-color) !important;
  border: 1px solid #dc3545 !important;
  padding: 8px 15px;
  font-size: 0.85rem;
  margin-top: 10px;
}

.btn-pas24-info:hover {
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
}

/* Georgian Bars */
.bars-group {
  margin-bottom: 20px;
}

.bars-group h4 {
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.custom-bars-container {
  margin-top: 15px;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.bar-pattern-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.pattern-btn {
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: var(--light-gray);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.pattern-btn:hover {
  background-color: #eee;
  transform: translateY(-2px);
}

.pattern-btn.selected {
  background-color: var(--primary-color);
  color: var(--white);
  border: 2px solid var(--secondary-color);
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid #ccc;
}

.bars-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: crosshair;
}

/* Custom Dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
}

.dropdown-selected {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
}

.dropdown-selected:hover {
  background-color: var(--light-gray);
}

.dropdown-selected img,
.dropdown-option img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 4px;
  background-color: var(--white);
}

.dropdown-selected::after {
  content: '▼';
  color: var(--primary-color);
  font-size: 0.8rem;
  margin-left: auto;
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.custom-dropdown.open .dropdown-options {
  display: block;
}

.custom-dropdown.open .dropdown-selected::after {
  content: '▲';
}

.dropdown-option {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  border-bottom: 1px solid #eee;
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover {
  background-color: var(--light-gray);
}

.dropdown-option.selected {
  background-color: rgba(15, 49, 36, 0.1);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: var(--primary-color);
}

.modal-close {
  color: #555;
  float: right;
  font-size: 42px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: 0;
  position: absolute;
  right: 20px;
  top: 15px;
  transition: all 0.3s;
}

.modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Window Item */
.window-item {
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: var(--radius);
  position: relative;
}

.window-price {
  font-weight: bold;
  color: var(--primary-color);
}

.btn-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #e74c3c;
  color: var(--white);
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Specific Components */
.warning-box,
.warning-message {
  color: #cc3300;
  padding: 10px;
  margin-top: 10px;
  background-color: #fff3cd;
  border-radius: var(--radius);
}

.dimension-input-wrapper {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
}

.dimension-select {
  flex: 1;
  max-height: 50px;
}

.dimension-input-wrapper.custom-mode .dimension-select {
  flex: 0 0 120px;
}

.opening-indicators {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.opening-indicator {
  position: absolute;
  font-size: 40px;
  font-weight: bold;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.opening-indicator.arrow {
  color: #485d54;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.opening-indicator.cross {
  color: #e4707c;
  opacity: 0.5;
  font-size: 35px;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.frosted-overlay {
  position: absolute;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.frosted-overlay.active {
  opacity: 1;
}

.frosted-overlay.realistic {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.4) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(240,240,240,0.4) 100%
  );
  backdrop-filter: blur(10px) saturate(0.8);
  -webkit-backdrop-filter: blur(10px) saturate(0.8);
}
/* MEASUREMENT INFO BOX - START */
.measurement-info-box {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0;
  animation: slideDown 0.3s ease;
  font-size: 0.85rem;
}

.measurement-info-box strong {
  color: #856404;
  font-size: 0.9rem;
}

.measurement-info-box p {
  margin: 3px 0;
  color: #856404;
}

.info-note {
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 6px !important;
}

.measurement-link {
  display: inline-block;
  margin-top: 6px;
  color: #0056b3;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
}

.measurement-link:hover {
  text-decoration: underline;
}

.spec-item.actual-size {
  background: #fff3cd;
  padding: 8px;
  border-radius: 4px;
  margin-top: 5px;
  border-left: 3px solid #ffc107;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* MEASUREMENT INFO BOX - END */


/* Responsive */
@media (max-width: 768px) {
  .configurator-grid {
    flex-direction: column;
  }
  
  .configurator-options {
    width: 100%;
    flex: none;
    min-width: unset;
  }
  
  .window-specification {
    width: 100%;
    flex: none;
    position: relative;
    top: 0;
  }
  
  .configurator-preview {
    position: relative;
    top: 0;
    width: 100%;
    flex: none;
  }
  
  .svg-window-visualization {
    flex-direction: column;
    align-items: center;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-between;
    margin: 0;
  }
  
  .radio-group {
    flex-direction: column;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  /* Sticky price bar dla mobile - fixed na dole ekranu */
  .price-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 15px 15px 0 0;
    padding: 12px 15px;
    z-index: 1000;
  }
  
  /* Dodaj padding na dole strony żeby content nie był zakryty */
  .configurator-preview {
    padding-bottom: 100px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .dropdown-option img,
  .dropdown-selected img {
    width: 30px;
    height: 30px;
  }
  
  .bar-pattern-buttons {
    justify-content: center;
  }
  
  .window-specification h2 {
    font-size: 1.2rem;
  }
}

/* ========================================
   IRONMONGERY STYLES
   ======================================== */

.ironmongery-section {
  margin-top: 20px;
  padding: 20px;
  background: var(--light-gray);
  border-radius: var(--radius-lg);
}

.ironmongery-section h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.furniture-finish-select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
  cursor: pointer;
}

.info-message {
  margin-top: 15px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  color: #856404;
}

.info-message strong {
  display: block;
  margin-bottom: 5px;
}

.ironmongery-products {
  margin-top: 20px;
}

.ironmongery-category {
  margin-bottom: 15px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.category-header:hover {
  background: #f8f9fa;
  border-color: var(--secondary-color);
}

.category-header h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.category-toggle {
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.category-toggle.open {
  transform: rotate(180deg);
}

.category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.category-content.open {
  max-height: 2000px;
  transition: max-height 0.5s ease-in;
}

.category-inner {
  padding: 20px;
}

.auto-quantity-info {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-left: 3px solid var(--secondary-color);
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--white);
  transition: var(--transition);
}

.product-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.product-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.product-item.pas24-only {
  border: 2px solid #28a745;
  background: #f8fff9;
}

.product-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-right: 20px;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  margin-right: 20px;
}

.product-name {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.product-name .recommended-badge {
  display: inline-block;
  background: #28a745;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
  font-weight: 500;
}

.product-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.product-price .vat-price {
  font-size: 0.85rem;
  color: #666;
  font-weight: 400;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-input {
  width: 60px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: center;
  font-size: 1rem;
}

.quantity-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.btn-add-product {
  padding: 10px 20px;
  background: var(--success-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-add-product:hover {
  background: #155d3a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-add-product:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Responsive dla Ironmongery */
@media (max-width: 768px) {
  .product-item {
    flex-direction: column;
    text-align: center;
  }

  .product-image {
    margin: 0 0 15px 0;
  }

  .product-info {
    margin: 0 0 15px 0;
  }

  .product-actions {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   IRONMONGERY GALLERY OVERLAY
   ======================================== */

.ironmongery-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 10000;
  display: none;
  overflow-y: auto;
}

.ironmongery-overlay.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.ironmongery-gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
}

.gallery-header h2 {
  color: #333;
  font-size: 2rem;
  margin: 0;
}

.gallery-close {
  background: none;
  border: none;
  color: #333;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.gallery-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

/* Type Selector (NEW) */
.type-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.type-btn {
  padding: 12px 30px;
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.type-btn:hover {
  background: rgba(15, 49, 36, 0.1);
}

.type-btn.active {
  background: var(--primary-color);
  color: white;
}

/* PAS24 Info Box */
.pas24-info-box {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
}

.pas24-info-box p {
  margin: 0;
  color: #856404;
  font-size: 0.95rem;
}

/* Filters */
.gallery-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: white;
  color: #666;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #f9f9f9;
  border-bottom-color: var(--secondary-color);
}

.filter-btn.active {
  background: #f9f9f9;
  border-bottom-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Category Tabs - MOCNE Z RAMKĄ */
.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.category-tab {
  padding: 12px 24px;
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.category-tab:hover {
  background: rgba(15, 49, 36, 0.1);
}

.category-tab.active {
  background: var(--primary-color);
  color: white;
}

/* Products Grid - KOLUMNY WEDŁUG KATEGORII */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 30px;
}

.category-products-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.category-products-column h4 {
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.category-products-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.product-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
  background: #fafafa;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.product-card.selected {
  border-color: gold;
  background: #fffef0;
}

.product-card.selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: gold;
  color: black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.product-card-image {
  width: 100%;
  height: 100px; /* 75% mniejsze */
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: #f5f5f5;
  cursor: zoom-in;
  transition: opacity 0.3s ease;
}

.product-card-image:hover {
  opacity: 0.85;
}

.product-card-name {
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.2;
}

.product-card-price {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.product-card-description {
  color: #666;
  font-size: 0.8rem;
  line-height: 1.3;
  display: none; /* Ukryj opis w małych kartach */
}

/* Modal powiększenia zdjęcia */
.image-zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.image-zoom-modal.active {
  display: flex;
}

.image-zoom-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

/* Gallery Footer */
.gallery-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 20px;
  border-top: 2px solid var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.selection-total {
  color: #333;
  font-size: 1.5rem;
  font-weight: bold;
}

.selection-total span {
  color: var(--primary-color);
  margin-left: 10px;
}

.btn-confirm-selection {
  padding: 15px 40px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-confirm-selection:hover {
  background: #155d3a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 115, 72, 0.4);
}

.btn-confirm-selection:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.selection-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn-clear-selection {
  padding: 15px 40px;
  background: transparent;
  color: #dc3545;
  border: 2px solid #dc3545;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear-selection:hover {
  background: #dc3545;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-header h2 {
    font-size: 1.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .category-tabs {
    justify-content: flex-start;
  }

  .gallery-footer {
    flex-direction: column;
    gap: 15px;
  }

  .selection-total {
    font-size: 1.2rem;
  }

  .btn-confirm-selection {
    width: 100%;
  }
}