body {
    background-color: #f8f1e9;
    font-family: 'Arial', sans-serif;
}

body {
    padding-top: 80px;   /* Juster efter din navbars højde */
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#product-grid .col-md-4 {
    display: flex;
}

.product-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 400px;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 400px;
    /* Fixed height for main image */
    width: 100%;
    /* Full card width */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background-color: #fff;
    /* Fallback for minor gaps */
}

.product-image img.card-img-top {
    width: 100%;
    /* Fill card width */
    height: 400px;
    /* Match container height */
    object-fit: cover;
    /* Fill area with minimal cropping */
    object-position: center;
    /* Center to reduce edge cropping */
    border-radius: 10px 10px 0 0;
}

.product-image-container {
    background-color: #fff;
    /* White background for image section */
}

.image-thumbs {
    width: 100%;
    /* Match card width */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 10px;
    /* Increased padding for clear separation */
    background-color: #e8d9c8;
    /* Darker shade for distinction */
    border-top: 2px solid #d0d0d0;
    /* Thicker separator line */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for depth */
}

.image-thumbs img {
    width: 50px;
    height: 50px;
    margin: 0 10px;
    /* Increased spacing between thumbnails */
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
    /* Thumbnails fill area with minimal cropping */
    object-position: center;
    border-radius: 4px;
    /* Slight rounding for thumbnails */
    transition: transform .2s;
}

.image-thumbs img:hover,
.image-thumbs img.active {
    border-color: #8f8582;
    transform: scale(1.5); 
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 20px;
    /* Increased spacing after thumbnails */
}

.btn-add-to-cart,
.btn-remove-from-cart {
    width: 100%;
}

.hidden {
    display: none;
}

.spinner-border {
    margin-left: 10px;
}

/* Style to ensure coupon row stands out */
.coupon-row {
    border-top: 2px solid #ddd;
    /* Visual separation */
}

#coupon-discount {
    font-weight: bold;
    color: #28a745;
    /* Green for discount, optional */
}

@media (max-width: 576px) {
    .text-end {
        text-align: right !important;
    }

    #coupon-discount {
        font-size: 0.9rem;
    }
}


/* Ensure basket is visible on mobile *//*
@media (max-width: 991.98px) {   
    .navbar-nav {
        flex-direction: column !important;  
    }

    .nav-item {
        padding: 5px 15px;
    }

    #cart-count {
        font-size: 0.9rem;
        padding: 2px 6px;
    }
}
*/
/* Optional: Sticky basket on scroll */
.navbar.fixed-top {
    z-index: 1000;
}

.nav-link {
    white-space: nowrap;
}

/* Customize button size for small devices */
.btn-remove-from-cart {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .btn-remove-from-cart {
        padding: 0.1rem 0.3rem;
        font-size: 0.8rem;
    }

    .btn-remove-from-cart .fas {
        margin: 0;
    }
}

.product-image-container {
    position: relative;
}

.product-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

.image-thumbs {
    display: flex;
    gap: 1px;
    margin-top: 5px;
}

.image-thumbs img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-body {
    flex-grow: 1;
}

.contents-text {
    margin-top: 10px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.contents-text:hover {
    text-decoration: underline;
}

.price-text {
    display: inline;
}

/* Aktiv link highlighting */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: #0d6efd !important;
    font-weight: 600;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
}

/* Bedre mobil styling */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        padding: 15px 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        margin-top: 10px;
    }
    
    .navbar-nav {
        flex-direction: column !important;
        width: 100%;
    }
    
    .nav-item {
        padding: 6px 0;
    }
    
    .nav-link {
        padding: 10px 20px !important;
        font-size: 1.05rem;
    }
    
    .dropdown-menu {
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    }
}

/* Cart badge */
#cart-count {
    font-size: 0.85rem;
    padding: 3px 6px;
}


 /* Ensure price, quantity, and add to basket are always visible */
    .product-card .card-body .price-text,
    .product-card .card-body .mb-2,
    .product-card .card-body .btn-add-to-cart {
      display: block !important;
    }

    /* Default description visibility */
    .product-card .card-body .card-text.description {
      display: block;
    }

    /* Hide toggle and collapse on large screens, show description */
    @media (min-width: 768px) {
      .product-card .card-body .toggle-description {
        display: none;
      }
      .product-card .card-body .collapse.description {
        display: block !important;
      }
    }

    /* On smaller screens, hide description by default */
    @media (max-width: 767.98px) {
      .product-card .card-body .collapse.description {
        display: none;
      }
      .product-card .card-body .toggle-description {
        display: block;
        cursor: pointer;
        font-weight: bold;
        color: #007bff;
      }
      .product-card .card-body .collapse.description.show {
        display: block !important;
      }
    }

    /* Product Image Container */
.product-image-container {
    position: relative;
    width: 100%;
}

.product-image {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

/* Billeder */
.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.card-img-top:hover {
    transform: scale(1.25);
    transition: transform 0.3s ease;
}

/* Videoer - samme størrelse som billeder */
.product-video {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* Gør videoen samme størrelse */
    object-position: center;
}

/* Thumbnail justering */
.thumb-container {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    margin: 3px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
}

.thumb-video,
.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play icon on top of video thumbnail */
.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 24px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
    z-index: 2;
    pointer-events: none;
}

/* Hover + Active effect */
.thumb-container:hover .video-icon,
.thumb-container.active .video-icon {
    color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

    .navbar-collapse {
        background: white;
        padding: 10px;
    }
    @media (max-width: 991.98px) {
        .navbar-nav {
            text-align: center;
        }
    }