/* ══════════════════════════════════════════════════════════════
   Oyinborave — Shop Pages Stylesheet
   (collection, cart, checkout, success, failed)
   ══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --mauve:        #bb72cc;
  --purple:       #8b3da0;
  --dark-purple:  #5c1f7a;
  --bg-light:     #faf8fc;
  --text-dark:    #1a0f22;
  --text-mid:     #4a3555;
  --text-muted:   #7a6788;
  --border:       rgba(187,114,204,.18);
  --white:        #ffffff;
  --radius-lg:    16px;
  --radius-md:    10px;
  --radius-sm:    6px;
  --shadow-sm:    0 2px 12px rgba(139,61,160,.08);
  --shadow-md:    0 8px 32px rgba(139,61,160,.14);
  --shadow-lg:    0 16px 48px rgba(139,61,160,.18);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; color: var(--text-dark); background: var(--bg-light); -webkit-font-smoothing: antialiased; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ── Shop Header ───────────────────────────────────────────── */
.shop-top-bar {
  background: var(--dark-purple);
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  padding: 7px 0;
}
.shop-top-bar .container {
  display: flex;
  align-items: center;
  gap: 16px;
}
.shop-top-social { display: flex; gap: 10px; }
.shop-top-social a { color: rgba(255,255,255,.7); font-size: 1rem; transition: color .2s; }
.shop-top-social a:hover { color: #fff; text-decoration: none; }
.shop-top-announcement { flex: 1; text-align: center; font-size: .78rem; letter-spacing: .02em; }
.shop-top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* Currency pill */
.currency-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; padding: 4px 12px 4px 8px;
  color: #fff; font-size: .78rem; font-weight: 500;
  cursor: pointer; transition: background .2s;
  position: relative;
}
.currency-pill:hover { background: rgba(255,255,255,.2); }
.currency-pill ion-icon { font-size: .75rem; margin-left: 2px; }

.shop-header-main {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 500;
  box-shadow: var(--shadow-sm);
}
.shop-header-inner {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 0; min-height: 72px;
}
.shop-logo img { height: 40px; width: auto; }
.shop-logo:hover { opacity: .88; }

.shop-nav { display: flex; gap: 4px; align-items: center; }
.shop-nav-link {
  padding: 7px 14px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: var(--text-mid);
  transition: background .2s, color .2s;
}
.shop-nav-link:hover, .shop-nav-link.is-active {
  background: var(--bg-light); color: var(--purple);
  text-decoration: none;
}

.shop-header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.cart-btn {
  position: relative; display: flex; align-items: center;
  background: none; border: 2px solid var(--border);
  border-radius: 10px; padding: 8px 14px; gap: 6px;
  font-size: .88rem; font-weight: 600; color: var(--purple);
  transition: border-color .2s, background .2s;
}
.cart-btn:hover { border-color: var(--purple); background: var(--bg-light); }
.cart-btn ion-icon { font-size: 1.1rem; }
.cart-badge {
  background: var(--purple); color: #fff;
  font-size: .65rem; font-weight: 700;
  border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: -6px; right: -6px;
}

.shop-mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 1.4rem; color: var(--text-dark); padding: 4px;
}

/* ── Page Hero / Breadcrumb ────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--dark-purple) 0%, var(--purple) 60%, var(--mauve) 100%);
  padding: 44px 0 36px;
  color: #fff;
}
.page-hero h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 8px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .82rem; opacity: .8; flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; text-decoration: none; }
.breadcrumb-sep { opacity: .5; }

/* ── Section headings ──────────────────────────────────────── */
.section-title {
  font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin-bottom: 6px;
}
.section-sub { font-size: .9rem; color: var(--text-muted); margin-bottom: 28px; }

/* ── Product Grid ──────────────────────────────────────────── */
.products-section { padding: 52px 0 72px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.product-card-media {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4; background: #f0eaf5;
}
.product-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
  position: absolute; inset: 0;
}
.product-card-img.back {
  opacity: 0; transition: opacity .35s ease, transform .45s ease;
}
.product-card:hover .product-card-img.front { opacity: 0; transform: scale(1.04); }
.product-card:hover .product-card-img.back  { opacity: 1; transform: scale(1.04); }

.product-wishlist-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.9); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted);
  transition: color .2s, transform .2s;
  backdrop-filter: blur(4px);
}
.product-wishlist-btn:hover { color: #e74c3c; transform: scale(1.15); }
.product-wishlist-btn.is-active { color: #e74c3c; }

.product-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-card-name { font-size: .95rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.product-card-desc { font-size: .8rem; color: var(--text-muted); line-height: 1.5; flex: 1; margin-bottom: 12px; }
.product-card-price { font-size: 1.05rem; font-weight: 700; color: var(--purple); margin-bottom: 14px; }

.btn-add-cart {
  width: 100%; padding: 11px 0; border: none;
  background: var(--purple); color: #fff;
  border-radius: var(--radius-md); font-size: .88rem;
  font-weight: 600; display: flex; align-items: center;
  justify-content: center; gap: 7px;
  transition: background .2s, transform .15s;
}
.btn-add-cart:hover { background: var(--dark-purple); }
.btn-add-cart:active { transform: scale(.97); }
.btn-add-cart.is-loading { opacity: .7; pointer-events: none; }
.btn-add-cart ion-icon { font-size: 1rem; }

.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--purple); color: #fff;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 4px;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 72px 20px; color: var(--text-muted);
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .5; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-dark); }

/* ── Cart Page ─────────────────────────────────────────────── */
.cart-section { padding: 52px 0 80px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }

.cart-table-wrap { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead th {
  background: var(--bg-light); padding: 14px 16px;
  text-align: left; font-size: .82rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em;
}
.cart-table tbody tr { border-bottom: 1px solid var(--border); }
.cart-table tbody tr:last-child { border-bottom: none; }
.cart-table td { padding: 16px; vertical-align: middle; }

.cart-product-cell { display: flex; align-items: center; gap: 14px; }
.cart-product-img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; background: #f0eaf5; }
.cart-product-name { font-size: .9rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.cart-product-price-unit { font-size: .8rem; color: var(--text-muted); }

.qty-control { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; width: fit-content; }
.qty-btn { background: none; border: none; padding: 6px 12px; font-size: 1rem; color: var(--purple); transition: background .15s; }
.qty-btn:hover { background: var(--bg-light); }
.qty-input { width: 44px; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-size: .9rem; font-weight: 600; padding: 6px 0; font-family: inherit; color: var(--text-dark); }
.qty-input:focus { outline: none; }

.cart-remove-btn { background: none; border: none; color: #c0392b; font-size: 1.1rem; padding: 6px; border-radius: 6px; transition: background .15s; }
.cart-remove-btn:hover { background: #fdf0ef; }
.cart-row-total { font-size: .95rem; font-weight: 700; color: var(--purple); text-align: right; }

/* Cart summary */
.cart-summary {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 24px; position: sticky; top: 88px;
}
.cart-summary-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 20px; color: var(--text-dark); }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: .9rem; color: var(--text-mid); border-bottom: 1px solid var(--border); }
.cart-summary-row:last-of-type { border-bottom: none; }
.cart-summary-total { font-size: 1.1rem; font-weight: 700; color: var(--purple); }

.btn-checkout {
  display: block; width: 100%; margin-top: 20px;
  background: var(--purple); color: #fff; border: none;
  border-radius: var(--radius-md); padding: 15px;
  font-size: .95rem; font-weight: 700; letter-spacing: .02em;
  transition: background .2s, transform .15s;
  text-align: center; text-decoration: none;
}
.btn-checkout:hover { background: var(--dark-purple); text-decoration: none; color: #fff; }
.btn-checkout:active { transform: scale(.98); }

.btn-continue-shopping { display: block; text-align: center; margin-top: 12px; font-size: .82rem; color: var(--text-muted); }
.btn-continue-shopping:hover { color: var(--purple); }

/* ── Checkout Page ─────────────────────────────────────────── */
.checkout-section { padding: 52px 0 80px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }

.form-card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 28px; margin-bottom: 24px; }
.form-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.form-card-title span { color: var(--purple); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text-mid); }
.form-label .req { color: var(--purple); }
.form-input, .form-select, .form-textarea {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: .9rem; font-family: inherit;
  color: var(--text-dark); background: #fff; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,61,160,.1);
}
.form-input.error { border-color: #e74c3c; }
.form-textarea { resize: vertical; min-height: 90px; }

/* Order summary sidebar */
.order-summary {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 24px; position: sticky; top: 88px;
}
.order-summary-title { font-size: 1rem; font-weight: 700; margin-bottom: 18px; color: var(--text-dark); }
.order-summary-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-summary-item:last-child { border-bottom: none; }
.order-item-img { width: 52px; height: 64px; object-fit: cover; border-radius: 6px; background: #f0eaf5; flex-shrink: 0; }
.order-item-name { font-size: .85rem; font-weight: 600; color: var(--text-dark); }
.order-item-qty  { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.order-item-price { margin-left: auto; font-size: .9rem; font-weight: 700; color: var(--purple); white-space: nowrap; }

.order-totals { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.order-totals-row { display: flex; justify-content: space-between; font-size: .88rem; color: var(--text-mid); padding: 5px 0; }
.order-totals-grand { font-size: 1.05rem; font-weight: 700; color: var(--purple); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; }

.btn-pay {
  width: 100%; margin-top: 20px; padding: 16px;
  background: linear-gradient(135deg, var(--purple), var(--dark-purple));
  color: #fff; border: none; border-radius: var(--radius-md);
  font-size: .95rem; font-weight: 700; letter-spacing: .02em;
  transition: opacity .2s, transform .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-pay:hover { opacity: .9; }
.btn-pay:active { transform: scale(.98); }
.btn-pay ion-icon { font-size: 1.05rem; }

.security-note {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  font-size: .75rem; color: var(--text-muted); margin-top: 12px;
}
.security-note ion-icon { color: #2e7d32; font-size: .9rem; }

/* ── Success / Failed ──────────────────────────────────────── */
.result-page { padding: 80px 20px; text-align: center; min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.result-card {
  background: var(--white); border-radius: 20px; padding: 52px 40px;
  max-width: 520px; width: 100%; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.result-icon { font-size: 4rem; margin-bottom: 20px; }
.result-card h1 { font-size: 1.7rem; margin-bottom: 12px; color: var(--text-dark); }
.result-card p  { color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.result-order-num { background: var(--bg-light); border-radius: 8px; padding: 12px 20px; font-size: .88rem; font-weight: 600; color: var(--purple); margin: 16px 0; display: inline-block; }

.btn-back-home {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple); color: #fff; border-radius: var(--radius-md);
  padding: 13px 28px; font-size: .92rem; font-weight: 600;
  margin-top: 20px; transition: background .2s;
}
.btn-back-home:hover { background: var(--dark-purple); text-decoration: none; color: #fff; }

/* ── Footer (shop pages) ───────────────────────────────────── */
.shop-footer {
  background: #1a0f22; color: rgba(255,255,255,.7);
  padding: 52px 0 24px;
}
.shop-footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 36px;
}
.shop-footer-brand-text { font-size: .82rem; line-height: 1.6; margin: 14px 0 20px; }
.shop-footer-social { display: flex; gap: 10px; }
.shop-footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08); display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,.7); font-size: .95rem;
  transition: background .2s, color .2s;
}
.shop-footer-social a:hover { background: var(--purple); color: #fff; text-decoration: none; }
.shop-footer-col-title { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); margin-bottom: 14px; }
.shop-footer-links { list-style: none; }
.shop-footer-links li { margin-bottom: 10px; }
.shop-footer-links a { font-size: .85rem; color: rgba(255,255,255,.65); transition: color .2s; }
.shop-footer-links a:hover { color: #fff; text-decoration: none; }
.shop-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: .78rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary, .order-summary { position: static; }
  .shop-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .shop-nav { display: none; }
  .shop-mobile-menu-btn { display: block; }
  .shop-top-social { display: none; }
  .shop-top-announcement { text-align: left; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; padding: 8px 16px; }
  .cart-table td::before { content: attr(data-label); font-size: .75rem; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 4px; }
  .cart-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }

  .page-hero h1 { font-size: 1.4rem; }
  .shop-footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .shop-footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .result-card { padding: 36px 22px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
}
