/* BASE – ισχύει παντού */
.homepage .titles {
    margin-left: 1.5rem;
    margin-top: 3rem;
    font-size: 25px;
    color: black;
    font-weight: bold;
}

/* ΓΡΑΜΜΕΣ */
.homepage hr {
    border: none;
    border-top: 3px solid black;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.items-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.items-cards .items-card-link {
    text-decoration: none;
    color: inherit;
}

.items-cards .items-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    
}


.items-cards .items-card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;   /* ομαλή μετάβαση */
    transform-origin: center;          /* κάνει το zoom από το κέντρο */
}
.items-card:hover .items-card-img {
    transform: scale(1.08);            /* πόσο zoom να κάνει */
}


.items-cards .items-card-content {
    padding: 15px;
}

.items-cards .items-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
}

.items-cards .items-card-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.4;
}

.items-cards .items-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #d63333;
}
.items-cards .items-card-code {
    font-size: 18px;
    font-weight: 700;
    color: #3105cf;
    margin: 1rem 0 1rem 0;
}

.items-cards .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
}

.items-cards .quantity-box {
    display: flex;
    align-items: center;
    justify-content: center;   /* ΚΕΝΤΡΑΡΙΣΜΑ ΟΡΙΖΟΝΤΙΑ */
    gap: 6px;
    margin: 10px auto;         /* κεντράρει ολόκληρο το box */
    width: fit-content;        /* ώστε να μην απλώνεται */
}


.items-cards .qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #ddd;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
}

.items-cards .qty-input {
    width: 45px;
    text-align: center;
    font-size: 16px;
    padding: 4px;
}

.items-cards .add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 10px;
}

.items-cards .add-to-cart-btn:hover {
    background: #3e8e41;
}
.items-cards .items-card-stock {
    color: green;
    font-weight: bold;
    margin: 1rem 0 1rem 0;
}
.tooltip {
  position: fixed;
  max-width: 260px;
  background: #fff;
  border: 1px solid #d0d7de;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  font-size: 0.92rem;
  line-height: 1.35;
  color: #111;
  pointer-events: none;
  z-index: 1000000;
}

.has-tooltip {
  font-size: 1rem;
  color: #666;
  padding: 0 0.57rem 0.57rem;
  text-align: left;
  letter-spacing: -0.65px;
  line-height: 1.2;
}
.page-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  padding-right: 3rem; /* ⬅️ ΤΟ ΚΕΝΟ ΠΟΥ ΘΕΛΕΙΣ */
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;
  border-radius: 999px;

  background: #ffffff;
  color: #444;
  border: 1px solid #e0e0e0;

  font-size: 14px;
  font-weight: 500;
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: #f7f7f7;
  border-color: #ccc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.back-btn:active {
  transform: translateY(1px);
}


@media only screen and (min-width: 240px) and (max-width: 600px) and (orientation: portrait) {

    .homepage .title {
        margin-left: 1rem;
    }

    /* ΓΡΑΜΜΕΣ */
    .homepage hr{
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .items-cards {
        grid-template-columns: 1fr;   /* ✅ 1 κάρτα ανά σειρά */
        padding-left: 1rem;           /* ✅ 1rem δεξιά-αριστερά */
        padding-right: 1rem;
        gap: 16px;                    /* λίγο πιο σφιχτό mobile */
    }

    .items-card {
        border-radius: 12px;          /* πιο “mobile friendly” */
    }

    .items-card-title {
        font-size: 17px;
    }

    .items-card-description {
        font-size: 14px;
    }

    .items-card-price {
        font-size: 17px;
    }

    .quantity-box {
        margin: 12px auto;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }
}

@media only screen and (min-width: 481px) and (max-width: 950px) and (orientation: landscape) {
    .homepage .title{
        margin-left: 1rem;
    }

    /* ΓΡΑΜΜΕΣ */
    .homepage hr{
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .items-cards {
        grid-template-columns: repeat(2, 1fr);  /* ✅ 2 κάρτες */
        padding-left: 1rem;                   /* άνετο spacing */
        padding-right: 1rem;
        gap: 20px;
    }

    .items-card-title {
        font-size: 17px;
    }

    .items-card-description {
        font-size: 14px;
    }

    .items-card-price {
        font-size: 17px;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }
}

@media only screen and (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
    .homepage .title{
        margin-left: 1rem;
    }

    /* ΓΡΑΜΜΕΣ */
    .homepage hr{
        margin-left: 1rem;
        margin-right: 1rem;
    }
    .items-cards {
        grid-template-columns: repeat(2, 1fr);  /* ✅ 2 κάρτες */
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 20px;
    }

    .items-card-title {
        font-size: 18px;
    }

    .items-card-description {
        font-size: 15px;
    }

    .items-card-price {
        font-size: 18px;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }
}

@media only screen and (min-width: 951px) and (max-width: 1366px) and (orientation: landscape) {

    /* 🔒 ΚΟΙΝΟΣ CONTAINER */
    .homepage-container {
        max-width: 1200px;      /* σταθερό πλάτος grid */
        margin: 0 auto;         /* ίσα κενά αριστερά / δεξιά */
        padding: 1.2rem;        /* κοινό padding για όλα */
    }

    /* 🏷️ ΤΙΤΛΟΣ */
    .homepage .titles {
        margin: 0 0 0.8rem 0;   /* ΧΩΡΙΣ left margin */
        font-size: 25px;
    }

    /* ➖ ΓΡΑΜΜΗ */
    .homepage hr {
        margin: 0 0 1rem 0;   /* ΧΩΡΙΣ left/right margin */
    }

    /* 🧱 GRID ΚΑΡΤΩΝ */
    .items-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    /* 🃏 CARD TYPOGRAPHY */
    .items-card-title {
        font-size: 18px;
    }

    .items-card-description {
        font-size: 15px;
    }

    .items-card-price {
        font-size: 18px;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }
}


@media only screen and (min-width: 1367px) and (max-width: 1599px) and (orientation: landscape) {
    .homepage .titles {
        margin-left: 1.4rem;
    }

    .homepage hr {
        margin-left: 1.4rem;
        margin-right: 1.4rem;
    }
    .items-cards {
        grid-template-columns: repeat(4, 1fr);  /* ✅ 4 κάρτες */
        padding-left: 1.4rem;
        padding-right: 1.4rem;
        gap: 28px;
        justify-content: stretch;
    }

    .items-card-title {
        font-size: 18px;
    }

    .items-card-description {
        font-size: 15px;
    }

    .items-card-price, .items-card-code {
        font-size: 18px;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }

}

@media only screen and (min-width: 1600px) and (max-width: 1920px) and (orientation: landscape) {
    .homepage .titles {
        margin-left: 1.5rem;
    }

    .homepage hr {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .items-cards {
        grid-template-columns: repeat(4, 1fr);  /* ✅ 4 κάρτες */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        gap: 32px;
        justify-content: stretch;
    }

    .items-card-title {
        font-size: 19px;
    }

    .items-card-description {
        font-size: 15px;
    }

    .items-card-price {
        font-size: 19px;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }
}

@media only screen and (min-width: 1921px) {

    .homepage .titles {
        margin-left: 1.8rem;
    }

    .homepage hr {
        margin-left: 1.8rem;
        margin-right: 1.8rem;
    }


    .items-cards {
        grid-template-columns: repeat(6, 1fr);  /* ✅ 6 κάρτες */
        padding-left: 1.8rem;
        padding-right: 1.8rem;
        gap: 32px;
        justify-content: stretch;
    }

    .items-card-title {
        font-size: 20px;
    }

    .items-card-description {
        font-size: 16px;
    }

    .items-card-price {
        font-size: 20px;
    }
    .has-tooltip {
    display: -webkit-box;          /* ✅ απαιτείται για να λειτουργήσει το clamp */
    -webkit-box-orient: vertical;  /* ✅ κατεύθυνση box */
    -webkit-line-clamp: 3;         /* ✅ 3 γραμμές */
    line-clamp: 3;                 /* 🔹 για μελλοντική standard υποστήριξη */
    overflow: hidden;
    white-space: normal;
    line-height: 1.5em;
    min-height: calc(1.5em * 3);   /* ✅ σταθερό ύψος για 3 γραμμές */
    margin: 0 0 1rem 0;            /* απόσταση από κουμπί */
    padding: 0 0.5rem;             /* αέρας δεξιά–αριστερά */
    text-align: left;              /* φυσική στοίχιση */
    word-break: break-word;        /* αν έχει πολύ μεγάλες λέξεις */
  }
}

