/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #333 url('../img/viking-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    max-width: 100%;
    box-sizing: border-box;
    padding-top: 200px;
}

/* Header */
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

header img {
    max-height: auto;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Products Grid */
#products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px auto;
    max-width: 1200px;
}

.product {
    border: 1px solid #777;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.product img {
    width: 85%;
    height: auto;
    cursor: pointer;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.product img:hover {
    transform: scale(1.2);
}

/* Cart and Checkout Styling */
.cart-checkout-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

.cart, .checkout {
    flex: 1 1 45%;
    padding: 20px;
    border: 1px solid #777;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Checkout Form Styling */
#checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #444;
    border-radius: 10px;
    color: #fff;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
}

input {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #888;
    border-radius: 5px;
    background-color: #333;
    color: white;
}

input:hover {
    border-color: #007BFF;
}

button {
    background-color: transparent;
    color: white;
    border: 1px solid #777;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button:hover {
    background-color: #555;
    color: white;
}

/* Specific Buttons */
button.clear {
    background-color: rgba(255, 0, 0, 0.5);
    border-color: #FF0000;
}

button.clear:hover {
    background-color: rgba(255, 0, 0, 0.7);
}

button.submit {
    background-color: rgba(0, 128, 0, 0.5);
    border-color: #008000;
}

button.submit:hover {
    background-color: rgba(0, 128, 0, 0.7);
}

/* Ensure hover priority */
button.clear:hover, button.submit:hover {
    background-color: inherit;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup img {
    max-width: 80%;
    max-height: 80%;
    border: 5px solid #fff;
    border-radius: 10px;
}

.popup .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-checkout-container {
        flex-direction: column;
    }

    #products {
        grid-template-columns: repeat(2, 1fr);
    }

    #checkout-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #products {
        grid-template-columns: 1fr;
    }
}


/* === FunBadge Pastel Theme Overrides (2025-10-27) === */

/* Global pastel background with gentle motion */
body {
    font-family: 'Poppins', Arial, sans-serif;
    color: #333;
    background: linear-gradient(135deg, #ffd6e0, #d1e8ff, #fff0b3, #e5d1ff);
    background-size: 400% 400%;
    animation: pastelFlow 20s ease infinite;
    padding-top: 180px;
}

@keyframes pastelFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header light glass */
header {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.logo-bg {
    background: radial-gradient(circle at center, #fff7ff 0%, #e7c9ff 40%, #c5e7ff 100%);
    padding: 15px 30px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.logo-bg:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}
.header-logo {
    height: 80px;
    width: auto;
    border-radius: 20px;
}

/* Grid layout more fluid */
#products {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Product cards turn light and rounded */
.product {
    background: linear-gradient(180deg, #ffffffcc, #f8f8ffcc);
    border: none;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.product img {
    width: 80%;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}
.product img:hover {
    transform: scale(1.05);
}

/* Sunburst pastel buttons */
button {
    background: radial-gradient(circle at 30% 30%,
        #fff0ff 0%,
        #ffe8f7 30%,
        #ffd6e0 60%,
        #e0f4ff 100%);
    border: none;
    color: #333;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: radial-gradient(circle at 70% 70%,
        #fffaff 0%,
        #f7d8ff 30%,
        #ffcce5 70%,
        #d1f0ff 100%);
}

/* Clear and Submit buttons keep semantic hints via subtle borders */
button.clear { border: 1px solid #ff9aa2; }
button.submit { border: 1px solid #a7e8bd; }

/* Cart & checkout panels */
.cart, .checkout {
    background: #ffffffcc;
    border: none;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    color: #333;
}

/* Form layout light theme */
#checkout-form {
    background-color: #ffffff;
    border-radius: 16px;
    color: #333;
}
input, textarea {
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus {
    border-color: #a88bff;
    box-shadow: 0 0 0 4px rgba(168,139,255,0.15);
    outline: none;
}

/* Popup light */
.popup {
    background-color: rgba(255, 255, 255, 0.85);
}
.popup img {
    border: 5px solid #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.popup .close {
    color: #333;
}



/* === FunBadge Flowing Multi-Pastell Buttons (2025-10-27) === */
:root {
    --flowDur: 12s;        /* default animation duration */
    --sunX: 35%;
    --sunY: 35%;
}

/* Base style for flowing buttons */
button.btn-fun {
    position: relative;
    overflow: hidden;
    color: #333;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.3s ease;
    /* Two-layer background: static sunburst + animated gradient flow */
    background-image:
        radial-gradient(circle at var(--sunX) var(--sunY),
            #ffe6f2 0%,
            #e0d7ff 25%,
            #d6f5e6 55%,
            #ffe7cc 100%),
        linear-gradient(135deg,
            #ffd6e0 0%,
            #d1e8ff 25%,
            #e7d1ff 50%,
            #c8f2dc 75%,
            #ffe0b3 100%);
    background-size: 200% 200%, 400% 400%;
    background-position: center, 0% 50%;
    animation: funFlow var(--flowDur) linear infinite;
}

button.btn-fun:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 24px rgba(0,0,0,0.16);
    filter: brightness(1.03);
}

@keyframes funFlow {
    0%   { background-position: center,   0% 50%; }
    50%  { background-position: center, 100% 50%; }
    100% { background-position: center,   0% 50%; }
}

/* Keep .clear and .submit also pastel if they don't get btn-fun applied */
button.clear.btn-fun { border: 1px solid #ff9aa2; }
button.submit.btn-fun { border: 1px solid #a7e8bd; }



/* === Välkomsttitel under loggan === */

/* === Välkomsttitel i Coca-Cola-stil (Pacifico) === */

/* === Välkomsttitel under loggan med glittereffekt === */
.welcome-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.6em;
    margin-top: 8px;
    text-align: center;
    letter-spacing: 1px;
    background: linear-gradient(
        90deg,
        #ffb6d9,
        #c3b6ff,
        #9fe6ff,
        #b7ffce,
        #ffdf9f
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 8s ease infinite, glitter 5s linear infinite;
    -webkit-text-stroke: 1px black; /* tunnare ram */
    text-stroke: 1px black;
    text-shadow:
        0 0 8px rgba(255,255,255,0.6),
        1px 1px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}



/* Mjuk färgförflyttning för välkomsttexten */
@keyframes textFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Lätt glitterreflex som sveper över texten */
@keyframes glitter {
    0% { text-shadow: 0 0 8px rgba(255,255,255,0.7), 1px 1px 4px rgba(0,0,0,0.3); }
    50% { text-shadow: 0 0 14px rgba(255,255,255,1), 1px 1px 4px rgba(0,0,0,0.2); }
    100% { text-shadow: 0 0 8px rgba(255,255,255,0.7), 1px 1px 4px rgba(0,0,0,0.3); }
}



/* === Headerlayout med loggor på sidorna (2025-10-27) === */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 40px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 0 0 25px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-flex .header-logo {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}
.header-flex .header-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Centrera och styla välkomsttiteln (behåller glitter & stroke) */
.header-flex .welcome-title {
    flex: 1;
    text-align: center;
    margin: 0 20px;
    font-family: 'Pacifico', cursive;
    font-size: 2.6em;
    background: linear-gradient(90deg,#ffb6d9,#c3b6ff,#9fe6ff,#b7ffce,#ffdf9f);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 8s ease infinite, glitter 5s linear infinite;
    -webkit-text-stroke: 1px black;
    text-stroke: 1px black;
    text-shadow: 0 0 8px rgba(255,255,255,0.6), 1px 1px 4px rgba(0,0,0,0.3);
}

/* Mobilanpassning */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        gap: 8px;
        padding: 15px 10px;
        border-radius: 0 0 18px 18px;
    }
    .header-flex .header-logo {
        width: 80px;
    }
    .header-flex .welcome-title {
        font-size: 2em;
        margin: 6px 0 0 0;
    }
}



/* === Headerlayout med pastell, rundade hörn och parallax (2025-10-27) === */
.header-flex {
    --parallaxY: 0px; /* updated by JS */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 40px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffd6e0, #d1e8ff, #e7d1ff, #c8f2dc, #ffe0b3);
    background-size: 300% 300%;
    background-position: 50% var(--parallaxY);
    border-radius: 0 0 26px 26px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
}

/* clickable logos */
.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.header-flex .header-logo {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
    transition: transform 0.35s ease, filter 0.35s ease;
}

@media (hover:hover) {
  .header-flex .header-logo:hover {
      transform: rotate(12deg) scale(1.06);
      filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
  }
}

/* Centered welcome title stays pastel + stroke */
.header-flex .welcome-title {
    flex: 1;
    text-align: center;
    margin: 0 20px;
    font-family: 'Pacifico', cursive;
    font-size: 2.6em;
    background: linear-gradient(90deg,#ffb6d9,#c3b6ff,#9fe6ff,#b7ffce,#ffdf9f);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 8s ease infinite, glitter 5s linear infinite;
    -webkit-text-stroke: 1px black;
    text-stroke: 1px black;
    text-shadow: 0 0 8px rgba(255,255,255,0.6), 1px 1px 4px rgba(0,0,0,0.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        gap: 8px;
        padding: 16px 12px;
        border-radius: 0 0 18px 18px;
    }
    .header-flex .header-logo {
        width: 82px;
    }
    .header-flex .welcome-title {
        font-size: 2.1em;
        margin: 6px 0 0 0;
    }
}



/* === Logo reflection + pulserande pastellram i headern (2025-10-27) === */

/* Gör headern position:relative så vi kan lägga en ram med ::after */
.header-flex {
    position: relative;
    overflow: hidden; /* håller reflektion/ram i schack på små skärmar */
}

/* Tunn, pulserande pastellram runt headern */
.header-flex::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 0 26px 26px;
    pointer-events: none;
    box-shadow:
        0 0 0 2px rgba(255, 214, 224, 0.65),
        0 0 22px rgba(209, 232, 255, 0.35),
        inset 0 0 24px rgba(231, 209, 255, 0.25);
    animation: headerBorderPulse 6s ease-in-out infinite;
}

@keyframes headerBorderPulse {
    0%, 100% {
        box-shadow:
            0 0 0 2px rgba(255, 214, 224, 0.55),
            0 0 12px rgba(209, 232, 255, 0.25),
            inset 0 0 14px rgba(231, 209, 255, 0.18);
    }
    50% {
        box-shadow:
            0 0 0 2px rgba(255, 214, 224, 0.85),
            0 0 28px rgba(209, 232, 255, 0.45),
            inset 0 0 28px rgba(231, 209, 255, 0.32);
    }
}

/* Spegeleffekt under loggorna (stöd i WebKit-baserade browsers) */
.header-flex .header-logo {
    -webkit-box-reflect: below 4px
        linear-gradient(transparent 0%, rgba(0,0,0,0.03) 30%, rgba(0,0,0,0.12) 100%);
}

/* Lite mindre reflektion på mobiler för att spara plats */
@media (max-width: 768px) {
    .header-flex .header-logo {
        -webkit-box-reflect: below 2px
            linear-gradient(transparent 0%, rgba(0,0,0,0.03) 30%, rgba(0,0,0,0.10) 100%);
    }
}
/* === Mobil/surfplatta: minska varorna till 50% (2025-10-27) === */


  .product img {
    width: 50%;
  }

  .product h3 {
    font-size: 0.9em;
  }

  .product p,
  .product button {
    font-size: 0.9em;
  }
}

/* Mindre mobiler: två kolumner och justerad spacing */
@media (max-width: 768px) {
  #products {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 6px;
  }
}

/* Små telefoner: en kolumn men samma 50%-skalning */
@media (max-width: 480px) {
  #products {
    grid-template-columns: 1fr;
  }
}


/* === Cart item thumbnails (mini) === */
#cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #ffffffcc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cart-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cart-thumb:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.item-main { display: grid; gap: 2px; }
.item-title { font-weight: 700; font-size: 14px; }
.item-title small { font-weight: 600; color: #667085; }
.item-meta { font-size: 13px; color: #475467; }

.item-actions { display: flex; gap: 6px; margin-top: 6px; }
.item-actions button { padding: 6px 10px; border-radius: 10px; }

.btn-remove {
  appearance: none;
  border: 1px solid #ff9aa2;
  background: #fff0f3;
  color: #7a1f2b;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

/* === Telefon: smartare layout per orientering (2025-10-29) === */

/* Bas: ge lite mindre min-bredd så fler kan få plats när det finns utrymme */
#products {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Telefon PORTRÄTT: större rutor, färre kolumner (lättläst) */
@media (max-width: 768px) and (orientation: portrait) {
  #products {
    grid-template-columns: repeat(2, minmax(170px, 1fr)); /* 2 i bredd, större rutor */
    gap: 8px;
    padding: 0 10px;
  }
  .product {
    padding: 14px;          /* lite mer yta i kortet */
    border-radius: 16px;
  }
  .product img {
    width: 100%;            /* gör bilden stor och tydlig */
  }
  .product h3 { 
    font-size: 1rem; 
    margin: 6px 0; 
  }
  .size-options { gap: 4px; }
  .size-option { padding: 6px 10px; }
  .size-name, .size-price { font-size: 12.5px; }
}

/* Telefon LANDSKAP: tajtare grid, fler i bredd */
@media (max-width: 768px) and (orientation: landscape) {
  #products {
    grid-template-columns: repeat(3, minmax(140px, 1fr)); /* 3 i bredd på liten horisontell skärm */
    gap: 6px;            /* mindre mellanrum */
    padding: 0 8px;
  }
  .product {
    padding: 12px;       /* kompakt kort för att få in fler */
    border-radius: 14px;
  }
  .product img { width: 100%; }
  .product h3 { font-size: .95rem; margin: 6px 0; }
  .size-option { padding: 5px 8px; grid-column-gap: 10px; }
  .size-name, .size-price { font-size: 12px; }
}

/* Mycket små telefoner: fallback till 1–2 kolumner beroende på orientering */
@media (max-width: 420px) and (orientation: portrait) {
  #products { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}
@media (max-width: 420px) and (orientation: landscape) {
  #products { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

/* Telefon: minska header-padding-top för att ge mer plats åt produkter */
@media (max-width: 768px) {
  body { padding-top: 140px; } /* var 180px */
}


/* === Logo splash overlay — ren logo, responsiv, mjuk fade (merge 2025-10-29) === */
#logo-splash {
  --splashIntroSec: var(--splashFadeSec);
  --splashVisibleSec: 3s;
  --splashFadeSec: 1.5s;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation-name: splashFadeOutLogo;
  animation-duration: var(--splashFadeSec);
  animation-delay: var(--splashVisibleSec);
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}
#logo-splash img {
  width: clamp(160px, 28vw, 420px);
  height: auto;
  animation: logoIntroOnce var(--splashIntroSec) ease-out both;
  will-change: transform, opacity;
}
@media (max-width: 1024px) {
  #logo-splash img { width: clamp(160px, 28vw, 420px); }
}
@media (max-width: 600px) {
  #logo-splash img { width: clamp(160px, 28vw, 420px); }
}
@keyframes splashFadeOutLogo {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.94); visibility: hidden; }
}
@keyframes logoIntroOnce {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #logo-splash { animation-duration: var(--splashFadeSec); }
  @keyframes splashFadeOutLogo {
    0%   { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
  }
}
  @keyframes splashFadeOutLogo {
    0%   { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
  }
}
  @keyframes splashFadeOutLogo {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
  }
}


/* Större logga på stora skrivbordsskärmar */
@media (min-width: 1400px) {
  #logo-splash img { width: clamp(200px, 22vw, 520px); }
}

/* --- Rabattkod & totals (coupon system) --- */
.totals { display: grid; gap: 10px; margin-top: 10px; }
.money-line {
  display: flex; align-items: center; justify-content: space-between;
  background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 10px 12px; color: #333;
}
.money-line.total-due { border-color: #a88bff; box-shadow: 0 2px 8px rgba(168,139,255,0.15); }
.coupon-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  align-items: center;
}
.coupon-row .input { background:#fff; }


/* === Förbättrad placering & synlighet för Tillbaka-knapp (2025-11-01) === */
.btn-back {
  position: fixed; /* alltid synlig i övre högra hörnet */
  top: 18px;
  right: 20px;
  background: radial-gradient(circle at 35% 35%, #fff0ff 0%, #ffe8f7 30%, #ffd6e0 60%, #e0f4ff 100%);
  border: 2px solid rgba(168,139,255,0.6); /* tydlig ram i pastellton */
  box-shadow: 0 4px 15px rgba(0,0,0,0.15), inset 0 0 8px rgba(255,255,255,0.5);
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  padding: 10px 20px;
  border-radius: 50px;
  z-index: 4000;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-back:hover {
  transform: translateY(-2px) scale(1.05);
  background: radial-gradient(circle at 70% 70%, #fffaff 0%, #f7d8ff 30%, #ffcce5 70%, #d1f0ff 100%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 0 10px rgba(255,255,255,0.8);
  border-color: rgba(168,139,255,0.9);
}
.btn-back:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(168,139,255,0.25);
}
@media (max-width: 768px) {
  .btn-back {
    top: 10px;
    right: 10px;
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}




/* === Header stripe fix & top spacing (2025-11-01) === */
body { padding-top: 60px !important; } /* minska stora toppmarginalen som gav "rand" långt ned */
header { 
  position: static !important; 
  background: transparent !important; 
  padding: 0 !important; 
  height: 0 !important; 
  box-shadow: none !important; 
}
.header-flex { 
  background: transparent !important; 
  box-shadow: none !important; 
  padding: 0 !important; 
  height: 0 !important; 
  min-height: 0 !important; 
  border: 0 !important;
}
.header-flex::after { display: none !important; } /* ta bort pulserande ram som kunde synas som en rand */




/* === HARD OVERRIDES for Back Button visibility (2025-11-01) === */
.btn-back {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  border-radius: 50px !important;
  background: radial-gradient(circle at 35% 35%, #fff0ff 0%, #ffe8f7 30%, #ffd6e0 60%, #e0f4ff 100%) !important;
  border: 2px solid rgba(168,139,255,0.8) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18), inset 0 0 8px rgba(255,255,255,0.6) !important;
  color: #333 !important;
  font-weight: 800 !important;
  font-size: 0.98rem !important;
  text-decoration: none !important;
  z-index: 9000 !important; /* above splash (5000) and modals unless opened */
  pointer-events: auto !important;
}
.btn-back:hover {
  transform: translateY(-2px) scale(1.04) !important;
  background: radial-gradient(circle at 70% 70%, #fffaff 0%, #f7d8ff 30%, #ffcce5 70%, #d1f0ff 100%) !important;
  border-color: rgba(168,139,255,1) !important;
}
/* If a modal opens, it should still be above; that's ok. This ensures visibility during normal browsing. */

