/* WooCommerce responsive overrides for WeddingBells
   Keep this file small and loaded after theme CSS. */

/* Entirely remove/hide Compare option */
.btn-compare,
.compare,
.add-to-compare,
.yith-woocompare-button,
.compare-button,
a[title*="Compare"],
a[aria-label*="Compare"] {
  display: none !important;
}

/* -----------------------------
   Single product
------------------------------*/

/* Fix: Ensure quantity input and spinner are visible and correctly ordered */
.single-product .product-details-action .quantity {
  display: inline-flex !important;
  margin-right: 2rem;
  margin-bottom: 1rem;
  vertical-align: middle;
}

.product-details-action form.cart {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.input-spinner {
  display: flex !important;
  align-items: stretch;
  width: 120px !important;
  background-color: #fff;
  border: 1px solid #ebebeb;
}

.input-spinner .input-group-prepend,
.input-spinner .input-group-append {
  display: flex;
  align-items: stretch;
}

.input-spinner .btn-spinner {
  padding: 0;
  width: 34px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.6rem;
}

.input-spinner .btn-spinner:hover {
  color: #a6c76c;
}

.input-spinner input.form-control {
  flex: 1;
  height: 40px;
  width: 100% !important;
  min-width: 40px;
  text-align: center;
  border: none !important;
  border-left: 1px solid #ebebeb !important;
  border-right: 1px solid #ebebeb !important;
  padding: 0;
  margin: 0;
  font-weight: 400;
  font-size: 1.4rem;
  background-color: transparent;
  box-shadow: none !important;
}

/* Style for Dropdown Add-ons & Variations */
.single-product .variations select,
.wc-pao-addon-container select,
.wc-pao-addon select,
.product-details .addon-select,
.product-details select.addon {
  display: block;
  width: 100%;
  max-width: 400px;
  height: 40px;
  padding: 0.85rem 1.5rem;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #777;
  background-color: #fff;
  border: 1px solid #ebebeb;
  border-radius: 0;
  margin-bottom: 1rem;
  transition: all 0.3s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: 8px 10px;
}

.single-product .variations select:focus,
.wc-pao-addon-container select:focus,
.wc-pao-addon select:focus {
  border-color: #a6c76c;
  outline: none;
}

.wc-pao-addon-name {
  display: block;
  font-weight: 600;
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

/* Ensure add to cart button aligns well */
.single-product .single_add_to_cart_button {
  height: 40px;
  padding: 0 2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .single-product .main .page-content .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .single-product .product-details-top {
    margin-bottom: 2rem;
  }

  .single-product .product-details {
    margin-top: 1.2rem;
  }

  /* Stack gallery vertically */
  .single-product .product-gallery-vertical .row {
    flex-direction: column;
  }

  .single-product .product-main-image,
  .single-product .product-image-gallery {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* vertical thumbs become horizontal scroll on small screens */
  .single-product .product-gallery-vertical .product-image-gallery {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.8rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0;
    margin-top: 1rem;
  }

  .single-product .product-gallery-vertical .product-image-gallery .product-gallery-item {
    flex: 0 0 80px;
    max-width: 80px;
  }

  .single-product .product-main-image img {
    max-height: 50vh;
    object-fit: contain;
    margin: 0 auto;
  }

  .single-product .product-details-action {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .single-product .product-details-action form.cart {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .single-product .product-details-action .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
    align-items: center;
  }

  .single-product .product-details-action form.cart .quantity {
    margin-right: 0;
  }

  .single-product .single_add_to_cart_button {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0 !important;
  }

  .single-product .details-action-wrapper {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    gap: 1.5rem;
  }

  /* Breadcrumbs & Pager stacking */
  .single-product .breadcrumb-nav .container {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .single-product .breadcrumb-nav .breadcrumb {
    margin-bottom: 1rem;
  }

  .single-product .breadcrumb-nav .product-pager {
    width: 100%;
    margin-left: 0 !important;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #ebebeb;
    padding-top: 0.5rem;
  }

  /* Attributes / Selection stacking */
  .single-product .details-filter-row,
  .single-product .variations tr {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-bottom: 1.5rem !important;
    border: none !important;
  }

  .single-product .details-filter-row label,
  .single-product .variations tr .label,
  .single-product .variations tr label {
    margin-bottom: 0.8rem;
    min-width: 0;
    display: block;
    text-align: left;
  }

  .single-product .details-filter-row .select-custom,
  .single-product .variations tr .value {
    width: 100% !important;
    margin-bottom: 0.5rem;
    margin-right: 0;
    padding-left: 0 !important;
  }

  .single-product .variations tr .value select {
    width: 100% !important;
    max-width: 100% !important;
  }

  .single-product .details-filter-row .size-guide {
    margin-left: 0 !important;
    margin-top: 0.5rem;
  }

  /* Tabs and Tables */
  .single-product .product-details-tab .nav.nav-pills {
    flex-wrap: wrap;
    justify-content: center !important;
  }

  .single-product .product-details-tab .nav.nav-pills .nav-item {
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .single-product .shop_attributes th {
    width: 120px;
    padding: 1rem 0;
  }
}

/* Bulk discount table (if present) */
.single-product .wb-bulk-discount-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.single-product .wb-bulk-discount-table th,
.single-product .wb-bulk-discount-table td {
  white-space: nowrap;
}

/* -----------------------------
   Cart Page – Theme UI Polish
------------------------------*/

/* Loading overlay for AJAX cart updates */
.wb-cart-loading {
  position: relative;
  pointer-events: none;
}

.wb-cart-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.wb-cart-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #ebebeb;
  border-top-color: #a6c76c;
  border-radius: 50%;
  z-index: 11;
  animation: wb-spin 0.6s linear infinite;
}

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

/* Cart table base */
.woocommerce-cart .table-cart {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.woocommerce-cart .table-cart thead th {
  font-weight: 600;
  font-size: 1.4rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1.5rem 1rem;
  border-top: none;
  border-bottom: 2px solid #ebebeb;
  background: transparent;
}

.woocommerce-cart .table-cart tbody td {
  padding: 2rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #ebebeb;
  font-size: 1.4rem;
  color: #666;
}

.woocommerce-cart .table-cart tbody tr:last-child td {
  border-bottom: 1px solid #ebebeb;
}

/* Product cell */
.woocommerce-cart .table-cart .product-col .product {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.woocommerce-cart .table-cart .product-col .product-media {
  flex: 0 0 80px;
  max-width: 80px;
}

.woocommerce-cart .table-cart .product-col .product-media img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid #f0f0f0;
}

.woocommerce-cart .table-cart .product-col .product-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: #333;
  margin: 0;
  line-height: 1.5;
}

.woocommerce-cart .table-cart .product-col .product-title a {
  color: #333;
  transition: color 0.3s;
}

.woocommerce-cart .table-cart .product-col .product-title a:hover {
  color: #a6c76c;
}

/* Variation data */
.woocommerce-cart .table-cart .product-col .variation {
  margin-top: 0.5rem;
}

.woocommerce-cart .table-cart .product-col .variation dt,
.woocommerce-cart .table-cart .product-col .variation dd {
  display: inline;
  font-size: 1.2rem;
  color: #999;
  font-weight: 300;
  margin: 0;
}

.woocommerce-cart .table-cart .product-col .variation dt::after {
  content: ' ';
}

.woocommerce-cart .table-cart .product-col .variation dd::after {
  content: '';
  display: block;
}

/* Price column */
.woocommerce-cart .table-cart .price-col {
  font-weight: 400;
  color: #333;
  font-size: 1.5rem;
}

/* Total column */
.woocommerce-cart .table-cart .total-col {
  font-weight: 600;
  color: #a6c76c;
  font-size: 1.5rem;
}

/* Quantity column – spinner in cart */
.woocommerce-cart .table-cart .quantity-col .cart-product-quantity {
  max-width: 130px;
}

.woocommerce-cart .table-cart .quantity-col .input-spinner {
  width: 100% !important;
}

/* Remove button */
.woocommerce-cart .table-cart .remove-col .btn-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f4f4f4;
  color: #999;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.woocommerce-cart .table-cart .remove-col .btn-remove:hover {
  background: #a6c76c;
  color: #fff;
}

/* Actions row (hidden nonce etc.) */
.woocommerce-cart .table-cart .actions {
  padding: 1.5rem 1rem;
  border: none;
  background: transparent;
}

/* Cart Bottom – coupon + update */
.woocommerce-cart .cart-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.woocommerce-cart .cart-bottom .cart-discount {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
}

.woocommerce-cart .cart-bottom .cart-discount .input-group {
  border: 1px solid #ebebeb;
  border-radius: 0;
}

.woocommerce-cart .cart-bottom .cart-discount .form-control {
  border: none;
  height: 42px;
  font-size: 1.4rem;
  padding: 0.5rem 1.5rem;
}

.woocommerce-cart .cart-bottom .cart-discount .form-control:focus {
  box-shadow: none;
  outline: none;
}

.woocommerce-cart .cart-bottom .cart-discount .btn {
  border: none;
  border-left: 1px solid #ebebeb;
  background: transparent;
  padding: 0 1.5rem;
  color: #a6c76c;
  font-size: 1.6rem;
  transition: all 0.3s;
}

.woocommerce-cart .cart-bottom .cart-discount .btn:hover {
  background: #a6c76c;
  color: #fff;
}

.woocommerce-cart .cart-bottom button[name="update_cart"] {
  height: 42px;
  padding: 0 2.5rem;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}

/* Cart Summary Sidebar */
.woocommerce-cart .summary-cart {
  background: #f9f9f9;
  padding: 3rem;
  border: 1px dashed #d7d7d7;
  position: relative;
}

.woocommerce-cart .summary-cart .summary-title {
  font-weight: 600;
  font-size: 1.8rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-bottom: 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
}

/* Summary table */
.woocommerce-cart .table-summary {
  width: 100%;
  margin-bottom: 2rem;
}

.woocommerce-cart .table-summary td {
  padding: 1.2rem 0;
  border-bottom: 1px solid #ebebeb;
  font-size: 1.4rem;
  color: #666;
  vertical-align: middle;
}

.woocommerce-cart .table-summary td:last-child {
  text-align: right;
  font-weight: 400;
  color: #333;
}

.woocommerce-cart .table-summary .summary-subtotal td:last-child {
  font-weight: 400;
}

.woocommerce-cart .table-summary .summary-total td {
  border-bottom: none;
  padding-top: 1.5rem;
  font-size: 1.6rem;
}

.woocommerce-cart .table-summary .summary-total td:first-child {
  font-weight: 600;
  color: #333;
}

.woocommerce-cart .table-summary .summary-total td:last-child {
  font-weight: 700;
  color: #a6c76c;
  font-size: 1.8rem;
}

/* Checkout & Continue buttons */
.woocommerce-cart .btn-order {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

/* ──────────────────────────────────
   Cart – Mobile Responsive
────────────────────────────────── */
@media (max-width: 991.98px) {
  .woocommerce-cart .summary.summary-cart {
    margin-top: 3rem;
  }
}

@media (max-width: 767.98px) {

  /* Hide table header on mobile */
  .woocommerce-cart .table-mobile thead {
    display: none;
  }

  .woocommerce-cart .table-mobile tbody tr {
    display: block;
    position: relative;
    padding: 2rem 2rem;
    border-bottom: 1px solid #ebebeb;
  }

  .woocommerce-cart .table-mobile tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.8rem 0;
    border: 0;
  }

  .woocommerce-cart .table-mobile tbody td::before {
    content: attr(data-title);
    font-weight: 600;
    color: #333;
    padding-right: 1.5rem;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  /* Product cell as mini card */
  .woocommerce-cart .table-mobile tbody td.product-col {
    display: block;
    padding-right: 4rem;
  }

  .woocommerce-cart .table-mobile tbody td.product-col::before {
    content: "";
    display: none;
  }

  .woocommerce-cart .table-mobile .product-col .product {
    display: flex;
    gap: 1.5rem;
    align-items: center;
  }

  .woocommerce-cart .table-mobile .product-col .product-media {
    flex: 0 0 80px;
    max-width: 80px;
  }

  .woocommerce-cart .table-mobile .product-col .product-media img {
    width: 80px;
    height: 80px;
    object-fit: cover;
  }

  .woocommerce-cart .table-mobile .product-col .product-title {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.5;
  }

  /* Quantity spinner on mobile */
  .woocommerce-cart .table-mobile .quantity-col .cart-product-quantity {
    display: flex;
    justify-content: flex-end;
    width: auto;
  }

  .woocommerce-cart .table-mobile .quantity-col .input-spinner {
    width: 110px !important;
  }

  .woocommerce-cart .table-mobile .quantity-col input.qty {
    max-width: 110px;
  }

  /* Remove button – absolute top-right */
  .woocommerce-cart .table-mobile td.remove-col {
    position: absolute;
    top: 2rem;
    right: 0;
    width: auto;
    padding: 0;
  }

  .woocommerce-cart .table-mobile td.remove-col::before {
    content: "";
    display: none;
  }

  /* Coupon + update stack on mobile */
  .woocommerce-cart .cart-bottom {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
  }

  .woocommerce-cart .cart-bottom .cart-discount {
    max-width: 100%;
    min-width: 0;
  }

  .woocommerce-cart .cart-discount .input-group {
    width: 100%;
  }

  .woocommerce-cart .cart-bottom button[name="update_cart"] {
    width: 100%;
  }

  /* Summary sidebar */
  .woocommerce-cart .summary-cart {
    padding: 2rem;
  }

  /* Actions row hide */
  .woocommerce-cart .table-cart .actions {
    display: none;
  }
}

/* -----------------------------
   Checkout (field stacking)
------------------------------*/
@media (max-width: 575.98px) {

  .woocommerce-checkout .form-row-first,
  .woocommerce-checkout .form-row-last {
    width: 100% !important;
    float: none !important;
  }

  .checkout-page-container .summary-card {
    padding: 2rem !important;
  }
}