.product-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
    /* padding: 0 1rem; */
    flex-shrink: 0;
}
.product-card .product-card-container{
    overflow: hidden;
    text-decoration: none;
    width: 100%;
    color: var(--primary-color);
    border-radius: 10px;
    /* border-radius: 5px; */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.product-card .product-card-container .product-image-container a.image-wrapper{
    overflow: hidden;
    width: 100%;
    height: 100%;
}
.product-card .product-card-container .product-image-container a.image-wrapper img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.product-card .product-card-container .product-image-container a.image-wrapper .primary-img {
    position: relative;
    z-index: 1;
}

.product-card .product-card-container .product-image-container a.image-wrapper .secondary-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 2;
    transform: translateY(-10px);
}
.product-card .product-card-container .product-image-container a.image-wrapper .secondary-img:hover {
    opacity: 1;
    transform: translateY(0px);
}

.product-card .product-card-container .product-image-container a.image-wrapper .primary-img:hover  {
    transform: translateY(10px);
    opacity: 0;
}
.product-card .product-card-container .product-image-container .product-labels{
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3;
}
.product-card .product-card-container .product-image-container .product-labels p{
    background-color: var(--accent-color);
    color: var(--secondary-color);
    font-size: var(--tertiary-font-size);
    padding: 3px 5px;
    width: fit-content;
    border-radius: 5px;
}
.product-card .product-card-container .product-image-container .product-save-container{
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    /* flex-direction: column; */
    padding: 10px;
    gap: 10px;
    z-index: 3;
}
.product-card .product-card-container .product-image-container button{
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    outline: none;
    min-height: 100%;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--secondary-color);
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
}
.product-card .product-card-container .product-image-container button:hover{
    color: var(--accent-color);
}
.product-card .product-card-container .product-image-container{
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}
.product-card .product-card-container .product-info{
    display: flex;
    flex-direction: column;
}
.product-card .product-card-container .product-info .category{
    font-size: var(--secondary-font-size);
    /* font-weight: var(--font-weight-semibold); */
    color: var(--accent-color);
}
.product-card .product-card-container .product-info h3{
    font-size: var(--heading-size-smaller);
    font-family: var(--body-font);
    font-weight: var(--font-weight-bold);
}
.product-card .product-card-container .product-info h3 a{
    text-decoration: none;
    color: var(--primary-color);
}
.product-card .product-card-container .product-info h3 a:hover{
    color: var(--accent-color);
}
.product-card .product-card-container .product-info .price{
    display: flex;
    gap: 1rem;
    width: 100%;
}
.product-card .product-card-container .product-info .price p.old-price{
    text-decoration: line-through;
    color: var(--gray-medium);
}

/* Fullscreen overlay */
.card-variation-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;            /* JS toggles to block */
    z-index: 9999;
  }
  
  /* Modal box */
  .card-variation-modal {
    width: 20%;
    margin: 10% auto;
    background: #fff;
    border-radius: 10px;
    padding: 20px 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    position: relative;
    font-family: inherit;
  }
  
  /* Close button */
  .card-variation-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
  }
  
  /* Content bits */
  .card-variation-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
  }
  
  .card-variation-label {
    margin: 0 0 10px;
    font-size: 14px;
    color: #555;
  }
  
  /* Options */
  .card-variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .card-variation-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
  }
  
  .card-variation-option input {
    display: none;
  }
  
  .card-variation-option input:checked + span,
  .card-variation-option:hover span {
    font-weight: 600;
  }
  
  .card-variation-option input:checked ~ span {
    color: #000;
  }
  
  /* Price + error + button */
  .card-variation-price {
    margin: 0 0 8px;
  }
  
  .card-variation-error {
    margin: 0 0 8px;
    font-size: 12px;
    color: #c00;
  }
  
  .card-variation-confirm {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 8px 0;
    background: #000;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
  }
/* ===================== media queries ===================== */
@media (max-width: 1350px) {
    .product-card{
        width: 30%;
    }
}
@media (max-width: 1200px) {
    .product-card .product-card-container .product-image-container .product-labels{
        gap: 5px;
    }
    .product-card .product-card-container .product-image-container .product-labels p{
        padding: 1px 3px;
        
    }
    .product-card .product-card-container .product-info h3{
        font-size: var(--primary-font-size);
    }
    .product-card .product-card-container .product-info .price{
        font-size: var(--secondary-font-size);
    }
    .card-variation-modal {
        width: 30%;
    }
}
@media (max-width: 1000px) {
    .product-card{
        width: 35%;
    }
    .card-variation-modal {
        width: 40%;
    }
}
@media (max-width: 850px) {
    .product-card{
        width: 55%;
    }
}
@media (max-width: 550px) {
    .product-card{
        width: 75%;
    }
    .product-card .product-card-container .product-info .category{
        flex-direction: column;
        gap: 0;
        font-size: var(--tertiary-font-size);
    }
    .product-card .product-card-container .product-info h3{
        font-size: var(--secondary-font-size);
    }
    .product-card .product-card-container .product-info .price{
        font-size: var(--tertiary-font-size);
    }
    .product-card .product-card-container .product-info .tags{
        font-size: var(--tertiary-font-size);
    }
}