.product-grid {
    display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.product-item-wrapper {
    position: relative;
    display: flex;
}

a .product-item {
    border: none;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 30%;
  max-width: 300px;
  transition: all 0.2s ease;

}

.dp-dfg-container .dp-dfg-items .dp-dfg-item, .product-item {
	border-radius:14px;
	box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.3);
}

.product-item:hover {
    box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.5);

}


.product-item img {
	width:100%;
}
.product-item-link {
    color:#000;
    display: flex;
    transition: transform 0.2s ease;
}

.product-item-link:hover{
    transform: translateY(-5px);
}
a .content-wrap {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Take up remaining space */
    position: relative;
}

.main-content {
    display: flex;
    flex-direction: column;
    flex: 1; /* Take up remaining space */
    min-height: 0; /* Allow content to shrink if needed */
}

.product-item h3 {
    font-size: 1.4em;
    line-height: 1.2;
}

p.subheading {
    font-size: 1.2em;
    padding: 0.5em 0 0 0;
    font-family: 'Saira',sans-serif;
    text-transform: uppercase;  
    font-weight: 700;
  font-stretch: 75%;  
  color: var(--divi-global-color-0, #3e3131);
}

.product-item img {
    max-width: 100%;
    height: auto;
}

/* Remove margin-bottom from links inside product-item */
.product-item a {
    margin-bottom: 0;
}

.product-item .entry-meta {
    margin-top:10px;
}

a .btn-tuote-haku {
    margin-top: auto;
    padding-top: 15px;
}

.view-product {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: var(--divi-global-color-2, inherit);
    color: white;
    text-decoration: none;
}
/*PRODUCT SEARCH*/
.custom-product-search-container {
    display: flex;
    justify-content: start;
    width: 100%;
}

.custom-product-search {
    max-width: 600px; /* Adjust this value as needed */
    width: 100%;
    background-color: transparent;
    padding:10px;
    border-radius:8px;
    text-align:center;
    margin-bottom: 0px;
        
    
}

.custom-product-search form {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    align-items: center;
    margin-top:0px;
    
}

.custom-product-search label {
    margin-right: 7px;
    font-weight:700;
    color:var(--divi-global-color-1, inherit);
    font-size:14px;
}

.custom-product-search input[type="text"] {
    padding: 0px 10px;
    margin-right: 10px;
    border: 1px solid var(--divi-global-color-3, inherit);
    background: var(--divi-global-color-1, inherit);
    border-radius: 50px;
    width:95px;
}

.custom-product-search button {
    padding: 2px 10px;
    background-color: var(--divi-global-color-2, inherit);
    color: white;
    border: 1px solid var(--divi-global-color-1, inherit);
    cursor: pointer;
    border-radius: 50px;
    font-weight:700;
    font-size:14px;
    
}

/* Mobile Styles */
@media (max-width: 768px) {
    .custom-product-search form {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-product-search label {
        margin-bottom: 5px;
        text-align: left;
    }

    .custom-product-search input[type="text"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .custom-product-search button {
        width: 100%;
    }
}

/* Datepicker Styles */
.ui-datepicker {
    font-size: 14px;
    background: var(--divi-global-color-1, inherit);
    border: 1px solid var(--divi-global-color-1, inherit);
    border-radius: 8px;
}

.ui-datepicker .ui-datepicker-header {
    background-color: var(--divi-global-color-4, inherit);
    color: white;
    border-radius: 8px 8px 0 0;
}

.ui-datepicker .ui-state-default {
    background-color: var(--divi-global-color-1, inherit);
    border: 1px solid var(--divi-global-color-4, inherit);
}

.ui-datepicker .ui-state-active {
    background-color: var(--divi-global-color-4, inherit);
    color: white;
}

.dp_oc_item {
    position: relative;
    overflow: hidden;
}

.dp_oc_item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.dp_ocp_lightbox_image {
    display: block;
    width: 100%;
    height: 100%;
}

.dp_oc_image_thumb {
    object-fit: cover;
    aspect-ratio: 1/1;
}

/* Lightbox improvements */
.mfp-figure figure {
    margin: 0;
}

.mfp-bottom-bar {
    margin-top: 10px;
}

.dp-dfg-overlay {
    position:absolute !important;
    z-index:90 !important;
}
.dfg_et_overlay {
        top:0px !important;
height:50%;
    background:rgba(0,0,0,.2) !important;
}
