/* ============================================================
   SHOP / E-COMMERCE
   Prefix: shp-*   (products, cart, checkout, order pages)
   Uses the theme variables from head_styles.php.
   ============================================================ */

/* ── Header cart button (lives in the topbar on every page) ── */
.shp-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  padding: .2rem .6rem;
}
.shp-cart-link:hover { color: var(--secondary); }
.shp-cart-badge {
  background: var(--secondary);
  color: #fff;
  border-radius: 5rem;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 .5rem;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Page intro ── */
.shp-intro { padding: 6rem 0 3rem; text-align: center; }
.shp-intro span { font-size: 1.7rem; color: var(--text-muted); font-style: italic; }
.shp-intro h1 {
  font-size: 3.6rem; font-weight: 800; color: var(--dark);
  margin-top: .5rem; text-transform: uppercase;
}

/* ── Category filter pills ── */
.shp-filters {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: center; margin-bottom: 4rem;
}
.shp-pill {
  padding: .9rem 2.2rem;
  border: 2px solid var(--border);
  border-radius: 5rem;
  font-size: 1.45rem; font-weight: 600;
  color: var(--text); text-decoration: none;
  background: #fff; transition: all .25s;
}
.shp-pill:hover { border-color: var(--primary); color: var(--primary); }
.shp-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Product grid card ── */
.shp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform .3s, box-shadow .3s;
  margin-bottom: 3rem;
}
.shp-card:hover { transform: translateY(-6px); box-shadow: 0 14px 36px rgba(0,0,0,.12); }
.shp-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--light-bg);
  overflow: hidden;
}
.shp-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.shp-card:hover .shp-thumb img { transform: scale(1.06); }
.shp-off-tag {
  position: absolute; top: 1.2rem; left: 1.2rem;
  background: var(--primary); color: #fff;
  font-size: 1.2rem; font-weight: 700;
  padding: .4rem 1rem; border-radius: .5rem;
}
.shp-oos-tag {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: #555; color: #fff;
  font-size: 1.15rem; font-weight: 700;
  padding: .4rem 1rem; border-radius: .5rem;
}
.shp-card-body { padding: 2rem; display: flex; flex-direction: column; flex: 1; }
.shp-cat-label {
  font-size: 1.2rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600; margin-bottom: .6rem;
}
.shp-card-body h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.4; }
.shp-card-body h3 a { color: var(--dark); text-decoration: none; }
.shp-card-body h3 a:hover { color: var(--primary); }
.shp-card-desc {
  font-size: 1.4rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 1.5rem; flex: 1;
}
.shp-price-row { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.6rem; }
.shp-price { font-size: 2.1rem; font-weight: 800; color: var(--primary); }
.shp-mrp { font-size: 1.5rem; color: var(--text-muted); text-decoration: line-through; }

/* ── Buttons ── */
.shp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .8rem;
  padding: 1.1rem 2.2rem;
  background: var(--primary); color: #fff;
  border: 2px solid var(--primary);
  border-radius: 5rem;
  font-size: 1.5rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all .3s; width: 100%;
}
.shp-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.shp-btn:disabled, .shp-btn.disabled { opacity: .5; cursor: not-allowed; }
.shp-btn-outline { background: transparent; color: var(--primary); }
.shp-btn-outline:hover { background: var(--primary); color: #fff; }
.shp-btn-auto { width: auto; }

/* ── Product detail ── */
.shp-detail { padding: 5rem 0; }
.shp-gallery-main {
  border: 1px solid var(--border); border-radius: 1.4rem;
  overflow: hidden; background: var(--light-bg);
  aspect-ratio: 1 / 1; margin-bottom: 1.5rem;
}
.shp-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.shp-thumbs { display: flex; gap: 1rem; flex-wrap: wrap; }
.shp-thumbs button {
  width: 7.5rem; height: 7.5rem; padding: 0;
  border: 2px solid var(--border); border-radius: .8rem;
  overflow: hidden; background: none; cursor: pointer; transition: border-color .2s;
}
.shp-thumbs button.active, .shp-thumbs button:hover { border-color: var(--primary); }
.shp-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.shp-detail h1 { font-size: 3.2rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; line-height: 1.3; }
.shp-detail-meta { font-size: 1.35rem; color: var(--text-muted); margin-bottom: 2rem; }
.shp-detail-meta span + span { margin-left: 2rem; }
.shp-detail .shp-price-row { margin: 2rem 0; }
.shp-detail .shp-price { font-size: 3rem; }
.shp-off-inline {
  background: #e8f5e9; color: #1b5e20;
  font-size: 1.3rem; font-weight: 700;
  padding: .4rem 1rem; border-radius: .5rem;
}
.shp-short {
  font-size: 1.6rem; color: var(--text); line-height: 1.85;
  padding-bottom: 2.4rem; margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--border);
}
.shp-stock-ok  { color: #1b5e20; font-weight: 700; font-size: 1.4rem; }
.shp-stock-out { color: #b71c1c; font-weight: 700; font-size: 1.4rem; }

/* Quantity stepper */
.shp-qty {
  display: inline-flex; align-items: center;
  border: 2px solid var(--border); border-radius: 5rem; overflow: hidden;
}
.shp-qty button {
  width: 4.4rem; height: 4.4rem; border: none; background: #fff;
  font-size: 1.9rem; color: var(--primary); cursor: pointer; line-height: 1;
}
.shp-qty button:hover { background: var(--light-bg); }
.shp-qty input {
  width: 5rem; height: 4.4rem; border: none; text-align: center;
  font-size: 1.6rem; font-weight: 700; color: var(--dark);
  -moz-appearance: textfield;
}
.shp-qty input::-webkit-outer-spin-button,
.shp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.shp-buy-row { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.shp-buy-row .shp-btn { width: auto; min-width: 20rem; }

.shp-desc-section { padding: 0 0 6rem; }
.shp-desc-body { font-size: 1.6rem; color: var(--text); line-height: 1.9; }
.shp-desc-body p  { margin-bottom: 1.5rem; }
.shp-desc-body ul, .shp-desc-body ol { margin: 0 0 1.5rem 2rem; }
.shp-desc-body li { margin-bottom: .8rem; }
.shp-desc-body h3 { font-size: 2.2rem; font-weight: 700; color: var(--primary); margin: 2.5rem 0 1.2rem; }

/* ── Cart table ── */
.shp-cart-page { padding: 5rem 0 6rem; }
.shp-cart-table { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 1.2rem; overflow: hidden; }
.shp-cart-table th {
  background: var(--light-bg); padding: 1.6rem;
  font-size: 1.3rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 700; text-align: left;
}
.shp-cart-table td { padding: 1.8rem 1.6rem; border-top: 1px solid var(--border); vertical-align: middle; }
.shp-cart-prod { display: flex; gap: 1.6rem; align-items: center; }
.shp-cart-prod img { width: 8rem; height: 8rem; object-fit: cover; border-radius: .8rem; flex-shrink: 0; }
.shp-cart-prod a { font-size: 1.55rem; font-weight: 700; color: var(--dark); text-decoration: none; }
.shp-cart-prod a:hover { color: var(--primary); }
.shp-cart-prod small { display: block; color: var(--text-muted); font-size: 1.25rem; margin-top: .4rem; }
.shp-line-total { font-size: 1.7rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.shp-remove {
  background: none; border: none; color: #b71c1c;
  font-size: 1.6rem; cursor: pointer; padding: .5rem;
}
.shp-remove:hover { color: #7f0000; }

/* ── Summary box (cart + checkout) ── */
.shp-summary {
  background: #fff; border: 1px solid var(--border);
  border-radius: 1.2rem; padding: 2.8rem;
  position: sticky; top: 12rem;
}
.shp-summary h3 {
  font-size: 2rem; font-weight: 800; color: var(--dark);
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.shp-sum-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 1.5rem; color: var(--text); margin-bottom: 1.3rem;
}
.shp-sum-row span:last-child { font-weight: 700; }
.shp-sum-free { color: #1b5e20; font-weight: 700; }
.shp-sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 1.9rem; font-weight: 800; color: var(--dark);
  padding-top: 1.6rem; margin-top: 1.6rem; border-top: 2px solid var(--border);
}
.shp-sum-total span:last-child { color: var(--primary); font-size: 2.4rem; }
.shp-ship-hint {
  background: var(--light-bg); border-radius: .8rem;
  padding: 1.2rem 1.5rem; font-size: 1.3rem;
  color: var(--text-muted); margin-bottom: 2rem; line-height: 1.6;
}

/* ── Empty state ── */
.shp-empty { text-align: center; padding: 7rem 2rem; }
.shp-empty i { font-size: 6rem; color: var(--border); margin-bottom: 2rem; }
.shp-empty h3 { font-size: 2.4rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; }
.shp-empty p { font-size: 1.6rem; color: var(--text-muted); margin-bottom: 2.5rem; }

/* ── Checkout ── */
.shp-panel {
  background: #fff; border: 1px solid var(--border);
  border-radius: 1.2rem; padding: 2.8rem; margin-bottom: 3rem;
}
.shp-panel h3 { font-size: 1.9rem; font-weight: 800; color: var(--dark); margin-bottom: 2rem; }
.shp-field { margin-bottom: 1.8rem; }
.shp-field label {
  display: block; font-size: 1.35rem; font-weight: 600;
  color: var(--text); margin-bottom: .6rem;
}
.shp-field label .req { color: #b71c1c; }
.shp-field input, .shp-field select, .shp-field textarea {
  width: 100%; padding: 1.15rem 1.4rem;
  border: 1.5px solid var(--border); border-radius: .8rem;
  font-size: 1.45rem; background: #fff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.shp-field input:focus, .shp-field select:focus, .shp-field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.shp-pay-opt {
  display: flex; gap: 1.4rem; align-items: flex-start;
  border: 2px solid var(--border); border-radius: 1rem;
  padding: 1.8rem; margin-bottom: 1.4rem; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.shp-pay-opt:hover { border-color: var(--primary); }
.shp-pay-opt.active { border-color: var(--primary); background: var(--primary-bg); }
.shp-pay-opt input { margin-top: .4rem; width: 1.9rem; height: 1.9rem; flex-shrink: 0; }
.shp-pay-opt strong { display: block; font-size: 1.55rem; color: var(--dark); margin-bottom: .3rem; }
.shp-pay-opt small { font-size: 1.3rem; color: var(--text-muted); line-height: 1.6; }
.shp-alert {
  padding: 1.4rem 1.8rem; border-radius: .8rem;
  font-size: 1.4rem; margin-bottom: 2.5rem; line-height: 1.65;
}
.shp-alert-error { background: #fdf0f0; border: 1px solid #f5c6cb; color: #721c24; }
.shp-alert-info  { background: var(--light-bg); border: 1px solid var(--border); color: var(--text); }

/* ── Order confirmation ── */
.shp-thanks { padding: 7rem 0; text-align: center; }
.shp-thanks-icon {
  width: 9rem; height: 9rem; margin: 0 auto 2.5rem;
  background: #e8f5e9; color: #1b5e20;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.shp-thanks h1 { font-size: 3.4rem; font-weight: 800; color: var(--dark); margin-bottom: 1.2rem; }
.shp-thanks p { font-size: 1.65rem; color: var(--text-muted); line-height: 1.8; }
.shp-order-box {
  background: #fff; border: 1px solid var(--border); border-radius: 1.2rem;
  padding: 3rem; margin: 3.5rem auto 0; max-width: 68rem; text-align: left;
}
.shp-order-box h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; }
.shp-oitem { display: flex; gap: 1.5rem; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--border); }
.shp-oitem img { width: 6rem; height: 6rem; object-fit: cover; border-radius: .6rem; }
.shp-oitem-t { flex: 1; font-size: 1.45rem; font-weight: 600; color: var(--dark); }
.shp-oitem-t small { display: block; font-weight: 400; color: var(--text-muted); font-size: 1.25rem; }

/* ── Order status pills (my-orders) ── */
.shp-status {
  display: inline-block; padding: .35rem 1.1rem; border-radius: 5rem;
  font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.shp-st-pending    { background: #fff8e1; color: #8d6e00; }
.shp-st-processing { background: #e3f2fd; color: #0d47a1; }
.shp-st-shipped    { background: #ede7f6; color: #4527a0; }
.shp-st-delivered  { background: #e8f5e9; color: #1b5e20; }
.shp-st-cancelled  { background: #ffebee; color: #b71c1c; }
.shp-st-paid       { background: #e8f5e9; color: #1b5e20; }
.shp-st-failed     { background: #ffebee; color: #b71c1c; }
.shp-st-refunded   { background: #f3e5f5; color: #6a1b9a; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .shp-summary { position: static; margin-top: 3rem; }
  .shp-intro h1 { font-size: 2.9rem; }
  .shp-detail h1 { font-size: 2.6rem; }
}
@media (max-width: 767px) {
  /* Stack the cart table into cards */
  .shp-cart-table thead { display: none; }
  .shp-cart-table, .shp-cart-table tbody, .shp-cart-table tr, .shp-cart-table td { display: block; width: 100%; }
  .shp-cart-table tr { border-top: 1px solid var(--border); padding: 1.5rem 0; }
  .shp-cart-table td { border: none; padding: .7rem 1.6rem; }
  .shp-buy-row .shp-btn { width: 100%; min-width: 0; }
  .shp-thanks h1 { font-size: 2.6rem; }
}
