:root {
  --text: #6b6375;
  --text-h: #08060d;
  --bg: #fff;
  --border: #e5e4e7;
  --code-bg: #f4f3ec;
  --accent: #aa3bff;
  --accent-bg: rgba(170, 59, 255, 0.1);
  --accent-border: rgba(170, 59, 255, 0.5);
  --social-bg: rgba(244, 243, 236, 0.5);
  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --heading: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #9ca3af;
    --text-h: #f3f4f6;
    --bg: #16171d;
    --border: #2e303a;
    --code-bg: #1f2028;
    --accent: #c084fc;
    --accent-bg: rgba(192, 132, 252, 0.15);
    --accent-border: rgba(192, 132, 252, 0.5);
    --social-bg: rgba(47, 48, 58, 0.5);
    --shadow:
      rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
  }

  #social .button-icon {
    filter: invert(1) brightness(2);
  }
}

body {
  margin: 0;
}

#root {
  width: 1126px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  border-inline: 1px solid var(--border);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

h1,
h2 {
  font-family: var(--heading);
  font-weight: 500;
  color: var(--text-h);
}

h1 {
  font-size: 56px;
  letter-spacing: -1.68px;
  margin: 32px 0;
  @media (max-width: 1024px) {
    font-size: 36px;
    margin: 20px 0;
  }
}
h2 {
  font-size: 24px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
  @media (max-width: 1024px) {
    font-size: 20px;
  }
}
p {
  margin: 0;
}

code,
.counter {
  font-family: var(--mono);
  display: inline-flex;
  border-radius: 4px;
  color: var(--text-h);
}

code {
  font-size: 15px;
  line-height: 135%;
  padding: 4px 8px;
  background: var(--code-bg);
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  color: white; min-height: 100vh;
}

.app { min-height: 100vh; }

header {
  background: rgba(0,0,0,0.9); backdrop-filter: blur(20px); padding: 1rem 2rem;
  position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #ff6b35;
}

header { display: flex; align-items: center; gap: 1rem; }

.logo {
  width: 60px; height: 60px; border-radius: 12px; box-shadow: 0 10px 30px rgba(255,107,53,0.5);
}

header h1 {
  font-size: 2rem; background: linear-gradient(135deg, #ff6b35, white);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.cart-btn {
  background: #ff6b35; border: none; color: white; padding: 0.8rem 1.5rem;
  border-radius: 50px; font-weight: 600; cursor: pointer; margin-left: auto;
  display: flex; gap: 0.5rem; align-items: center;
}

main { max-width: 1400px; margin: 0 auto; padding: 2rem; }

.filters { 
  display: flex; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; 
}

.filters button {
  background: rgba(255,107,53,0.2); border: 2px solid #ff6b35;
  color: #ff6b35; padding: 0.7rem 1.5rem; border-radius: 25px;
  cursor: pointer; transition: all 0.3s;
}

.filters button.active, .filters button:hover {
  background: #ff6b35; color: white;
}

.product-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 2rem;
}

.product-detail {
  background: rgba(26,26,26,0.95); border-radius: 20px; padding: 3rem;
  max-width: 900px; max-height: 90vh; overflow-y: auto;
  border: 1px solid #ff6b35; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  position: relative;
}

.close-detail {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: white; font-size: 2rem; cursor: pointer;
}

.product-detail img {
  width: 100%; height: 400px; object-fit: cover; border-radius: 15px;
}

.detail-info h1 { font-size: 2.5rem; color: #ff6b35; margin-bottom: 1rem; }

.price-large { font-size: 3rem; font-weight: bold; color: #ff6b35; margin-bottom: 1rem; }

.detail-info p { font-size: 1.2rem; line-height: 1.7; margin-bottom: 1rem; }

.full-desc { font-style: italic; color: #ddd; font-size: 1.1rem; }

.specs {
  margin-top: 2rem; background: rgba(255,107,53,0.1); padding: 1.5rem; border-radius: 12px;
}

.specs h4 { color: #ff6b35; margin-bottom: 1rem; }

.specs ul { list-style: none; }

.specs li { padding: 0.5rem 0; border-bottom: 1px solid rgba(255,107,53,0.2); }

.detail-actions { display: flex; gap: 1rem; margin-top: 2rem; }

.detail-actions button {
  flex: 1; padding: 1.2rem; border-radius: 12px; border: none;
  font-weight: 600; cursor: pointer; transition: all 0.3s;
}

.buy-now { background: linear-gradient(135deg, #ff6b35, #ff8e53); color: white; }

.detail-actions button:nth-child(2) { background: rgba(255,107,53,0.2); color: #ff6b35; border: 2px solid #ff6b35; }

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1rem; }
  .product-detail img { height: 300px; }
}

.products {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
  gap: 2rem;
  width: 100%;
}

@media (max-width: 1024px) {
  .products {
    grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .products {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1rem;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .logo {
    width: 50px;
    height: 50px;
  }
  
  .cart-btn {
    width: 100%;
    justify-content: center;
  }
  
  main {
    padding: 1rem;
  }
  
  .filters {
    justify-content: center;
    gap: 0.5rem;
  }
  
  .filters button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .product-card img {
    height: 250px;
  }
  
  .cart {
    width: 95%;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .promo-section {
    flex-direction: column;
  }
  
  .promo-input {
    margin-bottom: 0.5rem;
  }
}


.product-card {
  background: rgba(26,26,26,0.8); border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,107,53,0.3); transition: all 0.4s;
  backdrop-filter: blur(10px);
}

.product-card:hover {
  transform: translateY(-10px); box-shadow: 0 20px 40px rgba(255,107,53,0.3);
  border-color: #ff6b35;
}

.product-card img {
  width: 100%; height: 300px; object-fit: cover;
}

.info { padding: 1.5rem; }

.info h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

.info p { color: #ccc; margin-bottom: 1rem; }

.price {
  font-size: 1.6rem; font-weight: bold; color: #ff6b35;
  margin-bottom: 1rem;
}

.buy-btn {
  width: 100%; background: linear-gradient(135deg, #ff6b35, #ff8e53);
  border: none; color: white; padding: 1rem; border-radius: 12px;
  font-weight: 600; cursor: pointer; transition: all 0.3s;
}

.buy-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(255,107,53,0.4); }

.cart-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: grid; place-items: center; backdrop-filter: blur(20px); z-index: 1000;
}


.cart {
  background: rgba(26,26,26,0.95); padding: 2rem; border-radius: 20px;
  max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto;
  border: 1px solid #ff6b35;
}

.promo-section {
  display: flex; gap: 0.5rem; margin: 1rem 0;
}

.promo-input {
  flex: 1; padding: 0.8rem; border-radius: 8px; border: 1px solid #ff6b35;
  background: rgba(255,107,53,0.1); color: white;
}

.promo-input::placeholder { color: #aaa; }

.promo-btn {
  padding: 0.8rem 1.5rem; background: #ff6b35; border: none;
  color: white; border-radius: 8px; cursor: pointer;
  font-weight: 600;
}

.promo-btn:hover { background: #ff5533; }

.promo-success {
  background: rgba(0,255,0,0.2); color: #90ee90; padding: 0.8rem;
  border-radius: 8px; margin: 1rem 0; text-align: center;
}

.promo-error {
  background: rgba(255,0,0,0.2); color: #ff6a6a; padding: 0.8rem;
  border-radius: 8px; margin: 1rem 0; text-align: center;
}


.cart h2 { color: #ff6b35; margin-bottom: 1.5rem; text-align: center; }

.cart-item { 
  display: flex; justify-content: space-between; padding: 1rem 0;
  border-bottom: 1px solid #444;
}

.total { 
  font-size: 1.5rem; font-weight: bold; color: #ff6b35;
  text-align: center; margin: 1.5rem 0;
}

.checkout {
  width: 100%; background: #ff6b35; border: none; color: white;
  padding: 1.2rem; border-radius: 12px; font-size: 1.1rem;
  font-weight: 600; cursor: pointer; display: flex; gap: 0.5rem;
  align-items: center; justify-content: center; margin-bottom: 1rem;
}

.checkout:hover { background: #ff5533; }

.cart button:last-child {
  width: 100%; background: #444; color: white; border: none;
  padding: 0.8rem; border-radius: 12px; cursor: pointer;
}

@media (max-width: 768px) {
  .products { grid-template-columns: 1fr; }
  header { padding: 1rem; }
  .filters { justify-content: center; }
}
