.shoplink-gallery {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.shoplink-image {
    width: 100%;
    padding-bottom: 100%; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.shoplink-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: #5FA6E4;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.shoplink-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.shoplink-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9); /* White with 90% opacity */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.shoplink-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; 
}

.shoplink-gallery:hover .shoplink-overlay {
    opacity: 1;
    visibility: visible;
}

.shoplink-gallery:hover .shoplink-icon {
    opacity: 0;
    visibility: hidden;
}

.shoplink-products {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    max-height: 100%;
    overflow-y: auto;
}

.shoplink-product {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    margin: 5px 0;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    transform: scale(1);
}

.shoplink-product:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.shoplink-product-image {
    width: 20%;
    padding-right: 10px;
}

.shoplink-product-image img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.shoplink-product-info {
    width: 80%;
}

.shoplink-product-name {
    margin: 0 0 5px 0;
    font-size: 18px !important;
    color: #333;
}

.shoplink-product-category {
    font-size: 14px;
    color: #666;
}

.shoplink-category {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.shoplink-add-all-to-cart {
    display: block;
    width: calc(100% - 40px);
    padding: 10px 15px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    margin: 10px auto;
    font-size: 16px;
}

.shoplink-add-all-to-cart:hover {
    background-color: #005177;
}

.shoplink-gallery-complete {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.shoplink-search-form {
    margin-bottom: 20px;
    display: flex;
}

.shoplink-search-form input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.shoplink-search-form button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.shoplink-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.shoplink-gallery-grid.loading {
    position: relative;
}

.shoplink-gallery-grid.loading:after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #333;
}

@media (max-width: 768px) {
    .shoplink-gallery {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .shoplink-category {
        grid-template-columns: 1fr;
    }
    
    .shoplink-gallery-grid {
        grid-template-columns: 1fr;
    }
}
