/* Master Tom Platform — E-commerce Styles */

:root {
  --teal: #1a7f7f;
  --teal-dark: #156565;
  --teal-light: #e6f3f3;
  --green: #7cb342;
  --green-dark: #689f38;
  --green-light: #f1f8e9;
  --dark: #1a1a2e;
  --gray-900: #1e293b;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

/* Hero */
.hero-bg {
  background: linear-gradient(135deg, #0f2027 0%, #1a7f7f 50%, #2c5364 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,179,66,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26,127,127,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease-out both; }
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(124,179,66,0.4); }
  70% { box-shadow: 0 0 0 12px rgba(124,179,66,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,179,66,0); }
}

/* Product card */
.product-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--gray-100);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: var(--teal);
}

/* Product visual placeholder */
.product-visual {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-visual .pattern-profnastil {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--gray-300) 0px,
    var(--gray-300) 2px,
    var(--gray-100) 2px,
    var(--gray-100) 18px,
    var(--gray-300) 18px,
    var(--gray-300) 20px,
    var(--gray-50) 20px,
    var(--gray-50) 38px
  );
  opacity: 0.6;
}
.product-visual .pattern-chirpitsa {
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      var(--gray-300) 28px,
      var(--gray-300) 30px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 38px,
      var(--gray-300) 38px,
      var(--gray-300) 40px
    );
  background-color: var(--gray-100);
  opacity: 0.5;
}
.product-visual .pattern-default {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-visual .color-stripe {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
}

/* Category pill */
.cat-pill {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  color: var(--gray-700);
}
.cat-pill:hover { border-color: var(--teal); color: var(--teal); }
.cat-pill.active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* Color swatch */
.swatch {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.1);
  display: inline-block;
  flex-shrink: 0;
}
.swatch-lg { width: 28px; height: 28px; }

/* Step indicator */
.step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s;
  flex-shrink: 0;
}
.step-bar { height: 3px; flex: 1; transition: background 0.3s; }

/* Roof selector */
.roof-option {
  border: 2px solid var(--gray-100);
  border-radius: 16px;
  padding: 24px 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: var(--white);
}
.roof-option:hover { border-color: var(--teal); background: var(--teal-light); }
.roof-option.active { border-color: var(--teal); background: var(--teal-light); }
.roof-option .roof-icon {
  width: 64px; height: 48px;
  margin: 0 auto 12px;
}

/* Chat widget */
.chat-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1000;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,127,127,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(26,127,127,0.45);
}
.chat-fab.ring { animation: pulse-ring 2s infinite; }

.chat-panel {
  position: fixed;
  bottom: 96px; right: 24px;
  z-index: 999;
  width: 380px; height: 540px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
  word-wrap: break-word;
}
.chat-bubble.bot {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--gray-900);
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  align-self: flex-end;
  background: var(--teal);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-chip {
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.chat-chip:hover { background: var(--teal); color: var(--white); }

/* Spinner */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal overlay */
.modal-overlay {
  background: rgba(15,32,39,0.5);
  backdrop-filter: blur(4px);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stats counter */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Mobile chat fullscreen */
@media (max-width: 640px) {
  .chat-panel {
    bottom: 0; right: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 0;
  }
  .chat-fab { bottom: 16px; right: 16px; }
}

/* Scrollbar */
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

/* Print */
@media print {
  .chat-fab, .chat-panel, nav, footer, .no-print { display: none !important; }
}
