.title-font {
    font-family: "Grey Qo", cursive;
    font-size: 60px !important;
}

h1, h2, h3 {
    font-family: "Libre Franklin";
    font-weight: 400 !important;
    color: #2C2C2C;
}

h4, h5, h6, p {
    font-family: "Libre Franklin";
    font-weight: 300 !important;
    color: #2C2C2C;
}

body {
    font-family: "Libre Franklin" !important;
    margin: 0;
    padding: 0;
    color: #2C2C2C;
}

.background-img { 
    background: linear-gradient(135deg, #fdf0e9 0%, #fef9f4 40%, #f5f0fa 100%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.page-wrapper {
    padding: 20px;
}

/* NAVBAR */

.navbar-custom {
    background-color: #C45653 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.navbar-custom .navbar-brand {
    color: white !important;
    font-size: 1.3rem;
    font-weight: 400;
}

.nav-item {
    width: 100px;
}

.nav-item a {
    color: whitesmoke !important;
}

.nav-item a:hover {
    color: rgba(245, 245, 245, 0.885) !important;
    font-weight: 200;
}

.dropdown-menu a {
    color: darkslategrey !important;
    width: 110px;
}

.dropdown-menu a:hover {
    color: darkslategrey !important;
    background-color: white !important;
}

#searchBtn {
    border-color: whitesmoke;
    color: whitesmoke;
}

#searchBtn:hover {
    background-color: #E393BA;
    color: whitesmoke;
    outline: none !important;
}


/* FLASH MESSAGES */

.flash-messages {
    list-style: none;
    padding: 0;
    margin: 0;
}

.flash-messages li {
    background-color: rgba(196, 86, 83, 0.15);
    border: 1px solid #C45653;
    color: #333;
    padding: 10px 20px;
    margin: 10px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 400;
}


/* BUTTONS */

button {
    padding: 8px 16px;
    margin: 5px;
    background-color: #E5A839;
    border-radius: 6px !important;
    border: none;
    box-sizing: border-box;
    color: white;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover,
button:focus {
    background-color: #2D1B4E;
    color: whitesmoke;
}

button[type="submit"] {
    padding: 10px 20px;
    background-color: #E5A839;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

button[type="submit"]:hover {
    background-color: #2D1B4E;
}

.btn {
    display: inline-block;
    margin: 5px;
    padding: 8px 16px;
    background-color: #E5A839 !important;
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn:hover {
    background-color: #C45653 !important;
}

.btn-pink {
    display: inline-block;
    margin: 5px;
    padding: 8px 16px;
    background-color: #C45653 !important;
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-pink:hover {
    background-color: #E393BA !important;
    text-decoration: none;
}


/* CARDS */

.cellar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.card a:hover {
    text-decoration: none;
}

.card {
    overflow: hidden;
    padding: 3px;
    padding-top: 5px;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}

.cellar-grid .card {
    height: auto;
}

.cellar-grid .card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card img {
    border-radius: 10px !important;
    border: solid;
    border-width: 2px;
    border-color: #E393BA;
}

.card-title, .card-title:hover {
    font-size: medium;
    font-weight: 500 !important;
    color: #2C2C2C;
}

.card-subtitle, .card-subtitle:hover {
    font-size: small;
    color: #666;
}

.card-header {
    background-color: #C45653 !important;
    color: white;
}


/* MODAL */

.modal {
    display: flex !important;
    position: fixed !important;
    z-index: 1 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    z-index: 10;
    padding: 30px;
    border-radius: 4px;
    width: 50% !important;
}

.close {
    color: #aaa;
    display: flex;
    align-self: end !important;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: rgb(10, 19, 19);
    text-decoration: none;
    cursor: pointer;
}


/* CELLAR */

.cellar-header {
    text-align: center;
    font-weight: 300;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

#cellar-div {
    display: flex;
    gap: 16px;
    padding: 16px;
}

#cellar-main {
    flex: 1;
    min-width: 0;
}

#cellar-filters {
    width: 200px;
    flex-shrink: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    align-self: flex-start;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-items select {
    width: 100%;
    min-width: 175px;
    background-color: #fff !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    color: #2C2C2C;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-items select:focus {
    outline: none;
    border-color: #E5A839;
    box-shadow: 0 0 0 2px rgba(229, 168, 57, 0.25);
}


/* VINEYARD */

.vineyard-list {
    list-style-type: none;
    padding-left: 30px;
    padding-right: 30px;
}

.vineyard-item {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: whitesmoke;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vineyard-edit-button {
    background-color: #C45653;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
}


/* LOT PAGE */

.lot-page {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.lot-info {
    display: flex;
    flex-direction: row;
    gap: 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.lot-image img {
    width: 200px;
    border-radius: 10px;
}

.lot-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.lot-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}

.lot-actions .add-bottles-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lot-actions .add-bottles-form label {
    margin: 0;
    font-weight: 400;
    color: #333;
}

.lot-actions .add-bottles-form input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.lot-actions .add-bottles-form input:focus {
    outline: none;
    border-color: #E5A839;
    box-shadow: 0 0 0 2px rgba(229, 168, 57, 0.25);
}

.lot-aging-card {
    flex-shrink: 0;
    align-self: flex-start;
}

.lot-aging-card .card {
    width: 18rem;
    max-height: 400px;
    overflow-y: auto;
}

.notes-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.notes-grid .card {
    height: auto;
    overflow: visible;
}


/* FORMS */

#notes-grid {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-line {
    margin-bottom: 10px;
}

.form-line label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-line input,
.form-line select {
    width: calc(100% - 16px);
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    color: #2C2C2C;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-line input:focus,
.form-line select:focus {
    outline: none;
    border-color: #E5A839;
    box-shadow: 0 0 0 2px rgba(229, 168, 57, 0.25);
}

.form-line .radio-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-line .radio-group input {
    width: auto;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tasting-note-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tasting-note-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* LOGIN / SIGN UP */

.login-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-signup {
    width: 400px;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.3);
    padding: 24px;
    border-radius: 10px;
}

.login-signup .form-line input {
    width: 100%;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(196, 86, 83, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    margin: 0;
    border: none;
    border-radius: 0 !important;
    background-color: rgba(45, 27, 78, 0.75);
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    box-shadow: none;
}

.auth-tab:hover {
    background-color: rgba(196, 86, 83, 0.9);
    color: #fff;
}

.auth-tab.active {
    background-color: #C45653;
    color: #fff;
    font-weight: 600;
}

.auth-panel {
    padding-top: 4px;
}

.login-signup button[type="submit"] {
    background-color: #C45653;
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: none;
}

.login-signup button[type="submit"]:hover {
    background-color: #2D1B4E;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}


/* RESPONSIVE */

@media (max-width: 768px) {
    #cellar-div {
        flex-direction: column;
    }

    #cellar-filters {
        width: 100%;
    }

    .cellar-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .lot-info {
        flex-direction: column;
        align-items: center;
    }

    .lot-image img {
        width: 150px;
    }

    .lot-aging-card {
        align-self: stretch;
    }

    .lot-aging-card .card {
        width: 100%;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .login-signup {
        width: 90%;
        margin: 0 auto;
    }

    .tasting-note-actions {
        flex-direction: column;
    }
}
