/* Sharp Product Image Grid Styles */
.sharp-product-image-grid-wrapper {
    width: 100%;
    max-width: 100%;
}

.sharp-product-image-grid {
    display: grid;
    gap: var(--spig-gap, 20px);
}

.spig-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f9f9f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spig-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.spig-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.spig-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.spig-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.spig-item:hover .spig-image {
    transform: scale(1.08);
}

.spig-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.spig-item:hover .spig-overlay {
    opacity: 1;
}

.spig-view-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px;
    border: 2px solid #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.spig-view-text:hover {
    background: #fff;
    color: #333;
}

.spig-stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    background: #e74c3c;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.spig-out-of-stock {
    opacity: 0.7;
}

.spig-out-of-stock .spig-overlay {
    display: none;
}

.spig-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
    font-size: 14px;
}

.spig-info {
    padding: 15px;
    text-align: center;
    background: #fff;
}

.spig-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spig-price {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.spig-price .amount {
    color: #2ecc71;
    font-weight: 700;
    font-size: 16px;
}

.spig-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 4px;
    text-align: center;
}

/* AJAX Add to Cart loading state */
.spig-link-ajax.adding {
    opacity: 0.6;
    pointer-events: none;
}

.spig-link-ajax.added {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .spig-view-text {
        font-size: 14px;
        padding: 10px 18px;
    }

    .spig-info {
        padding: 10px;
    }

    .spig-title {
        font-size: 13px;
    }
}
