/**
 * Resham Shop/Category Archive Page Styles
 * Grid layout, sidebar filters, product badges, and responsive design
 */

/* ============================================
   SHOP CONTAINER & MAIN LAYOUT
   ============================================ */

.resham-shop-container {
  max-width: 1400px;
  margin: 0 auto;
}

.resham-shop-main {
  padding-top: 0;
}

/* ============================================
   SHOP HERO SECTION (SIMPLE, LIKE PRODUCT PAGE)
   ============================================ */

.resham-shop-hero {
  background: #f4ece8;
  padding: 0px 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
  margin-top: 10px;
}

.resham-shop-hero-content {
  max-width: 1400px;
  margin: 0 auto;
}

.resham-hero-inner {
  text-align: left;
}

.resham-hero-title {
  font-size: 32px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
  letter-spacing: 0;
  text-transform: none;
}

.resham-shop-hero-content .term-description {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.resham-shop-hero-content p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   MAIN LAYOUT: SIDEBAR + PRODUCTS
   ============================================ */

.resham-shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: flex-start;
}

/* ============================================
   SIDEBAR STYLING
   ============================================ */

.resham-shop-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.resham-sidebar-content {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

/* Scrollbar styling */
.resham-shop-sidebar::-webkit-scrollbar {
  width: 8px;
}

.resham-shop-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.resham-shop-sidebar::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.resham-shop-sidebar::-webkit-scrollbar-thumb:hover {
  background: #c97899;
}

.resham-sidebar-widget {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
}

.resham-sidebar-widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.resham-widget-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Category Links in Sidebar */
.resham-sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resham-sidebar-widget ul li {
  margin: 0 0 10px 0;
  padding: 0;
}

.resham-sidebar-widget ul li a {
  display: block;
  color: #666;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.resham-sidebar-widget ul li a:hover {
  color: #c97899;
  background: rgba(201, 120, 153, 0.05);
  padding-left: 12px;
}

.resham-sidebar-widget ul li.current a {
  color: #c97899;
  font-weight: 600;
  background: rgba(201, 120, 153, 0.08);
}

/* Category Toggle Button */
.resham-categories-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.resham-categories-list > li {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.resham-categories-list .category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e8e8e8;
}

.resham-categories-list > li:last-child .category-header {
  border-bottom: none;
}

.resham-categories-list .category-header a {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 6px 0;
}

.resham-categories-list .category-header a:hover {
  color: #c97899;
}

.resham-categories-list .category-header a.current,
.resham-categories-list > li.current .category-header a {
  color: #c97899;
  font-weight: 600;
}

.resham-categories-list .category-toggle {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #c97899;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, color 0.3s ease;
  min-width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: 1;
  border-radius: 0;
}

.resham-categories-list .category-toggle:hover {
  color: #999;
  background-color: transparent;
}

.resham-categories-list .category-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(45deg);
}

.resham-categories-list .toggle-icon {
  display: block;
  transition: transform 0.3s ease;
  font-size: 32px;
  line-height: 1;
  font-weight: bold;
}

/* Sub-categories List */
.resham-categories-list .subcategories-list {
  list-style: none !important;
  padding: 0 0 0 20px !important;
  margin: 6px 0 0 0 !important;
  border: none !important;
}

.resham-categories-list .subcategories-list li {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  list-style: none !important;
}

.resham-categories-list .subcategories-list a {
  display: block;
  color: #666;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 0;
  transition: all 0.3s ease;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
}

.resham-categories-list .subcategories-list a:hover {
  color: #c97899;
  border-left-color: #c97899;
}

.resham-categories-list .subcategories-list li.current a {
  color: #c97899;
  font-weight: 500;
  border-left-color: #c97899;
}

/* ============================================
   PRODUCTS AREA
   ============================================ */

.resham-products-area {
  width: 100%;
}

/* Top Bar with Sorting and Results */
.resham-shop-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: #f9f9f9;
  border-radius: 6px;
  gap: 20px;
  flex-wrap: wrap;
}

.resham-results-count {
  color: #666;
  font-size: 13px;
}

.resham-results-count .woocommerce-result-count {
  margin: 0;
}

.resham-catalog-ordering {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resham-catalog-ordering .woocommerce-ordering {
  margin: 0;
}

.resham-catalog-ordering select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.resham-catalog-ordering select:hover,
.resham-catalog-ordering select:focus {
  border-color: #c97899;
  outline: none;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.resham-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

/* Individual Product Item */
.resham-products-grid .product {
  position: relative;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.resham-products-grid .product:hover {
  border-color: #c97899;
  box-shadow: 0 6px 20px rgba(201, 120, 153, 0.12);
  transform: translateY(-4px);
}

/* Product Image */
.resham-products-grid .product-image-wrapper,
.resham-products-grid .woocommerce-product-gallery {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #f5f5f5;
  aspect-ratio: 1;
}

.resham-products-grid .product-image-wrapper img,
.resham-products-grid .woocommerce-product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.resham-products-grid .product:hover .product-image-wrapper img,
.resham-products-grid .product:hover .woocommerce-product-gallery img {
  transform: scale(1.08);
}

/* Product Info */
.resham-products-grid .product-info {
  padding: 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.resham-products-grid .product-title {
  font-size: 20px;
  font-weight: 300;
  color: #333;
  margin: 0 0 8px 0;
  line-height: 1.4;
  min-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resham-products-grid .product-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.resham-products-grid .product-title a:hover {
  color: #c97899;
}

.resham-products-grid .product-price {
  color: #333;
  font-size: 18px;
  margin: 12px 0;
  font-weight: 300;
  line-height: 1.3;
}

.resham-products-grid .product-price .amount {
  color: #333;
}

.resham-products-grid .product-price del {
  opacity: 0.6;
  margin-right: 8px;
  font-size: 16px;
  color: #999;
}

.resham-products-grid .product-price ins {
  text-decoration: none;
  color: #c97899;
  font-weight: 700;
}

/* Product Buttons */
.resham-products-grid .product-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.resham-products-grid .resham-product-buy-now,
.resham-products-grid .product-add-to-cart .button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #c97899;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: auto;
}

.resham-products-grid .resham-product-buy-now {
  background: #c97899;
  color: white;
  opacity: 1;
}

.resham-products-grid .resham-product-buy-now:hover {
  background: #b86483;
  border-color: #b86483;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 120, 153, 0.3);
}

.resham-products-grid .resham-product-buy-now:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.resham-products-grid .product-add-to-cart .button {
  background: white;
  color: #c97899;
  opacity: 0.6;
}

.resham-products-grid .product-add-to-cart .button:hover {
  background: rgba(201, 120, 153, 0.05);
  border-color: #c97899;
  transform: translateY(-2px);
  opacity: 0.85;
}

.resham-products-grid .product-add-to-cart .button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   PRODUCT BADGES
   ============================================ */

/* Badge Container */
.resham-product-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

/* Base Badge Styling */
.resham-product-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Sale Badge */
.resham-product-badge.sale {
  background: #c97899;
  color: white;
  animation: pulse-sale 0.6s ease-in-out infinite;
}

/* Sold Out Badge */
.resham-product-badge.sold-out {
  background: #999;
  color: white;
}

/* New Badge */
.resham-product-badge.new {
  background: #4a90e2;
  color: white;
}

/* Discount Percentage Badge */
.resham-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 50px;
  height: 50px;
  background: #c97899;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(201, 120, 153, 0.3);
}

/* Pulse Animation for Sale Badge */
@keyframes pulse-sale {
  0% {
    box-shadow: 0 2px 6px rgba(201, 120, 153, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(201, 120, 153, 0.6);
  }
  100% {
    box-shadow: 0 2px 6px rgba(201, 120, 153, 0.3);
  }
}

/* ============================================
   PAGINATION
   ============================================ */

.woocommerce-pagination,
.woocommerce-pagenavi {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid #e8e8e8;
}

.woocommerce-pagination .page-numbers,
.woocommerce-pagenavi .page-numbers {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
}

.woocommerce-pagination .page-numbers:hover,
.woocommerce-pagenavi .page-numbers:hover {
  border-color: #c97899;
  color: #c97899;
  background: rgba(201, 120, 153, 0.05);
}

.woocommerce-pagination .page-numbers.current,
.woocommerce-pagenavi .page-numbers.current {
  background: #c97899;
  color: white;
  border-color: #c97899;
}

.woocommerce-pagination .prev,
.woocommerce-pagination .next,
.woocommerce-pagenavi .prev,
.woocommerce-pagenavi .next {
  border-color: #c97899;
  color: #c97899;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet: 768px and below */
@media (max-width: 1024px) {
  .resham-shop-layout {
    grid-template-columns: 220px 1fr;
    gap: 30px;
  }

  .resham-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .resham-shop-container {
    padding: 30px 15px;
  }

  .resham-shop-header {
    margin-bottom: 30px;
  }

  .resham-shop-header-content h1,
  .resham-shop-header-content .woocommerce-products-header__title {
    font-size: 26px;
  }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
  .resham-shop-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .resham-shop-sidebar {
    position: static;
    top: auto;
  }

  .resham-sidebar-content {
    padding: 20px;
  }

  .resham-products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .resham-shop-topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 15px;
  }

  .resham-results-count,
  .resham-catalog-ordering {
    width: 100%;
  }

  .resham-catalog-ordering {
    flex-direction: column;
  }

  .resham-catalog-ordering select {
    width: 100%;
  }

  .resham-shop-hero {
    padding: 30px 20px;
    margin-bottom: 30px;
  }

  .resham-hero-title {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .resham-product-badges {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .resham-products-grid .product-info {
    padding: 15px;
  }

  .resham-products-grid .product-title {
    font-size: 13px;
  }

  .resham-products-grid .product-price {
    font-size: 16px;
    margin: 10px 0;
  }

  .resham-products-grid .product-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
  }

  .resham-products-grid .resham-product-buy-now,
  .resham-products-grid .product-add-to-cart .button {
    font-size: 11px;
    padding: 9px 10px;
  }
}

/* Small Mobile: 480px and below */
@media (max-width: 480px) {
  .resham-shop-container {
    padding: 0;
  }

  .resham-shop-hero {
    padding: 25px 15px;
    margin-bottom: 25px;
  }

  .resham-hero-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .resham-sidebar-content {
    padding: 15px;
  }

  .resham-widget-title {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .resham-products-grid {
    gap: 15px;
    padding: 0 10px;
  }

  .resham-sidebar-widget {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .resham-shop-topbar {
    padding: 10px 12px;
  }

  .resham-products-grid .product-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .resham-products-grid .resham-product-buy-now,
  .resham-products-grid .product-add-to-cart .button {
    font-size: 10px;
    padding: 8px 8px;
  }
}

/* ============================================
   NO PRODUCTS FOUND
   ============================================ */

.woocommerce-info,
.woocommerce-error,
.woocommerce-message {
  background: #f0f0f0;
  color: #666;
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
  border-left: 4px solid #c97899;
}


/* ============================================
   FILTER WIDGETS (WooCommerce Default)
   ============================================ */

.widget_layered_nav ul,
.widget_price_filter .price_slider {
  margin: 0;
  padding: 0;
}

.widget_layered_nav ul li {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
}

.widget_layered_nav ul li a {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.widget_layered_nav ul li a:hover {
  color: #c97899;
}

.widget_layered_nav ul li.chosen a {
  color: #c97899;
  font-weight: 600;
}

/* ============================================
   CHECKBOX FILTERS
   ============================================ */

.resham-filter-checkbox {
  display: flex;
  align-items: center;
  margin: 0 0 10px 0;
  padding: 4px 0;
}

.resham-filter-checkbox input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #c97899;
}

.resham-filter-checkbox label {
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: color 0.3s ease;
  user-select: none;
}

.resham-filter-checkbox input[type="checkbox"]:checked + label {
  color: #c97899;
  font-weight: 600;
}

.resham-filter-checkbox label:hover {
  color: #c97899;
}

/* ============================================
   PRICE RANGE FILTER
   ============================================ */

.resham-price-filter {
  margin: 0;
  padding: 0;
}

.resham-price-slider-container {
  margin-top: 15px;
}

.resham-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.resham-price-input-group {
  display: flex;
  flex-direction: column;
}

.resham-price-input-group label {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.resham-price-input-group input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  transition: border-color 0.3s ease;
}

.resham-price-input-group input:focus {
  outline: none;
  border-color: #c97899;
}

.resham-price-range-display {
  font-size: 13px;
  color: #333;
  margin-top: 8px;
  padding: 8px;
  background: rgba(201, 120, 153, 0.05);
  border-radius: 4px;
}

input[type="range"].resham-price-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 15px 0 10px 0;
}

input[type="range"].resham-price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c97899;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"].resham-price-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c97899;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ANIMATION
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resham-products-grid .product {
  animation: fadeIn 0.4s ease-out;
}

.resham-products-grid .product:nth-child(1) { animation-delay: 0s; }
.resham-products-grid .product:nth-child(2) { animation-delay: 0.05s; }
.resham-products-grid .product:nth-child(3) { animation-delay: 0.1s; }
.resham-products-grid .product:nth-child(4) { animation-delay: 0.15s; }
.resham-products-grid .product:nth-child(5) { animation-delay: 0.2s; }
.resham-products-grid .product:nth-child(6) { animation-delay: 0.25s; }
