/*
Template Shops - WooCommerce Styles
Custom styling for WooCommerce shop, products, cart, and checkout
*/

/* ==========================================================================
   WooCommerce Global
   ========================================================================== */

.woocommerce-page .site-main {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

.woocommerce,
.woocommerce-page {
  font-family: var(--font-family-base);
}
.woocommerce-breadcrumb {
  color: #a6a6a6;
  margin-bottom: 15px;
}

.woocommerce-breadcrumb a {
  color: #a6a6a6;
}
.woocommerce-breadcrumb a:hover {
  color: var(--color-primary);
}
.woocommerce-result-count {
  white-space: nowrap;
  margin-bottom: 0;
}
/* ==========================================================================
   Shop Page & Product Archives
   ========================================================================== */

.woocommerce-products-header {
  margin-bottom: var(--spacing-2xl);
  text-align: center;
}

.woocommerce-products-header__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.term-description {
  color: var(--color-text-secondary);
  max-width: 1200px;
  margin: 0 auto;
}

/* Shop Toolbar */
.shop-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
}
@media (max-width: 1024px) {
  .shop-filters {
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  .shop-filters {
    flex-direction: column;
  }
  .category-tabs {
    justify-content: center;
  }
  .products-and-sidebar {
    margin-bottom: 20px;
  }
  .woocommerce-products-header {
    margin-bottom: var(--spacing-sm);
  }
}
.woocommerce-result-count {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
  white-space: nowrap;
}

.woocommerce-ordering {
  margin: 0;
}

/* Category Navigation Tabs */
.product-category-nav {
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.5rem;
  background-color: #f3f4f6;
  color: #374151;
  border: 2px solid transparent;
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.category-tab:hover {
  background-color: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.category-tab.active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.category-tab.active:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-light);
  color: #ffffff;
}

.category-tab .count {
  margin-left: 0.375rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Dark mode support for category tabs */
body.dark-mode .category-tab {
  background-color: #374151;
  color: #e5e7eb;
}

body.dark-mode .category-tab:hover {
  background-color: #4b5563;
  color: #ffffff;
  border-color: #6b7280;
}

body.dark-mode .category-tab.active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary-light);
}

body.dark-mode .category-tab.active:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-light);
}

/* Responsive adjustments for category tabs */
@media (max-width: 640px) {
  .category-tab {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .category-tabs {
    gap: 0.5rem;
  }
}

.woocommerce-ordering select {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}

/* Products Grid - Masonry Layout */
.products-and-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
  overflow: visible;
}

.products-area {
  width: 100%;
  overflow: visible;
}

ul.products {
  column-count: 1;
  column-gap: var(--spacing-xl);
  list-style: none;
  margin: 0;
  padding: 10px;
  margin: -10px;
  overflow: visible;
}

ul.products > li.product {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: var(--spacing-lg);
  display: inline-block;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 640px) {
  ul.products {
    column-count: 2;
  }
}

@media (min-width: 900px) {
  ul.products {
    column-count: 3;
  }
}

@media (min-width: 1100px) {
  ul.products:not(.related) {
    column-count: 4;
  }
}

/* Product Item */
.product {
  position: relative;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.product:hover {
  box-shadow: var(--shadow-blur);
  transform: translateY(-4px);
}

/* Light Mode Product Shadow */
[data-theme="light"] .product {
  box-shadow: var(--shadow-blur);
}

/* Product Image */
.product .woocommerce-loop-product__link {
  display: block;
  position: relative;
  overflow: hidden;
}

.product img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* Product Badges */
.product-badge {
  display: none;
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: white;
  border-radius: var(--border-radius);
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new {
  background-color: var(--color-info);
  display: none;
}

.badge-sale {
  background-color: var(--color-error);
}

.onsale {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--color-secondary);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  border-radius: var(--border-radius);
  z-index: 10;
  display: none;
}

/* Product Info */
.product .woocommerce-loop-product__title {
  padding: var(--spacing-sm) var(--spacing-md);
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

.product .woocommerce-loop-product__title:hover {
  color: var(--color-primary);
}

.product-categories {
  padding: 0 var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.product-categories a {
  color: var(--color-text-secondary);
}

.product-categories a:hover {
  color: var(--color-primary);
}

/* Price */
.price {
  padding: 0 var(--spacing-md);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.price del {
  color: #868686;
  opacity: 0.5;
  font-weight: var(--font-weight-normal);
  margin-right: var(--spacing-xs);
}

.price ins {
  text-decoration: none;
  color: var(--color-primary);
}

.price .amount {
  font-weight: var(--font-weight-bold);
}

/* Product Item Layout - Price and Button */
.product {
  display: flex;
  flex-direction: column;
}

.product .woocommerce-LoopProduct-link {
  display: block;
  flex-shrink: 0;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md) var(--spacing-md);
  flex-wrap: wrap;
}

.product-footer .price {
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.product-footer .add_to_cart_button,
.product-footer .product_type_simple,
.product-footer .product_type_variable {
  margin: 0;
  flex: 0 0 auto;
  width: auto;
}

.added_to_cart {
  display: inline-flex;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  margin: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-success);
  color: white;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}
.add_to_cart_button,
.product_type_simple,
.product_type_variable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 5px 10px;
  background-color: var(--color-primary);
  color: #ffffff !important;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.add_to_cart_button:hover,
.product_type_simple:hover,
.product_type_variable:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.added_to_cart:hover {
  background-color: #059669;
  color: white;
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */

.single-product-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.single-product .product {
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
  width: 100%;
  max-width: 100%;
  padding: 0;
}

@media (min-width: 768px) {
  .woocommerce div.product {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-3xl);
  }
}

/* Product Images */
.woocommerce-product-gallery {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

/* Disable zoom image on hover */
.zoomImg {
  display: none !important;
}

.woocommerce-product-gallery__wrapper {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.woocommerce-product-gallery__image {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.woocommerce-product-gallery__image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Fix for FlexSlider gallery slider */
.woocommerce-product-gallery .flex-viewport {
  max-height: none !important;
  height: auto !important;
  overflow: hidden !important;
}

.woocommerce-product-gallery__wrapper {
  position: relative !important;
}

/* Show first image by default (for single image products) */
.woocommerce-product-gallery__wrapper > div.woocommerce-product-gallery__image {
  display: block !important;
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100% !important;
  float: none !important;
}

/* Hide non-active slides when slider is active (multiple images) */
.woocommerce-product-gallery__wrapper[style*="width"] > div.woocommerce-product-gallery__image:not(.flex-active-slide) {
  display: none !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Show only active slide when slider exists */
.woocommerce-product-gallery__wrapper[style*="width"] > div.woocommerce-product-gallery__image.flex-active-slide {
  display: block !important;
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce-product-gallery .flex-control-nav,
.woocommerce-product-gallery .flex-direction-nav {
  z-index: 5;
}

/* Ensure images in active slide display properly */
.woocommerce-product-gallery__wrapper > div.flex-active-slide img {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  max-height: 600px;
  background-color: #e7e7e7;
}

/* Override FlexSlider inline width styles */
.woocommerce-product-gallery__wrapper[style] {
  width: 100% !important;
  transform: none !important;
  transition: none !important;
}

.woocommerce-product-gallery__trigger {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: none;
  padding: 0;
  transition: all var(--transition-fast);
}

.woocommerce-product-gallery__trigger:hover {
  background-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.woocommerce-product-gallery__trigger span {
  display: none;
}

.woocommerce-product-gallery__trigger::before {
  content: '\f424';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 18px;
  color: var(--color-primary);
}

.woocommerce-product-gallery__trigger:hover::before {
  color: white;
}

.flex-control-thumbs {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  overflow-x: auto;
  padding: 0 var(--spacing-sm);
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.flex-control-thumbs li {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

@media (max-width: 640px) {
  .flex-control-thumbs {
    gap: var(--spacing-xs);
    padding: 0 var(--spacing-xs);
  }
  
  .flex-control-thumbs li {
    width: 60px;
    height: 60px;
  }
}

.flex-control-thumbs li:hover,
.flex-control-thumbs li.flex-active {
  border-color: var(--color-primary);
}

.flex-control-thumbs li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Summary */
.summary {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.product_title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin: 0;
  color: var(--color-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .summary {
    gap: var(--spacing-md);
  }
  
  .product_title {
    font-size: var(--font-size-2xl);
    line-height: 1.3;
  }
}

.woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.star-rating {
  position: relative;
  display: inline-block;
  font-family: 'star';
  font-size: 1em;
  color: var(--color-warning);
}

.woocommerce-review-link {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  padding: 0;
  margin-bottom: 0;
  line-height: 1.4;
}

.shop-main .price ins {
  font-size: var(--font-size-2xl);
}

.related .products .price ins {
  font-size: var(--font-size-2xl);
}

.single-product-main .price ins {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

@media (max-width: 640px) {
  .single-product-main .price ins {
    font-size: var(--font-size-2xl);
  }
  
  .price del {
    font-size: var(--font-size-base);
  }
}

/* Product Description */
.woocommerce-product-details__short-description {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

/* Product Meta */
.product_meta {
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.product_meta > span {
  display: block;
  margin-bottom: var(--spacing-xs);
}

.product_meta a {
  color: var(--color-text-secondary);
}

.product_meta a:hover {
  color: var(--color-primary);
}

/* Cart Form */
.cart {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 640px) {
  .cart {
    gap: var(--spacing-sm);
  }
}

.quantity {
  display: none;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.quantity input[type="number"] {
  width: 60px;
  padding: var(--spacing-sm);
  border: none;
  text-align: center;
  font-weight: var(--font-weight-medium);
}

.quantity input[type="button"] {
  width: 40px;
  padding: var(--spacing-sm);
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.quantity input[type="button"]:hover {
  background-color: var(--color-bg-tertiary);
}

/* Buy Now button - 2/3 width (66.666%) */
.buy_now_button {
  flex: 2;
  min-width: 200px;
  padding: 15px 30px;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--transition-fast);
  order: 1;
  max-width: 100%;
}

.buy_now_button:hover {
  background-color: #229954;
  box-shadow: var(--shadow-lg);
}

.buy_now_button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Add to Cart button - 1/3 width (33.333%) */
.single_add_to_cart_button {
  flex: 1;
  min-width: 150px;
  padding: 15px 30px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--transition-fast);
  order: 2;
  max-width: 100%;
}

.single_add_to_cart_button:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-lg);
}

/* Responsive layout for mobile */
@media (max-width: 640px) {
  .buy_now_button,
  .single_add_to_cart_button {
    flex: 1 1 100%;
    min-width: 100%;
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* Product Tabs */
.woocommerce-tabs {
  margin-top: var(--spacing-3xl);
  width: 100%;
  max-width: 100%;
  grid-column: 1 / -1;
  overflow-x: hidden;
}

.woocommerce-tabs ul.tabs {
  display: flex;
  gap: var(--spacing-sm);
  list-style: none;
  margin: 0 0 var(--spacing-xl) 0;
  padding: 0;
  border-bottom: 2px solid var(--color-border);
  -webkit-overflow-scrolling: touch;
}

.woocommerce-tabs ul.tabs li {
  margin-bottom: -2px;
  flex-shrink: 0;
}

.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 20px;
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .woocommerce-tabs {
    margin-top: var(--spacing-xl);
  }
  
  .woocommerce-tabs ul.tabs {
    gap: 0;
    margin: 0 0 var(--spacing-lg) 0;
  }
  
  .woocommerce-tabs ul.tabs li a {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

.woocommerce-tabs ul.tabs li a:hover,
.woocommerce-tabs ul.tabs li.active a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  text-decoration: none;
}

.woocommerce-Tabs-panel {
  padding: 24px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 1rem;
  line-height: 1.6;
}

.woocommerce-Tabs-panel h2 {
  margin-top: 0;
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.woocommerce-Tabs-panel h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.woocommerce-Tabs-panel p,
.woocommerce-Tabs-panel li {
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .woocommerce-Tabs-panel {
    padding: 16px;
    font-size: 0.95rem;
  }
  
  .woocommerce-Tabs-panel h2 {
    font-size: 1.25rem;
  }
  
  .woocommerce-Tabs-panel h3 {
    font-size: 1.1rem;
  }
}

/* Digital Download Info Tab */
.digital-download-info h3 {
  font-size: var(--font-size-xl);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.download-features {
  list-style: none;
  padding: 0;
  margin: var(--spacing-lg) 0;
}

.download-features li {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  color: var(--color-text);
}

.download-features li i {
  color: var(--color-success);
  font-size: var(--font-size-lg);
}

/* Related Products - Masonry Layout */
.related.products {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: var(--spacing-2xl);
}

/* Force related products to break out of grid and display full width */
.woocommerce div.product .related.products,
.single-product-wrapper .related.products,
section.related.products {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
}

.related.products ul.products {
  column-count: 2 !important;
  column-gap: var(--spacing-lg);
  display: block !important;
  width: 100% !important;
}

@media (min-width: 768px) {
  .related.products ul.products {
    column-count: 2 !important;
  }
}

@media (min-width: 1024px) {
  .related.products ul.products {
    column-count: 4 !important;
  }
}

.related.products ul.products > li.product {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: var(--spacing-lg);
  display: inline-block !important;
  width: 100% !important;
}

.related.products .product {
  position: relative;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-blur);
}

.related.products .product img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.related.products .product:hover {
  box-shadow: var(--shadow-blur);
  transform: translateY(-4px);
}
/*
Template Shops - WooCommerce Styles Part 2
Cart, Checkout, and Account Pages
*/

/* ==========================================================================
   Cart Page
   ========================================================================== */

.woocommerce-cart .cart-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
}

@media (min-width: 1024px) {
  .woocommerce-cart .cart-wrapper {
    grid-template-columns: 2fr 1fr;
  }
}

.woocommerce-cart-form {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
}

.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-xl);
}

.shop_table thead {
  background-color: var(--color-bg-tertiary);
}

.shop_table th,
.shop_table td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.shop_table th {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.cart_item {
  vertical-align: middle;
}

.product-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.product-name a {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

.product-name a:hover {
  color: var(--color-primary);
}

.product-price,
.product-subtotal {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.product-remove a {
  color: var(--color-error);
  font-size: var(--font-size-lg);
  text-decoration: none;
}

.product-remove a:hover {
  color: #dc2626;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.coupon {
  display: flex;
  gap: var(--spacing-sm);
}

.coupon input {
  flex: 1;
  max-width: 200px;
}

button[name="update_cart"] {
  background-color: var(--color-secondary);
}

button[name="update_cart"]:hover {
  background-color: var(--color-secondary-dark);
}

/* Cart Totals */
.cart-collaterals {
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-lg));
}

.cart_totals {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--color-border);
}

.cart_totals h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-xl);
}

.cart_totals .shop_table {
  margin-bottom: var(--spacing-lg);
}

.cart_totals th,
.cart_totals td {
  padding: var(--spacing-sm) 0;
  border: none;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  padding-top: var(--spacing-md);
  border-top: 2px solid var(--color-border);
}

.wc-proceed-to-checkout {
  margin-top: var(--spacing-lg);
}

.wc-proceed-to-checkout .checkout-button {
  width: 100%;
  padding: var(--spacing-md);
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wc-proceed-to-checkout .checkout-button:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Empty Cart */
.cart-empty {
  text-align: center;
  padding: var(--spacing-3xl);
  background-color: var(--color-bg-secondary);
  border-radius: var(--border-radius-lg);
}

.return-to-shop {
  margin-top: var(--spacing-xl);
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */

.woocommerce-checkout {
  max-width: 100%;
  margin: 0 auto;
}

.checkout-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
}

@media (min-width: 1024px) {
  .checkout-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

#customer_details {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.form-row {
  margin-bottom: var(--spacing-md);
}

.form-row label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.form-row label .required {
  color: var(--color-error);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--color-bg);
  color: var(--color-text);
}
.woocommerce-form-login__rememberme input {
  width: auto
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row-first,
.form-row-last {
  width: 100%;
}

@media (min-width: 640px) {
  .form-row-first,
  .form-row-last {
    width: calc(50% - var(--spacing-sm));
    display: inline-block;
  }
  
  .form-row-first {
    margin-right: var(--spacing-md);
  }
}

/* Order Review */
#order_review {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--color-border);
}

#order_review_heading {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.woocommerce-checkout-review-order-table {
  margin-bottom: var(--spacing-xl);
}

.woocommerce-checkout-review-order-table .product-name {
  font-weight: var(--font-weight-medium);
}

.woocommerce-checkout-review-order-table .product-total {
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  padding-top: var(--spacing-md);
  border-top: 2px solid var(--color-border);
}

/* Payment Methods */
#payment {
  background-color: var(--color-bg);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
}

.wc_payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-lg) 0;
}

.wc_payment_method {
  padding: var(--spacing-md);
  background-color: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.wc_payment_method:hover,
.wc_payment_method.active {
  border-color: var(--color-primary);
}

.wc_payment_method label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  margin: 0;
}

.wc_payment_method input[type="radio"] {
  width: auto;
}

.payment_box {
  padding: var(--spacing-md);
  margin-top: var(--spacing-md);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--border-radius);
}

.place-order {
  margin-top: var(--spacing-lg);
}

#place_order {
  width: 100%;
  padding: var(--spacing-md);
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

#place_order:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   My Account Page
   ========================================================================== */

.myaccount-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .myaccount-wrapper {
    grid-template-columns: 1fr;
  }
}

.woocommerce-MyAccount-navigation {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  height: fit-content;
  position: sticky;
  top: calc(var(--spacing-lg) + 60px);
  border: 1px solid var(--color-border);
}

.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce-MyAccount-navigation li {
  margin-bottom: var(--spacing-xs);
}

.woocommerce-MyAccount-navigation li:last-child {
  margin-bottom: 0;
}

.woocommerce-MyAccount-navigation a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--color-text);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

.woocommerce-MyAccount-navigation a:hover,
.woocommerce-MyAccount-navigation .is-active a {
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
}

.woocommerce-MyAccount-content {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
}

/* ==========================================================================
   Notices & Messages
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-radius: var(--border-radius);
  border-left: 4px solid;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.woocommerce-message {
  background-color: #d1fae5;
  border-left-color: var(--color-success);
  color: #065f46;
}

.woocommerce-info {
  background-color: #dbeafe;
  border-left-color: var(--color-info);
  color: #1e40af;
}

.woocommerce-error {
  background-color: #fee2e2;
  border-left-color: var(--color-error);
  color: #991b1b;
}

.woocommerce-message::before,
.woocommerce-info::before {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: var(--font-size-lg);
}

.woocommerce-message::before {
  content: '\f00c'; /* check icon */
}

.woocommerce-info::before {
  content: '\f05a'; /* info icon */
}

.woocommerce-error::before {
  content: '\f071'; /* exclamation icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: var(--font-size-lg);
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
  text-decoration: underline;
  font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   Widgets
   ========================================================================== */

/* Price Filter Widget */
.widget_price_filter .price_slider_wrapper {
  padding: var(--spacing-md) 0;
}

.widget_price_filter .price_label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-medium);
}

.widget_price_filter .button {
  width: 100%;
  margin-top: var(--spacing-md);
}

/* Product Categories Widget */
.widget_product_categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget_product_categories li {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.widget_product_categories li:last-child {
  border-bottom: none;
}

.widget_product_categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
}

.widget_product_categories a:hover {
  color: var(--color-primary);
}

.widget_product_categories .count {
  background-color: var(--color-bg-tertiary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
  .shop_table {
    font-size: var(--font-size-sm);
  }
  
  .shop_table thead {
    display: none;
  }
  
  .shop_table tbody tr {
    display: block;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
  }
  
  .shop_table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border: none;
  }
  
  .shop_table tbody td::before {
    content: attr(data-title);
    font-weight: var(--font-weight-semibold);
  }
  
  .product-thumbnail img {
    width: 60px;
    height: 60px;
  }
}

/* ==========================================================================
   Loading & Animations
   ========================================================================== */

.woocommerce .blockUI.blockOverlay {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.woocommerce .loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .woocommerce-message,
  .woocommerce-info,
  .add_to_cart_button,
  .product_type_simple,
  .woocommerce-MyAccount-navigation {
    display: none;
  }
}

.woocommerce-MyAccount-content fieldset {
  margin-bottom: 20px;
}
/* ==========================================================================
   Login & Password Input
   ========================================================================== */

.password-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input input {
  width: 100%;
  padding-right: 40px;
}

.show-password-input {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #7b7f85;
  transition: color var(--transition-fast);
}

.show-password-input:hover {
  color: var(--color-primary);
}

.show-password-input:hover:before {
  color: #d6d8da;
}

.show-password-input::before {
  content: '\f06e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  font-size: 18px;
}

.show-password-input[aria-pressed="true"]::before {
  content: '\f070';
}

/* ==========================================================================
   Login & Register Page
   ========================================================================== */

#customer_login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: flex-start;
}

@media (max-width: 768px) {
  #customer_login {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}

#customer_login .u-column1,
#customer_login .u-column2 {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
}

#customer_login h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

#customer_login .woocommerce-form-row {
  margin-bottom: var(--spacing-md);
}

#customer_login label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

#customer_login label .required {
  color: var(--color-error);
}

#customer_login input[type="text"],
#customer_login input[type="email"],
#customer_login input[type="password"] {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-base);
}

#customer_login input[type="text"]:focus,
#customer_login input[type="email"]:focus,
#customer_login input[type="password"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

#customer_login .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: 0;
  padding: 0;
}

#customer_login .woocommerce-form-login__rememberme input[type="checkbox"] {
  width: auto;
  margin: 0;
}

#customer_login .woocommerce-button,
#customer_login button[type="submit"] {
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  margin-top: 10px;
}

#customer_login .woocommerce-button:hover,
#customer_login button[type="submit"]:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

#customer_login .woocommerce-LostPassword {
  margin-top: var(--spacing-md);
  text-align: center;
}

#customer_login .woocommerce-LostPassword a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
}

#customer_login .woocommerce-LostPassword a:hover {
  text-decoration: underline;
}

#customer_login .woocommerce-privacy-policy-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: var(--spacing-md) 0;
  line-height: var(--line-height-relaxed);
}

#customer_login .woocommerce-privacy-policy-text a {
  color: var(--color-primary);
}

/* ==========================================================================
   Mobile Optimizations for Single Product Page
   ========================================================================== */

@media (max-width: 640px) {
  /* Ensure single product page container fits screen */
  .single-product-main {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .single-product-main .container {
    padding: 0 var(--spacing-sm);
    max-width: 100%;
  }
  
  /* Product wrapper mobile optimization */
  .single-product-wrapper {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }
  
  /* Product grid mobile optimization */
  .woocommerce div.product {
    gap: var(--spacing-md);
    padding: 0;
    margin-bottom: var(--spacing-xl);
  }
  
  /* Gallery mobile optimization */
  .woocommerce-product-gallery {
    margin: 0 calc(var(--spacing-sm) * -1);
    border-radius: 0;
    width: calc(100% + (var(--spacing-sm) * 2));
  }
  
  .woocommerce-product-gallery__image img {
    border-radius: 0;
  }
  
  /* Summary mobile optimization */
  .summary {
    padding: var(--spacing-md) 0;
  }
  
  /* Product meta mobile optimization */
  .product_meta {
    font-size: 0.9rem;
    padding-top: var(--spacing-md);
  }
  
  .product_meta > span {
    margin-bottom: var(--spacing-xs);
  }
  
  /* Short description mobile optimization */
  .woocommerce-product-details__short-description {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  /* Related products mobile optimization */
  .related.products {
    margin-top: var(--spacing-xl);
    overflow-x: hidden;
  }
  
  .related.products ul.products {
    column-count: 1 !important;
  }
  
  .related.products ul.products > li.product {
    margin-bottom: var(--spacing-md);
  }
}

/* ==========================================================================
   Thank You / Order Received Page
   ========================================================================== */

.thankyou-main {
  padding: var(--spacing-2xl) 0;
  min-height: 60vh;
}

.thankyou-wrapper {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Thank You Icon */
.thankyou-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-xl);
  font-size: 3rem;
}

.thankyou-icon.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
  animation: pulse-success 2s infinite;
}

.thankyou-icon.failed {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
}

.thankyou-icon.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

@keyframes pulse-success {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.4);
  }
}

/* Thank You Header */
.thankyou-header {
  margin-bottom: var(--spacing-2xl);
}

.thankyou-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.thankyou-message {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

/* Order Summary Card */
.order-summary-card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.order-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.order-summary-header h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

.order-number {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  background-color: rgba(99, 102, 241, 0.1);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
}

.order-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 640px) {
  .order-info-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

.order-info-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.info-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.info-label i {
  color: var(--color-primary);
}

.info-value {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.info-value.total {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Order Items Card */
.order-items-card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.order-items-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.order-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--color-bg);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

.order-item:hover {
  box-shadow: var(--shadow-sm);
}

.item-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin: 0 0 var(--spacing-xs);
}

.item-name a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.item-name a:hover {
  color: var(--color-primary);
}

.item-quantity {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.item-price {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  white-space: nowrap;
}

/* Downloads Card */
.order-downloads-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.order-downloads-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0 0 var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.downloads-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: var(--line-height-relaxed);
}

.downloads-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--color-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  flex: 1;
  min-width: 0;
}

.download-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-remaining {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.download-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.download-button:hover {
  color: #ffffff;
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Next Steps Section */
.thankyou-next-steps {
  margin-bottom: var(--spacing-2xl);
  text-align: left;
}

.thankyou-next-steps h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 768px) {
  .next-steps-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

.step-item {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: all var(--transition-fast);
}

.step-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  font-size: 1.5rem;
  color: var(--color-primary);
}

.step-item h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-sm);
}

.step-item p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: var(--line-height-relaxed);
}

/* Thank You Actions */
.thankyou-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.thankyou-actions .button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.thankyou-actions .button-primary {
  background-color: var(--color-primary);
  color: white;
}

.thankyou-actions .button-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.thankyou-actions .button-secondary {
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.thankyou-actions .button-secondary:hover {
  background-color: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .thankyou-main {
    padding: var(--spacing-xl) 0;
  }

  .thankyou-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .thankyou-title {
    font-size: var(--font-size-2xl);
  }

  .thankyou-message {
    font-size: var(--font-size-base);
  }

  .order-summary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .order-item {
    flex-wrap: wrap;
  }

  .item-image {
    width: 60px;
    height: 60px;
  }

  .item-price {
    width: 100%;
    text-align: right;
    margin-top: var(--spacing-xs);
  }

  .download-item {
    flex-direction: column;
    align-items: stretch;
  }

  .download-button {
    width: 100%;
    justify-content: center;
  }

  .thankyou-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .thankyou-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* Dark Mode Support */
body.dark-mode .order-summary-card,
body.dark-mode .order-items-card,
body.dark-mode .step-item {
  background-color: #1f2937;
  border-color: #374151;
}

body.dark-mode .order-item {
  background-color: #111827;
}

body.dark-mode .download-item {
  background-color: #111827;
  border-color: #374151;
}

body.dark-mode .order-downloads-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

body.dark-mode .thankyou-actions .button-secondary {
  background-color: #1f2937;
  border-color: #374151;
}

body.dark-mode .thankyou-actions .button-secondary:hover {
  background-color: #111827;
}

/* ==========================================================================
   CHECKOUT PAGE LAYOUT & CUSTOMIZATION
   ========================================================================== */

/* Main checkout form grid layout */
form.checkout.woocommerce-checkout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  form.checkout.woocommerce-checkout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Customer details on the left */
#customer_details {
  order: 1;
  display: block !important;
}

#customer_details .col-1,
#customer_details .col-2 {
  width: 100% !important;
  float: none !important;
}

/* Order review heading and section on the right */
#order_review_heading {
  order: 2;
  display: none;
}

#order_review {
  order: 3;
  position: sticky;
  top: 120px;
  align-self: start;
}

@media (min-width: 992px) {
  #order_review_heading,
  #order_review {
    grid-column: 2;
  }
  
  #customer_details {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
}

/* Order review card styling */
#order_review {
  background: var(--color-bg-secondary, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
  padding: 1.5rem;
}

#order_review::before {
  content: 'Your Order';
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text, #111827);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

/* Hide billing fields except email */
.woocommerce-billing-fields__field-wrapper .cvn-billing-hidden,
#billing_first_name_field,
#billing_last_name_field,
#billing_company_field,
#billing_country_field,
#billing_address_1_field,
#billing_address_2_field,
#billing_city_field,
#billing_state_field,
#billing_postcode_field,
#billing_phone_field {
  display: none !important;
}

/* Make sure email is visible */
#billing_email_field {
  display: block !important;
  width: 100% !important;
}

/* Hide Billing details heading */
.woocommerce-billing-fields > h3 {
  display: none !important;
}

/* Product Thumbnail in Order Table */
.woocommerce-checkout-review-order-table .product-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.woocommerce-checkout-review-order-table .product-thumbnail {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
}

.woocommerce-checkout-review-order-table .product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woocommerce-checkout-review-order-table .product-info {
  flex: 1;
  min-width: 0;
}

.woocommerce-checkout-review-order-table .product-info .product-title {
  font-weight: 500;
  color: var(--color-text, #111827);
  margin-bottom: 4px;
  display: block;
}

.woocommerce-checkout-review-order-table .product-quantity {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6b7280);
}

/* Free Download Button */
#place_order.free-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  margin-top: 20px;
}

#place_order.free-download:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

#place_order.free-download::after {
  content: none;
}

/* Place Order Loading State */
#place_order {
  position: relative;
  transition: all 0.3s ease;
}

#place_order.loading {
  pointer-events: none;
  opacity: 0.8;
  padding-left: 50px;
}

#place_order.loading::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: cvn-spin 0.8s linear infinite;
}

@keyframes cvn-spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Checkout Processing Overlay */
.cvn-checkout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cvn-checkout-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cvn-checkout-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--color-primary, #6366f1);
  border-radius: 50%;
  animation: cvn-spin 0.8s linear infinite;
  margin-bottom: 20px;
}

.cvn-checkout-text {
  font-size: 18px;
  color: #333;
  font-weight: 500;
}

/* Dark mode support for checkout */
body.dark-mode #order_review {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode #order_review::before {
  color: #f3f4f6;
  border-color: #374151;
}

body.dark-mode .woocommerce-checkout-review-order-table .product-thumbnail {
  background: #374151;
  border-color: #4b5563;
}

body.dark-mode .cvn-checkout-overlay {
  background: rgba(17, 24, 39, 0.95);
}

body.dark-mode .cvn-checkout-text {
  color: #f3f4f6;
}

body.dark-mode .cvn-checkout-spinner {
  border-color: #374151;
  border-top-color: var(--color-primary, #6366f1);
}

/* Responsive Mobile for Checkout */
@media (max-width: 991px) {
  #order_review {
    position: relative;
    top: auto;
  }
}

/* ==========================================================================
   FREE PRODUCT STYLES
   ========================================================================== */

/* Free Price Badge */
.price.free-price {
  color: var(--color-success, #10b981) !important;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.single-product-main .price.free-price {
  font-size: var(--font-size-2xl);
}

/* Hide Add to Cart button for free products on archive pages */
.product.is-free-product .add_to_cart_button,
.product.is-free-product .product_type_simple,
.product.is-free-product .product_type_variable {
  display: none !important;
}

/* Hide Add to Cart button for free products on single product page */
body.free-product .single_add_to_cart_button {
  display: none !important;
}

/* Free Download Button Styling */
.free-download-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  flex: 1 !important;
  width: 100% !important;
}

.free-download-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* Adjust cart form layout for free products */
body.free-product .cart {
  flex-direction: column;
  align-items: flex-start;
}

body.free-product .cart .quantity {
  display: none;
}

body.free-product .cart .buy_now_button {
  width: 100%;
  max-width: 300px;
}

/* ==========================================================================
   PRODUCT VIDEO STYLES
   ========================================================================== */

/* Single Product Page - Video Overlay on Gallery */
.woocommerce-product-gallery {
  position: relative;
}

/* Ensure gallery has proper positioning context */
.single-product .woocommerce-product-gallery {
  position: relative;
  z-index: 1;
}

.product-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  background-color: #000;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.product-video-overlay .product-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.video-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 110;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.video-close-btn i {
  font-size: 18px;
  color: #333;
}

.video-close-btn:hover {
  background: #ff4444;
  transform: scale(1.1);
}

.video-close-btn:hover i {
  color: #ffffff;
}

/* Play button on gallery - centered */
.gallery-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gallery-video-play-btn i {
  font-size: 28px;
  color: var(--color-primary);
  margin-left: 4px;
}

.gallery-video-play-btn:hover {
  background: var(--color-primary);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.gallery-video-play-btn:hover i {
  color: #ffffff;
}

/* Archive Product Page - Video on Hover */
.product-hover-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.product .woocommerce-LoopProduct-link,
.product .woocommerce-loop-product__link {
  position: relative;
  display: block;
}

.product img.attachment-woocommerce_thumbnail {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.archive-product-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #000;
}

/* Video indicator badge on archive products - only show on first link that contains the video */
.product:has(.product-hover-video) > .woocommerce-LoopProduct-link:first-of-type::after {
  content: '\f04b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: var(--spacing-md, 16px);
  right: var(--spacing-md, 16px);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-primary);
  z-index: 15;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.product:has(.product-hover-video):hover > .woocommerce-LoopProduct-link:first-of-type::after {
  background: var(--color-primary);
  color: #ffffff;
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-video-play-btn {
    width: 60px;
    height: 60px;
  }
  
  .gallery-video-play-btn i {
    font-size: 22px;
    margin-left: 3px;
  }
  
  .video-close-btn {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }
  
  .video-close-btn i {
    font-size: 16px;
  }
  
  /* Disable hover video on mobile/tablet */
  .product-hover-video {
    display: none !important;
  }
  
  .product:has(.product-hover-video) > .woocommerce-LoopProduct-link:first-of-type::after {
    display: none;
  }
}

/* Dark mode support for video */
body.dark-mode .gallery-video-play-btn {
  background: rgba(255, 255, 255, 0.9);
}

body.dark-mode .gallery-video-play-btn:hover {
  background: var(--color-primary);
}

body.dark-mode .video-close-btn {
  background: rgba(255, 255, 255, 0.9);
}

body.dark-mode .video-close-btn:hover {
  background: var(--color-primary);
}

body.dark-mode .product:has(.product-hover-video) > .woocommerce-LoopProduct-link:first-of-type::after {
  background: rgba(255, 255, 255, 0.9);
}

body.dark-mode .product:has(.product-hover-video):hover > .woocommerce-LoopProduct-link:first-of-type::after {
  background: var(--color-primary);
}