/* Custom Product Card Styles */
.custom-product-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 15px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.custom-product-card:hover {
    z-index: 9;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Product Images Container */
.custom-product-images {
    position: relative;
    width: 100%;
    height: 250px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    aspect-ratio: 1;
}

.custom-product-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
	object-fit: contain;
    opacity: 0;
    padding-bottom: 4px;
}

.custom-product-images img.active {
    opacity: 1;
}

.custom-product-images img.main-image {
    opacity: 1;
}

/* Product Title */
.custom-product-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: #18202e;;
}

.custom-product-title a {
    text-decoration: none;
    color: inherit;
    font-weight: inherit;
    transition: color 0.3s ease;
}

.custom-product-title a:hover {
    color: #3498db;
}

/* Product Category */
.custom-product-category {
	display: none;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
	flex: 1;
}

/* Product Price */
.custom-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #f37a1f;
    margin-bottom: 20px;
    margin-top: auto;
}

.custom-product-price .amount {
    color: inherit;
}

.custom-product-price del {
    color: #95a5a6;
    font-weight: 400;
    font-size: 16px;
    margin-right: 8px;
}

/* Add to Cart Button */
.custom-add-to-cart {
    margin-bottom: 15px;
}

.custom-add-to-cart .button,
.custom-add-to-cart .added_to_cart {
    width: 100%;
    padding: 10px 20px;
    background: #f37a1f;
    color: white;
    border: none;
    border-radius: 35px;
	font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.custom-add-to-cart .button:hover,
.custom-add-to-cart .added_to_cart:hover {
    background: #18202e;
	color: white;
}

.custom-add-to-cart .added_to_cart {
    background: #18202e;
	color: white;
}

/* Product SKU */
.custom-product-sku {
    font-size: 12px;
    color: #18202e;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #ecf0f1;
    border-radius: 35px;
    font-weight: 600;
}

.custom-product-sku strong {
    color: #f37a1f;
	letter-spacing: 1px;
}

/* Product Brand */
.custom-product-brand {
    margin-bottom: 15px;
    flex: 1;
    /*padding: 10px 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 6px;
    border-left: 4px solid #3498db;*/
}

.custom-product-brand strong {
    color: #2c3e50;
    letter-spacing: 0.5px;
}

/* Product Attributes */
.custom-product-attributes {
	position: absolute;
    top: calc(100% - 25px);
    left: 0;
    width: 100%;
    padding: 20px;
	opacity: 0;
    background: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 25px 30px rgba(0, 0, 0, 0.15);
    z-index: -1;
	transition: all .3s;
}

.custom-product-card:hover .custom-product-attributes, .custom-product-card:hover .attribute-item {
	opacity: 1;
}
.custom-product-attributes .attribute-item {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
	opacity: 0;
}

.custom-product-attributes .attribute-item strong {
    color: #18202e;
    min-width: 80px;
    font-weight: 600;
    text-align: left;
}


/* Responsive Design */
@media (max-width: 768px) {
    .custom-product-card {
        padding: 15px;
    }
    
    .custom-product-images {
        height: 200px;
        margin-bottom: 15px;
    }
    
    .custom-product-title {
        font-size: 16px;
    }
    
    .custom-product-price {
        font-size: 18px;
    }
}

/* WooCommerce Grid Adjustments */
.woocommerce ul.products {
    display: flex;
	flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    width: 100%;
}
.woocommerce ul.products li.product-category {
    width: calc(20% - 16px) !important;
}
/*.woocommerce ul.products li.product-category.product {
    display: none;
}*/


.woocommerce ul.products li.product {
    margin: 0 0 30px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.woocommerce ul.products li.product .custom-product-card {
    height: 100%;
}

/* Loading State */
.custom-product-card.loading .custom-product-images::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
    z-index: 1;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Hover Image Transition Effect */
.custom-product-card:hover .custom-product-images img.gallery-image {
    opacity: 0;
}

.custom-product-card.image-hover .custom-product-images img.main-image {
    opacity: 0;
}

.custom-product-card.image-hover .custom-product-images img.gallery-image.active {
    opacity: 1;
}

/*ANIMACIJE*/
/* Additional animations and enhanced styling for product cards */


/* Enhanced add to cart states */
.custom-add-to-cart .button.loading {
    position: relative;
    color: transparent;
}

.custom-add-to-cart .button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.custom-product-card.adding-to-cart {
    transform: scale(0.98);
}

.custom-product-card.added-to-cart {
    animation: addedToCart 0.6s ease;
}

@keyframes addedToCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Success state for add to cart */
.custom-add-to-cart .added_to_cart {
    background: #18202e !important;
    position: relative;
    overflow: hidden;
}

.custom-add-to-cart .added_to_cart.wc-forward {
    position: absolute;
    left: 15px;
    width: calc(100% - 30px);
}

@keyframes checkmark {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Enhanced image transitions 
.custom-product-images img {
    transform: scale(1);
}*/

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    .custom-product-card {
        transform: none;
        opacity: 1;
    }
    
    .custom-product-card:hover {
        transform: none;
    }
    
    .custom-product-images::after {
        display: none;
    }
}

/* Product grid enhancements */
/*.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}*/

.woocommerce ul.products li.product {
    margin: 0;
    width: auto;
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* Sale badge styling */
.custom-product-card .onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #f37a1f;
	border: unset;
    color: white;
    padding: 5px 12px;
    border-radius: 35px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    animation: saleFloat 2s ease-in-out infinite alternate;
}

@keyframes saleFloat {
    from { transform: translateY(0px); }
    to { transform: translateY(-3px); }
}


/* Skeleton loading state */
.custom-product-card.skeleton {
    pointer-events: none;
}

.custom-product-card.skeleton .custom-product-images {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.custom-product-card.skeleton .custom-product-title,
.custom-product-card.skeleton .custom-product-category,
.custom-product-card.skeleton .custom-product-price {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    color: transparent;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}



/* Print styles */
@media print {
    .custom-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .custom-quick-view,
    .custom-wishlist,
    .custom-add-to-cart {
        display: none;
    }
}

/* ADD THIS CSS TO YOUR custom-product-card.css FILE */

/* Image Pagination Dots */
.image-pagination {
position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 4px;
    background: white;
    z-index: 2;
    width: 100%;
}

.pagination-dot {
	width: 7px;
    height: 4px;
    background: #f4f4f4;
    cursor: pointer;
    position: relative;
    flex: 1;
}

.pagination-dot:hover {
    background: #dedede;
}

.pagination-dot.active {
    background: #dedede;
}
