/* Generel container for grid og loader */
.apr-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 2em 0;
    box-sizing: border-box;
}

/* Selve produkt-griddet */
.apr-grid .apr-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

/* Styling for hvert produktkort */
.apr-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    height: 100%;
}

.apr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.apr-card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.apr-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #532128;
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.apr-card-image {
    aspect-ratio: 1 / 1;
    background-color: #f3f4f6;
    overflow: hidden;
}

.apr-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 8px;
    box-sizing: border-box;
}

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

.apr-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.apr-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
    margin: 0 0 12px 0;
    min-height: 44px;
    word-break: break-word;
}

.apr-card-price {
    margin-top: auto;
    font-size: 18px;
    font-weight: 700;
}

.apr-card .old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 14px;
    margin-right: 8px;
}

.apr-card .new-price {
    color: #10b981;
}

.apr-card-footer {
    padding: 0 16px 16px 16px;
}

.apr-card-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #37512b;
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.apr-card-button:hover {
    background-color: #2a3d20;
}

.apr-loader-wrap {
    text-align: center;
    padding: 2em;
}

.apr-loader {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

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

/* === Enkelt Produkt Side Styling === */
.apr-product-single-container, .apr-product-single-container * { box-sizing: border-box; }
.apr-product-single-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #374151; background: #fff; margin: 2em 0; overflow: hidden; width: 100%; }
.apr-product-single { display: grid; grid-template-columns: 1fr; gap: 2em; max-width: 1100px; margin-left: auto; margin-right: auto; padding: 1em; }
@media (min-width: 768px) { .apr-product-single { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3em; padding: 2em; } }
.apr-product-single img { max-width: 100%; height: auto; display: block; }
.apr-product-single-gallery img { border-radius: 12px; border: 1px solid #e5e7eb; width: 100%; }
.apr-product-single-brand { font-size: 14px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 0.5em; }
.apr-product-single-title { font-size: 24px; font-weight: 800; line-height: 1.2; color: #111827; margin: 0 0 0.5em 0; word-break: break-word; overflow-wrap: break-word; }
@media (min-width: 768px) { .apr-product-single-title { font-size: 36px; } }
.apr-product-single-price { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 1em; }
.apr-product-single-price .old-price { font-size: 20px; text-decoration: line-through; color: #9ca3af; }
.apr-product-single-price .new-price { font-size: 28px; font-weight: 700; color: #10b981; }
.apr-product-single-meta { display: flex; flex-wrap: wrap; gap: 1em; font-size: 14px; margin-bottom: 1.5em; padding-bottom: 1.5em; border-bottom: 1px solid #e5e7eb; }
.apr-meta-stock.in-stock { color: #059669; }
.apr-meta-stock.out-of-stock { color: #dc2626; }
.apr-product-single-actions { display: flex; flex-direction: column; gap: 1em; margin-bottom: 1.5em; }
.apr-product-single-button { display: block; width: 100%; text-align: center; background-color: #215328; color: white; padding: 16px; border-radius: 4px; text-decoration: none; font-size: 18px; font-weight: 600; transition: background-color 0.2s ease; }
.apr-product-single-button:hover { background-color: #163a1c; }
.apr-product-single-logo { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #6b7280; }
.apr-product-single-logo span { flex-shrink: 0; white-space: nowrap; }
.apr-product-single-logo img { max-height: 24px; width: auto; flex-shrink: 0; }
.apr-product-single-description h3 { font-size: 18px; margin-bottom: 0.5em; border-bottom: 2px solid #3b82f6; padding-bottom: 0.25em; display: inline-block; }
.apr-product-single-description .prose { line-height: 1.6; color: #4b5563; word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
.apr-product-single-description .prose * { max-width: 100%; }
.apr-product-single-description .prose table { display: block; overflow-x: auto; white-space: nowrap; border-collapse: collapse; width: 100%; }
.apr-product-single-disclaimer { font-size: 11px; color: #9ca3af; margin-top: 1.5em; font-style: italic; }

/* === Glider Slider Styles === */
.apr-slider-container { margin: 2em 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.glider-contain { position: relative; }
.glider-track { display: flex; gap: 15px; }
.glider.draggable { cursor: grab; }
.glider.draggable:active { cursor: grabbing; }

.glider { padding: 0 1px; }

.glider .apr-card {
    /* **FIX: Matcher den nye itemWidth fra JS** */
    min-width: 230px;
    width: 230px;
}

.glider-prev, .glider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0;
}
.apr-slider-container:hover .glider-prev, .apr-slider-container:hover .glider-next { opacity: 1; }
.glider-prev:hover, .glider-next:hover { background: white; transform: translateY(-50%) scale(1.1); }
.glider-prev { left: -12px; }
.glider-next { right: -12px; }
.glider-prev.disabled, .glider-next.disabled { opacity: 0.2; cursor: default; pointer-events: none; }
.glider-prev svg, .glider-next svg { width: 22px; height: 22px; }

/* Styling for CTA-kort */
.apr-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    padding: 20px;
    box-sizing: border-box;
}
.apr-card-cta-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    color: #37512b; 
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    width: 100%;
    height: 100%;
    transition: all 0.2s ease;
}
.apr-card-cta-link:hover {
    background: #e5e7eb;
    border-color: #37512b;
    color: #2a3d20;
}
.glider-track{
        margin-left: -35px;
    padding-left: 35px;
}