/**
 * Theme Name: Ahura Child
 * Description: Child theme for aase.ir storefront improvements.
 * Author: Aase
 * Template: ahura
 * Version: 1.1.0
 */

.aase-unavailable-price {
  color: #8b1e1e;
  font-weight: 700;
}

.aase-purchase-assurances {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e7e1dc;
  border-radius: 12px;
  background: #fffaf7;
}

.aase-purchase-assurances div {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) 1.3fr;
  gap: 10px;
  align-items: baseline;
}

.aase-purchase-assurances strong { color: #342720; }
.aase-purchase-assurances span,
.aase-purchase-assurances a { color: #5f5650; }

.aase-product-specs {
  margin: 16px 0;
  border-block: 1px solid #e7e1dc;
  padding: 12px 0;
}

.aase-product-specs summary { cursor: pointer; font-weight: 700; }
.aase-product-specs dl { margin: 12px 0 0; }
.aase-product-specs div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 7px 0; }
.aase-product-specs dt { color: #5f5650; }
.aase-product-specs dd { margin: 0; }

.aase-sticky-cart { display: none; }

/* Keep the mobile header compact and use one minimal icon language. */
@media (max-width: 767px) {
  .ahura-logo-element a,
  .ahura-logo-element img {
    width: 136px !important;
    height: 136px !important;
  }

  .mm2-side-button .ah-theme-icon--menu img,
  #mcart-stotal .ah-theme-icon--basket img { display: none; }

  .mm2-side-button .ah-theme-icon--menu,
  #mcart-stotal .ah-theme-icon--basket {
    display: inline-block;
    width: 24px;
    height: 24px;
    color: #211c19;
  }

  .mm2-side-button .ah-theme-icon--menu::before,
  #mcart-stotal .ah-theme-icon--basket::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    mask: center / contain no-repeat;
    -webkit-mask: center / contain no-repeat;
  }

  .mm2-side-button .ah-theme-icon--menu::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  #mcart-stotal .ah-theme-icon--basket::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 5h2l1.8 9.2a2 2 0 0 0 2 1.6h7.9a2 2 0 0 0 2-1.6L20.5 8H6.1M10 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 5h2l1.8 9.2a2 2 0 0 0 2 1.6h7.9a2 2 0 0 0 2-1.6L20.5 8H6.1M10 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

/* Checkout actions follow Aase's primary CTA instead of WooCommerce gray. */
.woocommerce .wc-proceed-to-checkout .checkout-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.woocommerce-checkout #payment #place_order,
.woocommerce-checkout button#place_order {
  border-color: #a82820 !important;
  background: #a82820 !important;
  color: #fff !important;
}

.woocommerce .wc-proceed-to-checkout .checkout-button:hover,
.woocommerce .wc-proceed-to-checkout .checkout-button:focus-visible,
.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-button:focus-visible,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button:focus-visible,
.woocommerce-checkout #payment #place_order:hover,
.woocommerce-checkout #payment #place_order:focus-visible {
  border-color: #842019 !important;
  background: #842019 !important;
}

.home .elementor-widget-image-carousel .swiper,
.home .elementor-widget-image-carousel .swiper-slide { aspect-ratio: 1; }

.home .elementor-widget-image-carousel .swiper-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .single-product .product .summary { margin-top: 18px; }

  .aase-purchase-assurances div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .aase-sticky-cart:not([hidden]) {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    border-top: 1px solid #e4ddd8;
    background: rgba(255,255,255,.97);
    box-shadow: 0 -6px 24px rgba(42,29,22,.12);
  }

  .aase-sticky-cart button {
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #a82820;
    font: inherit;
    font-weight: 700;
  }

  .aase-sticky-price .amount { font-weight: 700; }
}
