/* ============================================================
   XCAT APP – CORE CSS (CLEAN)
   File: assets/xcat-app.css
   Version: 1.0.7
============================================================ */

/* ============================================================
   DRAWER GLOBAL SCOPE FIX
   Drawer lives outside .xcat-app
============================================================ */
.xcat-drawer,
.xcat-drawer * {
  box-sizing: border-box;
}

/* ============================================================
   BASE APP WRAPPER
============================================================ */
.xcat-app {
  background: #ededed;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: 48px;
}

/* ============================================================
   SECTIONS
============================================================ */
.xcat-app-section {
  padding: 8px 0;
}

.xcat-app-section-title,
.xcat-app-section h2 {
  font-size: 0.75rem;
  margin: 0 0 10px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0 8px;
}

/* ============================================================
   TILE GRID – LEGACY RETIRED
============================================================ */
.xcat-app-grid {
  display: block;
}

/* ============================================================
   BASKET STRIP – CLEAR BUTTON
============================================================ */
.xcat-app-basket-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xcat-app-basket-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xcat-app-basket-clear {
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.xcat-app-basket-clear:active {
  transform: scale(0.97);
}

/* ============================================================
   BASKET STRIP (ALL DRAWERS)
============================================================ */
.xcat-app-basket-strip {
  display: flex;
  align-items: center;
  justify-content: space-between; /* ← forces far-right button */
  gap: 12px;

  background: #3f4fd8;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-weight: 800;
}

/* Left group: icon + totals */
.xcat-app-basket-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xcat-app-basket-icon {
  font-size: 18px;
  line-height: 1;
}

.xcat-app-basket-text {
  font-size: 0.95rem;
}

.xcat-app-basket-sep {
  opacity: 0.85;
}

/* ============================================================
   CLEAR BUTTON (RIGHT ALIGNED)
============================================================ */
.xcat-app-basket-clear {
  margin-left: auto;              /* ← absolute guarantee right */
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 10px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}

/* Hover / focus */
.xcat-app-basket-clear:hover,
.xcat-app-basket-clear:focus {
  background: #000;
  color: #fff;
}

/* Tap feedback (mobile) */
.xcat-app-basket-clear:active {
  transform: scale(0.97);
}
/* ============================================================
   PRODUCT TITLE – HARD 3 LINE CLAMP (DRAWER SAFE)
============================================================ */
.xcat-app-product-title {
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 8px;
  overflow: hidden;
  max-height: calc(1.25em * 3);
}

/* ============================================================
   PRODUCT MEDIA
============================================================ */
.xcat-app-product-media {
  margin-bottom: 12px;
  padding: 10px;
  background: #fff;
  border-radius: 14px;
}

.xcat-app-product-img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #ededed;
  border-radius: 10px;
}

/* ============================================================
   PRICE + STOCK
============================================================ */
.xcat-app-product-price {
  font-weight: 800;
  margin: 8px 0;
  font-size: 1.2rem;
}

.xcat-app-product-stock {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.xcat-app-product-stock.out {
  color: #b00020;
}

/* ============================================================
   QTY INPUT – MOBILE FRIENDLY
============================================================ */
.xcat-app-product-qtyrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
}

.xcat-app-product-qtylabel {
  font-weight: 700;
  min-width: 42px;
}

.xcat-app-product-qty {
  flex: 1;
  height: 48px;
  font-size: 16px; /* prevents iOS zoom */
  text-align: center;
  border-radius: 12px;
  border: 1px solid #ccc;
  background: #fff;
}

/* Remove native spinners */
.xcat-app-product-qty::-webkit-inner-spin-button,
.xcat-app-product-qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.xcat-app-product-qty {
  -moz-appearance: textfield;
}

/* ============================================================
   BUTTON ROW
============================================================ */
.xcat-app-product-btnrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.xcat-app-product-btnrow .button {
  height: 48px;
  border-radius: 14px;
  font-weight: 800;
  width: 100%;
  color: #fff;
}

/* Add to basket */
.xcat-app-product-add {
  background: #000;
}

/* Checkout */
.xcat-app-product-checkout {
  background: #3f4fd8;
}

/* View / fallback buttons */
.xcat-app-product-view {
  display: block;
  margin: 14px 0;
  text-align: center;
  height: 48px;
  line-height: 48px;
  border-radius: 14px;
  font-weight: 800;
  background: #3f4fd8;
  color: #fff;
}

/* ============================================================
   PRODUCT DESCRIPTION
============================================================ */
.xcat-app-product-desc {
  font-size: 0.9rem;
  margin-top: 10px;
}

/* ============================================================
   FOOTER / LINKS
============================================================ */
.xcat-app-product-link {
  margin-top: 10px;
  font-size: 0.85rem;
}

.xcat-app-product-link a {
  color: #3f4fd8;
  text-decoration: none;
}

/* ============================================================
   UTILITIES
============================================================ */
.xcat-muted {
  color: #777;
  font-size: 0.8rem;
}

.xcat-center { text-align: center; }
.xcat-mt { margin-top: 12px; }
.xcat-mb { margin-bottom: 12px; }

/* ============================================================
   END
============================================================ */