/* 
 * Shop Styling for Light Color Scheme
 * Customized for bread acid shop with warm brown tones
 */

/* Hide original sidebar elements */
.shop-sidebar-header {
  display: none !important;
}

.shop-sidebar-content {
  display: none !important;
}

/* Shop Container Layout */
.shop-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin: 0 auto;
  padding: 0;
}

/* Sidebar Styling */
.shop-sidebar {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: sticky;
  top: 30px;
  height: max-content;
}

.sidebar-header {
  background: linear-gradient(to right, var(--primary-color), var(--primary-hover));
  padding: 20px;
  color: white;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 24px;
}

.sidebar-inner {
  padding: 20px;
}

/* Widget Styling */
.shop-sidebar .widget {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.shop-sidebar .widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.shop-sidebar .widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
  position: relative;
  display: flex;
  align-items: center;
}

.shop-sidebar .widget-title::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background-color: var(--primary-color);
  opacity: 0.3;
  margin-left: 10px;
}

/* Main Shop Area */
.shop-main {
  width: 100%;
}

.shop-header {
  margin-bottom: 30px;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.woocommerce-products-header__title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--primary-color);
}

.term-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 20px;
}

.storefront-sorting {
  justify-items: center;
  justify-self: center;
  display: ruby;
}

.term-description p:last-child {
  margin-bottom: 0;
}

/* Filter Bar */
.shop-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  background-color: var(--card-background);
  padding: 15px 20px;
  padding-bottom: 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.storefront-sorting {
  margin-bottom: 15px !important;
}

.woocommerce-result-count {
  margin: 0 !important;
  color: var(--text-light);
  font-size: 14px;
}

/* Dropdown Styling */
.woocommerce-ordering select {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 15px;
  border-radius: var(--border-radius);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b5d33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 35px;
  transition: var(--transition);
}

.woocommerce-ordering select:hover, 
.woocommerce-ordering select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(139, 93, 51, 0.1);
  outline: none;
}

/* Products Loading State */
.products-wrapper {
  position: relative;
  min-height: 200px;
}

.shop-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border-radius: var(--border-radius);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.shop-loading.active {
  opacity: 1;
  visibility: visible;
}

.shop-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139, 93, 51, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Product Price Styling */
.woocommerce ul.products li.product .price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 18px;
  margin: 10px 0;
}

.woocommerce ul.products li.product .price del {
  color: var(--text-light);
  font-weight: 400;
  font-size: 14px;
  margin-right: 5px;
  text-decoration: line-through;
  opacity: 0.7;
}

.woocommerce ul.products li.product .price ins {
  text-decoration: none;
  font-weight: 700;
}

/* Product Filter Button */
.price_slider_amount .button {
  background-color: var(--primary-color) !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  border-radius: var(--border-radius) !important;
  transition: var(--transition) !important;
  text-transform: uppercase;
  font-size: 14px !important;
  border: none !important;
  cursor: pointer;
  margin-top: 10px !important;
  box-shadow: var(--shadow-sm);
}

.price_slider_amount .button:hover {
  background-color: var(--primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Category List Styling */
.product-categories .cat-item,
.widget_product_categories li {
  position: relative;
  padding-left: 15px !important;
  margin-bottom: 8px;
  list-style-type: none;
}

.product-categories .cat-item::before,
.widget_product_categories li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 20px;
  line-height: 1;
  top: 0;
}

.product-categories .children,
.widget_product_categories .children {
  margin-top: 8px;
  margin-left: 8px !important;
}

.product-categories .cat-item.cat-parent > a::after,
.widget_product_categories li.cat-parent > a::after,
.product-categories .cat-item::before,
.widget_product_categories li > a::before {
  display: none !important;
}

/* Product Count Badge */
.count {
  background-color: rgba(139, 93, 51, 0.1) !important;
  color: var(--primary-color) !important;
  font-size: 12px !important;
  padding: 2px 6px !important;
  border-radius: 12px !important;
  margin-left: 5px;
  display: inline-block;
}

/* Price Slider Styling */
.ui-slider-range {
  background: var(--primary-color) !important;
}

.ui-slider-handle {
  background: white !important;
  border: 2px solid var(--primary-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* Product Grid Item Styling */
.woocommerce ul.products li.product {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: var(--transition);
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 93, 51, 0.2);
}

.woocommerce ul.products li.product img {
  border-radius: calc(var(--border-radius) - 4px);
  margin-bottom: 15px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--text-color);
  font-weight: 600;
  font-size: 16px;
  padding-bottom: 0;
}

.woocommerce ul.products li.product .button {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  transition: var(--transition);
}

.woocommerce ul.products li.product .button:hover {
  background-color: var(--primary-hover);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .shop-container {
      grid-template-columns: 240px 1fr;
      gap: 20px;
  }
  
  .woocommerce ul.products {
      grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media screen and (max-width: 768px) {
  .shop-container {
      grid-template-columns: 1fr;
  }
  
  .sidebar-toggle {
      display: block;
  }
  
  .sidebar-inner {
      display: none;
  }
  
  .sidebar-inner.open {
      display: block;
  }
  
  .woocommerce ul.products {
      grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 480px) {
  .shop-filter-bar {
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
  }
  
  .woocommerce-ordering {
      width: 100%;
  }
  
  .woocommerce-ordering select {
      width: 100%;
  }
  
  .woocommerce ul.products {
      grid-template-columns: 1fr !important;
  }
  
  .woocommerce-products-header__title {
      font-size: 24px;
  }
}