@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,700');

:root {
    --bs-body-color: #e2e9e9d9;
    --bs-body-bg: #0b2c30;
    --bs-heading-color: #9ad7d2;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    line-height: 1.15;
}

a,
button,
input,
textarea,
select,
.btn,
.navbar-brand,
.nav-link {
    font-family: 'Poppins', sans-serif;
}

.btn {
    --bs-btn-bg: #94d1cc;
    --bs-btn-active-bg: #94d1cc;
    --bs-btn-hover-bg: #11252c;
    --bs-btn-font-size: 1rem;
    --bs-btn-color: #0b2c30;
}

.navbar {
    background: #0b2c30;
    border-bottom: 1px solid #24434a;
}

.navbar-brand {
    white-space: normal;
}

.nav-order-link {
    align-items: center;
    display: inline-flex;
    min-height: 36px;
    padding: 0.38rem 0.9rem;
}

.hero {
    padding: 48px 0 64px;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.book-img {
    height: auto;
    max-height: min(72vh, 596px);
    max-width: min(100%, 440px);
    width: auto;
}

.book-gallery {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.book-gallery .book-img {
    display: block;
    height: min(72vh, 596px);
    object-fit: contain;
    width: min(100%, 440px);
}

.book-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.book-thumbnail {
    background: #12343a;
    border: 1px solid #304850;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    flex: 0 0 56px;
    height: 74px;
    padding: 6px;
    transition: border-color 160ms ease, transform 160ms ease;
    width: 56px;
}

.book-thumbnail:hover,
.book-thumbnail:focus {
    border-color: #9ad7d2;
    outline: none;
    transform: translateY(-1px);
}

.book-thumbnail.active {
    border-color: #9ad7d2;
    box-shadow: 0 0 0 2px rgba(154, 215, 210, 0.18);
}

.book-thumbnail-preview {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    display: block;
    height: 100%;
    width: 100%;
}

.authors {
    max-width: 660px;
}

.hero-intro {
    border-left: 3px solid #9ad7d2;
    color: rgba(226, 233, 233, 0.88);
    font-size: 1.08rem;
    margin: 26px 0 22px;
    max-width: 720px;
    padding: 4px 0 4px 22px;
}

.hero-intro p {
    margin-bottom: 1rem;
}

.hero-intro p:last-child {
    margin-bottom: 0;
}

.author-card {
    background-color: #1c3740;
    border: 1px solid #304850;
    border-radius: 8px;
}

.author-role {
    border-left: 3px solid #9ad7d2;
    color: rgba(226, 233, 233, 0.82);
    font-size: 0.98rem;
    font-style: italic;
    margin-bottom: 1rem;
    padding-left: 12px;
}

.team-photo-section {
    display: flex;
    justify-content: flex-start;
    margin-top: 36px;
    padding-left: 0;
    padding-right: 0;
}

.team-photo-button {
    background: transparent;
    border: 0;
    padding: 0;
    transition: border-color 160ms ease, transform 160ms ease;
}

.team-photo-button:hover,
.team-photo-button:focus {
    outline: none;
    transform: translateY(-1px);
}

.team-photo {
    border-radius: 8px;
    display: block;
    max-width: min(100%, 520px);
    width: 100%;
}

.team-photo-modal {
    background: #12343a;
    border: 1px solid #304850;
    color: #e2e9e9;
}

.team-photo-modal .modal-header {
    border-bottom-color: #304850;
}

.team-photo-large {
    border-radius: 8px;
    display: block;
    max-height: 78vh;
    object-fit: contain;
    width: 100%;
}

.downloads-table-wrap {
    border: 1px solid #304850;
    border-radius: 8px;
    margin-top: 32px;
    overflow: hidden;
}

.downloads-table {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e9e9;
    --bs-table-hover-color: #e2e9e9;
    --bs-table-striped-color: #e2e9e9;
    color: #e2e9e9;
    margin-bottom: 0;
}

.downloads-table th {
    background: #12343a;
    color: #9ad7d2;
    font-weight: 400;
}

.downloads-table td,
.downloads-table th {
    border-color: #304850;
    color: #e2e9e9;
    padding: 18px;
}

.downloads-table strong,
.downloads-table span {
    display: block;
}

.downloads-table span {
    color: rgba(226, 233, 233, 0.72);
    font-size: 0.95rem;
    margin-top: 4px;
}

.content-section {
    padding: 80px 0;
    max-width: 900px;
    margin: auto;
}

.quote-section {
    background: #0b2c30;
    padding: 70px 20px;
}

.quote {
    font-size: 1.6rem;
    font-style: italic;
    max-width: 800px;
    margin: auto;
    color: #9ad7d2;
}

.quote-author {
    margin-top: 20px;
    opacity: 0.8;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer {
    border-top: 1px solid #24434a;
    padding: 28px 0;
    color: rgba(226, 233, 233, 0.78);
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #9ad7d2;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #e2e9e9;
    text-decoration: underline;
}

.legal-section h2 {
    margin-top: 44px;
}

.legal-section h3 {
    margin-top: 28px;
    font-size: 1.35rem;
}

.legal-section ul {
    padding-left: 1.2rem;
}

.order-form {
    margin-top: 32px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.product-order {
    background: #12343a;
    border: 1px solid #304850;
    border-radius: 8px;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, 280px);
    margin-bottom: 24px;
    padding: 24px;
}

.product-order-main {
    align-items: center;
    display: flex;
    gap: 20px;
    min-width: 0;
}

.product-order-main h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.product-order-img {
    flex: 0 0 auto;
    width: 96px;
}

.quantity-control {
    align-items: center;
    align-self: center;
    display: grid;
    grid-template-columns: 44px 62px 44px;
}

.quantity-button,
.quantity-input {
    background: #0b2c30;
    border: 1px solid #304850;
    color: #e2e9e9;
    height: 44px;
    text-align: center;
}

.quantity-button {
    color: #9ad7d2;
    font-size: 1.35rem;
}

.quantity-button:hover,
.quantity-button:focus {
    background: #183f46;
}

.quantity-input {
    border-left: 0;
    border-right: 0;
    font-size: 1.1rem;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    margin: 0;
}

.order-totals {
    display: grid;
    gap: 8px;
}

.order-totals div {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.order-total {
    border-top: 1px solid #304850;
    color: #9ad7d2;
    font-size: 1.2rem;
    margin-top: 4px;
    padding-top: 10px;
}

.product-order-summary {
    margin-top: 32px;
}

.quantity-summary {
    align-self: center;
    background: #0b2c30;
    border: 1px solid #304850;
    border-radius: 8px;
    min-width: 150px;
    padding: 14px 18px;
    text-align: center;
}

.quantity-summary span {
    color: rgba(226, 233, 233, 0.72);
    display: block;
    font-size: 0.95rem;
}

.quantity-summary strong {
    color: #9ad7d2;
    display: block;
    font-size: 1.7rem;
    line-height: 1.1;
}

.form-label {
    color: #9ad7d2;
}

.form-control,
.form-select {
    background-color: #12343a;
    border-color: #304850;
    color: #e2e9e9;
}

.form-control:focus,
.form-select:focus {
    background-color: #12343a;
    border-color: #94d1cc;
    box-shadow: 0 0 0 0.25rem rgba(148, 209, 204, 0.18);
    color: #e2e9e9;
}

.form-control::placeholder {
    color: rgba(226, 233, 233, 0.55);
}

.form-text,
.order-meta {
    color: rgba(226, 233, 233, 0.72);
}

.alert {
    border-radius: 8px;
}

.summary-list {
    display: grid;
    gap: 14px;
    margin: 32px 0;
}

.summary-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: 16px;
    border-bottom: 1px solid #24434a;
    padding-bottom: 14px;
}

.summary-label {
    color: #9ad7d2;
}

.summary-value {
    margin: 0;
}

.status-box {
    background: #12343a;
    border: 1px solid #304850;
    border-radius: 8px;
    margin-top: 32px;
    padding: 24px;
}

.cookie-consent {
    align-items: center;
    background: #12343a;
    border: 1px solid #3d6268;
    border-radius: 8px;
    bottom: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    color: #e2e9e9;
    display: flex;
    gap: 18px;
    left: 16px;
    max-width: min(560px, calc(100% - 32px));
    padding: 16px;
    position: fixed;
    z-index: 1050;
}

.cookie-consent p {
    margin: 0;
}

.backoffice-section {
    margin: 0;
    max-width: none;
    padding-top: 32px;
}

.backoffice-container {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
}

.backoffice-header {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.backoffice-actions {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.backoffice-actions form {
    margin: 0;
}

.backoffice-login {
    margin: 0;
    max-width: 480px;
}

.backoffice-table {
    --bs-table-bg: #12343a;
    --bs-table-border-color: #304850;
    --bs-table-color: #e2e9e9;
    display: block;
    margin: 0;
    min-width: 1540px;
    overflow-x: auto;
}

.backoffice-table th {
    color: #9ad7d2;
    font-weight: 500;
    white-space: nowrap;
}

.backoffice-table td {
    vertical-align: top;
}

.backoffice-messages-table {
    min-width: 1040px;
}

.backoffice-message-cell {
    max-width: 520px;
    white-space: normal;
}

.backoffice-muted {
    color: rgba(226, 233, 233, 0.68);
    display: block;
    font-size: 0.86rem;
    margin-top: 3px;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 16px;
    }

    .nav-link {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .hero {
        padding: 32px 0 52px;
        text-align: center;
    }

    .authors {
        margin-left: auto;
        margin-right: auto;
    }

    .product-order {
        grid-template-columns: 1fr;
    }

    .quantity-control {
        justify-self: start;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cookie-consent {
        align-items: stretch;
        flex-direction: column;
    }

    .navbar-brand {
        max-width: calc(100% - 64px);
        line-height: 1.2;
    }

    .hero {
        padding-top: 24px;
    }

    .book-gallery .book-img {
        height: min(96vw, 485px);
        width: min(78vw, 300px);
    }

    .lead {
        font-size: 1.08rem;
    }

    .btn-lg {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        white-space: normal;
    }

    .hero-actions {
        flex-direction: column;
    }

    .form-actions {
        justify-content: stretch;
    }

    .product-order {
        padding: 18px;
    }

    .product-order-main {
        align-items: flex-start;
    }

    .product-order-img {
        width: 72px;
    }

    .quantity-control {
        grid-template-columns: 1fr 1fr 1fr;
        justify-self: stretch;
    }

    .content-section {
        padding: 48px 0;
    }

    .author-card {
        margin-left: 0;
        margin-right: 0;
    }

    .quote-section {
        padding: 48px 20px;
    }

    .quote {
        font-size: 1.25rem;
    }

    .site-footer .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
