body, h1,h2,h3,h4,p,ul,li,table,th,td { margin:0; padding:0; }
body { font-family: system-ui, sans-serif; background:#fff; color:#222; line-height:1.5; }
a { color:#0073e6; text-decoration:none; }
a:hover { text-decoration:underline; }

/* Layout */
header, footer { background:#f9f9f9; padding:10px 15px; border-bottom:1px solid #ddd; }
.logo { font-weight:bold; font-size:1.5em; color:#000; text-decoration:none; }
main { max-width:1100px; margin:auto; padding:15px; }
h1,h2,h3 { margin:1em 0; }
img { max-width:100%; height:auto; display:block; }

/* Desktop default */
.product-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product-info { flex: 2 1 400px; text-align: left; }
.product-image-wrapper { flex: 1 1 250px; display: flex; flex-direction: column; gap: 10px; }
.product-image { text-align: left; }
.barcode { text-align: left; }
.barcode img { max-width: 200px; height: auto; }

.mobile-product-image {
    display: none;
}

@media (max-width: 768px) {
  .search-toggle {
    display: block;
  }
  
  
.search-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;

}

.search-toggle svg {
  width: 22px;
  height: 22px;
  stroke: #1aa84b;
  stroke-width: 2;
  fill: none;
}



}



/* Mobile adjustments */
@media(max-width:768px) {

    .mobile-product-image {
        display: block;
        margin: 10px 0;
        text-align: center;
    }

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

    /* Hide original image wrapper on mobile */
    .product-image-wrapper {
        display: none;
    }

    .product-header {
        flex-direction: column;
        gap: 15px;
    }

    /* Product info appears first */
    .product-info {
        order: 1;
        flex: 1 1 100%;
        text-align: left;
    }

    /* Image + barcode below info */
    .product-image-wrapper {
        order: 2;
        flex-direction: row; /* image + barcode side by side */
        justify-content: flex-start;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .product-image, .barcode {
        flex: 1 1 auto;
        max-width: 50%;
        text-align: left;
    }

    .barcode img { max-width: 120px; height: auto; }

    /* Optional spacing for details section */
    .product-info .details {
        margin-top: 15px;
    }

    /* Top info (name, price, button) spacing */
    .product-info .top-info h1 { margin-bottom: 8px; font-size: 1.4em; }
    .product-info .top-info .price { margin-bottom: 8px; }
    .product-info .top-info .buy { margin-top: 0; }
        .product-info .top-info .bestdeal { margin-top: 0; }
}


h1 {
    margin-top: 0.5em; /* smaller top margin */
    margin-bottom: 0.5em; /* optional, reduce bottom margin */
}

.old {
    text-decoration: line-through;
    color: #888; /* optional: makes it greyed out */
    margin-right: 5px;
}

.discount {
    color: #d9534f; /* red-ish for discount */
    font-weight: bold;
    margin-right: 5px;
}


@media(max-width:768px) {
    h1 {
        font-size: 1.4em; /* matches your intended mobile size */
    }
}



/* Prices */
.price { font-size:1.2em; margin:10px 0; }
.price .old { text-decoration:line-through; color:#999; margin-right:8px; }
.price .new { color:#c00; font-weight:bold; font-size:1.4em; }
.buy { display:inline-block; padding:10px 15px; background:#0a0; color:#fff; margin-top:10px; border-radius:4px; }
.bestdeal {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #01559a, #0a0);
  color: #fff;
  margin-top: 10px;
  border-radius: 8px;
  text-decoration: none; /* ensures no underline */
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  cursor: pointer;
}

.bestdeal:hover {
  background: linear-gradient(135deg, #0170c0, #0a0);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  text-decoration: none; 
}



.price-table th:nth-child(2), 
.price-table td:nth-child(2) {
    width: 50%;
    word-break: break-word;
}


/* Mobile Adjustment: allow table to scroll or stack if 50% is too wide */
@media(max-width:768px) {



    /* Force table to behave like a list */
    .price-table, .price-table thead, .price-table tbody, .price-table th, .price-table td, .price-table tr { 
        display: block; 
    }

    /* Hide the header row (Shop, Produkt, etc.) */
    .price-table thead { display: none; }

    .price-table tr {
        border: 1px solid #ddd;
        border-bottom: 3px solid #ddd;
        margin-bottom: 15px;
        padding: 10px;
        border-radius: 8px;
        background: #fff;
    }

    .price-table td {
    border-bottom: none !important;
        border: none;
        padding: 5px 0;
        text-align: center; /* Centers everything in the card */
        width: 100% !important; /* Overrides the 50% desktop rule */
    }
    
    .price-table td img { } /* Center the shop logo */
    div[style*="overflow-x:auto"] {
        overflow-x: visible !important;
    }

    /* Prevent the table itself from leaking out */
    .price-table {
        width: 100% !important;
        table-layout: auto; /* Reset fixed layout for block mode */
    }
}



/* Table */
.price-table { width:100%; border-collapse:collapse; margin:20px 0;    table-layout: fixed; }
.price-table th, .price-table td { padding:10px; border-bottom:1px solid #eee; text-align:left; }
.price-table th { background:#f4f4f4; }
.price-table .discount { color:#c00; font-weight:bold; }

/* Similar products grid */
.products, .grid { list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:15px; margin-top:10px; }
.products li { border:1px solid #ddd; padding:10px; text-align:center; border-radius:4px; }
.products li img { max-height:150px; object-fit:contain; margin-bottom:5px; }

/* Footer */
footer { border-top:1px solid #ddd; padding:15px; text-align:center; font-size:0.9em; color:#555; }

/* Cookie notice */
#cookie { position:fixed; bottom:0; left:0; right:0; background:#000; color:#fff; padding:10px; display:flex; justify-content:space-between; align-items:center; z-index:999; }
#cookie button { background:#0073e6; border:none; color:#fff; padding:5px 10px; cursor:pointer; border-radius:3px; }

/* Responsive fixes */
@media(max-width:768px) {
    .product-header { flex-direction:column; }
    .product-info, .product-image { flex:1 1 100%; }
    .price-table th, .price-table td { font-size:0.9em; }
}

/* === Homepage / Product Grid === */
.products-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
    gap: 15px;
    margin: 20px 0;
}

.products-grid li {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.products-grid li:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.products-grid img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f9f9f9;
}

.products-grid a {
    text-decoration: none;
    color: #222;
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.products-grid strong {
    font-size: 0.95em;
    margin-top: 8px;
    display: block;
}

.products-grid .meta {
    font-size: 0.85em;
    color: #555;
    margin-top: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #0073e6;
    text-decoration: none;
}

.pagination a:hover {
    background: #0073e6;
    color: #fff;
}

/* Headings */
.homepage h1 { font-size: 2em; margin-bottom:10px; }
.homepage h2 { font-size: 1.5em; margin-top:20px; margin-bottom:10px; }

/* Responsive tweaks */
@media(max-width:768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
    }
    .products-grid img {
        height: 140px;
    }
}


/* =========================
   Base
========================= */

.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.site-header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Logo */
.logo img {
  height: 52px;
}

/* =========================
   Mobile Search Toggle
========================= */


/* =========================
   Search Form
========================= */

.search-form {
  display: none;
  padding: 12px 16px 16px;
  border-top: 1px solid #eee;
}

.search-form input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
}

.search-form button {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #1aa84b;
  color: #fff;
  font-weight: 600;
}

/* =========================
   Mobile States
========================= */

.mobile-show-toggle .search-toggle {
  display: block;
}

.mobile-search-open .search-form {
  display: block;
}

@media (min-width: 768px) {

.header-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}



.search-toggle  {
display:none;
}


  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
  }

  .header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  /* Desktop search form */
  .search-form {
    display: flex;
    align-items: center;
    flex: 1;           /* input fills remaining space */
    max-width: 520px;
    margin-left: 20px;
    border-top: none;
  }

  .search-form input {
    flex: 1;           /* fill remaining space */
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 1rem;
    line-height: 1.2;
    box-sizing: border-box;
  }

.search-form button {
    flex: 0 0 auto;       
    width: auto;          /* FIX: Overrides the 100% width from mobile */
    margin-top: 0;        /* FIX: Overrides the 10px margin from mobile */
    height: 42px;
    padding: 0 16px;      
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: #1aa84b;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  /* Remove any margin */
  .search-form input,
  .search-form button {
    margin: 0;
  }
}

.product-content {
    margin: 20px 0;
    padding: 18px 20px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1f2933;
    line-height: 1.6;
}

/* Base h3 style */
.product-content h3 {
    margin: 18px 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    border-left: 4px solid #005199; /* default for first */
    padding-left: 10px;
}

/* Second h3 in .product-content */
.product-content h3:nth-of-type(2) {
    border-left-color: #06927f; /* middle color */
}

/* Third h3 in .product-content */
.product-content h3:nth-of-type(3) {
    border-left-color: #0d9764; /* final color */
}


/* Paragraphs */
.product-content p {
    margin: 8px 0 12px;
    font-size: 14.5px;
    color: #334155;
}

/* Lists */
.product-content ul {
    margin: 8px 0 16px 18px;
    padding: 0;
}

.product-content li {
    margin: 6px 0;
    font-size: 14.5px;
    color: #334155;
}

/* Highlight questions */
.product-content li strong {
    color: #0f172a;
    font-weight: 600;
}

/* Mobile friendly */
@media (max-width: 600px) {
    .product-content {
        padding: 14px 14px;
    }

    .product-content h3 {
        font-size: 16px;
    }

    .product-content p,
    .product-content li {
        font-size: 14px;
    }
}




