body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffc0cb;
}

header {
    background-color: #fb4570;
    color: white;
    padding: 15px;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

header input, header button {
    margin-left: 10px;
}

#kop_summas_container {
    font-size: 18px;
}

main {
    text-align: center;
    padding: 20px;
}

#kontakti span, #kontakti a {
    display: inline-block;
    margin-right: 20px;
}

#produkti_container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.produkts {
    background-color: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: calc(20% - 20px);
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.produkts img {
    width: 100%;
    height: 200px; /* Piespiedu augstums, lai visi attēli būtu vienādi */
    object-fit: cover; /* Attēlu apgriešana, lai tie labi izskatītos */
    display: block;
    cursor: pointer; /* Pievieno pirkstiņa kursoru, kad uzbrauc uz attēla */
}

.produkts h3, .produkts p {
    margin: 10px 0;
}

.produkts button {
    background-color: #fb4570;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    margin-top: auto; /* Lai poga vienmēr būtu apakšā */
}

.produkts button:hover {
    background-color: #FF8BDA;
}

/* Lightbox pamatstils */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Fons, kas aptumšo ekrānu */
    display: none; /* Sākotnēji neredzams */
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Lai Lightbox būtu virs visiem citiem elementiem */
}

/* Lightbox aktīvais stāvoklis */
#lightbox.active {
    display: flex; /* Padara Lightbox redzamu un centrētu */
}

/* Lightbox attēla stils */
#lightbox img {
    max-width: 90%; /* Attēls aizņems 90% no ekrāna platuma */
    max-height: 90%; /* Attēls aizņems 90% no ekrāna augstuma */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7); /* Neliela ēna zem attēla */
    border-radius: 10px; /* Nedaudz noapaļoti stūri */
}

/* Krustiņš Lightbox aizvēršanai */
#lightbox .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer; /* Pievieno pirkstiņa kursoru krustiņam */
    z-index: 10001; /* Augstāks z-index, lai būtu virs attēla */
}

/* Hover efekts krustiņam */
#lightbox .close-btn:hover {
    background-color: rgba(0, 0, 0, 0.9); /* Mazliet tumšāks fons hover laikā */
}

/* Mobilajām ierīcēm */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header input, header button {
        margin-left: 0;
        margin-top: 10px;
    }

    #kop_summas_container {
        font-size: 16px;
    }

    #kontakti span, #kontakti a {
        margin-right: 10px;
    }

    #produkti_container {
        flex-direction: column;
        gap: 10px;
    }

    .produkts {
        width: 100%; /* Katrs produkts aizņems visu platumu */
    }

    .produkts img {
        height: auto; /* Attēlu augstums pielāgosies saturam */
    }
}
