/* Shop: product designs (product-details.php #designs and the popup of our-products.php),
   quantity + Add to Cart on the product cards, "added to cart" message. Colours from the theme (style.css). */

/* ---- designs grid ---- */
.product-designs { padding: 0 0 90px; }
.product-designs__title { font-size: 28px; margin-bottom: 6px; }
.product-designs__help { color: #777; margin-bottom: 25px; }
.product-designs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.product-design { border: 2px solid #e8eef3; border-radius: 16px; padding: 12px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.product-design.is-chosen { border-color: var(--helpest-base); box-shadow: 0 8px 24px rgba(var(--helpest-base-rgb), .15); }
.product-design__img { display: block; aspect-ratio: 13 / 10; border-radius: 10px; overflow: hidden; background: #f3f6f9; }
.product-design__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-design__name { font-size: 16px; font-weight: 700; margin: 12px 0 10px; color: var(--helpest-black); }
.product-design__qty,
.product-card-qty { display: flex; align-items: center; justify-content: space-between; border: 1px solid #dfe6ec; border-radius: 30px; padding: 3px; background: #fff; }
.product-design__qty button,
.product-card-qty button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f0f5f9; color: var(--helpest-black); cursor: pointer; flex: 0 0 auto; }
.product-design__qty button:hover,
.product-card-qty button:hover { background: var(--helpest-base); color: #fff; }
.product-design__qty input,
.product-card-qty input { width: 50px; border: 0; text-align: center; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.product-design__qty input::-webkit-outer-spin-button, .product-design__qty input::-webkit-inner-spin-button,
.product-card-qty input::-webkit-outer-spin-button, .product-card-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-designs__footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 30px; padding: 20px 25px; border-radius: 16px; background: #f3f8fb; }
.product-designs__summary { font-size: 18px; font-weight: 700; color: var(--helpest-black); }
.product-designs__messages { color: #b42318; font-weight: 600; width: 100%; }
.product-designs__messages:empty { display: none; }

/* ---- product cards (our-products.php) ---- */
.single-product-style1__img.has-designs { cursor: pointer; }
.product-card-buy { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.product-card-buy .product-card-qty { flex: 0 0 auto; }
.product-card-qty button { width: 32px; height: 32px; }
.product-card-qty input { width: 38px; }
.product-card-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 30px; padding: 10px 18px; background: var(--helpest-base); color: #fff;
  font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s; }
.product-card-btn:hover { background: var(--helpest-black); color: #fff; }
.product-card-btn[disabled] { opacity: .6; cursor: wait; }

/* ---- designs popup ---- */
.designs-modal { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 22, 53, .6); }
.designs-modal.is-open { display: flex; }
.designs-modal__panel { position: relative; width: 100%; max-width: 980px; max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.designs-modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f0f5f9; font-size: 18px; cursor: pointer; }
.designs-modal__close:hover { background: var(--helpest-base); color: #fff; }
.designs-modal__title { font-size: 26px; margin: 0 50px 4px 0; }
.designs-modal .product-designs__footer { position: sticky; bottom: -30px; margin: 25px -30px -30px; border-radius: 0 0 20px 20px; }
.designs-modal .product-designs__grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
body.designs-modal-open { overflow: hidden !important; }

/* ---- "added to cart" message ---- */
.cart-toast { position: fixed; left: 50%; bottom: 30px; z-index: 100001; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 14px; background: var(--helpest-black); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 30px); }
.cart-toast.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cart-toast a { color: var(--helpest-base); font-weight: 700; white-space: nowrap; }
.cart-toast.is-error { background: #b42318; }
.cart-toast.is-error a { color: #fff; }

@media (max-width: 575px) {
  .product-designs__grid, .designs-modal .product-designs__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-design__qty input { width: 34px; }
  .product-design__qty button { width: 30px; height: 30px; }
  .designs-modal { padding: 0; align-items: flex-end; }
  .designs-modal__panel { max-height: 92vh; border-radius: 20px 20px 0 0; padding: 22px 16px; }
  .designs-modal .product-designs__footer { margin: 20px -16px -22px; bottom: -22px; padding: 14px 16px; border-radius: 0; }
}

/* product list: short description under the price */
.single-product-style1__content-left .product-card-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #6b7a86; }
