/* Importerer Oswald og Poppins fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

/* Sticky indkøbskurv styling */
.wc-mix-tilbud-container {
    padding-bottom: 100px; /* Giver plads til den sticky kurv */
    position: relative;
}

/* Full width bar med begrænset indholdsbredde */
.wc-mix-tilbud-sticky-summary {
    position: fixed;
    bottom: 0px;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 19999 !important;
    border-top: 2px solid #8c7131;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Indre container til indholdet med max-bredde */
.wc-mix-tilbud-sticky-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wc-mix-tilbud-sticky-summary.hide-sticky {
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none;
}

.wc-mix-tilbud-sticky-summary.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Layout for left section */
.wc-mix-tilbud-sticky-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 15px;
}

.wc-mix-tilbud-sticky-center {
    display: none;
}

.wc-mix-tilbud-sticky-right {
    flex: 0 0 auto;
}

/* Count badge */
.wc-mix-tilbud-sticky-count {
    display: flex;
    align-items: center;
    background-color: #8c7131;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Info section */
.wc-mix-tilbud-sticky-info {
    margin-left: 20px;
    flex: 1;
}

.wc-mix-tilbud-sticky-title {
    font-family: "korolev", sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* Message styling */
.wc-mix-tilbud-sticky-message {
    font-size: 13px;
    line-height: 1.3;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.wc-mix-tilbud-sticky-message i {
    margin-right: 5px;
    font-size: 16px;
}

.wc-mix-tilbud-sticky-message.success {
    color: #155724;
}

.wc-mix-tilbud-sticky-message.info {
    color: #0062cc;
}

.wc-mix-tilbud-sticky-message.warning {
    color: #856404;
}

.wc-mix-tilbud-sticky-message.error {
    color: #721c24;
}

/* Pricing section */
.wc-mix-tilbud-sticky-pricing {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wc-mix-tilbud-sticky-original {
    text-decoration: line-through;
    color: #666;
    font-size: 14px;
}

.wc-mix-tilbud-sticky-price {
    font-family: 'poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #C72929;
}

.wc-mix-tilbud-sticky-discount {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    background-color: rgba(140, 113, 49, 0.1);
    color: #8c7131;
    font-size: 12px;
    font-weight: 500;
}

/* Button styling */
.wc-mix-tilbud-sticky-button {
    font-family: "korolev", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #8c7131;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wc-mix-tilbud-sticky-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%) skewX(-30deg);
    transition: transform 0.6s cubic-bezier(0.3, 1, 0.8, 1);
}

.wc-mix-tilbud-sticky-button:hover {
    background-color: #000;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.wc-mix-tilbud-sticky-button:hover::before {
    transform: translateX(100%) skewX(-15deg);
}

.wc-mix-tilbud-sticky-button:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wc-mix-tilbud-sticky-button:disabled::before {
    display: none;
}

/* Visual slots grid */
.wc-mix-tilbud-sticky-visual-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    width: auto;
    max-width: 150px;
    height: auto;
    padding: 5px;
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

.wc-mix-tilbud-sticky-visual-slots.small-set {
    grid-template-columns: repeat(2, 1fr);
}

.wc-mix-tilbud-sticky-visual-slots::-webkit-scrollbar {
    display: none;
}

/* Individual slots */
.wc-mix-tilbud-sticky-slot {
    width: 28px;
    height: 28px;
    position: relative;
    border-radius: 50%;
    background-color: #f8f8f8;
    border: 1px solid #eaeaea;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 2px;
}

.wc-mix-tilbud-sticky-slot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ddd;
    border-radius: 50%;
}

.wc-mix-tilbud-sticky-slot.filled {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

.wc-mix-tilbud-sticky-slot.filled:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: scale(1.1);
}

.wc-mix-tilbud-sticky-slot.filled .wc-mix-tilbud-sticky-slot-placeholder {
    border: none;
}

.wc-mix-tilbud-sticky-slot-image {
    width: 85%;
    height: 85%;
    object-fit: contain;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wc-mix-tilbud-sticky-slot-placeholder::before {
    content: '+';
    color: #ccc;
    font-size: 16px;
    font-weight: 300;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1.05); opacity: 1; }
}

.wc-mix-tilbud-sticky-slot.filled {
    animation: pulse 0.3s ease-in-out;
}

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

/* Responsive design */
@media (max-width: 1650px) {
    .wc-mix-tilbud-sticky-inner {
        max-width: 1400px;
    }
}

@media (max-width: 992px) {
    .wc-mix-tilbud-sticky-visual-slots {
        grid-template-columns: repeat(4, 1fr);
        max-width: 130px;
    }
    
    .wc-mix-tilbud-sticky-slot {
        width: 24px;
        height: 24px;
    }
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .wc-mix-tilbud-container {
        padding-bottom: 120px; /* Øget padding for to-række layout */
    }
    
    .wc-mix-tilbud-sticky-summary {
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-top-width: 1px;
    }
    
    .wc-mix-tilbud-sticky-inner {
        padding: 8px 10px;
        gap: 8px;
        flex-direction: column; /* Skift til kolonne layout */
        align-items: stretch;
    }
    
    /* Top række med count, slots og info */
    .wc-mix-tilbud-sticky-top-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    /* Kompakt left section */
    .wc-mix-tilbud-sticky-left {
        gap: 8px;
        flex: 1;
        min-width: 0; /* Tillader flex shrink */
        width: 100%;
    }
    
    /* Mindre count badge */
    .wc-mix-tilbud-sticky-count {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 8px;
    }
    
    /* Right section (button) får fuld bredde */
    .wc-mix-tilbud-sticky-right {
        width: 100%;
        flex: none;
    }
    
    /* Visual slots på mobil */
    .wc-mix-tilbud-sticky-visual-slots {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        max-width: 85px;
        gap: 3px;
        padding: 3px;
        margin-right: 8px;
    }
    
    .wc-mix-tilbud-sticky-slot {
        width: 22px;
        height: 22px;
        margin: 1px;
    }
    
    .wc-mix-tilbud-sticky-slot-placeholder::before {
        font-size: 12px;
    }
    
    /* Info section optimering */
    .wc-mix-tilbud-sticky-info {
        margin-left: 0;
        flex: 1;
        min-width: 0;
    }
    
    .wc-mix-tilbud-sticky-title {
        font-size: 14px;
        margin-bottom: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .wc-mix-tilbud-sticky-message {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .wc-mix-tilbud-sticky-message i {
        font-size: 12px;
        margin-right: 3px;
    }
    
    /* Pricing optimering */
    .wc-mix-tilbud-sticky-pricing {
        gap: 5px;
        flex-wrap: nowrap;
    }
    
    .wc-mix-tilbud-sticky-original {
        font-size: 11px;
        display: none; /* Skjul original pris på meget små skærme */
    }
    
    .wc-mix-tilbud-sticky-price {
        font-size: 14px;
        font-weight: 600;
    }
    
    .wc-mix-tilbud-sticky-discount {
        font-size: 10px;
        padding: 1px 5px;
    }
    
    /* Fuld bredde button nederst */
    .wc-mix-tilbud-sticky-button {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
        letter-spacing: 0.5px;
        white-space: nowrap;
        margin-top: 4px;
    }
    
    .wc-mix-tilbud-sticky-button i {
        font-size: 14px;
    }
    
    /* Vis original pris igen på tablets */
    @media (min-width: 480px) {
        .wc-mix-tilbud-sticky-original {
            display: inline;
        }
    }
}

/* Meget små skærme */
@media (max-width: 380px) {
    .wc-mix-tilbud-sticky-inner {
        padding: 6px 8px;
        flex-direction: column; /* Behold kolonne layout */
    }
    
    .wc-mix-tilbud-sticky-count {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 6px;
    }
    
    .wc-mix-tilbud-sticky-visual-slots {
        max-width: 75px;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wc-mix-tilbud-sticky-slot {
        width: 20px;
        height: 20px;
    }
    
    .wc-mix-tilbud-sticky-info {
        display: none; /* Skjul info tekst på meget små skærme */
    }
    
    .wc-mix-tilbud-sticky-button {
        width: 100%;
        padding: 8px 12px;
        font-size: 12px;
        gap: 5px;
    }
    
    .wc-mix-tilbud-sticky-right {
        width: 100%;
    }
    
    .wc-mix-tilbud-container {
        padding-bottom: 100px; /* Øget for to-række layout */
    }
}

/* Landscape mobil optimering */
@media (max-width: 768px) and (orientation: landscape) {
    .wc-mix-tilbud-sticky-summary {
        position: fixed;
        bottom: 0;
    }
    
    .wc-mix-tilbud-sticky-inner {
        padding: 5px 10px;
        flex-direction: row; /* Behold række layout i landscape */
        align-items: center;
    }
    
    .wc-mix-tilbud-sticky-right {
        width: auto;
        flex: 0 0 auto;
    }
    
    .wc-mix-tilbud-sticky-button {
        width: auto;
        padding: 8px 14px;
        margin-top: 0;
    }
    
    .wc-mix-tilbud-container {
        padding-bottom: 55px;
    }
}