/* Shortcodes Styles */
.spc-products-shortcode,
.spc-related-products,
.spc-recently-viewed,
.spc-product-archive-shortcode,
.spc-categories-shortcode {
    margin: 20px 0;
}

/* Products Grid */
.spc-products-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.spc-columns-1 {
    grid-template-columns: repeat(1, 1fr);
}

.spc-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.spc-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.spc-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.spc-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.spc-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Product Item */
.spc-product-item {
    position: relative;
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.spc-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.spc-product-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.spc-product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.spc-product-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.spc-product-item:hover .spc-product-thumb {
    transform: scale(1.05);
}

/* Product Badges */
.spc-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.spc-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.spc-badge-outofstock {
    background: #e74c3c;
}

.spc-badge-featured {
    background: #f39c12;
}

.spc-badge-onsale {
    background: #27ae60;
}

/* Product Actions */
.spc-product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.spc-product-item:hover .spc-product-actions {
    transform: translateY(0);
}

.spc-btn {
    display: inline-block;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
}

.spc-btn-quickview {
    background: #3498db;
    color: white;
}

.spc-btn-quickview:hover {
    background: #2980b9;
}

.spc-btn-add-to-cart {
    background: #27ae60;
    color: white;
}

.spc-btn-add-to-cart:hover {
    background: #219653;
}

/* Product Info */
.spc-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.spc-product-category {
    margin-bottom: 8px;
}

.spc-category-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
}

.spc-product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.3;
}

.spc-product-title a {
    color: #333;
    text-decoration: none;
}

.spc-product-title a:hover {
    color: #3498db;
}

.spc-product-sku {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.spc-product-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin: 8px 0;
}

.spc-product-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* Section Titles */
.spc-related-title,
.spc-recent-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Archive Shortcode */
.spc-archive-header {
    margin-bottom: 30px;
    text-align: center;
}

.spc-archive-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.spc-archive-description {
    color: #666;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
}

/* Archive Filters */
.spc-archive-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.spc-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.spc-filter-group {
    flex: 1;
    min-width: 200px;
}

.spc-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.spc-orderby,
.spc-price-filter {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.spc-filter-separator {
    display: inline-block;
    margin: 0 5px;
    color: #666;
}

.spc-btn-filter {
    background: #3498db;
    color: white;
    border: none;
}

.spc-btn-filter:hover {
    background: #2980b9;
}

.spc-btn-reset {
    background: #95a5a6;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.spc-btn-reset:hover {
    background: #7f8c8d;
}

/* Archive Layout */
.spc-archive-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.spc-archive-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.spc-archive-widget {
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.spc-archive-widget:last-child {
    margin-bottom: 0;
}

.spc-widget-title {
    font-size: 18px;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Category List */
.spc-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spc-category-list li {
    margin-bottom: 8px;
}

.spc-category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s;
}

.spc-category-list li a:hover {
    color: #3498db;
}

.spc-category-list li.active a {
    color: #3498db;
    font-weight: bold;
}

.spc-category-count {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Price Filter Widget */
.spc-price-filter-form {
    margin-top: 10px;
}

.spc-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.spc-price-inputs input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.spc-price-inputs span {
    color: #666;
}

/* Tag Cloud */
.spc-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spc-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.spc-tag:hover {
    background: #3498db;
    color: white;
}

/* Categories Grid */
.spc-categories-grid {
    display: grid;
    gap: 20px;
}

.spc-category-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.spc-category-item:hover {
    transform: translateY(-5px);
}

.spc-category-link {
    display: block;
    text-decoration: none;
}

.spc-category-image {
    position: relative;
    padding-top: 70%;
    /* Aspect ratio */
    overflow: hidden;
}

.spc-category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.spc-category-item:hover .spc-category-image img {
    transform: scale(1.05);
}

.spc-category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    text-align: center;
}

.spc-category-title {
    margin: 0;
    font-size: 18px;
    color: white;
}

.spc-category-count {
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

/* Pagination */
.spc-pagination {
    margin-top: 40px;
    text-align: center;
}

.spc-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.spc-pagination li {
    border-right: 1px solid #eee;
}

.spc-pagination li:last-child {
    border-right: none;
}

.spc-pagination a,
.spc-pagination span {
    display: block;
    padding: 10px 15px;
    background: white;
    color: #3498db;
    text-decoration: none;
    min-width: 40px;
    text-align: center;
}

.spc-pagination a:hover {
    background: #f8f9fa;
}

.spc-pagination .current {
    background: #3498db;
    color: white;
}

/* No Products/Categories */
.spc-no-products,
.spc-no-categories,
.spc-notice {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.spc-no-products a,
.spc-no-categories a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .spc-columns-6 {
        grid-template-columns: repeat(5, 1fr);
    }

    .spc-columns-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .spc-archive-with-sidebar {
        grid-template-columns: 1fr;
    }

    .spc-archive-sidebar {
        position: static;
        order: 2;
    }

    .spc-archive-main {
        order: 1;
    }

    .spc-columns-6,
    .spc-columns-5,
    .spc-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .spc-columns-6,
    .spc-columns-5,
    .spc-columns-4,
    .spc-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .spc-filter-row {
        flex-direction: column;
    }

    .spc-filter-group {
        width: 100%;
    }

    .spc-product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {

    .spc-columns-6,
    .spc-columns-5,
    .spc-columns-4,
    .spc-columns-3,
    .spc-columns-2 {
        grid-template-columns: 1fr;
    }

    .spc-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.spc-btn-add-to-cart {
    display: none;
}