/*
 Theme Name: Astra Child
 Template: astra
 Version: 1.0
*/

/* =====================================================
   GLOBAL RESET (WooCommerce)
===================================================== */

/* =====================================================
   GLOBAL WooCommerce BUTTON STYLE
   ===================================================== */

/* All WooCommerce buttons */
.woocommerce button,
.woocommerce .button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce input[type="submit"],
.woocommerce #respond input#submit {
  border-radius: 0 !important;
  background-color: #242424 !important;
  color: #ffffff !important;
  border: none !important;
  transition: opacity 0.2s ease;
}

/* Hover state – 80% opacity */
.woocommerce button:hover,
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce input[type="submit"]:hover,
.woocommerce #respond input#submit:hover {
  opacity: 0.8;
}


.woocommerce button,
.woocommerce .button,
.woocommerce a.button,
.woocommerce input,
.woocommerce select,
.woocommerce textarea {
  border-radius: 0 !important;
}

/* Hide quantity */
.single-product .quantity {
  display: none !important;
}

/* Hide default price */
.single-product .summary .price {
  display: none !important;
}

/* =====================================================
   VARIATIONS (KEEP JS ALIVE, HIDE UI)
===================================================== */

.single-product form.variations_form .variations {
  position: absolute;
  left: -9999px;
  visibility: hidden;
}

.woocommerce-page:not(.single-product) .variations {
  display: none !important;
}

/* =====================================================
   CUSTOM SERVICE FORM
===================================================== */

#service-form {
  margin-top: 32px;
  padding: 32px;
  border: 1px solid #ddd;
  background: #fff;
}

.sf-block {
  margin-bottom: 28px;
}

.sf-block label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.sf-desc {
  margin: 6px 0 10px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

#service-form input,
#service-form textarea,
#service-form select {
  width: 100%;
  padding: 6px;
  border: 1px solid #bbb;
  font-size: 13px;
}

#service-form textarea {
  min-height: 100px;
}

/* =====================================================
   PRICE PREVIEW
===================================================== */

#sf-price {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}

#sf-price .old {
  margin-right: 8px;
  color: #777;
  text-decoration: line-through;
}

/* =====================================================
   REMOVE DEFAULT CART SPACING
===================================================== */

.single-product .summary form.cart,
.single-product .woocommerce-variation-add-to-cart,
.single-product .variations_button {
  margin: 0 !important;
  padding: 0 !important;
}

.single_add_to_cart_button {
  margin-bottom: 0 !important;
}

/* =====================================================
   ACTION BUTTONS (CART + WISHLIST)
===================================================== */

#sf-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

/* Prevent full-width cart form */
#sf-action-buttons form.cart {
  display: flex;
  width: auto;
  margin: 0;
}

/* Add to cart button */
#sf-action-buttons .single_add_to_cart_button {
  height: 48px;
  padding: 0 24px;
}

/* Wishlist */
#sf-action-buttons .sf-wishlist {
  display: flex;
}

/* =========================================
   ADD TO WISHLIST – CLEAN STYLE
========================================= */

#sf-action-buttons .yith-wcwl-add-to-wishlist-button--single {
  border: none !important;
  background: transparent !important;
  color: #222222 !important;

  padding: 0 24px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  cursor: pointer;
  transition: opacity 0.2s ease, text-decoration 0.2s ease;
}

/* Hover effect */
#sf-action-buttons .yith-wcwl-add-to-wishlist-button--single:hover {
  opacity: 0.8;
  text-decoration: underline;
}


/* Mobile */
@media (max-width: 768px) {
  #sf-action-buttons {
    flex-direction: column;
  }

  #sf-action-buttons > * {
    width: 100%;
  }
}

/* =====================================================
   CUSTOM REVIEWS SECTION (SCOPED)
===================================================== */

#custom-reviews {
  margin-top: 48px;
  padding: 32px;
  border: 1px solid #ddd;
  background: #fafafa;
}

/* Title */
#custom-reviews .cr-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* Rating summary */
#custom-reviews .cr-summary {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

#custom-reviews .cr-score {
  font-weight: 700;
  margin-left: 8px;
}

#custom-reviews .cr-count {
  color: #777;
  margin-left: 4px;
}

/* Gold stars */
#custom-reviews .star-rating span::before,
#custom-reviews .comment-form-rating .stars span a::before {
  color: #f5b301 !important;
}

/* =====================================================
   REVIEW LIST
===================================================== */

#custom-reviews .cr-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 8px;
}

#custom-reviews .commentlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

#custom-reviews .commentlist li,
#custom-reviews .commentlist li.review {
  background: #fff;
  border: 1px solid #e5e5e5;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 4px;
}

#custom-reviews .comment-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

#custom-reviews .comment-text {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  background: transparent;
  border: none;
}

/* =====================================================
   REVIEW FORM
===================================================== */

#custom-reviews .cr-form {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

#custom-reviews textarea,
#custom-reviews input[type="text"],
#custom-reviews input[type="email"] {
  width: 100%;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
}

/* ===============================
   Review submit button (FINAL)
   =============================== */

#custom-reviews input[type="submit"],
#custom-reviews button[type="submit"] {
  background-color: #242424 !important;
  color: #ffffff !important;
  border: none !important;
  opacity: 1;
  transition: opacity 0.2s ease;
}

#custom-reviews input[type="submit"]:hover,
#custom-reviews button[type="submit"]:hover {
  opacity: 0.8;
}


/* Mobile */
@media (max-width: 768px) {
  #custom-reviews {
    padding: 20px;
  }
}

/* =====================================================
   RELATED PRODUCTS TITLE
===================================================== */

.related.products > h2 {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 50px 0 24px;
}

/* =====================================================
   MISC CLEANUP
===================================================== */

/* Hide product category on single product page */
.single-product .product_meta .posted_in {
  display: none !important;
}

/* =========================================
   FIX: Review form star rating visibility
========================================= */

#custom-reviews .ast-comment-formwrap {
  order: -1;
  margin-bottom: 16px;
}

/* Ensure rating stars are visible */
#custom-reviews .comment-form-rating {
  display: block !important;
  margin-bottom: 16px;
}

#custom-reviews .comment-form-rating select {
  width: 100%;
  padding: 6px;
}

#custom-reviews .stars,
#custom-reviews .star-rating {
  display: inline-block !important;
  color: #f5b301;
}

/* Scoped hiding of Astra/WP comment wrappers inside our custom reviews block */
#custom-reviews .ast-comment-formwrap,
#custom-reviews .ast-row,
#custom-reviews .comment-form-cookies-consent {
  display: none !important;
  /* keep it hidden but safe — only affects reviews area (#custom-reviews) */
}

/* If Astra outputs slightly different wrapper names, catch them safely */
#custom-reviews [class*="ast-comment"],
#custom-reviews [class*="ast-row"] {
  display: none !important;
}

/* If you still need the form inputs to be visible, only hide the cookie-consent line:
   (uncomment the following if you prefer hiding only cookie consent)
*/
/*
#custom-reviews .comment-form-cookies-consent {
  display: none !important;
}
*/