.custom-product-page {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  align-items: start;
}

.custom-thumb-column {
  width: 200px;
  max-height: 480px;
  overflow: hidden;
  overflow-y: auto;
  position: relative;
}

.thumb-track {
  display: block;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

.custom-thumb-column .thumb-track {
  transform: none !important;
  transition: none !important;
}

.custom-thumb {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  cursor: pointer;
}


.custom-thumb-column {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.custom-thumb {
  width: 120px !important;
  height: auto;
  cursor: pointer;
  border: 1px solid #eee;
  padding: 4px;
  transition: border-color .2s;
}


.custom-thumb:hover {
  border-color: #999;
}

@media (max-width: 1024px) {
  .custom-product-page {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "thumbs"
      "summary";
  }
  .custom-image-column   { grid-area: image; }
  .custom-thumb-column   { grid-area: thumbs; }
  .custom-summary-column { grid-area: summary; }
}
.thumb-track {
  transition: none !important;
}

@media (max-width: 1024px) {
  .custom-thumb-column {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    width: 100% !important;
    margin: 1rem 0;
    padding-bottom: 0.5rem;
  }

  .custom-thumb-column .custom-thumb {
    flex: 0 0 auto !important;
    margin-right: 0.75rem !important;
  }

  .custom-thumb-column .custom-thumb:last-child {
    margin-right: 0 !important;
  }
}

.custom-image-column {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem;
  margin-top: 0;
}

.custom-main-image {
  max-width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.4s ease-in-out;
  opacity: 1;
}

.custom-summary-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #fef8f8;
  border-radius: 8px;
  padding: 2rem;
}

.custom-subtitle {
  font-size: 1rem;
  color: #555;
}

.custom-rating {
  margin-top: .5rem;
}

.custom-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

.custom-summary-column .price,
.custom-summary-column .custom-subtitle,
.custom-summary-column .custom-rating {
  margin-bottom: 0.25rem !important;
}

.custom-divider {
  margin: 0.5rem 0 !important;
}

.custom-summary-column .custom-variable-form-wrap,
.custom-summary-column .custom-add-to-cart {
  margin-top: 0.5rem !important;
}

.custom-upsells {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
}

.custom-shipping-note {
  font-size: .875rem;
  color: #666;
  margin-top: auto;
}

.custom-image-column .swiper-button-prev,
.custom-image-column .swiper-button-next {
  width: 32px !important;
  height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-image-column .swiper-button-prev::after,
.custom-image-column .swiper-button-next::after {
  font-size: 16px !important;
  color: #333333 !important;
}

.custom-image-column .swiper-button-prev:hover,
.custom-image-column .swiper-button-next:hover {
  background: rgba(0,0,0,0.2);
  opacity: 1 !important;
}


@media (max-width: 1024px) {
  .custom-product-page {
    grid-template-columns: 1fr;
  }
  .custom-upsells {
    grid-template-columns: 1fr;
  }
}

.custom-cart-form {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1.5rem;
}

.custom-cart-form .quantity {
  flex: 0 0 auto;
}
.custom-cart-form .quantity .qty {
  width: 3.5ch;
  padding: 0.5em;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  background: #fff;
}

.custom-cart-form .custom-button {
  flex: 1 1 auto;
  background-color: #333333;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 1.5em;              
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;                 
  align-items: center;
  justify-content: center;
  gap: .5em;
  transition: background-color .2s;
}

.custom-button-price {
  font-weight: 700;
}

.custom-cart-form .custom-button:hover {
  background-color: #555555;
}

.variations {
  display: flex !important;
  flex-wrap: wrap !important;
  border: none !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
}

.variations tr {
  text-align: left !important;
  width: 100% !important;
}
.variations select {
  padding: .5em .75em !important;
  font-size: 1rem !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background: #fff !important;
  width: 100% !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg fill='%23333' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right .75em center !important;
  background-size: 1em !important;
}

.variations tbody{
  width: 100% !important;
}

.custom-variable-form-wrap {
  width: 100% !important;
}

.value {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 1rem !important;
  margin-top: 1rem !important;
}



.custom-variable-form-wrap {
  width: 100%;
}
.woocommerce-variation-add-to-cart {
  width: 100%;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 1rem !important;
}


.quantity.qty {
  width: 3.5ch !important;
  padding: 1rem !important;
  align-self: center !important;
  text-align: center !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  font-size: 5rem !important;
  background: #fff !important;
}

.input-text {
  margin-top: .1rem;
 align-self: center !important;
 font-size: 1rem;
}

.single_add_to_cart_button {
 flex: 1 ; 
 background: #333 !important; 
 color: #fff !important; 
 border-radius: 8px !important;
  padding: 0 .75em; 
  text-transform: uppercase !important; 
  font-weight: 600 !important;
}
.single_add_to_cart_button:not(.disabled):hover {
  background-color: #333 !important;
}


.custom-variation-field select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.75em center;
  background-size: 1em;
}

.custom-variation-field select {
  background-image: url("data:image/svg+xml,%3Csvg fill='%23333' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.custom-variation-field select {
  padding-right: 2em;
}


.single-product .entry-title {
  margin-bottom: 0;
  font-weight: 200;
}

.single-product .price {
  margin-top: 1rem;
  font-size: x-large;
  font-weight: 300;
}

.single-product .custom-subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}


/* PRODUCT INFO SECTION */
.product-info-description {
  margin: 2rem auto;
  max-width: 800px;
  padding: 0 1rem;
}
.product-info-description h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  text-align: left;
}
.product-info-description p {
  line-height: 1.6;
  margin-bottom: 1rem;
}



.variations_form.cart table.variations tbody {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.variations_form.cart table.variations tr {
  display: flex;
  flex-direction: column;
  border: none;
}
.variations_form.cart table.variations th,
.variations_form.cart table.variations td {
  padding: 0;
}
.variations_form.cart table.variations th.label label {
  margin-bottom: .25rem;
  font-weight: 500;
}

.variations_form.cart select {
  padding: .5em .75em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml;charset=UTF-8,<svg fill='%23333' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right .75em center;
  background-size: 1em;
  appearance: none;
}

.single_variation_wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.single_variation_wrap .quantity .qty {
  width: 3.5ch;
  padding: .5em;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
}
.single_variation_add_to_cart_button {
  flex: 1;
  padding: .75em 1.5em;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  transition: background .2s;
}
.single_variation_add_to_cart_button:not(:disabled):hover {
  background: #555;
}

@media (max-width: 600px) {
  .variations_form.cart table.variations tbody {
    flex-direction: column;
  }
  .single_variation_wrap {
    flex-direction: column;
  }
  .single_variation_wrap .quantity,
  .single_variation_add_to_cart_button {
    width: 100%;
  }
}


/* CART */
#mini-cart-drawer {
  position: fixed!important;
  top: 0!important; right: 0!important;
  width: 320px!important;
  height: 100%!important;
  background: #fff!important;
  box-shadow: -3px 0 8px rgba(0,0,0,0.2)!important;
  transform: translateX(100%)!important;
  transition: transform .3s ease!important;
  z-index: 9999!important;
}
#mini-cart-drawer.open {
  transform: translateX(0)!important;
}
.mini-cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}
.mini-cart-content {
  padding: 1rem!important;
  overflow-y: auto; height: calc(100% - 140px)!important;
  align-items: center!important;
}

.mini-cart-footer {
  padding: 1rem;
  border-top: 1px solid #eee;
}
#mini-cart-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
}

#mini-cart-backdrop {
  position: fixed!important;
  top: 0!important; left: 0!important;
  width: 100%!important; height: 100%!important;
  background: rgba(0,0,0,0.4)!important;
  opacity: 0!important;
  pointer-events: none!important;
  transition: opacity .3s ease!important;
  z-index: 9998!important;
  border-top-left-radius: 8px!important;
  border-bottom-left-radius: 8px!important;
  box-shadow: -4px 0 12px rgba(0,0,0,0.15)!important;
}

.mini-cart-content .woocommerce-mini-cart__empty-message {
  text-align: center;
  color: #777;
  padding: 2rem 1rem;
  font-style: italic;
}

#mini-cart-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.woocommerce-mini-cart__buttons a {
  width: 70%!important;
  background: #000000!important;
  color: #fff!important;
  text-align: center!important;
  padding: .75em 0!important;
  font-weight: 600!important;
  border-radius: 6px!important;
  display: block!important;
  text-decoration: none!important;
  margin: 1rem!important;
}

.woocommerce-mini-cart-item a {
  text-decoration: none!important;
  color: inherit;
}

#mini-cart-drawer .woocommerce-mini-cart__buttons {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

#mini-cart-drawer .woocommerce-mini-cart__buttons a.button {
  width: 70%;
  max-width: 200px;
  text-align: center;
}

.mini-cart-footer .checkout-button:hover {
  background: #005a9c!important;
}

.mini-cart-content {
  scrollbar-width: thin!important;
  scrollbar-color: #ccc transparent!important;
}

.mini-cart-content::-webkit-scrollbar {
  width: 6px!important;
}
.mini-cart-content::-webkit-scrollbar-thumb {
  background: #ccc!important;
  border-radius: 3px!important;
}


#mini-cart-drawer .blockUI.blockOverlay,
#mini-cart-drawer .blockUI.blockMsg {
  display: none !important;
}

#mini-cart-drawer .mini-cart-content .woocommerce-mini-cart.cart_list li {
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.related-section-title {
  text-align: center;
  font-size: 1.5rem;
  margin: 3rem 0 1.5rem;
}

.related.products,
.upsells.products {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.related.products ul.products,
.upsells.products ul.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: auto;
  margin: 0 auto;
}

.related.products ul.products li.product,
.upsells.products ul.products li.product {
  flex: 1 1 clamp(100px, 25%, 150px)!important;
  max-width: 200px;
}

.related-section-title {
  text-align: center;
}


.related.products h2,
.upsells.products h2 {
  grid-column: 1 / -1;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.checkout-button {
   flex: 1 ; 
 background: #333 !important; 
 color: #fff !important; 
 border-radius: 8px !important;
  padding: 0 .75em; 
  text-transform: uppercase !important; 
  font-weight: 600 !important;
   display: block!important;               /* make it block-level */
  margin: 1.5rem auto 0!important;        /* top 1.5rem, horizontal auto, bottom 0 */
  max-width: 200px !important;             /* optional: constrain its width */
  text-align: center !important;           /* if it has inline text inside */
}

/* Disabled state */
.checkout-button.disabled {
  background: #333 !important;      /* lighter grey */
  color: #eee !important;           /* light text */
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;  /* prevent hover/click */
}