/* ── Axon Synergy Shop — Minimal Storefront ── */
/* Colors: Black, White, #1A3263 (navy), #FAB95B (amber) */

:root {
  --black: #111111;
  --white: #ffffff;
  --navy: #1A3263;
  --amber: #FAB95B;
  --gray-light: #f5f5f5;
  --gray-mid: #e0e0e0;
  --gray-text: #666666;
  --danger: #cc3333;
  --success: #2e7d32;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--amber);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Header ── */

.site-header {
  border-bottom: 2px solid var(--black);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.site-logo span {
  color: var(--amber);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
}

.site-nav a:hover {
  color: var(--amber);
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--amber);
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

/* ── Layout ── */

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

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.page-subtitle {
  color: var(--gray-text);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ── Product Grid ── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.product-card {
  border: 1px solid var(--gray-mid);
  padding: 1rem;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--navy);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--gray-light);
  margin-bottom: 0.75rem;
}

.product-card .product-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  flex-grow: 1;
}

.product-card .product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.product-card .product-stock {
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-top: 0.25rem;
}

.product-card .product-stock.low-stock {
  color: var(--danger);
  font-weight: 600;
}

.product-card .product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ── Product Detail Page ── */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.product-detail .product-image {
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--gray-light);
  width: 100%;
  align-self: start;
}

.product-info .product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-info h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-info .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.product-info .price-note {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-bottom: 1rem;
}

.product-info .description {
  color: var(--gray-text);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.product-info .stock-status {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.stock-status.in-stock {
  color: var(--success);
}

.stock-status.low-stock {
  color: var(--danger);
}

.stock-status.out-of-stock {
  color: var(--danger);
}

/* ── Quantity Selector ── */

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gray-mid);
  margin-bottom: 1rem;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--gray-light);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: background 0.15s;
  user-select: none;
}

.qty-btn:hover {
  background: var(--gray-mid);
}

.qty-btn:active {
  background: var(--navy);
  color: var(--white);
}

.qty-input {
  width: 50px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--gray-mid);
  border-right: 1px solid var(--gray-mid);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ── Add to Cart Button ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

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

.btn-primary:hover {
  background: var(--black);
}

.btn-amber {
  background: var(--amber);
  color: var(--black);
}

.btn-amber:hover {
  background: #e5a84e;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--black);
  color: var(--black);
}

.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.add-to-cart-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

/* ── Live Price Preview ── */

.live-preview {
  background: var(--gray-light);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.live-preview .line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.live-preview .line.total {
  border-top: 1px solid var(--gray-mid);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

/* ── Specs Table ── */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  table-layout: fixed;
}

.specs-table th,
.specs-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-mid);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.specs-table th {
  font-weight: 600;
  width: 35%;
  color: var(--navy);
}

.specs-table td {
  color: var(--gray-text);
  width: 65%;
}

/* ── Cart Page ── */

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-text);
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-mid);
  align-items: center;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: var(--gray-light);
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.cart-item-total {
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
}

.cart-item .remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}

.cart-item .remove-btn:hover {
  text-decoration: underline;
}

.cart-summary {
  background: var(--gray-light);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.cart-summary .line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.cart-summary .line.total {
  border-top: 2px solid var(--black);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-summary .shipping-note {
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-top: 0.5rem;
}

#paypal-button-container {
  margin-top: 1.5rem;
}

/* ── Order Confirmation ── */

.order-confirmation {
  text-align: center;
  padding: 2rem;
  background: var(--gray-light);
  margin-top: 2rem;
}

.order-confirmation h2 {
  color: var(--success);
  margin-bottom: 0.5rem;
}

.order-number {
  font-family: monospace;
  font-size: 1.1rem;
  background: var(--white);
  padding: 0.5rem 1rem;
  display: inline-block;
  margin: 0.5rem 0;
  border: 1px solid var(--gray-mid);
}

/* ── Notification Toast ── */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast a {
  color: var(--amber);
  font-weight: 700;
  margin-left: 0.5rem;
}

/* ── Footer ── */

.site-footer {
  border-top: 2px solid var(--black);
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-text);
}

.site-footer a {
  color: var(--gray-text);
}

.site-footer a:hover {
  color: var(--navy);
}

/* ── Policies Page ── */

.policy-section {
  margin-bottom: 2.5rem;
}

.policy-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-mid);
}

.policy-section p {
  color: var(--gray-text);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
  }

  .cart-item-total {
    grid-column: 1 / -1;
    text-align: left;
  }

  .container {
    padding: 1.5rem 0.75rem;
  }

  .product-info h1 {
    font-size: 1.25rem;
  }

  .product-info .price {
    font-size: 1.4rem;
  }
}

@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
