/* Product Card Module Styles */

/* Base Card Styles */
.product-card {
    display: block;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.product-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Card Content Elements */
.product-card-title {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-card-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
}

.product-card-title a:hover {
    color: #0073aa;
}

.product-card-brand {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    font-style: italic;
}

.product-card-image {
    position: relative;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.product-card-image:hover img {
    transform: scale(1.05);
}

.product-card-price {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.product-card-price .woocommerce-Price-amount {
    color: inherit;
}

.product-card-wishlist {
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.2em;
    transition: transform 0.2s ease;
    display: inline-block;
}

.product-card-wishlist:hover {
    transform: scale(1.1);
    color: #ff4757;
}

.product-card-wishlist .et-pb-icon {
    line-height: 1;
}

.product-card-add-to-cart {
    background: #0073aa;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
    min-width: 100px;
    position: relative;
    line-height: 1.4;
}

.product-card-add-to-cart:hover {
    background: #005a87;
    color: white !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product-card-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 0.15em solid transparent;
    outline: 1px solid black;
    background-clip: content-box;
    box-sizing: content-box;
    background-size: cover;
}

.product-card-add-to-cart[disabled] {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Product availability button styles for product cards */
.product-card-add-to-cart.dreamedia-plus-redirect,
.product-card-add-to-cart.call-to-purchase-redirect {
    background-color: #0073aa !important;
    color: #fff !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
}

.product-card-add-to-cart.dreamedia-plus-redirect:hover,
.product-card-add-to-cart.call-to-purchase-redirect:hover {
    background-color: #005a87 !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.product-card-add-to-cart.discontinued-disabled {
    background-color: #999 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

.product-card-add-to-cart.discontinued-disabled:hover {
    background-color: #999 !important;
    color: #fff !important;
    transform: none !important;
}

.product-card-info-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.product-card-info-link:hover {
    text-decoration: underline;
    color: #005a87;
}

.product-card-arrow-link {
    color: #28a745;
    font-size: 1.2em;
    text-decoration: none;
    transition: transform 0.2s ease;
    display: inline-block;
}

.product-card-arrow-link:hover {
    transform: translateX(3px);
    color: #218838;
}

.product-card-arrow-link .et-pb-icon {
    line-height: 1;
}

/* Full Size Card Layout */
.product-card-full {
    max-width: 300px;
    min-height: 280px;
}

.product-card-full .product-card-row-1 {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.product-card-full .product-card-row-1 .product-card-image {
    flex: 0 0 120px;
}

.product-card-full .product-card-row-1 .product-card-info {
    flex: 1;
}

.product-card-full .product-card-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-card-full .product-card-row-3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card-wishlist-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Medium Size Card Layout */
.product-card-medium {
    max-width: 250px;
    min-height: 320px;
}

.product-card-medium .product-card-row-1 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card-medium .product-card-wishlist-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.product-card-medium .product-card-add-to-cart {
    margin-top: 10px;
    width: 100%;
}

/* Small Size Card Layout */
.product-card-small {
    max-width: 200px;
    min-height: 250px;
}

.product-card-small .product-card-info {
    position: relative;
    margin-top: 10px;
}

.product-card-small .product-card-arrow-link {
    position: absolute;
    top: 0;
    right: 0;
}

.product-card-small .product-card-title {
    margin-top: 20px;
    font-size: 0.9em;
}

.product-card-small .product-card-title a {
    font-size: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 15px;
    }
    
    .product-card-full .product-card-row-1 {
        flex-direction: column;
    }
    
    .product-card-full .product-card-row-1 .product-card-image {
        flex: none;
        width: 100%;
    }
    
    .product-card-full .product-card-row-2,
    .product-card-full .product-card-row-3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-card-wishlist-price {
        width: 100%;
        justify-content: space-between;
    }
    
    .product-card-full,
    .product-card-medium,
    .product-card-small {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .product-card {
        padding: 12px;
    }
    
    .product-card-title a {
        font-size: 1em;
    }
    
    .product-card-add-to-cart {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

/* Error Styling */
.et_pb_product_card_error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    text-align: center;
    margin: 10px 0;
}

/* Loading States */
.product-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-card.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Variations for Different Themes */
.product-card.theme-dark {
    background: #2c3e50;
    border-color: #34495e;
    color: #ecf0f1;
}

.product-card.theme-dark .product-card-title a {
    color: #ecf0f1;
}

.product-card.theme-dark .product-card-title a:hover {
    color: #3498db;
}

.product-card.theme-dark .product-card-brand {
    color: #bdc3c7;
}

.product-card.theme-dark .product-card-price {
    color: #ecf0f1;
}

/* Hover Effects */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

/* Accessibility */
.product-card:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.product-card-add-to-cart:focus,
.product-card-info-link:focus,
.product-card-title a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

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


