/* Prevent image scale on hover for category cards, but keep smooth transition */
.woocommerce .product-category:hover img {
    transform: none !important;
}
/**
 * Product Card Styles - Minecraft Theme
 * Individual product styling and effects
 */

/* Category Cards - Enhanced design for shop page */
.woocommerce .product-category {
    min-height: 380px !important;
    max-height: 420px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    aspect-ratio: 4/5 !important;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(162, 89, 255, 0.05) 100%) !important;
    border: 2px solid rgba(162, 89, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
}

.woocommerce .product-category::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, transparent 0%, rgba(162, 89, 255, 0.1) 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.4s ease !important;
    z-index: 1 !important;
}

.woocommerce .product-category:hover::before {
    opacity: 1 !important;
}


.woocommerce .product-category {
    transition: transform 0.33s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.33s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.33s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.woocommerce .product-category:hover {
    transform: translateY(-8px) scale(1.06) !important;
    box-shadow: 0 20px 60px rgba(162, 89, 255, 0.25) !important;
    border-color: rgba(162, 89, 255, 0.3) !important;
}


.woocommerce .product-category img {
    height: 280px !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Remove margin from a inside product-category for flush image edges */
.woocommerce ul.products li.product-category > a {
    margin: 0 !important;
}

/* Hover effect - image scales with the card now */

.woocommerce .product-category .woocommerce-loop-category__title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    margin-top: auto !important;
    padding-top: 1.5rem !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 2 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    line-height: 1.3 !important;
    height: 60px !important;
}

/* Specific targeting for category titles to ensure consistent positioning */
.woocommerce ul.products li.product-category a h2.woocommerce-loop-category__title,
.woocommerce ul.products li.product-category.first a h2.woocommerce-loop-category__title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    margin-top: auto !important;
    padding: 1.5rem 0 0 0 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 2 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    line-height: 1.3 !important;
    height: 60px !important;
    box-sizing: border-box !important;
}

/* Product Cards - Better sizing */
.woocommerce .product:not(.product-category) {
    min-height: 320px !important;
    padding: 1.2rem !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Only target product card images in shop/archive pages, not single product content */
.woocommerce:not(.single-product) .product:not(.product-category) img,
.woocommerce.single-product .related .product img,
.woocommerce.single-product .upsells .product img {
    height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
}

/* Hide "Sepeti Görüntüle" (View Cart) link */
.woocommerce ul.products li.product .added_to_cart.wc-forward {
    display: none !important;
}

/* Hide the "added" class state on add to cart buttons */
.woocommerce ul.products li.product .button.add_to_cart_button.added {
    display: inline-block !important;
}

/* Ensure add to cart buttons are properly styled */
.woocommerce ul.products li.product .add_to_cart_button {
    background: var(--gradient-bg) !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 25px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    text-decoration: none !important;
    width: 100% !important;
    margin-top: 10px !important;
    box-shadow: 0 4px 15px rgba(162, 89, 255, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product .add_to_cart_button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: left 0.5s !important;
}

.woocommerce ul.products li.product .add_to_cart_button:hover::before {
    left: 100% !important;
}

.woocommerce ul.products li.product .add_to_cart_button:hover {
    background: linear-gradient(135deg, var(--secondary-purple), var(--dark-purple)) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(162, 89, 255, 0.5) !important;
    color: white !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .add_to_cart_button:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(162, 89, 255, 0.4) !important;
}
