/* ============================================================
   PAWMART - style.css  (Shop Frontend)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4CAF50;
  --primary-dark: #388E3C;
  --secondary: #FF9800;
  --danger: #f44336;
  --text: #333;
  --text-light: #666;
  --bg: #f5f5f5;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,.1);
  --radius: 12px;
}

body { font-family: 'Segoe UI', Tahoma, sans-serif; color: var(--text); background: var(--bg); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
.header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-content { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.logo-section { display: flex; align-items: center; gap: 10px; }
.logo img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.brand h1 { font-size: 18px; color: var(--primary); }
.brand p  { font-size: 12px; color: var(--text-light); }
.center-logo img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.header-actions { display: flex; gap: 10px; align-items: center; }

.cart-btn { position: relative; background: var(--primary); color: #fff; border: none;
  padding: 10px 14px; border-radius: 50px; cursor: pointer; font-size: 20px; transition: .2s; }
.cart-btn:hover { background: var(--primary-dark); transform: scale(1.05); }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--danger);
  color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 11px;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.menu-btn { background: none; border: 2px solid var(--primary); color: var(--primary);
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 18px; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, #e8f5e9 0%, #fff9c4 100%); padding: 60px 0; }
.hero-content { max-width: 600px; }
.hero-content h2 { font-size: 28px; color: var(--primary-dark); margin-bottom: 12px; line-height: 1.4; }
.hero-content p  { font-size: 16px; color: var(--text-light); margin-bottom: 24px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn { padding: 12px 24px; border: none; border-radius: 50px; cursor: pointer;
  font-size: 15px; font-weight: 600; transition: .2s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: #e8f5e9; }
.btn-success   { background: #2196F3; color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-large     { width: 100%; justify-content: center; padding: 15px; font-size: 16px; }
.btn-sm        { padding: 6px 12px; font-size: 13px; border-radius: 6px; }

/* ── Categories ── */
.categories { padding: 32px 0 16px; }
.category-grid { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.category-card { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 20px; background: var(--white); border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; transition: .2s; min-width: 100px; }
.category-card:hover, .category-card.active { border-color: var(--primary); background: #e8f5e9; }
.category-icon { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.category-card h3 { font-size: 13px; color: var(--text); white-space: nowrap; }

/* ── Products ── */
.products { padding: 24px 0 48px; }
.products h2 { font-size: 22px; margin-bottom: 20px; color: var(--primary-dark); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .2s; position: relative; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--secondary);
  color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; z-index: 1; }
.product-image { height: 180px; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info { padding: 14px; }
.product-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-desc { font-size: 12px; color: var(--text-light); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-price { font-size: 18px; font-weight: 700; color: var(--primary); }

/* ── Cart Sidebar ── */
.cart-sidebar { position: fixed; right: -400px; top: 0; width: 380px; height: 100vh;
  background: var(--white); box-shadow: -4px 0 20px rgba(0,0,0,.15); z-index: 1000;
  transition: right .3s; display: flex; flex-direction: column; }
.cart-sidebar.open { right: 0; }
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999;
  display: none; }
.cart-overlay.active { display: block; }
.cart-header { display: flex; justify-content: space-between; align-items: center;
  padding: 20px; border-bottom: 1px solid #eee; }
.cart-header h2 { font-size: 18px; }
.close-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.empty-cart { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; align-items: center; }
.cart-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name  { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: 14px; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn { background: #f0f0f0; border: none; width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--primary); color: #fff; }
.remove-item { background: none; border: none; color: #ccc; font-size: 18px; cursor: pointer;
  padding: 4px; transition: .2s; }
.remove-item:hover { color: var(--danger); }

.cart-footer { padding: 16px 20px; border-top: 2px solid #f0f0f0; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700;
  margin-bottom: 14px; }

/* ── Checkout ── */
.checkout-page, .payment-page, .confirmation-page { padding: 32px 0 64px; }
.checkout-content { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.checkout-section { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-header h3 { font-size: 16px; font-weight: 700; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 8px;
  font-size: 14px; transition: .2s; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }

.payment-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.payment-option { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 20px; border: 2px solid #e0e0e0; border-radius: 10px; cursor: pointer; transition: .2s; }
.payment-option input { display: none; }
.payment-option.active { border-color: var(--primary); background: #e8f5e9; }
.payment-icon { font-size: 24px; }
.payment-name  { font-size: 13px; font-weight: 600; }

.order-summary { }
.order-items { margin-bottom: 16px; }
.order-item { display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.order-totals { background: #f9f9f9; border-radius: 8px; padding: 14px; }
.total-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.grand-total { font-size: 18px; font-weight: 700; border-top: 2px solid #eee; margin-top: 8px; padding-top: 12px; }
.total-amount { color: var(--primary); font-size: 22px; }
.free-ship-hint { text-align: center; color: var(--secondary); font-size: 13px; margin: 8px 0; }

/* ── Payment Page ── */
.payment-container, .confirmation-container {
  max-width: 480px; margin: 0 auto; background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); text-align: center; }
.payment-header h2, .confirmation-container h2 { font-size: 22px; margin-bottom: 8px; }
.qr-container { margin: 24px 0; display: flex; justify-content: center; }
.qr-code { border: 3px solid var(--primary); border-radius: 12px; padding: 8px; }
.amount-display { background: #e8f5e9; border-radius: 10px; padding: 16px; margin: 20px 0;
  display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; }
.amount { font-size: 28px; color: var(--primary); }
.payment-instructions { text-align: left; background: #f9f9f9; border-radius: 10px; padding: 16px; margin: 20px 0; }
.payment-instructions ol { padding-left: 20px; }
.payment-instructions li { margin: 8px 0; font-size: 14px; color: var(--text-light); }

/* ── Confirmation ── */
.success-icon { font-size: 64px; margin-bottom: 16px; }
.order-details { background: #f9f9f9; border-radius: 10px; padding: 20px; margin: 20px 0; text-align: left; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid #eee; font-size: 14px; }
.delivery-info { display: flex; align-items: center; gap: 8px; background: #e3f2fd;
  border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-size: 14px; }

/* ── Footer Pages ── */
.content-page { padding: 32px 0 64px; }
.content-wrapper { max-width: 800px; margin: 0 auto; background: var(--white);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.content-wrapper h2 { font-size: 24px; margin-bottom: 24px; color: var(--primary-dark); }
.content-section { margin-bottom: 28px; }
.content-section h3 { font-size: 18px; margin-bottom: 12px; color: var(--text); }
.content-section h4 { font-size: 15px; margin: 16px 0 8px; color: var(--primary-dark); }
.content-section p  { font-size: 14px; color: var(--text-light); line-height: 1.8; }
.feature-list { list-style: none; padding: 0; }
.feature-list li { padding: 6px 0; font-size: 14px; color: var(--text-light); border-bottom: 1px solid #f0f0f0; }
.highlight-text { background: #e8f5e9; border-left: 4px solid var(--primary);
  padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 14px; }
.back-btn { background: none; border: 2px solid var(--primary); color: var(--primary);
  padding: 8px 18px; border-radius: 8px; cursor: pointer; font-size: 14px;
  margin-bottom: 20px; transition: .2s; }
.back-btn:hover { background: var(--primary); color: #fff; }

.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start;
  background: #f9f9f9; border-radius: 10px; padding: 14px; }
.contact-form .form-group { margin-bottom: 16px; }

.faq-item { margin-bottom: 24px; }
.faq-item h3 { font-size: 16px; margin-bottom: 14px; color: var(--primary-dark); }
.faq-qa { margin-bottom: 14px; padding: 12px; background: #f9f9f9; border-radius: 8px; }
.faq-qa strong { font-size: 14px; display: block; margin-bottom: 6px; }
.faq-qa p { font-size: 13px; color: var(--text-light); }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article-card { background: #f9f9f9; border-radius: 10px; padding: 20px; }
.article-card h3 { font-size: 16px; margin-bottom: 16px; color: var(--primary-dark); }
.article-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.article-item h4 { font-size: 14px; margin-bottom: 8px; font-weight: 700; }
.article-item p  { font-size: 13px; color: var(--text-light); line-height: 1.7; }
.location-card { background: #f9f9f9; border-radius: 10px; padding: 16px; }
.location-card p { font-size: 14px; margin-bottom: 8px; color: var(--text-light); }

/* ── Footer ── */
.footer { background: #2e2e2e; color: #ccc; padding: 48px 0 0; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 15px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #aaa; text-decoration: none; font-size: 14px; transition: .2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid #444; margin-top: 32px; padding: 20px 16px; text-align: center; }
.footer-bottom h3 { color: var(--primary); margin-bottom: 6px; }
.footer-bottom p  { font-size: 13px; color: #888; }

/* ── Loading overlay ── */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; gap: 16px; }
.spinner { width: 48px; height: 48px; border: 5px solid #e0e0e0;
  border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 600px) {
  .center-logo { display: none; }
  .hero-content h2 { font-size: 20px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cart-sidebar { width: 100%; right: -100%; }
  .payment-methods { justify-content: center; }
}
