/* ============================================================
   PRODUCT CARD
   Structure: image (wishlist + quick add on hover) →
              category / price row → rating
   ============================================================ */

.custom-product-card {

    --card-bg:        #ffffff;
    --card-border:    rgba(28, 24, 18, .08);
    --card-radius:    14px;
    --card-shadow:    0 20px 44px -20px rgba(35, 28, 16, .22);

    --category-color: #000;
    --price-color:    #ad7a26;

    --star-color:     #ad7a26;
    --star-off-color: #ddd4c4;
    --rating-color:   #9a8f7d;

    --btn-bg:         #17140f;
    --btn-bg-hover:   #2c261c;

    list-style: none;
    box-sizing: border-box;
}

.custom-product-card * {
    box-sizing: border-box;
}


/* ============================================================
   CARD SHELL
   ============================================================ */

.custom-product-card-inner {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;

    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);

    overflow: hidden;

    transition: box-shadow .3s ease, transform .3s ease;
}

.custom-product-card-inner:hover {
    box-shadow: var(--card-shadow);
    transform: translateY(-2px);
}


/* ============================================================
   PRODUCT IMAGE
   ============================================================ */

.custom-product-image {
    display: block;
    position: relative;

    width: 100%;

    text-decoration: none !important;

    overflow: hidden;
}

.custom-product-image-wrap {
    display: block;
    position: relative;

    width: 100%;

    background: #f4f2ee;
}

.custom-product-img {
    display: block !important;

    width: 100% !important;
    height: auto !important;

    aspect-ratio: 3 / 3;

    object-fit: cover;

    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   WISHLIST — hidden until hover
   ============================================================ */

.custom-wishlist {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 50%;

    background: rgba(255, 255, 255, .92);
    color: #221e17;

    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);

    transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease, visibility .2s ease;

    z-index: 3;
}

.custom-product-image:hover .custom-wishlist,
.custom-wishlist:focus-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-wishlist:hover {
    background: var(--btn-bg);
    color: #fff;
}


/* ============================================================
   QUICK ADD — hidden until hover
   ============================================================ */

.custom-quick-add {
    position: absolute;

    left: 50%;
    bottom: 14px;

    transform: translate(-50%, 8px);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 18px;

    background: #ffffff;
    color: #17140f;

    border-radius: 30px;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1;
    white-space: nowrap;

    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);

    opacity: 0;
    visibility: hidden;

    transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease, visibility .2s ease;

    z-index: 3;
}

.custom-product-image:hover .custom-quick-add {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.custom-product-image:hover .custom-quick-add:hover {
    background: var(--btn-bg-hover);
    color: #fff;
}


/* ============================================================
   PRODUCT INFO
   ============================================================ */

.custom-product-info {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: clamp(14px, 1.6vw, 18px);
    gap: 8px;
}


/* Category + Price */

.custom-product-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    gap: 12px;
}

.custom-product-category {
    flex: 1;
    min-width: 0;
    font-size: 22px;
    font-family: 'Crimson Pro';
    font-weight: bold;
    color: var(--category-color);
    overflow: hidden;
    white-space: nowrap;
}

.custom-product-price {
    flex-shrink: 0;

    color: var(--price-color);
    font-size: 17px;
    font-weight: 700;
}

.custom-product-price .woocommerce-Price-amount {
    color: var(--price-color);
}

.custom-product-price del {
    margin-right: 6px;
    color: var(--rating-color);
    font-size: .8em;
    opacity: .8;
}

.custom-product-price ins {
    text-decoration: none;
}


/* ============================================================
   RATING
   ============================================================ */

.custom-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-top: 2px;
}

.custom-stars {
    display: flex;
    align-items: center;
    gap: 2px;

    font-size: 15px;
    line-height: 1;
}

.custom-stars span {
    color: var(--star-off-color);
    font-size: 15px;
    line-height: 1;
}

.custom-stars span.filled {
    color: var(--star-color);
}

.custom-rating-number {
    color: var(--rating-color);
    font-size: 12.5px;
    font-weight: 500;
}


/* ============================================================
   CLEANUP
   ============================================================ */

.custom-product-card .price {
    margin: 0 !important;
}

.custom-product-card .star-rating {
    display: none !important;
}

.custom-product-card img {
    box-shadow: none !important;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 480px) {

    .custom-product-info {
        padding: 14px;
        gap: 6px;
    }

    .custom-product-price {
        font-size: 15px;
    }
}