/* 
 * Updated Modern Product Card CSS
 * Changes:
 * - Fixed image centering
 * - Added subtle border shadow
 * - Reduced image size and improved quality
 * - Increased price size with green color
 * - Made product title larger, bolder with Inter font
 * - Added styling for sale price and original price display
 */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Generel styling */
.produkt-kort {
    background-color: #ffffff;
    margin-bottom: 2em;
    list-style-type: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04); /* Added subtle border shadow */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Inter', 'Poppins', sans-serif; /* Added Inter as primary font */
    height: auto;
    display: flex;
    flex-direction: column;
}

.produkt-kort:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05); /* Updated hover shadow */
}

.produkt-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Produceret i Europa badge */
.produceret-i-europa-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #2a4b8d; /* Blue color */
    color: white;
    padding: 6px 10px 6px 36px; /* Increased left padding for the flag */
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10; /* Very high z-index to ensure it stays on top */
    font-family: 'Inter', sans-serif;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
    background-image: url('https://amerika-webshop.udvikling360.dk/wp-content/uploads/2025/03/Flag_of_Europe.svg');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 18px 12px;
}

/* When both sale badge and Europe badge are present */
.produkt-kort .tilbud-badge {
    top: 10px;
    left: 10px;
}

.produkt-kort .tilbud-badge + .produceret-i-europa-badge {
    top: 50px; /* Position below the sale badge */
}

.produkt-kort .tilbud-badge + .produceret-i-europa-badge {
    top: 50px; /* Position below the sale badge */
}

/* When both sale badge and Europe badge are present */
.produkt-kort .tilbud-badge + .produceret-i-europa-badge {
    top: 45px; /* Position below the sale badge */
}

/* Produktbillede styling */
.produkt-billede-container {
    position: relative;
    background-color: white;
    overflow: hidden;
    height: 260px; /* Fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.produkt-billede-container a.produkt-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.produkt-billede-container img {
    max-width: 100%!important;
    max-height: 90%!important;
    width: auto !important;
    height: auto !important;
    object-fit: contain; /* Ensures full image is shown without cropping */
    image-rendering: auto; /* Set to auto for full quality */
    margin: 0 auto;
    padding: 10px; /* Add padding to make images appear smaller and fully contained */
}


.produkt-link {
    text-decoration: none;
    color: inherit;
}

/* Tilbud badge */
.tilbud-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #2ecc71;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 1;
}

/* Se produkt knap - fjernet hover effekt */
.produkt-handlinger {
    display: none; /* Completely hide the hover action */
}

/* Produkt detaljer */
.produkt-detaljer {
    padding: 18px 15px 12px 15px; /* Slightly increased padding */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Increased gap from 6px to 8px */
    height: auto;
}

/* Farve muligheder */
.farve-muligheder {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.woocommerce ul.products li.product .woocommerce-loop-category__title, .woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product h3 {
padding: 0em 0em 2em 0em!important;
}

.farve-cirkel {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #55565a;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.farve-cirkel:hover {
    transform: scale(1.1);
}

.farve-cirkel:first-child {
    background-color: #3c8195;
}

.farve-cirkel:last-child {
    background-color: #a49b89;
}

/* Produkttitel */
.produkt-titel {
    font-family: 'Inter', sans-serif; /* Specifically Inter for the title */
    font-size: 16px; /* Increased from 15px */
    font-weight: 600; /* Increased from 500 */
    margin: 0;
    padding: 0;
    line-height: 1.3;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 42px; /* Adjusted for larger font size */
    color: #222; /* Slightly darker for better contrast */
}

.produkt-link:hover .produkt-titel {
    color: #2ecc71;
}

/* Pris */
.produkt-pris {
    font-weight: 700;
    font-size: 20px; /* Increased from 17px */
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Original pris (streget ud) */
.produkt-pris .original-pris {
    font-size: 12px; /* Mindre skriftstørrelse */
    color: #888 !important; /* Grå farve */
    font-weight: 400;
    text-decoration: line-through;
    order: 1; /* Vist først */
    line-height: 1;
}

/* Tilbudspris */
.produkt-pris .tilbuds-pris {
    color: #2ecc71 !important; /* Grøn farve */
    font-weight: 700;
    font-size: 20px;
    order: 2; /* Vist efter original pris */
}

.woocommerce .produkt-kort .price {
    color: #2ecc71 !important; /* Enforced green color for price */
    font-weight: 700;
    font-size: 1.1em; /* Slightly larger */
}

.woocommerce .produkt-kort .price del {
    opacity: 0.6;
    font-weight: 400;
    color: #888;
    margin-right: 5px;
    font-size: 0.8em; /* Smaller size for deleted price */
    display: block; /* Make it a block element to ensure it's on its own line */
}

.woocommerce .produkt-kort .price ins {
    font-weight: 700;
    text-decoration: none; /* Remove the underline from the sale price */
    color: #2ecc71;
}

/* Produktegenskaber */
.produkt-egenskaber {
    margin-top: 2px;
}

.egenskab {
    display: inline-block;
    background-color: #f0f9f3;
    border: 1px solid #e0f0e6;
    color: #27ae60;
    font-size: 11px;
    padding: 3px 8px;
    margin-right: 5px;
    margin-bottom: 2px;
    border-radius: 3px;
    font-weight: 500;
}

/* Produkt kategorier */
.produkt-kategorier {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.kategori-boks {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quantity Controls */
.produkt-knapper {
    margin-top: 6px;
    margin-bottom: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    width: 110px; /* Slightly wider for better number visibility */
    height: 36px;
    flex-shrink: 0;
}

.quantity-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 36px;
    background-color: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.quantity-input {
    flex: 1;
    height: 100%;
    text-align: center;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield; /* Remove spinner for Firefox */
    background-color: white;
    width: 44px;
    padding: 0 2px;
    display: block;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Update se-detaljer-knap to account for the quantity controls */
.se-detaljer-knap, .udsolgt-knap {
    flex: 1;
    padding: 10px 15px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-align: center !important;
    text-decoration: none !important;
    display: block !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .quantity-controls {
        width: 90px;
    }
    
    .quantity-btn {
        width: 25px;
    }
}

/* Se detaljer knap (erstatter læg i kurv) */
.produkt-knapper {
    margin-top: 6px; /* Small top margin */
    margin-bottom: 0;
}

.se-detaljer-knap, .udsolgt-knap {
    width: 100%;
    padding: 10px 15px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-align: center !important;
    text-decoration: none !important;
    display: block !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.se-detaljer-knap {
    background-color: #2ecc71 !important;
    color: white !important;
    border: none !important;
}

.se-detaljer-knap:hover {
    background-color: #27ae60 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2) !important;
}

.udsolgt-knap {
    background-color: #f1f1f1 !important;
    color: #777 !important;
    border: 1px solid #ddd !important;
}

.udsolgt-knap:hover {
    background-color: #e9e9e9 !important;
}

/* Lager status og SKU */
.lager-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin: 0;
}

.på-lager, .ikke-på-lager {
    display: flex;
    align-items: center;
    gap: 5px;
}

.på-lager {
    color: #2ecc71;
}

.ikke-på-lager {
    color: #e74c3c;
}

.status-ikon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.på-lager .status-ikon {
    background-color: #2ecc71;
}

.ikke-på-lager .status-ikon {
    background-color: #e74c3c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .produkt-kort {
        margin-bottom: 1.5em;
    }
    
    .produkt-billede-container {
        height: 220px; /* Fixed height on mobile */
    }
}