
/* ========================================
   WooCommerce Custom Styles
   Combined for performance & consistency
   ======================================== */

/* Quantity Input Wrapper on Single Product */
.dc-qty-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.5em;
  margin-bottom: 1em;
}

.dc-qty-label {
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

/* Save Money Section - Green Background & Header */
.single-product-extras {
  background-color: #f0fdf4; /* Soft green */
  padding: 14px;
  border-radius: 8px;
}

.single-product-extras p strong {
  color: #065f46; /* Deep green */
}

/* SKU Above Add to Cart Button */
.sku-above-button {
  font-size: 0.6em;
  color: #999;
  margin-bottom: 4px;
  line-height: 1.2;
}

/* 
 * Hide Currency Symbol in:
 * - Product grids (Shop, Categories, Related, Upsells, Widgets)
 * - Single product page (main summary)
 */
.woocommerce ul.products li.product .woocommerce-Price-currencySymbol,
.woocommerce-page ul.products li.product .woocommerce-Price-currencySymbol,
.widget ul.products li.product .woocommerce-Price-currencySymbol,
.related ul.products li.product .woocommerce-Price-currencySymbol,
.upsells ul.products li.product .woocommerce-Price-currencySymbol,
.cross-sells ul.products li.product .woocommerce-Price-currencySymbol,
.single-product .product .summary .price .woocommerce-Price-currencySymbol {
    display: none !important;
}

/* 
 * Right-align Prices in Product Grids 
 * Adds subtle spacing for visual rhythm
 */

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
    text-align: right;
    width: 100%;
    margin-top: 0.4em;
}

/* 
 * Subtle Sale Pricing: 
 * Soften the original (strikethrough) price on:
 * - Product grids (Shop, Categories, Related)
 * - Single product page
 * Keeps focus on sale price, reduces visual noise.
 */
ul.products li.product del,
.single-product .product del {
    font-size: 0.85em !important;
    color: #666 !important;
    opacity: 0.8;
}

/* Category Cards: Flex Layout with Bottom-aligned Button */
.woocommerce ul.products li.product-category {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
}

.woocommerce ul.products li.product-category a.category-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: auto;
  transition: background-color 0.3s ease;
  background-color: var(--global-palette1, #000);
  color: var(--global-palette9, #fff);
}

.woocommerce ul.products li.product-category a.category-button:hover {
  background-color: var(--global-palette2, #000); /* 444 */
  color: var(--global-palette9, #fff);
}

/* Product Grid Spacing (Desktop/Tablet) */
.woocommerce ul.products {
  padding-left: 1px;
  padding-right: 1px;
  column-gap: 24px;
  row-gap: 36px;
}

/* Mobile: 2-Column Grid */
@media only screen and (max-width: 768px) {
  .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    column-gap: 10px !important;
    row-gap: 36px !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }
  .woocommerce ul.products li.product-category {
    padding: 10px;
  }
}

/* Recently Viewed Products Widget */
.widget_recently_viewed_products ul.product_list_widget li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.widget_recently_viewed_products ul.product_list_widget li img {
  width: 50px;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0;
}

.widget_recently_viewed_products ul.product_list_widget li a {
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  font-weight: normal;
  line-height: normal !important;
  min-height: unset !important;
  flex: 1;
}

.widget_recently_viewed_products ul.product_list_widget li .product-title {
  font-size: 14px;
  font-weight: normal;
  color: var(--global-palette6, #333);
  line-height: 1.2 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Hide $ sign Prices & Labels in Recently Viewed Widget */
.widget_recently_viewed_products ul.product_list_widget li del,
.widget_recently_viewed_products ul.product_list_widget li ins,
.widget_recently_viewed_products ul.product_list_widget li .woocommerce-Price-amount,
.widget_recently_viewed_products ul.product_list_widget li .dcshopee-price-after,
.widget_recently_viewed_products ul.product_list_widget li .screen-reader-text {
  display: none;
}

/* === Universal Product Grid Styling (Enhanced) === */
.woocommerce ul.products li.product {
  position: relative;
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.4s ease;
  z-index: 1;
}

/* Desktop: Lift on hover */
.woocommerce ul.products li.product:hover,
.woocommerce ul.products li.product:focus {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

/* Mobile: Feedback when tapping */
.woocommerce ul.products li.product:active {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

/* Add to Cart Button in Grid */
.woocommerce ul.products li.product .button {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.woocommerce ul.products li.product .button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.woocommerce ul.products li.product h2 {
  line-height: 1.4;
}

/* Luxury Gradient Overlay on Hover 
.woocommerce ul.products li.product::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(210, 210, 215, 0.35), rgba(240, 240, 245, 0));
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 6px;
  pointer-events: none;
}

.woocommerce ul.products li.product:hover::before {
  opacity: 1;
}*/

/* Mobile: Add to Cart Button Full Width */
@media (max-width: 767px) {
  .single-product form.cart .single_add_to_cart_button {
    width: 100% !important;
    display: block !important;
    text-align: center;
    box-sizing: border-box;
    padding: 0.75em 1em;
    font-size: 1.2em;
    margin-top: 0;
    border-radius: 8px;
  }
}

/* Add to Cart Button: Shimmer Effect */
.single_add_to_cart_button {
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  background-color: #111;
  color: #fff;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  z-index: 1;
}

.single_add_to_cart_button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
  transition: none;
}

.single_add_to_cart_button:hover::after,
.single_add_to_cart_button:focus::after {
  animation: shimmer 1.2s ease-in-out forwards;
}

@keyframes shimmer {
  0% { left: -75%; }
  100% { left: 125%; }
}

.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus {
  transform: scale(1.02);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  background-color: #000;
  color: #f4f4f4;
}

/* Mobile: Cart Button Spacing */
@media (max-width: 480px) {
  form.cart .button {
    margin-top: 12px;
    display: block;
    width: 100%;
  }
}

/* === Reduce Motion for Accessibility === */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    .woocommerce ul.products li.product,
    .single_add_to_cart_button,
    .woocommerce ul.products li.product img,
    .woocommerce ul.products li.product::before {
      transform: none !important;
      box-shadow: none !important;
    }
  }

/* === Related Products: Card Styling === */