/**
* Theme Name: Audib Child
* Description: This is a child theme of Audib, generated by Merlin WP.
* Author: <a href="https://pavothemes.com/">Pavothemes</a>
* Template: audib
* Version: 1.2.7
*/

/* 🔹 WooCommerce Custom Fields Styling */
.custom-fields {
  display: block;
  margin-top: 10px;
  margin-bottom: 20px;
}

.custom-fields p {
  margin-bottom: 15px;
}

/* Custom Message Textarea */
.custom-fields #custom_message {
  width: 100%;
  height: 60px; /* 2 lines high */
  padding: 10px 12px;
  border: 1px solid #d3d3d3;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Upload File Input */
.custom-fields #upload_file {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid #d3d3d3;
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
}

/* Labels */
.custom-fields label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

/* ✅ Custom Product Fields Design */
.custom-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.custom-message-field textarea {
  width: 100%;
  height: 90px; /* 3 lines */
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.5;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  resize: vertical;
}

.custom-message-field label,
.upload-file-field label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

/* ✅ Upload Button Styled Like Add to Cart */
.upload-file-field input[type="file"] {
  display: inline-block;
  padding: 12px 24px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Style the file upload inner button */
.upload-file-field input[type="file"]::-webkit-file-upload-button {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.upload-file-field input[type="file"]::-webkit-file-upload-button:hover {
  background-color: #a00; /* Red hover effect */
}

/* ✅ Add to Cart Button spacing */
.single_add_to_cart_button {
  margin-top: 10px;
}

/* 🔧 Fix spacing between quantity, textarea, and upload fields */
form.cart {
  display: flex;
  flex-direction: column;
  gap: 20px; /* space between each block */
}

form.cart .quantity-wrapper {
  margin-bottom: 15px;
}

.custom-fields {
  margin-top: 10px;
}

.custom-message-field {
  margin-top: 10px;
  margin-bottom: 15px;
}

.upload-file-field {
  margin-bottom: 10px;
}

/* Optional: make fields full width alignment under price */
form.cart .quantity,
form.cart .custom-message-field,
form.cart .upload-file-field {
  width: 100%;
  max-width: 100%;
}

/* ✅ FINAL FIX — Proper vertical spacing for all fields on product page */
.single-product form.cart {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start;
  gap: 25px !important; /* space between all elements */
}

/* Quantity block spacing */
.single-product form.cart .quantity,
.single-product form.cart .quantity-wrapper {
  margin-bottom: 20px !important;
}

/* Custom message box spacing */
.single-product .custom-message-field {
  width: 100%;
  margin-top: 10px !important;
  margin-bottom: 15px !important;
  display: block;
}

/* Upload field spacing */
.single-product .upload-file-field {
  width: 100%;
  margin-top: 10px !important;
  margin-bottom: 15px !important;
  display: block;
}

/* File button full width like Add to Cart */
.single-product .upload-file-field input[type="file"] {
  width: 100%;
  max-width: 400px;
}

/* Keep Add to Cart separate */
.single-product .single_add_to_cart_button {
  margin-top: 10px !important;
  align-self: flex-start;
}

/* Extra: prevent any theme inline flex merging */
.single-product form.cart > * {
  width: 100%;
}

/* ✅ Fix for custom fields overlapping with quantity box */
form.cart .custom-fields {
  display: block !important;
  margin-top: 20px !important;
  margin-bottom: 25px !important;
}

form.cart .custom-fields p {
  margin-bottom: 15px !important;
}

form.cart .custom-fields label {
  display: block !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
}

form.cart .custom-fields input[type="text"],
form.cart .custom-fields input[type="file"],
form.cart .custom-fields textarea {
  width: 100% !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* ✅ Add extra space below custom fields before Add to Cart button */
form.cart .single_add_to_cart_button {
  margin-top: 20px !important;
}

/* ✅ Mobile optimization */
@media (max-width: 480px) {
  form.cart .custom-fields,
  form.cart .quantity-wrapper,
  form.cart .upload-file-field,
  form.cart .custom-message-field {
    width: 100% !important;
  }

  form.cart .custom-fields input,
  form.cart .custom-fields textarea,
  form.cart .custom-fields input[type="file"],
  form.cart .single_add_to_cart_button {
    width: 100% !important;
    max-width: 100% !important;
  }

  .custom-message-field textarea {
    height: 80px; /* slightly smaller for mobile */
  }
}

/* ✅ Make header text & icons black only on WooCommerce pages */
body.single-product .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:not(:hover),
body.woocommerce-cart .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:not(:hover),
body.woocommerce-checkout .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:not(:hover),
body.woocommerce-order-received .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:not(:hover) {
  color: #000 !important;
}

/* ✅ Header icons black only on WooCommerce-related pages */
body.single-product .elementor-254 .elementor-element.elementor-element-7726c69.elementor-column.elementor-element[data-element_type="column"] > .elementor-widget-wrap.elementor-element-populated,
body.woocommerce-cart .elementor-254 .elementor-element.elementor-element-7726c69.elementor-column.elementor-element[data-element_type="column"] > .elementor-widget-wrap.elementor-element-populated,
body.woocommerce-checkout .elementor-254 .elementor-element.elementor-element-7726c69.elementor-column.elementor-element[data-element_type="column"] > .elementor-widget-wrap.elementor-element-populated,
body.woocommerce-order-received .elementor-254 .elementor-element.elementor-element-7726c69.elementor-column.elementor-element[data-element_type="column"] > .elementor-widget-wrap.elementor-element-populated {
  color: #000 !important;
  filter: brightness(0) !important; /* ensures icons turn black even if SVG */
}

/* ✅ Optional: hover color (slightly darker gray) */
body.single-product .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:hover,
body.woocommerce-cart .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:hover,
body.woocommerce-checkout .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:hover,
body.woocommerce-order-received .elementor-254 .elementor-element.elementor-element-cd824dd .main-navigation ul.menu > li.menu-item > a:hover {
  color: #222 !important;
}

/* ✅ Header white background on WooCommerce pages only */
body.single-product .elementor-254,
body.woocommerce-cart .elementor-254,
body.woocommerce-checkout .elementor-254,
body.woocommerce-order-received .elementor-254 {
  background-color: #fff !important;
  transition: background-color 0.3s ease-in-out;
}
/* Hide breadcrumb only on WooCommerce pages */
body.single-product .breadcrumb-wrap,
body.woocommerce-cart .breadcrumb-wrap,
body.woocommerce-checkout .breadcrumb-wrap,
body.woocommerce-order-received .breadcrumb-wrap {
  display: none !important;
}

/* 🖥️ Desktop */
.single-product #page .site-content {
  margin-top: 100px !important;
}

/* 💻 Tablet */
@media (max-width: 1024px) {
  .single-product #page .site-content {
    margin-top: 80px !important;
  }
}

/* 📱 Mobile */
@media (max-width: 767px) {
  .single-product #page .site-content {
    margin-top: 60px !important;
  }
}



