/* Store-specific styles — extends theme.css */

/* Page header */
.page-header { padding: 7rem 2.5rem 3rem; }
.page-header-inner { max-width: 1200px; margin: 0 auto; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--accent); }

/* Store header */
.store-header { padding: 7rem 2.5rem 3rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.store-header-inner { max-width: 1200px; margin: 0 auto; }
.store-header h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.store-header p { color: var(--text-muted); }

/* Shop grid */
.shop-main { padding: 3rem 2.5rem; max-width: 1200px; margin: 0 auto; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; }

/* Product card */
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color 0.2s; }
.product-card:hover { border-color: var(--accent); }
.product-card.compact { background: transparent; border: none; }

.product-image-wrap { display: block; position: relative; }
.product-img-placeholder { height: 220px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.product-img-placeholder.large { height: 400px; }
.product-img-placeholder.sm { height: 80px; width: 80px; border-radius: 8px; font-size: 1.5rem; }
.product-icon { opacity: 0.3; }

.sale-badge { position: absolute; top: 0.75rem; right: 0.75rem; background: var(--accent); color: var(--bg); font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 4px; }

.product-info { padding: 1rem; }
.product-category { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.product-info h3 { font-size: 1rem; margin: 0.4rem 0 0.6rem; }
.product-info h3 a { color: var(--text); text-decoration: none; }
.product-info h3 a:hover { color: var(--accent); }
.product-info h4 { font-size: 0.9rem; margin: 0.4rem 0; }
.product-info h4 a { color: var(--text); text-decoration: none; }

.product-pricing { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.price { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.compare-price { font-size: 0.9rem; color: var(--text-dim); text-decoration: line-through; }
.discount-tag { font-size: 0.7rem; color: var(--accent); font-weight: 600; }

/* Buttons */
.btn-add-cart, .btn-primary {
  display: inline-block; width: 100%;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 8px;
  padding: 0.65rem 1rem; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-align: center; text-decoration: none;
  transition: opacity 0.2s;
}
.btn-add-cart:hover, .btn-primary:hover { opacity: 0.85; }
.btn-primary { width: auto; padding: 0.75rem 1.5rem; }
.btn-add-cart:disabled, .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.out-of-stock { color: var(--text-dim); font-size: 0.85rem; }

/* Product detail */
.product-detail { padding: 7rem 2.5rem 4rem; max-width: 1200px; margin: 0 auto; }
.product-detail-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.product-gallery { display: flex; flex-direction: column; gap: 1rem; }
.product-main-img { border-radius: 16px; overflow: hidden; }
.product-detail-info h1 { font-size: 1.8rem; margin: 0.75rem 0; }
.product-detail-info .price { font-size: 1.5rem; }
.product-description { color: var(--text-muted); margin: 1.5rem 0; line-height: 1.7; }
.product-stock { margin: 1rem 0; }
.in-stock { color: var(--accent); font-size: 0.9rem; }
.product-actions { margin: 1.5rem 0; }
.product-meta { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.product-meta p { margin: 0.5rem 0; }
.aliexpress-link { color: var(--accent); }

/* Related products */
.related-products { padding: 4rem 2.5rem; background: var(--surface); }
.related-inner { max-width: 1200px; margin: 0 auto; }
.related-inner h2 { margin-bottom: 2rem; font-size: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.related-grid .product-card { background: var(--bg); }

/* Cart */
.cart-main { padding: 3rem 2.5rem; max-width: 1200px; margin: 0 auto; }
.empty-cart { text-align: center; padding: 4rem 0; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-cart h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.empty-cart p { color: var(--text-muted); margin-bottom: 2rem; }

.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; }
.cart-item { display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.cart-item-img { flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.item-price { color: var(--text-muted); font-size: 0.9rem; }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.qty-control { display: flex; align-items: center; gap: 0.75rem; }
.qty-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { border-color: var(--accent); }
.qty-value { font-weight: 600; min-width: 20px; text-align: center; }
.btn-remove { background: none; border: none; color: var(--text-dim); font-size: 0.8rem; cursor: pointer; text-decoration: underline; }

/* Cart summary */
.cart-summary { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.75rem; height: fit-content; }
.cart-summary h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.summary-row { display: flex; justify-content: space-between; margin: 0.75rem 0; font-size: 0.95rem; }
.summary-row.total { font-size: 1.1rem; font-weight: 700; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.free-shipping-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0.5rem 0; }

.btn-checkout { display: block; width: 100%; background: var(--accent); color: var(--bg); text-align: center; text-decoration: none; border-radius: 8px; padding: 0.85rem; font-weight: 600; margin-top: 1rem; transition: opacity 0.2s; }
.btn-checkout:hover { opacity: 0.85; }
.btn-continue { display: block; text-align: center; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; margin-top: 0.75rem; }

/* Checkout */
.checkout-main { padding: 3rem 2.5rem; max-width: 1100px; margin: 0 auto; }
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; }
.checkout-form-section h2 { font-size: 1.1rem; margin: 1.5rem 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.checkout-form-section h2:first-child { margin-top: 0; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.form-group input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.65rem 0.85rem; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.95rem; }
.form-group input:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.stripe-element { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem; margin-bottom: 1rem; }
.payment-message { color: var(--accent); font-size: 0.85rem; margin-bottom: 1rem; }

.btn-checkout-full { width: 100%; background: var(--accent); color: var(--bg); border: none; border-radius: 8px; padding: 0.9rem; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 1.5rem; }
.btn-checkout-full:hover { opacity: 0.85; }
.btn-checkout-full:disabled { opacity: 0.5; cursor: not-allowed; }

.checkout-summary { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.75rem; height: fit-content; }
.checkout-summary h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.summary-item { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); margin: 0.5rem 0; }
.summary-divider { border-top: 1px solid var(--border); margin: 1rem 0; }

/* Success page */
.success-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 8rem 2.5rem; text-align: center; }
.success-inner { max-width: 500px; }
.success-icon { font-size: 4rem; margin-bottom: 1.5rem; }
.success-inner h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.success-sub { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2.5rem; }
.success-actions { display: flex; gap: 1rem; justify-content: center; }
.btn-secondary { display: inline-block; padding: 0.75rem 1.5rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); text-decoration: none; transition: border-color 0.2s; }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

/* Policy page */
.policy-page { padding: 7rem 2.5rem 4rem; }
.policy-inner { max-width: 720px; margin: 0 auto; }
.policy-inner h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.policy-date { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 2.5rem; }
.policy-inner h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.policy-inner p { color: var(--text-muted); margin: 0.75rem 0; line-height: 1.7; }
.policy-inner ul { color: var(--text-muted); margin: 0.75rem 0; padding-left: 1.5rem; line-height: 1.8; }
.policy-inner a { color: var(--accent); }

/* Error page */
.error-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.error-inner { text-align: center; }
.error-inner h1 { font-size: 5rem; color: var(--accent-dim); margin-bottom: 1rem; }
.error-inner p { color: var(--text-muted); margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .product-detail-inner { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .success-actions { flex-direction: column; }
}