:root {
  --biz-primary: #111827;
  --biz-accent: #3b82f6;
  --biz-accent-hover: #2563eb;
  --biz-text: #4b5563;
  --biz-bg: #ffffff;
  --biz-surface: #f3f4f6;
  --biz-border: #e5e7eb;
  --biz-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --biz-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --biz-radius: 16px;
  --biz-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.biz-showcase {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--biz-text);
  position: relative;
  width: 100%;
}

/* Grid Layout */
.biz-showcase.biz-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 24px;
}

/* Masonry Layout */
.biz-masonry {
  column-count: var(--cols, 3);
  column-gap: 24px;
}
.biz-masonry .biz-card {
  break-inside: avoid;
  margin-bottom: 24px;
}

/* Horizontal List Layout */
.biz-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.biz-list .biz-card {
  display: flex !important;
  flex-direction: row;
  height: auto;
  align-items: stretch;
}
.biz-list .biz-card-image {
  flex: 0 0 320px;
  max-width: 320px;
  border-right: 1px solid var(--biz-border);
}
.biz-list .biz-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.biz-list .biz-card-overlay-actions {
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .biz-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .biz-masonry {
    column-count: 2 !important;
  }
  .biz-list .biz-card {
    flex-direction: column;
  }
  .biz-list .biz-card-image {
    flex: auto;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--biz-border);
  }
}

@media (max-width: 480px) {
  .biz-grid {
    grid-template-columns: 1fr !important;
  }
  .biz-masonry {
    column-count: 1 !important;
  }
}

/* Slider Layout (CSS Scroll Snap) */
.biz-showcase.biz-slider .biz-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 24px;
  padding-bottom: 24px;
  scrollbar-width: none; /* Firefox */
}
.biz-showcase.biz-slider .biz-slider-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
.biz-showcase.biz-slider .biz-card {
  scroll-snap-align: start;
  flex-shrink: 0;
}
.biz-showcase.biz-slider.columns-1 .biz-card { min-width: 100%; }
.biz-showcase.biz-slider.columns-2 .biz-card { min-width: calc(50% - 12px); }
.biz-showcase.biz-slider.columns-3 .biz-card { min-width: calc(33.333% - 16px); }
.biz-showcase.biz-slider.columns-4 .biz-card { min-width: calc(25% - 18px); }
.biz-showcase.biz-slider.columns-5 .biz-card { min-width: calc(20% - 19.2px); }
.biz-showcase.biz-slider.columns-6 .biz-card { min-width: calc(16.666% - 20px); }

@media (max-width: 1024px) {
  .biz-showcase.biz-slider .biz-card { min-width: calc(50% - 12px) !important; }
}
@media (max-width: 640px) {
  .biz-showcase.biz-slider .biz-card { min-width: 85% !important; }
}

/* Navigation Buttons */
.biz-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--biz-bg);
  color: var(--biz-primary);
  border: 1px solid var(--biz-border);
  box-shadow: var(--biz-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--biz-transition);
}
.biz-slider-nav:hover {
  background: var(--biz-accent);
  color: white;
  border-color: var(--biz-accent);
}
.biz-slider-nav svg {
  width: 20px;
  height: 20px;
}
.biz-slider-nav.prev { left: -22px; }
.biz-slider-nav.next { right: -22px; }

/* Images and Hover Flip */
.biz-image-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}
.biz-primary-image,
.biz-secondary-image {
  max-width: 100%;
  height: auto;
  transition: opacity 0.4s ease;
}
.biz-image-cover .biz-primary-image,
.biz-image-cover .biz-secondary-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.biz-secondary-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 2;
}
.biz-card:hover .biz-secondary-image {
  opacity: 1;
}

/* Product Card */
.biz-card {
  background: var(--biz-bg);
  border-radius: var(--biz-radius);
  overflow: hidden;
  box-shadow: var(--biz-shadow);
  transition: var(--biz-transition);
  border: 1px solid var(--biz-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.biz-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--biz-shadow-hover);
}

/* Card Image & Overlay */
.biz-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background-color: transparent;
}
.biz-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.biz-card:hover .biz-card-image img {
  transform: scale(1.04);
}
.biz-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.8) 0%, rgba(17, 24, 39, 0) 50%);
  opacity: 0;
  transition: var(--biz-transition);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
}
.biz-card:hover .biz-card-overlay {
  opacity: 1;
}
.biz-card-overlay span {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.biz-card:hover .biz-card-overlay span {
  transform: translateY(0);
}

/* Card Content */
.biz-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.biz-card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--biz-accent);
  margin-bottom: 8px;
}
.biz-card-category a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.biz-card-category a:hover {
  color: var(--biz-accent-hover);
}

.biz-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px 0;
  color: var(--biz-primary);
}
.biz-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.biz-card-title a:hover {
  color: var(--biz-accent);
}

.biz-card-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--biz-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.biz-card-price del {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}
.biz-card-price ins {
  text-decoration: none;
  color: var(--biz-accent);
}

/* Actions Area */
.biz-card-actions {
  margin-top: auto;
}
.biz-card-actions .button {
  display: block;
  width: 100%;
  text-align: center;
  background-color: var(--biz-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--biz-transition);
  text-decoration: none;
  cursor: pointer;
}
.biz-card-actions .button:hover {
  background-color: var(--biz-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Category Cards Special Styling */
.biz-category-card .biz-card-image {
  aspect-ratio: 1/1; /* Square for categories */
}
.biz-category-content {
  align-items: center;
  text-align: center;
  padding: 30px 24px;
}
.biz-category-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: #9ca3af;
  margin-top: 4px;
  background: var(--biz-surface);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
}
.biz-category-card:hover .biz-category-count {
  background: var(--biz-accent);
  color: #fff;
}

/* -------------------------------------
   Template 1: Clean Minimal
------------------------------------- */
.biz-template-1 {
    box-shadow: none;
    background: #fff;
    border: 1px solid var(--biz-border);
}
.biz-template-1 .biz-card-image {
    aspect-ratio: 1/1;
    background: transparent;
}
.biz-template-1 .biz-card-image img {
    object-fit: contain;
}
.biz-template-1 .biz-card-content {
    padding: 24px;
}
.biz-template-1:hover {
    box-shadow: var(--biz-shadow);
    transform: translateY(-4px);
}

/* -------------------------------------
   Template 3: Floating Panels
------------------------------------- */
.biz-template-3 {
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
}
.biz-template-3 .biz-card-image {
    border-radius: var(--biz-radius);
    aspect-ratio: 1/1;
    overflow: hidden;
    background: transparent;
}
.biz-template-3 .biz-card-floating-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--biz-radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--biz-transition);
    opacity: 0.95;
    z-index: 2;
}
.biz-template-3:hover .biz-card-floating-content {
    transform: translateY(-8px);
    opacity: 1;
}

/* -------------------------------------
   Category Template 2: Promo Banner
------------------------------------- */
.biz-cat-template-2 {
    border: none;
    border-radius: var(--biz-radius);
    overflow: hidden;
}
.biz-cat-template-2 .biz-card-image {
    aspect-ratio: 16/9;
}
.biz-cat-template-2 .biz-card-promo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    color: #fff;
    transition: var(--biz-transition);
}
.biz-cat-template-2 .biz-card-promo-overlay .biz-card-title {
    color: #fff !important;
    font-size: 2rem;
    margin-bottom: 20px;
}
.biz-cat-template-2:hover .biz-card-promo-overlay {
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
}
.biz-btn-outline-white {
    display: inline-block;
    border: 2px solid #fff;
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    width: max-content;
    transition: all 0.3s ease;
}
.biz-btn-outline-white:hover {
    background: #fff;
    color: #000;
}

/* -------------------------------------
   Smart Ribbon Badges
------------------------------------- */
.biz-card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}
.biz-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    box-shadow: var(--biz-shadow);
    letter-spacing: 0.5px;
}
.biz-badge-sale { background: #e11d48; }
.biz-badge-featured { background: #f59e0b; }
.biz-badge-new { background: #10b981; }

.biz-card-overlay-actions {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--biz-transition);
    z-index: 5;
}
.biz-card-image:hover .biz-card-overlay-actions, 
.biz-template-3 .biz-card-image:hover .biz-card-overlay-actions {
    opacity: 1;
}

/* -------------------------------------
   Quick View Modal
------------------------------------- */
.biz-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}
.biz-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.biz-modal-content {
    background: #fff;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    border-radius: var(--biz-radius);
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}
.biz-modal.show .biz-modal-content {
    transform: translateY(0);
}
.biz-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #000;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}
.biz-qw-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}
.biz-qw-image img {
    border-radius: var(--biz-radius);
    width: 100%;
    height: auto;
}
.biz-qw-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--biz-text);
}
.biz-qw-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--biz-primary);
    margin-bottom: 20px;
}
.biz-qw-desc {
    color: var(--biz-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}
.biz-spinner {
    padding: 50px;
    text-align: center;
    font-weight: 600;
    color: var(--biz-text-light);
}

@media (max-width: 768px) {
    .biz-qw-container { grid-template-columns: 1fr; padding: 20px; }
}

/* -------------------------------------
   AJAX Category Filters
------------------------------------- */
.biz-ajax-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}
.biz-filter-btn {
    background: transparent;
    border: 2px solid var(--biz-border);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--biz-text-light);
    cursor: pointer;
    transition: var(--biz-transition);
}
.biz-filter-btn:hover {
    border-color: var(--biz-primary);
    color: var(--biz-primary);
}
.biz-filter-btn.active {
    background: var(--biz-primary);
    border-color: var(--biz-primary);
    color: #fff;
}
.biz-showcase-wrapper.loading .biz-showcase {
    opacity: 0.5;
    pointer-events: none;
}

/* -------------------------------------
   Template 4: Action Bar
------------------------------------- */
.biz-template-4 {
    display: flex;
    flex-direction: column;
}
.biz-template-4 .biz-card-content {
    flex-grow: 1;
    padding: 24px 24px 16px;
    text-align: center;
}
.biz-template-4 .biz-card-action-bar {
    width: 100%;
}
.biz-template-4 .biz-card-action-bar .add_to_cart_button {
    width: 100%;
    border-radius: 0 0 var(--biz-radius) var(--biz-radius) !important;
    margin: 0;
    padding: 16px;
    text-align: center;
    display: block;
}

/* -------------------------------------
   Category Template 3: Circle Avatar
------------------------------------- */
.biz-cat-template-3 {
    background: transparent;
    box-shadow: none;
    border: none;
    text-align: center;
}
.biz-cat-template-3:hover {
    box-shadow: none;
    transform: translateY(-4px);
}
.biz-cat-template-3 .biz-cat-avatar-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.biz-cat-template-3 .biz-circle-image {
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    width: 80%;
    box-shadow: var(--biz-shadow);
}
.biz-cat-template-3 .biz-circle-image img {
    object-fit: cover !important;
}

/* -------------------------------------
   Badges
------------------------------------- */
.biz-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}
.biz-badge {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    border-radius: 50px;
    display: inline-block;
    box-shadow: var(--biz-shadow);
}
.biz-badge-sale {
    background-color: #ef4444; 
}
.biz-badge-featured {
    background-color: #f59e0b;
}
.biz-badge-new {
    background-color: #10b981;
}
.biz-badge-custom {
    background-color: var(--biz-primary);
}
