/* ========================
   TIANGUIS GROW MX — Store
   ======================== */

/* ======= HERO ======= */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  max-width: 520px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
}

.hero-text h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-text h1 span {
  color: var(--text-secondary);
}

.hero-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-visual {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
}

.hero-glow {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border: 1px solid var(--border);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ======= SECTION ======= */
.section {
  padding: 60px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* ======= CATEGORY TABS ======= */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-tab {
  padding: 8px 18px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}

.cat-tab:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.cat-tab.active {
  background: var(--text-primary);
  color: #000;
  border-color: var(--text-primary);
}

/* ======= PRODUCTS GRID ======= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ======= PRODUCT CARD ======= */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.product-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.04);
}

.product-badge-out {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.8);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
}

.product-cat {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: capitalize;
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.product-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ======= FOOTER ======= */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-brand {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ======= CART PAGE ======= */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 48px 0;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--text-secondary);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.qty-btn {
  background: none;
  color: var(--text-secondary);
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition);
}
.qty-btn:hover { color: var(--text-primary); }

.qty-num {
  font-size: 14px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.btn-remove {
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  transition: color var(--transition);
}
.btn-remove:hover { color: var(--danger); }

.cart-summary {
  position: sticky;
  top: 80px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.summary-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ======= CHECKOUT ======= */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 48px 0;
  align-items: start;
}

.checkout-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.payment-option:hover,
.payment-option.selected {
  border-color: var(--text-muted);
  background: var(--accent-dim);
}

.payment-option.selected {
  border-color: var(--text-primary);
}

.payment-option input[type="radio"] {
  accent-color: var(--text-primary);
  width: 16px;
  height: 16px;
}

.payment-option-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.payment-option-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ======= ORDER DETAIL ======= */
.order-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 48px 0;
  align-items: start;
}

.order-status-banner {
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.order-id {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ======= CHAT ======= */
.chat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.chat-msg.mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-msg.mine .chat-bubble {
  background: var(--text-primary);
  color: #000;
  border-bottom-right-radius: 4px;
}

.chat-msg.theirs .chat-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-img-thumb {
  max-width: 200px;
  border-radius: 8px;
  margin-top: 6px;
  cursor: zoom-in;
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  transition: border-color var(--transition);
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: var(--text-muted);
}

.chat-attach-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 18px;
  transition: all var(--transition);
}
.chat-attach-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }

/* ======= ORDERS LIST ======= */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 48px 0;
}

.order-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color var(--transition);
  text-decoration: none;
  color: inherit;
}

.order-row:hover {
  border-color: var(--border-light);
}

.order-row-id {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.order-row-items {
  font-size: 13px;
  color: var(--text-secondary);
}

.order-row-total {
  font-size: 18px;
  font-weight: 700;
}

.order-row-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 900px) {
  .cart-layout,
  .checkout-layout,
  .order-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary,
  .checkout-summary {
    position: static;
  }
  .hero-visual { display: none; }
  .hero { padding: 60px 0 40px; }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .cart-item { flex-wrap: wrap; }
}
