/* ==============================
   GLOBAL
   ============================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #1b1919;
    color: #000;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* ==============================
   HEADER
   ============================== */

.site-header {
    width: 100%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.site-header h1 {
    margin: 0;
    padding: 6px 12px;
    font-size: 28px;
    font-weight: 900;
    color: #000;
    background: #f9f9f9;
    border: 6px solid #000;
    border-radius: 10px;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.header-nav a {
    display: inline-block;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    color: #000;
    background: #f9f9f9;
    border: 4px solid #000;
    border-radius: 8px;
    transition: transform .2s;
}

.header-nav a:hover {
    transform: scale(1.08);
}

/* ==============================
   FEEDS (INDEX)
   ============================== */

.feed-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 16px;
}

.feed-column {
    background: #2d2828;
    border: 4px solid #000;
    border-radius: 20px;
    padding: 10px;
}

.feed-column h2 {
    background: #f9f9f9;
    border: 4px solid #000;
    border-radius: 12px;
    font-size: 26px;
    text-align: center;
    margin-bottom: 12px;
}

.feed-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feed-column li {
    background: #f9f9f9;
    border: 4px solid #000;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    transition: transform .2s;
}

.feed-column li:hover {
    transform: translateY(-4px);
}

.feed-column a {
    color: #000;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    display: block;
}

/* ==============================
   ABOUT PAGE
   ============================== */

.about-section {
    max-width: 1200px;
    margin: 16px auto;
    padding: 16px;
    background: #f9f9f9;
    border: 6px solid #000;
    border-radius: 14px;
    overflow-x: hidden;
}

.about-section h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    text-decoration: underline;
    margin-bottom: 16px;
}

/* ==============================
   MARKET TABLE
   ============================== */

.market-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 16px;
}

.market-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
    border: 4px solid #000;
    border-radius: 12px;
    overflow: hidden;
}

.market-table th,
.market-table td {
    border: 2px solid #000;
    padding: 12px 14px;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.market-table th {
    background: #fff;
}

.market-table a {
    color: #000;
    text-decoration: none;
}

.market-table a:hover {
    text-decoration: underline;
}

.chg-up { color: #1a8f3a; }
.chg-down { color: #c62828; }

@media (max-width: 768px) {
    .market-table-wrap::after {
        content: "⬅ σύρε για να δεις περισσότερα ➡";
        display: block;
        text-align: center;
        font-size: 13px;
        color: #555;
        margin-top: 6px;
    }
}

/* ==============================
   FRUIT & VEG CONTROLS
   ============================== */

.fv-controls {
    margin: 20px auto 0;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fv-controls label {
    font-weight: 700;
}

.fv-controls select {
    padding: 12px 14px;
    border: 3px solid #000;
    border-radius: 10px;
    font-size: 16px;
}

/* ==============================
   FRUIT & VEG CHART
   ============================== */

.fv-chart-wrap {
    margin-top: 16px;
    background: #fff;
    border: 3px solid #000;
    border-radius: 12px;
    padding: 12px;
    height: 360px;
}

.fv-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.fv-meta {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #333;
}

/* ==============================
   CONTACT PAGE
   ============================== */

.contact-section {
    max-width: 600px;
    margin: 16px auto;
    padding: 16px;
    background: #f9f9f9;
    border: 6px solid #000;
    border-radius: 14px;
    text-align: center;
}

/* ==============================
   FOOTER
   ============================== */

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 16px;
    border-top: 6px solid #000;
}

/* ==============================
   COTTON BLOCK – FINAL FIX
   HTML-compatible with your markup
   ============================== */

.cotton-container {
    width: 100%;
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 16px;

    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

/* Multiplier dropdown */
.cotton-multiplier-container {
    background: #f9f9f9;
    border: 4px solid #000;
    border-radius: 12px;
    padding: 12px;

    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 220px;
    max-width: 320px;
    flex: 1;
}

.cotton-multiplier-container label {
    font-weight: 800;
    font-size: 14px;
}

.cotton-multiplier-container select {
    width: 100%;
    padding: 10px;
    border: 3px solid #000;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
}

/* Cotton info cards */
#cotton-info-section1,
#cotton-info-section2 {
    background: #f9f9f9;
    border: 4px solid #000;
    border-radius: 12px;
    padding: 12px;

    flex: 1;
    min-width: 240px;
    max-width: 520px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

/* Fix h2 inside cotton cards */
#cotton-info-section1 h2,
#cotton-info-section2 h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    color: #000;
}

/* Mobile behavior */
@media (max-width: 768px) {
    .cotton-container {
        flex-direction: column;
        padding: 0 10px;
    }

    .cotton-multiplier-container,
    #cotton-info-section1,
    #cotton-info-section2 {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-weight: 800;
        font-size: 16px;
    }

    #cotton-info-section1 h2,
    #cotton-info-section2 h2 {
        font-size: 14px;
    }
}


/* ==============================
   MOBILE
   ============================== */

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 10px;
    }

    .header-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .about-section {
        margin: 10px;
        padding: 12px;
    }

    .market-table {
        min-width: 680px;
    }

    .fv-chart-wrap {
        height: 300px;
    }
}
