/*
 Theme Name:   Astra Child
 Description:  Custom child theme for Astra with shop layout tweaks
 Author:       Martin Perez
 Version:      1.0.0
*/

/* Global font and base setup */
body,
.ast-site-title,
.site-description,
.ast-header-break-point *,
.woocommerce a,
.woocommerce button {
  font-family: 'Montserrat', 'Helvetica Neue', sans-serif !important;
  font-size: 16px;
  color: #222;
  background-color: #fff;
}

/* ================= HEADER / TOP BAR ================= */

.custom-top-bar {
  background-color: #f0f0f0;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
  font-size: 14px;
}

.top-bar-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-top-bar .search-form {
  display: flex;
  align-items: center;
}

.custom-top-bar .search-field {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  height: 34px;
  width: 180px;
}

.custom-top-bar .search-submit {
  background-color: #fff;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 4px 4px 0;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 16px;
  color: #c8102e;
}

.custom-top-bar .search-submit:hover {
  background-color: #e0e0e0;
}

.custom-top-bar .search-submit i {
  font-size: 14px;
}

/* Top bar menu */
.custom-top-bar .top-bar-menu,
.custom-top-bar .top-bar-nav {
  display: flex;
  flex-direction: row;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-top-bar .top-bar-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-top-bar .top-bar-menu a,
.custom-top-bar .top-bar-nav a {
  background: transparent;
  color: #c8102e;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  transition: background-color 0.2s ease;
}

.custom-top-bar .top-bar-menu a:hover,
.custom-top-bar .top-bar-nav a:hover {
  background-color: #e5e5e5;
  color: #000;
  border-radius: 4px;
}

/* Social icons */
.custom-top-bar .top-social-icons {
  display: flex;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-top-bar .top-social-icons li {
  margin: 0;
  padding: 0;
}

.custom-top-bar .top-social-icons a {
  color: #c8102e;
  font-size: 18px;
  text-decoration: none;
  background: none !important;
  padding: 4px;
}

.custom-top-bar .top-social-icons a:hover {
  color: #000;
}

/* ================= LOGO / TAGLINE ================= */

.ast-site-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ast-site-identity .ast-site-title,
.ast-site-identity .site-description {
  margin: 0;
}

.ast-site-identity .site-description {
  margin-top: 5px;
  font-size: 15px;
  color: #333;
}

/* ================= SHOP PAGE HEADER ================= */

.woocommerce-page .content-area {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* SHOP Title Styling */
.woocommerce-page .woocommerce-products-header {
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-page .woocommerce-products-header__title {
  background: #f5f5f5;
  padding: 1.5rem 1rem;
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
  border-bottom: 1px solid #eee;
}

/* Sort + Results row */
.a1st-results-sort-wrap {
  background-color: #f6f6f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 2em;
  margin-bottom: 1em;
  border-radius: 0.25em;
  flex-wrap: wrap;
}

.woocommerce-result-count,
.woocommerce-ordering {
  margin: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 1rem;
  color: #222;
}

/* Sort dropdown */
.woocommerce-ordering select {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Remove bleed and spacing into product grid */
.a1st-results-sort-wrap + ul.products {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Product Grid */
ul.products {
  background-color: #fff !important;
  padding: 2rem;
  margin: 0;
}

.woocommerce ul.products li.product {
  border: 1px solid #eee;
  padding: 15px;
  background: #fff;
  transition: all 0.3s ease;
}

.woocommerce ul.products li.product:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.woocommerce ul.products li.product h2 {
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.woocommerce ul.products li.product .price {
  color: #0073aa;
  font-size: 16px;
  font-weight: bold;
}

.woocommerce ul.products li.product .button {
  background-color: #0073aa;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-transform: uppercase;
  font-size: 13px;
}

.woocommerce ul.products li.product .button:hover {
  background-color: #005077;
  color: #fff;
}

/* ========== FOOTER ========== */
.site-footer {
  background-color: #f1f1f1;
  color: #333;
  font-size: 14px;
  padding: 30px 0;
}
.a1st-results-sort-wrap {
    background-color: #f6f6f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Ensure result count and sorting stay aligned */
.a1st-results-sort-wrap .woocommerce-result-count,
.a1st-results-sort-wrap .woocommerce-ordering {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    color: #333;
}

/* Style the dropdown like your search input */
.a1st-results-sort-wrap .woocommerce-ordering select {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.4rem 2rem 0.4rem 0.6rem;
    font-size: 1rem;
    color: #222;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 7l3-3 3 3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 1rem;
    min-width: 180px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Remove default select style (safeguard) */
.a1st-results-sort-wrap .woocommerce-ordering select:focus {
    outline: none;
    border-color: #999;
}

/* Overwrite Checkout Product title summary size */
.wc-block-components-product-name {
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  margin: 0 0 0.25em !important;
}
/* Reduce height of the grey footer area */
.site-primary-footer-wrap {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Remove extra padding from inner grid row */
.ast-builder-grid-row-container-inner {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Tighten widget area padding */
.footer-widget-area {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Tidy footer links */
#astra-footer-menu {
  justify-content: center;
}

#astra-footer-menu li {
  margin: 0 .5rem;
}

#astra-footer-menu li a {
  color: #c8102e;
  font-size: 0.8rem;
  text-decoration: none;
}

/* Position navigation arrows over the main image */
ul.flex-direction-nav {
  position: absolute;
  top: 20%;
  z-index: 9999;
  width: 100%;
  left: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Prev goes left, Next goes right */
li.flex-nav-prev { float: left; }
li.flex-nav-next { float: right; }

/* Hide default empty links, inject icons via pseudo-elements */
a.flex-prev,
a.flex-next {
  visibility: hidden;
  text-decoration: none !important;
}

a.flex-prev::before,
a.flex-next::after {
  visibility: visible;
  font-size: 24px;
  font-weight: bold;
  color: #c8102e; /* match your red link color */
  text-decoration: none;
}

/* Inject left chevron */
a.flex-prev::before {
  content: '\f104'; /* FontAwesome left arrow (chevron style) */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  background-color: #fff;
  padding-left: 10px;
}

/* Inject right chevron */
a.flex-next::after {
  content: '\f105'; /* FontAwesome right arrow */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  background-color: #fff;
  padding-right: 10px;
}

/* Ensure container is positioned */
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper {
  position: relative;
}

