/* Basic reset or base adjustments */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Navigation/Brand Section */
nav.navbar {
    background-color: #fff !important;
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav.navbar .navbar-brand {
    font-size: 1.1em;
    font-weight: bold;
    color: #000;
    text-decoration: none;
}
.nav-container {
    display: flex;
    align-items: center;
    /* We will use space-between first, then center the search container using margin:auto */
    justify-content: space-between;
    padding: 0px 0px;
    background-color: #fff;
    border-bottom: 0px solid #ddd;
    width: 100%; /* Full width of the navbar */
}

.navbar-brand {
    display: inline-block;
}

.brand-logo {
    max-height: 140px;
    display: block;
}

.brand-subtitle {
    font-size: 0.9em;
    color: #333;
    margin-top: 5px;
}

.search-container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start; /* Align form and label to the right */
    margin: 0 auto; /* Centers the search-container within the nav space */
    gap: 10px;
}

.search-label {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    text-align: left; /* Align label text to the right to match the form */
}

.search-form {
    display: flex;
    align-items: center;
}

.search-box {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
    /* Add some horizontal padding inside the box to match the target's spacious look */
}

.search-input {
    border: none;
    padding: 12px; /* Increased padding for a bigger look */
    font-size: 1rem;
    width: 600px; /* Increased width for a bigger search field */
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #888;
    font-size: 1rem;
}

.search-button {
    background: #fff;
    border: none;
    border-left: 1px solid #ccc;
    padding: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background-color: #f1f1f1;
}
/* Container and spacing */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

h1 {
    margin-bottom: 20px;
    font-weight: normal;
}

/* Page Title */
.page-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: left;
}

/* Product Table Styles */
.product-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    margin-bottom: 30px;
    table-layout: fixed; /* Ensures columns stay aligned */
}

.product-table th, .product-table td {
    padding: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    text-align: left;
    overflow: hidden;       /* For long text */
    text-overflow: ellipsis; /* ... if text is too long */
    white-space: nowrap;    /* Prevent columns from wrapping if undesired */
}

.product-table thead th {
    background-color: #343a40; /* Dark header background */
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    text-align: left;
    white-space: nowrap;
    position: relative;
}

.product-table td {
    font-size: 1rem;
    color: #333;
    cursor: pointer;
}

/* On hover, highlight row */
.product-table tr:hover {
    background-color: #f9f9f9;
}

/* Sorting Headers */
.sortable-header {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
}

.sortable-header:hover {
    text-decoration: none; /* No underline on hover */
}

.sort-icon-img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 5px;
}

/* Product Columns */
.product-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #000;
    white-space: normal; /* Allow wrapping if needed */
}

.product-meta {
    font-size: 0.9em;
    color: #666;
    white-space: normal;
}

.product-table.product-expiry, .product-country {
    text-align: right;
    font-size: 1rem;
    color: #333;
    white-space: nowrap;
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: center;
    margin-top: 20px;
}

.pagination .page-item a {
    text-decoration: none;
    color: #007bff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 2px;
}

.pagination .page-item a:hover {
    background-color: #007bff;
    color: #fff;
}

.pagination .page-item.active a {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    cursor: default;
}

.pagination .page-item.disabled a {
    color: #aaa;
    border: 1px solid #ddd;
    background-color: #f1f1f1;
    cursor: not-allowed;
}

/* Breadcrumb Bar */
.breadcrumb-bar {
    background-color: #a3281d;
    color: #fff;
    padding: 10px 0;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
}
.btn-secondary {
    text-decoration: none;
    color: #fff;
    display: inline-block;
}
.breadcrumb-bar .container {
    font-size: 1.1rem;
}

.breadcrumb-bar span {
    color: #fff;
}

/* Media queries dla breadcrumb-bar */
@media (max-width: 767px) {
    .breadcrumb-bar {
        padding: 12px 0;
    }
    
    .breadcrumb-bar .container {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .btn-secondary {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}

.text-available {
    color: #28a745; /* Bootstrap green for available */
    font-weight: bold;
}

.text-unavailable {
    color: #dc3545; /* Bootstrap red for unavailable */
    font-weight: bold;
}



.product-detail-container {
    margin-bottom: 20px; /* or any spacing you prefer */
  }
  
  .product-image-col {
    text-align: center; /* center the image horizontally if desired */
    margin-bottom: 20px; /* spacing on smaller screens where columns stack */
  }
  
  .product-main-image {
    max-width: 100%;
    height: auto;
  }
  .product-image-col {
    border-right: 1px solid #ddd; 
    /* The line color #ddd is common for a subtle divider.
       Adjust thickness, color, or style as needed (e.g., #ccc, dashed, etc.) */
  }
  .product-info-col {
    display: flex;
    flex-direction: column;
    justify-content: center; /* optional vertical centering */
    padding: 10px; /* horizontal spacing for the text column */
  }
  
  .product-detail-product-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
  }
  
  .text-available {
    color: #28a745;
    font-weight: bold;
  }
  
  .text-unavailable {
    color: #dc3545;
    font-weight: bold;
  }
  
  .product-description {
    margin-top: 15px;
    line-height: 1.5;
  }
  
.product-detail.product-ean{
    color: #dc3545;
    font-weight: bold;
    font-size: 1.8rem;
    align-self: center;
}

  .product-detail.product-expiry {
    margin: 5px 0;
  }
  
  .shop-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 15px;
  }
  
  .shop-btn:hover {
    background-color: #333;
  }
  
/* Media Queries dla responsywności - bardziej uniwersalne podejście */
/* Duże ekrany */
@media (min-width: 1200px) {
    .search-input {
        width: 500px;
    }
}

/* Średnie ekrany (laptopy, małe desktopy) */
@media (min-width: 992px) and (max-width: 1199px) {
    .search-input {
        width: 400px;
    }
}

/* Tablety i małe laptopy */
@media (min-width: 768px) and (max-width: 991px) {
    .search-input {
        width: 300px;
    }
    
    /* Dostosowanie tabeli produktów */
    .product-table th, .product-table td {
        padding: 8px;
        font-size: 0.95rem;
    }
}

/* Duże telefony i małe tablety */
@media (min-width: 576px) and (max-width: 767px) {
    .search-input {
        width: 250px;
    }
    
    .brand-logo {
        max-height: 100px;
    }
    
    /* Dostosowanie tabeli produktów */
    .product-table th, .product-table td {
        padding: 6px;
        font-size: 0.9rem;
    }
    
    .product-table thead th {
        white-space: normal;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-meta {
        font-size: 0.85rem;
    }
    
    /* Dostosowanie paginacji */
    .pagination-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .brand-subtitle {
        font-size: 0.85em;
        max-width: 100%;
        word-wrap: break-word;
        line-height: 1.4;
    }
}

/* Małe i średnie telefony - układ pionowy */
@media (max-width: 575px) {
    .search-input {
        width: 90%;
        max-width: 300px;
    }
    
    .search-box, .search-form {
        width: 100%;
    }
    
    .brand-logo {
        max-height: 90px;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: center;
    }
    
    .navbar-brand {
        margin-bottom: 15px;
        text-align: center;
    }
    
    .search-container {
        align-items: center;
        width: 100%;
    }
    
    /* Dostosowanie tabeli produktów */
    .product-table {
        table-layout: auto;
    }
    
    .product-table th, .product-table td {
        padding: 5px;
        font-size: 0.85rem;
        white-space: normal;
    }
    
    .product-table thead th {
        font-size: 0.85rem;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-meta {
        font-size: 0.8rem;
    }
    
    .sort-icon-img {
        width: 12px;
        height: 12px;
        margin-left: 2px;
    }
    
    /* Dostosowanie kolumn tabeli */
    .product-table th:nth-child(1) {
        width: 55%;  /* Kolumna z nazwą produktu */
    }
    
    .product-table th:nth-child(2) {
        width: 25%;  /* Kolumna z datą ważności */
    }
    
    .product-table th:nth-child(3) {
        width: 20%;  /* Kolumna z krajem pochodzenia */
    }
    
    /* Dostosowanie paginacji */
    .pagination-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .per-page-selector {
        margin-bottom: 10px;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .pagination .page-item a {
        padding: 3px 6px;
        font-size: 0.8rem;
    }
    
    .brand-subtitle {
        font-size: 0.8em;
        width: 100%;
        word-wrap: break-word;
        white-space: normal;
        hyphens: auto;
        text-align: center;
        line-height: 1.5;
    }
}

/* Tryb poziomy dla telefonów i małych tabletów */
@media (max-width: 991px) and (orientation: landscape) {
    .search-input {
        width: 300px;
    }
    
    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .brand-logo {
        max-height: 70px;
    }
    
    .search-container {
        margin-left: 20px;
    }
    
    /* Dostosowanie tabeli w trybie poziomym */
    .product-table th, .product-table td {
        padding: 6px;
        font-size: 0.9rem;
    }
    
    .brand-subtitle {
        font-size: 0.8em;
        max-width: 100%;
        word-wrap: break-word;
        white-space: normal;
    }
}

