/* Põhiseaded kogu lehele */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #000000; /* Tume tekst */
    line-height: 1.6;
}

/* Konteiner, mis hoiab sisu keskel ja piirab laiust */
.konteiner {
    max-width: 1000px;
    margin: 0 auto; /* Keskendab konteineri */
    padding: 0 20px; /* Natuke õhku külgedele */
}

/* 1. Päise stiilid (vana kood) */
header {
    background-color: #4a7c59; /* Metsaroheline */
    color: white;
    padding: 20px 0;
    border-bottom: 3px solid #3b6347; /* Tumedam roheline äär */
}

header .konteiner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lehe-nimi {
    margin: 0;
    font-size: 2em;
}

/* 2. Üldine nupu stiil (vana kood) */
.nupp {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none; /* Eemaldab lingilt allakriipsutuse */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.avaleht-nupp {
    background-color: #f0e6d2;
    color: #4a7c59;
    border: 1px solid #4a7c59;
}

.avaleht-nupp:hover {
    background-color: #e6dac8;
}

/* 3. Põhisisu ja tooteploki stiilid (vana kood) */
main {
    padding: 120px 0 40px 0;
}

.toode {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: #ffffff; /* Valge taust tooteplokile */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.toote-pilt {
    flex: 1;
    min-width: 300px;
}

.toote-pilt img {
    max-width: 100%;
    height: auto;
}

.toote-info {
    flex: 2;
    min-width: 300px;
}

.toote-info h2 {
    margin-top: 0;
    font-size: 2.2em;
    color: #3b6347;
}

/*
=========================================
 REITINGU LINGI STIIL (PARANDATUD)
=========================================
*/
/* See teeb reitingu lingiks ilma, et see näeks välja nagu link */
.reiting-link {
    text-decoration: none; /* Eemaldab ALLAKRIIPSUTUSE */
    color: inherit; /* Pärib vanema värvi */
    cursor: pointer;
    display: inline-block;
}

/* Väike efekt hiirega peal olles */
.reiting-link:hover .toote-reiting {
    opacity: 0.8;
}
/* =========================================
 REITINGU STIILID (PARANDATUD)
========================================= */

.toote-reiting {
    display: flex;
    align-items: center;
    gap: 8px; /* Tühimik tärnide konteineri ja teksti vahel */
    margin-bottom: 20px;
    margin-top: -10px;
}

/* See konteiner hoiab täis ja tühjad tärnid koos */
.toote-reiting .tahed-konteiner {
    display: flex; /* Liidab tärnid kokku */
}

.toote-reiting .tahed-taidetud {
    color: #f1c40f;
    font-size: 1.5em;
    letter-spacing: 2px; /* Väike vahe sümbolite vahel */
}

.toote-reiting .tahed-tuhjad {
    color: #ccc;
    font-size: 1.5em;
    letter-spacing: 2px; /* Väike vahe sümbolite vahel */
}

.toote-reiting .reitingu-tekst {
    color: #555;
    font-size: 0.9em;
    padding-top: 5px;
}
/* =========================================
 REITINGU STIILID LÕPPEVAD
========================================= */


.kirjeldus {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.hind {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

.lisa-korvi-nupp {
    background-color: #d9a05b;
    color: white;
    border: none;
    font-size: 1.2em;
    padding: 15px 30px;
}

.lisa-korvi-nupp:hover {
    background-color: #c88f4a;
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 0.9em;
}

/*
=========================================
 SARNASED TOOTED (See kood oli sul juba olemas)
=========================================
*/

.sarnased-tooted {
    margin-top: 60px;
    border-top: 1px solid #ddd;
    padding-top: 40px;
}

.sarnased-tooted h2 {
    font-size: 1.8em;
    color: #3b6347;
    margin-bottom: 30px;
    text-align: center;
}

.sarnased-tooted .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.4rem;
}

.sarnased-tooted .card {
    background: #ffffff;
    border: 1px solid #e7ede9;
    border-radius: 14px;
    overflow: clip;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(10, 20, 10, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.sarnased-tooted .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(10, 20, 10, .12);
}

.sarnased-tooted .card__media {
    position: relative;
    aspect-ratio: 4/3;
    background: #f3f6f4;
    overflow: hidden;
}

.sarnased-tooted .card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sarnased-tooted .card__body {
    padding: 1rem;
}

.sarnased-tooted .card__title {
    margin: .1rem 0 .25rem;
    font-size: 1.05rem;
}

.sarnased-tooted .card__title a {
  text-decoration: none;
  color: inherit;
}
.sarnased-tooted .card__title a:hover {
  text-decoration: underline;
}

.sarnased-tooted .card__price {
    margin: 0 0 .25rem;
    font-weight: 700;
    color: #1b3f2e;
}

/*
=========================================
 HINNANGUTE SEKTSIOON (See kood oli sul juba olemas)
=========================================
*/
.toote-hinnangud {
    margin-top: 60px;
    border-top: 1px solid #ddd;
    padding-top: 40px;
}

.toote-hinnangud h2 {
    font-size: 1.8em;
    color: #3b6347;
    margin-bottom: 30px;
    text-align: center;
}

.hinnangu-plokk {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.hinnangu-pais {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.hinnangu-tahed {
    color: #f1c40f;
    font-size: 1.1em;
}

.hinnangu-autor {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.hinnangu-tekst {
    color: #555;
    font-size: 1em;
    line-height: 1.5;
}