#product_general_image {
    display: flex;
    width: 100%;
}
#product_general_image img {
    height: 250px;
    width: 65%;
    object-fit: cover;
}

#product_general_image div {
    width: 35%;
    background-color: #ECE4D6;
    text-align: center;
}
#product_general_image div span {
    position: relative;
    font-size: 300%;
    top: 90px;
}

@media (max-width: 900px) {
    #product_general_image {
        flex-direction: column;
    }
    #product_general_image div {
        width: 100%;
        height: 100px;
    }
    #product_general_image div span {
        position: relative;
        top: 15px;
        font-size: 50px;
    }
    #product_general_image img {
        height: 250px;
        width: 100%;
        object-fit: cover;
    }

    @media (max-width: 700px) {
        #product_general_image div {
            width: 100%;
            height: 70px;
        }
        #product_general_image div span {
            position: relative;
            top: 10px;
            font-size: 40px;
        }
    }


}




/* =========================================================
   PRODUCT GRID — mobile-first
   phones & small tablets: 2 compact cards per row
   768px+: 3 cards per row (original desktop look)
   ========================================================= */
#products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
    margin: 0;
    padding: 16px 12px;
}

.product {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease; /* Smooth animation */
}

.product img {
    order: 0;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: #fff;
}

/* Price first, then name, then button — like marketplace cards */
.product .price {
    order: 1;
    margin-top: 10px;
    font-size: 18px;
    color: rgb(50, 50, 50);
    font-family: "TikTok Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings:
      "slnt" 0,
      "wdth" 100;
}

.product h2 {
    order: 2;
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: #555;
    /* max 2 lines, then "…" */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product form {
    order: 3;
    margin-top: auto;      /* buttons line up at the bottom of each row */
    padding-top: 10px;
}

.product span {
    padding: 10px;
    font-family: "TikTok Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings:
      "slnt" 0,
      "wdth" 100;
  }

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s ease;
    color: #d69c1c;
}

.product form button {
    width: 100%;
    background: #d69c1c;
    color: #fff;
    border: none;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.product form button:hover {
    opacity: .9;
}

.out-of-stock {
    order: 3;
    margin-top: auto;
    padding: 12px 10px;
    border-radius: 12px;
    background: #e8e2d6;
    color: #6e6555;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

/* "3 results for …" line above the grid when searching */
.search-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 16px;
    font-size: 16px;
    color: #2d261c;
}
.search-summary a,
.products-empty a {
    color: #b87d00;
    font-weight: 500;
}
.products-empty {
    grid-column: 1 / -1;
    padding: 24px 0;
    text-align: center;
    color: #6e6555;
}

/* Hover effects only on devices with a real mouse */
@media (hover: hover) {
    .product:hover {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* Add shadow */
        transform: scale(1.05);
    }
    .wishlist-btn:hover {
        transform: scale(1.15);
    }
}

/* ---------- Large phones ---------- */
@media (min-width: 576px) {
    #products {
        gap: 24px 16px;
        padding: 20px 16px;
    }
}

/* ---------- Tablets & desktops: original 3-column look ---------- */
@media (min-width: 768px) {
    #products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        margin: 2%;
        padding: 0;
    }

    .product {
        padding: 9%;
        border-radius: 16px;
        text-align: center;
    }

    .product img {
        aspect-ratio: auto;
        border-radius: 0;
        background: none;
    }

    .product .price {
        margin-top: 0;
        font-weight: 500;
    }

    .product h2 {
        order: 0;
        margin: 0.83em 0;
        font-size: 1.5em;
        font-weight: 700;
        color: #222;
        -webkit-line-clamp: unset;
    }

    .product form {
        margin-top: 0;
        padding-top: 0;
    }

    .product form button {
        width: auto;
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 400;
    }

    .wishlist-btn {
        top: 20px;
        right: 20px;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
    }
}
