/*single product page */
.woocommerce .summary #combo_products_table .product_title {
  font-size: 0.9rem !important;
  margin-bottom: 0 !important;
}

.combo_products_tr figure,
.combo_products_tr p {
  margin: 0;
}

.wrap-single-product-images .slick-slide,
.wrap-single-product-images .slick-track {
  width: 100% !important;
}

.wrap-single-product-images {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
}

.woocommerce div.product div.images {
  width: 40%;
}

.woocommerce div.product div.product-summary-side {
  width: 58%;
}

.woocommerce div.product div.images,
.woocommerce div.product div.product-summary-side {
  flex: 1 0 auto;
}

.combo_products_tr .product-bundles-optional {
  width: 140px;
}

.woocommerce-product-gallery__wrapper {
  display: inline-block;
}

.woocommerce div.product form.cart table td {
  padding-left: 10px !important;
  vertical-align: middle;
}

.RemoveBundleItem {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-size: inherit;
  justify-content: center;
  margin-bottom: 6px;
  color: #dc3545;
  text-decoration: none;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid #dc3545;
  border-radius: 3px;
  background: transparent;
  transition: all 0.3s ease;
}

.RemoveBundleItem:hover {
  background-color: #dc3545;
  color: white;
}

.RemoveBundleItem.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.entry-summary .product-price {
  font-size: 26px;
  color: #000;
  font-weight: 600;
}

a,
a.combo-alt-link,
.woocommerce .product_meta a {
  color: #01aeed;
}

a:hover,
a.combo-alt-link:hover,
.woocommerce .product_meta a:hover {
  color: #00415a !important;
}

.woocommerce .star-rating::before {
  color: #01aeed;
}

a.combo-alt-link {
  font-size: 21px;
}

.products .product .wrap-product-loop-content .wrap-product-loop-detail .product-loop-title {
  font-size: 16px !important;
}

.cafe-wrap-search-fields select.cafe-product-cat {
  width: 130px !important;
}

.single-product .wrap-main-product-gallery .wp-post-image {
  max-height: 600px;
}

.woocommerce div.product form.cart div.quantity {
  width: 22%;
}

table#combo_products_table div.quantity {
  width: 100%;
  font-size: 38px;
  font-weight: 300;
}

table#combo_products_table div.quantity input.qty {
  width: 100%;
  height: 30px;
}

.woocommerce div.product form.cart table th {
  padding-left: 23px;
}

form.cart > .quantity {
  height: 50px;
}

table#combo_products_table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
}

table#combo_products_table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
}

table#combo_products_table th,
table#combo_products_table td {
  padding: .625em;
  text-align: center;
}

table#combo_products_table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
  background-color: #f0f0f0;
  font-weight: bold;
}

/* Hidden product rows */
table#combo_products_table tr.combo_products_tr.hide {
  display: none !important;
}

/* Required item styling */
.combo_products_table tr.required-item {
  border-left: 3px solid #d63638;
}

.required-indicator {
  color: #d63638 !important;
  font-weight: bold;
  font-size: 0.9em;
}

.required-item-notice {
  color: #666;
  font-style: italic;
  font-size: 0.9em;
}

/* Optional item styling */
.combo_products_table tr[data-optional="1"] {
  border-left: 3px solid #00a32a;
}

/* Discount row styling */
.combo-discount-row {
  background-color: #f8f9fa;
  font-weight: bold;
}

.combo-discount-row .discount-label {
  text-align: right;
  color: #00a32a;
}

.combo-discount-row .discount-amount {
  color: #00a32a;
  text-align: center;
}

/* Out of stock styling */
table#combo_products_table tr.out-of-stock {
  opacity: 0.6;
  filter: grayscale(100%);
  background-color: #f5f5f5 !important;
}

table#combo_products_table tr.out-of-stock td {
  color: #999 !important;
}

table#combo_products_table tr.out-of-stock img {
  filter: grayscale(100%);
  opacity: 0.5;
}

/* Stock status indicators */
.stock-status {
  font-weight: bold;
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-left: 5px;
}

.stock-status.out-of-stock {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.stock-status.out-of-stock a {
  color: #dc3545;
  text-decoration: underline;
}

.stock-status.out-of-stock a:hover {
  color: #a71e2a;
}

.stock-status.in-stock {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

/* Disabled quantity inputs */
table#combo_products_table input.qty.qty-disabled,
table#combo_products_table input.qty[readonly],
table#combo_products_table input.qty.out-of-stock {
  background-color: #f5f5f5 !important;
  color: #666 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  border-color: #ddd !important;
}

table#combo_products_table input.qty.qty-disabled:focus,
table#combo_products_table input.qty[readonly]:focus,
table#combo_products_table input.qty.out-of-stock:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Quantity input container styling for disabled state */
table#combo_products_table .quantity.qty-disabled {
  opacity: 0.7;
}

table#combo_products_table .quantity.qty-disabled input {
  pointer-events: none;
}

/* Quantity input styling for required items */
.combo_products_table tr[data-required="1"] .quantity input.qty {
  border-color: #d63638;
}

.combo_products_table tr[data-required="1"] .quantity input.qty:focus {
  border-color: #d63638;
  box-shadow: 0 0 0 1px #d63638;
}

/* Max quantity notice styling */
.max-qty-notice {
  margin-top: 2px !important;
  font-style: italic;
  text-align: center;
}

/* Quantity input validation styling */
table#combo_products_table input.qty.qty-max-exceeded {
  border-color: #dc3545 !important;
  background-color: #fff5f5 !important;
}

/* Message area styling */
.combo-messages {
  margin: 15px 0;
}

.combo-messages .notice {
  margin: 5px 0;
  padding: 12px;
  border-left: 4px solid;
}

.combo-messages .notice-error {
  border-left-color: #d63638;
  background-color: #fef7f7;
}

.combo-messages .notice-warning {
  border-left-color: #ffb900;
  background-color: #fff8e5;
}

.combo-messages .notice-success {
  border-left-color: #00a32a;
  background-color: #f0f8f0;
}

.combo-messages .notice p {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
}

.combo-messages .notice-dismiss {
  position: absolute;
  top: 0;
  right: 1px;
  border: none;
  margin: 0;
  padding: 9px;
  background: none;
  color: #787c82;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.23076923;
  text-decoration: none;
}

.combo-messages .notice-dismiss:before {
  content: "\f153";
  font-family: dashicons;
  font-size: 16px;
  width: 20px;
  height: 20px;
  line-height: 1.25;
  display: block;
}

.combo-messages .notice-dismiss:hover,
.combo-messages .notice-dismiss:active {
  color: #c00;
}

/* Combo Add to Cart Section */
.combo-add-to-cart-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
}

.combo-quantity-wrapper {
  flex: 0 0 auto;
}

.combo-quantity-wrapper .quantity {
  margin: 0;
}

.combo-quantity-wrapper input.qty {
  width: 80px;
  height: 50px;
  text-align: center;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
}

body #site-main-content div.product form.cart .button.combo_add_to_cart_button:not(.zoo-buy-now) {
  color: #ffffff;
  text-decoration-color: #ffffff;
  background-color: #01aeed;
  background-repeat: repeat;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
  min-width: 200px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body #site-main-content div.product form.cart .button.combo_add_to_cart_button:not(.zoo-buy-now):hover {
  background-color: #001e42;
  transform: translateY(-1px);
}

.combo-additional-buttons {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.combo-cart-form {
  margin: 20px 0;
}

/* Combo Reservation Option */
.combo-reservation-option {
  margin: 15px 0;
  padding: 15px;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  background: #fafafa;
}

.reservation-checkbox-wrapper label {
  display: block;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0;
}

.reservation-checkbox-wrapper input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.1);
}

.widget_shopping_cart .widget_shopping_cart_content .wrap-product-cart-detail dt.variation-Itemof,
.widget_shopping_cart .widget_shopping_cart_content .wrap-product-cart-detail dd.variation-Itemof {
  margin: 0;
  font-size: 12px;
}

dl.variation .combopacks-main {
  border: 0;
  padding: 2px;
}

.combopacks-main {
  display: block;
  text-align: left !important;
  border: none !important;
}

.woocommerce td.product-name dl.variation dt {
  float: none;
  clear: both;
  margin-right: inherit;
  display: flex;
  flex: 0 0 auto;
  width: auto;
}

.woocommerce td.product-name .wc-item-meta dd,
.woocommerce td.product-name dl.variation dd {
  margin: 0;
  flex: auto;
}

/* Reservation Elements */
.woocommerce-checkout .woocommerce-info.pay-balance-notice {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #e7f3ff;
  border-left: 4px solid #0073aa;
  border-radius: 4px;
}

.woocommerce-checkout .woocommerce-info.pay-balance-notice .button {
  margin-left: 15px;
  background-color: #0073aa;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.woocommerce-checkout .woocommerce-info.pay-balance-notice .button:hover {
  background-color: #005a87;
}

/* Combo Items Section */
.combo-items {
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
}

.combo-items h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.2em;
  font-weight: 600;
}

/* Admin tab styling */
.nav-tab-disabled {
  background: #f1f1f1;
  border: 1px solid #ccc;
  border-bottom: none;
  color: #999;
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  line-height: 16px;
  margin: 0;
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
  cursor: not-allowed;
  opacity: 0.6;
}

.premium-feature-notice {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
}

/* Helpers */
.flex-row-10 {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.pl-2 {
  padding-left: 8px;
}

/* Loading states */
.combo_add_to_cart_button.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.combo_add_to_cart_button.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Grayscale filter for out of stock items */
.grayscale {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  -ms-filter: grayscale(100%);
  -o-filter: grayscale(100%);
}

/* Combo Responsive Table */
@media screen and (max-width: 768px) {
  table#combo_products_table {
    border: 0;
  }

  table#combo_products_table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  table#combo_products_table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
    padding: 0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  /* Hidden rows remain hidden on mobile */
  table#combo_products_table tr.combo_products_tr.hide {
    display: none !important;
  }

  /* Out of stock rows maintain styling on mobile */
  table#combo_products_table tr.out-of-stock {
    opacity: 0.6;
    filter: grayscale(100%);
    background-color: #f5f5f5 !important;
  }

  /* Discount row on mobile */
  table#combo_products_table tr.combo-discount-row {
    background-color: #e8f5e8 !important;
    border: 2px solid #4caf50;
  }

  table#combo_products_table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .8em;
    text-align: right;
    padding: 10px;
  }

  table#combo_products_table td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
    color: #666;
    font-size: 0.9em;
  }

  table#combo_products_table td:last-child {
    border-bottom: 0;
  }

  table#combo_products_table .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image {
    width: auto;
    float: right;
  }

  .woocommerce div.product form.cart table#combo_products_table td {
    padding-left: 0 !important;
  }

  .woocommerce div.product div.images,
  .woocommerce div.product div.product-summary-side {
    width: 100%;
  }

  .flex-row-10 {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  /* Max quantity notice on mobile */
  .max-qty-notice {
    font-size: 10px !important;
  }

  /* Mobile responsive add to cart section */
  .combo-add-to-cart-section {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .combo-quantity-wrapper {
    align-self: center;
  }

  body #site-main-content div.product form.cart .button.combo_add_to_cart_button:not(.zoo-buy-now) {
    width: 100%;
    min-width: auto;
  }

  .combo-additional-buttons {
    justify-content: center;
  }

  /* Mobile message styling */
  .combo-messages .notice {
    padding: 10px 12px;
    font-size: 13px;
  }

  .required-indicator,
  .required-item-notice {
    display: block;
    margin-top: 5px;
  }

  .combo_products_table tr.required-item,
  .combo_products_table tr[data-optional="1"] {
    border-left-width: 2px;
  }
}

/* Print styles */
@media print {
  .RemoveBundleItem,
  .combo_add_to_cart_button,
  .combo-add-to-cart-section,
  .combo-additional-buttons,
  .combo-messages {
    display: none;
  }

  table#combo_products_table {
    border-collapse: collapse;
  }

  table#combo_products_table th,
  table#combo_products_table td {
    border: 1px solid #000;
    padding: 8px;
  }

  /* Hidden rows remain hidden in print */
  table#combo_products_table tr.combo_products_tr.hide {
    display: none !important;
  }

  /* Show out of stock items in print but mark them clearly */
  table#combo_products_table tr.out-of-stock::after {
    content: " (OUT OF STOCK)";
    font-weight: bold;
    color: #000;
  }

  /* Show discount row in print */
  table#combo_products_table tr.combo-discount-row {
    background-color: #f0f0f0 !important;
    border: 1px solid #000;
  }

  .max-qty-notice,
  .stock-status {
    display: none;
  }
}
