/*
	Theme Name: Cop.Academy Theme
	Template: hello-elementor
	Version: 1.0.0
	License: GNU General Public License v3 or later
	License URI: https://www.gnu.org/licenses/gpl-3.0.html
	Text Domain: cop-academy-theme
*/

.woocommerce table.shop_attributes td {
  padding: 0;
}

.woocommerce .quantity input.qty {
  width: 70px;
}

.page-header {
  padding-top: 10px;
}

h1.product_title.entry-title {
  font-size: 2.25em !important;
}

.woocommerce div.product p.price {
  font-size: 1.8em !important;
}

.e-atc-qty-button-holder {
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
}

.e-atc-qty-button-holder > * {
  flex-basis: auto !important;
}

.e-atc-qty-button-holder .single_add_to_cart_button {
  margin-block-start: 0 !important;
}

/* === COPA search results === */
.search .page-header,
.search-results .page-header {
  max-width: 900px;
  margin: 48px auto 44px;
  padding: 0 20px;
}

.search .page-header .entry-title,
.search-results .page-header .entry-title {
  font-size: 30px;
  font-weight: 700;
  color: #273E4D;
  margin: 0;
}

.search .page-header .entry-title span,
.search-results .page-header .entry-title span {
  color: #D3521F;
}

.search .page-content,
.search-results .page-content {
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search .page-content > p,
.search-results .page-content > p {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 16px;
  padding: 24px;
  color: #55627a;
}

.search .page-content article.post,
.search-results .page-content article.post {
  display: grid;
  grid-template-columns: 140px 1fr;
  grid-template-areas:
    "thumb title"
    "thumb excerpt";
  column-gap: 24px;
  row-gap: 6px;
  align-items: start;
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.search .page-content article.post:hover,
.search-results .page-content article.post:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.1);
}

.search .page-content article.post > a,
.search-results .page-content article.post > a {
  grid-area: thumb;
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
}

.search .page-content article.post > a img,
.search-results .page-content article.post > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search .page-content article.post h2.entry-title,
.search-results .page-content article.post h2.entry-title {
  grid-area: title;
  align-self: end;
  margin: 0 0 6px;
  font-size: 19px;
}

.search .page-content article.post h2.entry-title a,
.search-results .page-content article.post h2.entry-title a {
  color: #273E4D;
  text-decoration: none;
  font-weight: 700;
  transition: color .15s ease;
}

.search .page-content article.post h2.entry-title a:hover,
.search-results .page-content article.post h2.entry-title a:hover {
  color: #D3521F;
}

.search .page-content article.post > div,
.search .page-content article.post > p,
.search-results .page-content article.post > div,
.search-results .page-content article.post > p {
  grid-area: excerpt;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #55627a !important;
  max-width: none !important;
  margin: 0 !important;
}

.search .page-content article.post > div p,
.search-results .page-content article.post > div p {
  margin: 0 !important;
}

/* Nessuna immagine in evidenza: il testo occupa tutta la larghezza */
.search .page-content article.post:not(:has(> a)),
.search-results .page-content article.post:not(:has(> a)) {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "excerpt";
}

@media (max-width: 640px) {
  .search .page-content article.post,
  .search-results .page-content article.post {
    grid-template-columns: 1fr;
    grid-template-areas:
      "thumb"
      "title"
      "excerpt";
  }
  .search .page-content article.post > a,
  .search-results .page-content article.post > a {
    width: 100%;
    height: 180px;
  }
}

nav.pagination {
  max-width: 900px;
  margin: 10px auto 60px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

nav.pagination a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4e8f0;
  color: #273E4D;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s ease;
}

nav.pagination a:hover {
  background: linear-gradient(135deg, #F07741 0%, #D3521F 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(211, 82, 31, 0.3);
}
