/* Container for the collection variants */
.collection-variants-wrapper {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Individual product swatch link */
.collection-variant-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
}

/* Hover state */
.collection-variant-swatch:hover {
    border-color: #000;
    background-color: #f9f9f9;
    color: #000;
    text-decoration: none;
}

/* Active/Selected swatch styling */
.collection-variant-swatch.active {
    border-color: #000;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Sale and Featured Badges */
.collection-variant-swatch .badge {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 10;
}

.collection-variant-swatch .badge.sale {
    top: -5px;
    right: -5px;
    background-color: #d9534f; /* Bootstrap danger color for sale */
    color: white;
}

.collection-variant-swatch .badge.featured {
    top: -5px;
    left: -5px;
    background-color: #f0ad4e; /* Bootstrap warning color for featured */
    color: white;
}

/* Size label styling */
.variant-size {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Price label styling */
.variant-price {
    font-size: 12px;
    color: #666;
}

.variant-price del {
    color: #aaa;
    margin-right: 4px;
}

.variant-price ins {
    text-decoration: none;
    font-weight: bold;
}

/* Collection Shortcode Styles */
/* Shortcode Grid Layout */
.wcvsp-collection-wrapper ul.products {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 -10px; /* Negative margin for gutter */
    list-style: none;
    clear: both;
}

.wcvsp-collection-wrapper ul.products li.product {
    float: none !important;
    margin: 0 0 40px 0 !important;
    padding: 0 10px; /* Gutter */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Column Widths */
.wcvsp-collection-wrapper ul.products.columns-1 li.product { width: 100%; }
.wcvsp-collection-wrapper ul.products.columns-2 li.product { width: 50%; }
.wcvsp-collection-wrapper ul.products.columns-3 li.product { width: 33.333%; }
.wcvsp-collection-wrapper ul.products.columns-4 li.product { width: 25%; }
.wcvsp-collection-wrapper ul.products.columns-5 li.product { width: 20%; }
.wcvsp-collection-wrapper ul.products.columns-6 li.product { width: 16.666%; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wcvsp-collection-wrapper ul.products.columns-3 li.product,
    .wcvsp-collection-wrapper ul.products.columns-4 li.product,
    .wcvsp-collection-wrapper ul.products.columns-5 li.product,
    .wcvsp-collection-wrapper ul.products.columns-6 li.product {
        width: 50%; /* 2 columns on tablet */
    }
}

@media (max-width: 480px) {
    .wcvsp-collection-wrapper ul.products li.product {
        width: 100% !important; /* 1 column on mobile */
    }
}

/* Ensure images fill width */
.wcvsp-collection-wrapper ul.products li.product a img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

/* Center Content */
.wcvsp-collection-wrapper ul.products li.product {
    text-align: center;
}

/* Variations Box Refinements */
.wcvsp-variations-box {
    margin-top: auto; /* Push to bottom if flex column */
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.wcvsp-var-link {
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #e1e1e1;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    transition: all 0.2s;
}

.wcvsp-var-link:hover {
    border-color: #333;
    background: #f0f0f0;
}

.wcvsp-var-type,
.wcvsp-var-size {
    display: block;
}

.wcvsp-var-type {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    margin-bottom: 2px;
}
