/* ============================================================
   ALLMASAJID — SHOP PAGE (/shop/ and product category pages)
   File: /wp-content/themes/almsajid/calligraphy-shop.css
   Loaded only on the shop + product category pages (see functions.php)
   Matches the product, cart and checkout page styling.
   ============================================================ */

/* Scope: the page wrapper that contains the WooCommerce result count */

.container:has(.woocommerce-result-count) .content-panel,
.container:has(.woocommerce-result-count) .content-panel * {
  box-sizing: border-box;
}

/* ---------- Full width, hide old sidebar ---------- */
.container:has(.woocommerce-result-count) > .sidebar {
  display: none !important;
}

.container:has(.woocommerce-result-count) > .content-panel {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-bottom: 80px;
  font-family: 'Poppins', sans-serif;
}

/* ---------- Breadcrumbs ---------- */
.container:has(.woocommerce-result-count) .breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0 0;
  padding: 7px 18px;
  border-radius: 50px;
  background: #FAF8F2;
  border: 1px solid rgba(11, 30, 64, 0.08);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #6B7280;
}

.container:has(.woocommerce-result-count) .breadcrumbs a {
  font-weight: 600;
  color: #12A66C !important;
  text-decoration: none !important;
}

/* ---------- Page title as a navy banner (like the homepage dark sections) ---------- */
.container:has(.woocommerce-result-count) article > h1 {
  display: block !important;
  position: relative;
  overflow: hidden;
  margin: 26px 0 34px !important;
  padding: 64px 50px 58px !important;
  border-radius: 26px;
  background-color: #0B1E40;
  background-image:
    radial-gradient(ellipse at 85% -20%, rgba(30, 72, 150, 0.75) 0%, rgba(30, 72, 150, 0) 60%),
    radial-gradient(circle at 10% 120%, rgba(32, 192, 118, 0.22) 0%, rgba(32, 192, 118, 0) 45%),
    linear-gradient(135deg, #0F2654 0%, #0B1E40 55%, #0A1533 100%);
  box-shadow: 0 24px 50px rgba(11, 30, 64, 0.20);
  font-family: 'Poppins', sans-serif !important;
  font-size: 48px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.5px;
  color: #FFFFFF !important;
  animation: calligraphyShopFadeUp 0.7s ease-out 0.05s both;
}

/* gold accent line above the title */
.container:has(.woocommerce-result-count) article > h1::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-bottom: 22px;
  border-radius: 3px;
  background: #C9952A;
}

/* faint geometric ornament on the right of the banner */
.container:has(.woocommerce-result-count) article > h1::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 50px;
  width: 190px;
  height: 190px;
  margin-top: -95px;
  opacity: 0.35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23C9952A' stroke-width='1.5'%3E%3Crect x='42' y='42' width='116' height='116' transform='rotate(45 100 100)'/%3E%3Crect x='52' y='52' width='96' height='96'/%3E%3Ccircle cx='100' cy='100' r='40' stroke-dasharray='3 6'/%3E%3Ccircle cx='100' cy='100' r='24'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: calligraphyShopSpin 60s linear infinite;
}

/* ---------- Toolbar: result count + sorting ---------- */
.container:has(.woocommerce-result-count) .entry-content > .woocommerce {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.container:has(.woocommerce-result-count) .entry-content > .woocommerce > .woocommerce-notices-wrapper,
.container:has(.woocommerce-result-count) .entry-content > .woocommerce > ul.products,
.container:has(.woocommerce-result-count) .entry-content > .woocommerce > nav.woocommerce-pagination,
.container:has(.woocommerce-result-count) .entry-content > .woocommerce > .woocommerce-info {
  flex: 0 0 100%;
  width: 100%;
}

.container:has(.woocommerce-result-count) .woocommerce-notices-wrapper:empty {
  display: none;
}

.container:has(.woocommerce-result-count) .woocommerce-result-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  float: none !important;
  margin: 0 !important;
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(32, 192, 118, 0.10);
  border: 1px solid rgba(32, 192, 118, 0.30);
  font-size: 14px;
  font-weight: 600;
  color: #12A66C;
}

.container:has(.woocommerce-result-count) .woocommerce-result-count::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.container:has(.woocommerce-result-count) .woocommerce-ordering {
  float: none !important;
  margin: 0 !important;
}

.container:has(.woocommerce-result-count) .woocommerce-ordering select.orderby {
  min-width: 250px;
  height: 46px;
  padding: 0 46px 0 20px !important;
  border: 1.5px solid rgba(11, 30, 64, 0.14) !important;
  border-radius: 50px !important;
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312A66C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center / 16px !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: 0 6px 16px rgba(11, 30, 64, 0.05);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #0B1E40;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.container:has(.woocommerce-result-count) .woocommerce-ordering select.orderby:hover {
  border-color: rgba(11, 30, 64, 0.28) !important;
}

.container:has(.woocommerce-result-count) .woocommerce-ordering select.orderby:focus {
  border-color: #20C076 !important;
  box-shadow: 0 0 0 4px rgba(32, 192, 118, 0.14);
  outline: none;
}

/* ---------- Product grid ---------- */
.container:has(.woocommerce-result-count) ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.container:has(.woocommerce-result-count) ul.products::before,
.container:has(.woocommerce-result-count) ul.products::after {
  display: none !important;
  content: none !important;
}

.container:has(.woocommerce-result-count) ul.products li.product {
  position: relative;
  display: flex !important;
  flex-direction: column;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  text-align: left;
  background: #FFFFFF;
  border: 1px solid rgba(11, 30, 64, 0.08);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(11, 30, 64, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  animation: calligraphyShopFadeUp 0.7s ease-out both;
}

/* cards appear one after another */
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(1)  { animation-delay: 0.10s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(2)  { animation-delay: 0.16s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(3)  { animation-delay: 0.22s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(4)  { animation-delay: 0.28s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(5)  { animation-delay: 0.34s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(6)  { animation-delay: 0.40s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(7)  { animation-delay: 0.46s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(8)  { animation-delay: 0.52s; }
.container:has(.woocommerce-result-count) ul.products li.product:nth-child(n+9) { animation-delay: 0.58s; }

.container:has(.woocommerce-result-count) ul.products li.product:hover {
  transform: translateY(-6px);
  border-color: rgba(32, 192, 118, 0.35);
  box-shadow: 0 22px 44px rgba(11, 30, 64, 0.13);
}

.container:has(.woocommerce-result-count) ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  text-decoration: none !important;
}

/* image zooms on hover, stays inside the card */
.container:has(.woocommerce-result-count) ul.products li.product a img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: scale(1);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.container:has(.woocommerce-result-count) ul.products li.product:hover a img {
  transform: scale(1.08);
}

/* "View" badge that slides in over the image on hover */
.container:has(.woocommerce-result-count) ul.products li.product a.woocommerce-LoopProduct-link::before {
  content: "View Painting";
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  padding: 7px 14px;
  border-radius: 50px;
  background: rgba(11, 30, 64, 0.85);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #FFFFFF;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.container:has(.woocommerce-result-count) ul.products li.product:hover a.woocommerce-LoopProduct-link::before {
  opacity: 1;
  transform: translateY(0);
}

/* title */
.container:has(.woocommerce-result-count) ul.products li.product .woocommerce-loop-product__title {
  position: relative;
  z-index: 2;
  margin: 0 !important;
  padding: 18px 20px 6px !important;
  background: #FFFFFF;
  font-family: 'Poppins', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #0B1E40 !important;
  transition: color 0.25s ease;
}

.container:has(.woocommerce-result-count) ul.products li.product:hover .woocommerce-loop-product__title {
  color: #12A66C !important;
}

/* price */
.container:has(.woocommerce-result-count) ul.products li.product .price {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 !important;
  padding: 0 20px 4px;
  background: #FFFFFF;
  font-family: 'Poppins', sans-serif;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #12A66C !important;
}

.container:has(.woocommerce-result-count) ul.products li.product .price del {
  margin-right: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #8A94A6 !important;
  opacity: 1;
}

.container:has(.woocommerce-result-count) ul.products li.product .price ins {
  text-decoration: none;
}

/* add to cart */
.container:has(.woocommerce-result-count) ul.products li.product .button {
  position: relative;
  z-index: 2;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: stretch;
  margin: 14px 20px 20px !important;
  padding: 12px 18px !important;
  border: 2px solid #20C076 !important;
  border-radius: 50px !important;
  background: transparent !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: #12A66C !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container:has(.woocommerce-result-count) ul.products li.product .button::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l-1 13H7z'/%3E%3Cpath d='M9 7V5a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l-1 13H7z'/%3E%3Cpath d='M9 7V5a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.container:has(.woocommerce-result-count) ul.products li.product:hover .button,
.container:has(.woocommerce-result-count) ul.products li.product .button:focus-visible {
  background: #20C076 !important;
  color: #FFFFFF !important;
}

.container:has(.woocommerce-result-count) ul.products li.product .button.loading {
  opacity: 0.7;
}

.container:has(.woocommerce-result-count) ul.products li.product .button.loading::after,
.container:has(.woocommerce-result-count) ul.products li.product .button.added::after {
  position: static !important;
  margin-left: 4px;
}

/* "View cart" link after adding */
.container:has(.woocommerce-result-count) ul.products li.product .added_to_cart {
  display: block;
  margin: -10px 20px 18px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #0B1E40 !important;
  text-decoration: underline !important;
}

/* sale badge */
.container:has(.woocommerce-result-count) ul.products li.product .onsale {
  position: absolute !important;
  z-index: 4;
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 6px 13px !important;
  border-radius: 50px !important;
  background: #C9952A !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #FFFFFF !important;
}

/* ---------- Pagination (when more products are added) ---------- */
.container:has(.woocommerce-result-count) .woocommerce-pagination {
  margin-top: 46px;
  text-align: center;
}

.container:has(.woocommerce-result-count) .woocommerce-pagination ul.page-numbers {
  display: inline-flex !important;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.container:has(.woocommerce-result-count) .woocommerce-pagination ul.page-numbers li {
  float: none !important;
  border: 0 !important;
}

.container:has(.woocommerce-result-count) .woocommerce-pagination .page-numbers a,
.container:has(.woocommerce-result-count) .woocommerce-pagination .page-numbers span {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px !important;
  border: 1.5px solid rgba(11, 30, 64, 0.12) !important;
  border-radius: 50px;
  background: #FFFFFF !important;
  font-family: 'Poppins', sans-serif;
  font-size: 14px !important;
  font-weight: 600;
  color: #0B1E40 !important;
  text-decoration: none !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.container:has(.woocommerce-result-count) .woocommerce-pagination .page-numbers a:hover {
  border-color: #20C076 !important;
  color: #12A66C !important;
}

.container:has(.woocommerce-result-count) .woocommerce-pagination .page-numbers span.current {
  border-color: #20C076 !important;
  background: #20C076 !important;
  color: #FFFFFF !important;
}

/* ---------- "Added to cart" / info notices ---------- */
.container:has(.woocommerce-result-count) .woocommerce-message,
.container:has(.woocommerce-result-count) .woocommerce-info {
  margin: 0 0 10px !important;
  padding: 16px 22px 16px 52px !important;
  border: 1px solid rgba(32, 192, 118, 0.35) !important;
  border-left: 4px solid #20C076 !important;
  border-radius: 14px;
  background: rgba(32, 192, 118, 0.07) !important;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #0B1E40 !important;
}

.container:has(.woocommerce-result-count) .woocommerce-message::before,
.container:has(.woocommerce-result-count) .woocommerce-info::before {
  color: #20C076 !important;
}

.container:has(.woocommerce-result-count) .woocommerce-message .button {
  float: right;
  padding: 7px 16px !important;
  border-radius: 50px !important;
  background: #0B1E40 !important;
  font-size: 13px !important;
  color: #FFFFFF !important;
}

/* ---------- Animations ---------- */
@keyframes calligraphyShopFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes calligraphyShopSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1001px) {
body.woocommerce-shop .inner-pages .container .content-panel {
        margin-top: 0;

}



@media (max-width: 1199px) {
  .container:has(.woocommerce-result-count) ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}



@media (max-width: 860px) {
  .container:has(.woocommerce-result-count) article > h1 {
    padding: 46px 30px 42px !important;
    font-size: 38px !important;
  }
  .container:has(.woocommerce-result-count) article > h1::after {
    width: 130px;
    height: 130px;
    margin-top: -65px;
    right: 20px;
    opacity: 0.25;
  }
  .container:has(.woocommerce-result-count) ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .container:has(.woocommerce-result-count) article > h1 {
    padding: 38px 24px 34px !important;
    border-radius: 20px;
    font-size: 32px !important;
  }
  .container:has(.woocommerce-result-count) .woocommerce-result-count,
  .container:has(.woocommerce-result-count) .woocommerce-ordering,
  .container:has(.woocommerce-result-count) .woocommerce-ordering select.orderby {
    width: 100%;
  }
  .container:has(.woocommerce-result-count) .woocommerce-result-count { justify-content: center; }
  .container:has(.woocommerce-result-count) ul.products li.product .woocommerce-loop-product__title {
    padding: 14px 14px 4px !important;
    font-size: 14px !important;
  }
  .container:has(.woocommerce-result-count) ul.products li.product .price {
    padding: 0 14px 2px;
    font-size: 15px !important;
  }
  .container:has(.woocommerce-result-count) ul.products li.product .button {
    margin: 12px 14px 14px !important;
    padding: 10px 10px !important;
    font-size: 13px !important;
  }
  .container:has(.woocommerce-result-count) ul.products li.product a.woocommerce-LoopProduct-link::before {
    display: none;
  }
}

@media (max-width: 380px) {
  .container:has(.woocommerce-result-count) ul.products {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .container:has(.woocommerce-result-count) article > h1,
  .container:has(.woocommerce-result-count) article > h1::after,
  .container:has(.woocommerce-result-count) ul.products li.product {
    animation: none;
  }
  .container:has(.woocommerce-result-count) ul.products li.product,
  .container:has(.woocommerce-result-count) ul.products li.product a img {
    transition: none;
  }
}

#mc_embed_signup .button {
	background:#12c27a!Important;
	color:#0b2341!Important;
	border-radius:50px!Important;
	padding:15px 30px!Important;
    font-size: 15pxv;
    font-weight: 600!Important;
    text-decoration: none !important;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease, color .3s ease!Important;
	}
