/* favorit knap styling (i nav) */
.nav-item.heart .material-symbols-outlined {
    color: #f96700;
}
/* Carousel billeder og knapper */
.billede-knapper {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
}
.billede-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.billede-container img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
}
.knap-række {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.tilføj-kurv {
    background-color: #ff7900;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
}
.tilføj-kurv:hover {
    background-color: #e86c00;
}
.tilføj-favorit {
    background: #111;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ff7900;
    font-size: 1.3rem;
}
/* --- BASIS STYLING (Desktop) --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "montserrat", Arial, sans-serif; background-color: #333; }
a { text-decoration: none; color: inherit; }

.main-header {
    background-color: #333;
    padding: 15px 20px;
    color: white;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap; 
}

/* Menu Burger */
.menu-toggle {
    background: black;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 4px;
    order: 1; 
}
.menu-toggle:hover { background: #292929; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: white; }

/* Logo */
.logo { order: 2; margin-right: auto; }
.logo img { height: 30px; display: block; }

/* Søgefelt */
.search-container {
    display: flex;
    flex-grow: 1;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 15px;
    order: 3;
    height: 44px;
}
.search-container input { border: none; padding: 0 12px; flex-grow: 1; outline: none; font-size: 14px; }
.search-btn { background: white; border: none; padding: 0 15px; cursor: pointer; font-size: 18px; }

/* Ikoner gruppe (Chat, Butik, Hjerte) */
.nav-links { display: flex; gap: 10px; order: 4; }

/* Generel knap stil */
.nav-item {
    background-color: black;
    color: #ffffff; 
    padding: 0 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
    height: 44px;
}
.nav-item:hover { background-color: #292929; }

/* Kurven (Orange) - Skal ligge MELLEM nav-links og user på desktop */
.cart-btn {
    background-color: #f96700;
    color: white;
    padding: 0 15px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    order: 5; /* Kommer efter nav-links (hjerte) */
    height: 44px;
}
.cart-btn:hover { background-color: #e35f01; }

/* MyPOWER - Skal ligge TIL SIDST på desktop */
.nav-item.user {
    order: 6; /* Kommer efter kurven */
}

body {
  font-family: "montserrat", Arial, sans-serif;
}

/* --- LOGIN SLUT --- */
/* Dropdown */
.dropdown {
    display: inline-block;
    text-align: left;
    order: 6;
    flex-shrink: 0;
}

.dropdown button {
    background-color: black;
    color: #ffffff; 
    padding: 0 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    height: 44px;
    border: none;
    cursor: pointer;
}

.dropdown button:hover {
    background-color: #292929;
}

.dropbtn:hover {
    background-color: #292929;
}

.dropdown button img {
    width: 24px;
    height: 24px;
}

.dropdown a {
    display: block;
    color: black;
    text-decoration: none;
    padding: 16px 10px;
    border-radius: 6px;
    text-align: left;
    }

.dropdown p {
    margin-right: 106px;
    margin-top: 2px;
    padding: 16px 10px;
    font-weight: bold;
    border-left: 2px;
    text-align: left;
}

.dropdown-content {
    background-color: white;
    position: absolute;
    width: 25%;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.717);
    display: none;
    border-radius: 5px;
    border: 1px solid #333;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #292929;
}

.dropdown a:hover {
    background-color: #f0f0f0;
    color: #333;
}

h3 {
    margin-right: 106px;
    margin-top: 2px;
    padding: 16px 10px;
    font-weight: bold;
    border-left: 2px;
    text-align: left;
    color: #111;
}

/* Sidepanel til login */
.login-panel {
    position: fixed;
    right: -800px;
    top: 0;
    width: 600px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    overflow-x: hidden;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    padding: 30px 20px;
}

.login-panel.open {
    right: 0;
}

.login-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: -10px;
    margin-bottom: 10px;
}

.login-panel .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    font-weight: 50;
    cursor: pointer;
    color: #333;
}

.login-panel .close-btn:hover {
    color: #cf4602;
}

.login-panel h2 {
    margin-top: 0px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #333;
}

.login-panel p {
    margin: 15px 0 10px 0;
    color: #111;
    font-weight: 550;
    font-size: 14px;
}

.login-panel input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.login-panel input:focus {
    outline: none;
    border-color: #f96700;
    box-shadow: 0 0 5px rgba(249, 103, 0, 0.2);
}

.login-panel button {
    width: 100%;
    padding: 12px;
    background-color: #f96700;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
}

.login-panel button:hover {
    background-color: #ce472c;
}

.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 0px;
    margin-bottom: 10px;
}

.login-panel #nyBrugerPanel,
.login-panel #glemt-adgangskodePanel {
    margin-top: 20px;
}

.login-panel a {
    color: #333;
    text-decoration: none;
}

.login-panel a:hover {
    text-decoration: underline;
}

/* Overlay/backdrop */
.login-panel-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
    pointer-events: none;
}

.login-panel-overlay.open {
    display: block;
    pointer-events: auto;
}

.login-logo {
    display: block;
    margin: 0 0 30px 0;
    width: 180px;
    height: auto;
}

.piggy-login {
    display: block;
    margin-left: -10%;
    margin-top: 15px;
    width: 700px;
    height: auto;
}
/* --- LOGIN SLUT --- */

/* --- TABLET / MELLEM (Responsiv) --- */
@media (max-width: 1100px) {
    
    /* 1. Søgefeltet tvinges ned på ny linje */
    .search-container {
        order: 10; /* Højt tal = kommer sent */
        width: auto; 
        margin: 10px 10px 0 0; 
        flex-basis: 60%; 
    }

    /* 2. Kurven tvinges ned ved siden af søgefeltet */
    .cart-btn {
        order: 11; /* Lige efter søgefeltet */
        margin-top: 10px;
        flex-shrink: 0; 
    }

    /* 3. MyPOWER skal blive oppe (før søgefeltet) */
    .nav-item.user {
        order: 5; /* Før søgefeltet hopper ned */
    }

    /* 4. Ikonerne (Nav-links) bliver hvor de er */
    .nav-links {
        order: 3; 
    }

    /* Skjul teksten i knapperne */
    .nav-item .text { display: none; }
    
    /* Gør knapper kvadratiske */
    .nav-item { padding: 0; width: 44px; justify-content: center; }
}

/* --- MOBIL (Skjul chat og find butik) --- */
@media (max-width: 600px) {
    .nav-item.chat, 
    .nav-item.store,
    .cart-btn {
        display: none;
    }
    .search-container { margin-right: 10px; }
}
/* HER ENDER NAV-LINJE */

/* hero-overskriften større */
.hero h1 {
    font-size: 3rem;
    letter-spacing: 2px;
    font-weight: 400;
}
body {
    margin: 0;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    background-image: url(../images/power-city-baggrund.png);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* Hero med billede */
.hero {
    background-image: url(../images/power-city-baggrund.png);
    background-size: contain;
    background-position: center;
    color: white;
    padding: 80px 20px;
    text-align: center;
}

/* tekst+indhold sektion */
.content {
     background-color: #000000;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    margin: 20px;
    padding: 20px;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(2px);

}

.footer-billede {
    background-image: url(../images/footer-billede.png);
    width: 100%;
    min-height: 400px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #474747;
    z-index: 100;
    margin-top: auto;
}

/*carousel css*/
.carousel {
max-width: 1000px;
  position: relative;
  margin: auto;
}

.mySlides {
  display: none;
}

.mySlides img {
    width: 170px;
    height: auto;
    border-radius: 10px;
    max-width: 100%;
    object-fit: contain;
  }

/* forrige og næste knapper */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  user-select: none;
  transition: 0.6s ease;
}

.prev { left: 0; }
.next { right: 0; }

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}


/* Fade animation */
.fade {
  animation-name: fade;
  animation-duration: 1s;
}
/* Animation keyframes for fade effekt*/ 
@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}


/* INDKØBSKURV STYLING */

/* Backdrop (Mørk baggrund) */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
}

.backdrop.vis {
    display: block;
}

/* Sidebar (Selve kurven) */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px; /* Desktop bredde */
    max-width: 100%; /* Mobil sikring */
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 9999; /* Skal ligge over alt andet (også backdrop) */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    font-family: 'Montserrat', sans-serif;
}

.sidebar.vis {
    transform: translateX(0);
}

/* Cart Header */
.cart-header {
    padding: 20px;
    background-color: white;
}

.luk-knap {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

.faner {
    display: flex;
    margin-top: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.fane {
    padding-bottom: 10px;
    margin-right: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #777;
    position: relative;
    top: 2px;
}

.fane.aktiv {
    color: #ef6637;
    border-bottom: 2px solid #ef6637;
    font-weight: bold;
}

/* Indhold */
.indhold {
    flex: 1;
    padding: 30px;
    text-align: center;
    overflow-x: hidden;
    color: #333;
}

.indhold h2 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 20px;
}

.indhold p {
    font-size: 14px;
    line-height: 1.5;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.shop-knap {
    width: 100%;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    color: #333;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.shop-knap:hover {
    background-color: #f0f0f0;
}

/* Styling til 'Senest Sete' beskeden */
.tom-besked {
    margin-top: 40px;
}
.emoji-stor {
    font-size: 50px;
    display: block;
    margin-bottom: 20px;
}
/* --- BASIS STYLING (Desktop) --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; background-color: #f9f9f9; } /* Rettet bg farve */
a { text-decoration: none; color: inherit; }

/* --- HEADER STYLES --- */
.main-header {
    background-color: #333;
    padding: 15px 0;
    color: white;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 14.3%;
    width: auto; 
    flex-wrap: wrap; 
}

/* Menu Burger & Logo & Search & Nav Items */
.menu-toggle { background: black; border: none; padding: 12px; border-radius: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; order: 1; }
.menu-toggle:hover { background: #292929; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: white; }
.logo { order: 2; margin-right: auto; }
.logo img { height: 30px; display: block; }
.search-container { display: flex; flex-grow: 1; background: white; border-radius: 4px; overflow: hidden; margin: 0 15px; order: 3; height: 44px; }
.search-container input { border: none; padding: 0 12px; flex-grow: 1; outline: none; font-size: 14px; }
.search-btn { background: white; border: none; padding: 0 5px; cursor: pointer; font-size: 18px; }
.nav-links { display: flex; gap: 10px; order: 4; }
.nav-item.heart .material-symbols-outlined { color: #f96700; }
.nav-item { background-color: black; color: #ffffff; padding: 0 15px; border-radius: 4px; font-size: 14px; font-weight: bold; display: flex; align-items: center; gap: 8px; height: 44px; }
.nav-item:hover { background-color: #292929; }
.cart-btn { background-color: #f96700; color: white; padding: 0 15px; border-radius: 4px; display: flex; align-items: center; justify-content: center; order: 5; height: 44px; }
.cart-btn:hover { background-color: #e35f01; }
.nav-item.user { order: 6; }

/* MEDIA QUERIES */
@media (max-width: 1100px) {
    .header-container { margin: 0 20px; }
    .nav-links { order: 3; }
    .nav-item.user { order: 4; }
    .search-container { order: 5; margin: 10px 10px 0 0; width: auto; flex-grow: 1; flex-basis: 50%; }
    .cart-btn { order: 6; margin-top: 10px; flex-shrink: 0; }
    .nav-item .text { display: none; }
    .nav-item { padding: 0; width: 44px; justify-content: center; }
}
@media (max-width: 600px) {
    .nav-item.chat, .nav-item.store { display: none; }
    .search-container { margin-right: 10px; }
}

/* SIDE LAYOUT */
.page-content {
    margin: 0 14.3%;
    padding-top: 20px;
}

/* Tablet justering af sidens margin */
@media (max-width: 1100px) {
    .page-content { margin: 0 20px; }
}

/* --- Tilbage Knap --- */
.back-btn-container {
    margin-bottom: 20px;
    text-align: left; 
}

.back-link { 
    text-decoration: none; 
    color: #555; 
    font-size: 14px;
    display: inline-flex; 
    align-items: center; 
    font-weight: 500;
}
.back-link i { margin-right: 8px; font-size: 14px; }
.back-link:hover { text-decoration: underline; color: #000; }

/* --- Indhold --- */
.header-content { text-align: center; margin-bottom: 40px; }
.header-content h1 { font-size: 32px; margin-bottom: 10px; font-weight: 900; }
.header-content p { color: #555; max-width: 600px; margin: 0 auto; line-height: 1.5; }

.container { 
    max-width: 100%; /* Fylder page-content ud */
    margin: 0 auto; 
}

.create-btn { 
    background: white; border: 1px solid #ddd; padding: 15px 20px; 
    border-radius: 5px; font-weight: bold; cursor: pointer; 
    display: flex; align-items: center; justify-content: space-between; 
    width: 250px; margin-bottom: 30px; 
}

/* Liste Styles */
.list-wrapper { margin-bottom: 20px; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.list-header { background-color: #444; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.list-info { display: flex; gap: 20px; align-items: center; width: 100%; }
.list-name { font-weight: bold; flex-grow: 1; }
.list-meta { font-size: 14px; color: #ddd; min-width: 100px; text-align: right; }
.arrow-icon { transition: transform 0.3s ease; }
.arrow-icon.open { transform: rotate(180deg); }
.list-content { display: none; padding: 40px 20px; text-align: center; border: 1px solid #eee; border-top: none; }
.list-content.show { display: block; }
.empty-state i.box { font-size: 60px; color: #ddd; margin-bottom: 10px; }
.empty-state i.heart { font-size: 30px; color: #ff5a14; position: relative; top: -30px; }
.empty-text { color: #555; margin: 20px 0; max-width: 500px; margin-left: auto; margin-right: auto; }
.edit-btn { background: white; border: 1px solid #ddd; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: 20px; }
.product-item { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 15px 0; text-align: left; }
.product-placeholder-img { width: 60px; height: 60px; background-color: #ddd; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #999; font-size: 20px; flex-shrink: 0; }
.product-info { display: flex; flex-direction: column; flex-grow: 1; margin-left: 15px; }
.product-name { font-weight: bold; font-size: 14px; margin-bottom: 4px; }
.product-price { color: #ff5a14; font-weight: bold; }

/* --- PANELER --- */
#overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
#overlay.show { opacity: 1; visibility: visible; }

#create-list-panel, #edit-list-panel {
    position: fixed; top: 0; right: -600px; width: 450px; height: 100%;
    background: white; z-index: 1100; box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
#create-list-panel.open, #edit-list-panel.open { right: 0; }

.panel-header { padding: 20px 30px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.mypower-logo { font-style: italic; font-weight: 900; font-size: 24px; color: white; background: black; padding: 5px 10px; transform: skewX(-10deg); }
.mypower-logo span { color: #ff5a14; }
.close-panel-btn { background: none; border: none; font-size: 30px; cursor: pointer; color: #999; }
.panel-body { padding: 30px; flex-grow: 1; }
.panel-body h2 { font-size: 22px; margin-top: 0; margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: bold; font-size: 14px; }
.input-group input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 16px; }
.input-group input:focus { outline: none; border-color: #ff5a14; }
.error-text { color: #e00; font-size: 13px; margin-top: 5px; display: none; }
.panel-footer { padding: 20px 30px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 15px; background: #fff; }
.btn-cancel { background: white; border: 1px solid #ccc; color: #333; padding: 12px 24px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-save { background: #ff5a14; border: none; color: white; padding: 12px 30px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-save:hover { background-color: #e04e10; }

/* Toggle Switch */
.delete-toggle-group { display: flex; align-items: center; margin-top: 10px; }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: #ff5a14; }
input:checked + .slider:before { transform: translateX(24px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
/* Responsiv: På mobil skal kurven fylde hele skærmen */
@media (max-width: 600px) {
    .sidebar {
        width: 100%;
    }
}

