:root {
    --color-border-shadow: #00000014;
    --color-white: #ffffff;
    --color-gray-dark: #444a51FF;
    --color-gray-light: #66707AFF;
    --color-green-dark: #235b4eFF;
    --color-green-light: #799990FF;

    --gray-shade-1: #e8e9eaFF;
    --gray-shade-2: #9098a2FF;
    --gray-shade-3: #66707aFF;
    --gray-shade-4: #444a51FF;
    --gray-shade-5: #2e3338FF;
    --gray-shade-6: #1e1c21FF;

    --green-shade-1: #d3eee8FF;
    --green-shade-2: #a7ddd0FF;
    --green-shade-3: #6cc6b1FF;
    --green-shade-4: #3fa28bFF;
    --green-shade-5: #235b4eFF;
    --green-shade-6: #173b32FF;

    --background-darker: #f4f5f6FF;
    --background-ligher: #fff;

    --font-sans: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Base text */
    --font-size-base: 1rem;        /* 16px */
    --line-height-base: 1.6;

    /* Headings */
    --h1-size: 1.75rem;            /* 28px */
    --h2-size: 1.375rem;           /* 22px */
    --h3-size: 1.125rem;           /* 18px */

    /* Spacing */
    --space-text: 0.5rem;
    --space-heading: 0.75rem;
}

@font-face {
    font-family: "Rubik";
    src: url("/static/shared/rubik-300.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("/static/shared/rubik-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("/static/shared/rubik-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("/static/shared/rubik-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

ul, ol {
    padding-left: 1.25rem;
    margin: 0 0 var(--space-text);
}

li, dt, dd {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--gray-shade-4);
}

p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    margin: 0 0 var(--space-text);
    color: var(--gray-shade-4);
}

h1 {
    font-size: var(--h1-size);
    line-height: 1.25;
    font-weight: 600;
    margin: 0 0 var(--space-heading);
    color: var(--green-shade-5);
}

h2 {
    font-size: var(--h2-size);
    line-height: 1.3;
    font-weight: 500;
    margin: var(--space-heading) 0 var(--space-heading);
    color: var(--gray-shade-4);
}

h3 {
    font-size: var(--h3-size);
    line-height: 1.4;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: var(--gray-shade-4);
}


.font-14px-400 {
    /* TEXT */
    color: var(--color-white);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}


.font-16px-500 {
    /* TEXT */
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: stretch;
    justify-content: start;
    row-gap: 16px;

    background-color: var(--background-darker);
    margin: 0;
    padding: 0;

    /* used to push footer to the bottom */
    min-height: 100vh;

    /* TEXT */
    font-family: var(--font-sans);
}

.site-header {
    /* FILL */
    background-color: var(--background-ligher);
    box-shadow: 0px 2px 2px 0px var(--color-border-shadow);

    /* LAYOUT */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    align-content: stretch;
    justify-content: start;
    padding-inline-start: 16px;
    padding-inline-end: 16px;

    /* FLEX ELEMENT */
    flex-shrink: 0;
}

.site-logo {
    /* LAYOUT */
    display: flex;
    align-items: center;
    /* height: 52px; /* optional, but recommended */
    padding: 12px 0;

    /* FLEX ELEMENT */
    flex-shrink: 0;
}

.site-logo img {
    /* SIZE & POSITION */
    height: 28px;
    display: block;
}

main {
    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: stretch;
    justify-content: start;
    row-gap: 16px;

    /* used to push footer to the bottom */
    flex: 1;

    /* FILL */
    background-color: var(--background-darker);
}

.heading-3 {
    /* TEXT */
    color: var(--gray-shade-2);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.site-footer {
    /* SIZE & POSITION */
    width: 100%;

    /* FILL */
    background: var(--gray-shade-6);

    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-items: start;
    justify-content: start;
    row-gap: 16px;
    padding-block-start: 16px;
    padding-block-end: 16px;
}

.footer-container {
    /* SIZE & POSITION */
    width: 100%;

    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    row-gap: 12px;
    padding-inline-start: 16px;
    padding-inline-end: 16px;

    /* FLEX ELEMENT */
    flex-shrink: 0;
}

.contact-card {
    /* SIZE & POSITION */
    width: 100%;
    border-start-start-radius: 12px;
    border-start-end-radius: 12px;
    border-end-start-radius: 12px;
    border-end-end-radius: 12px;

    /* FILL */
    background-color: var(--gray-shade-5);

    /* STROKE */
    border: 2px solid;
    border-color: var(--gray-shade-3);

    /* LAYOUT */
    padding-inline-start: 12px;
    padding-inline-end: 12px;
    padding-top: 12px;
    padding-bottom: 12px;

    /* TEXT */
    color: var(--color-white);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;

    flex: 1;
}

.language-select {
    width: 100%;
}

.select-field__control {
    /* SIZE & POSITION */
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;

    /* reset native look */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* FILL */
    background-color: var(--gray-shade-5);

    /* LAYOUT */
    padding-inline-start: 12px;
    padding-inline-end: 12px;
    padding-top: 12px;
    padding-bottom: 12px;

    /* STROKE */
    border: 2px solid;
    border-color: var(--gray-shade-3);

    /* TEXT */
    font-family: var(--font-sans);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.legal-nav {
    /* SIZE & POSITION */
    width: 100%;

    /* LAYOUT */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: start;
    align-content: stretch;
    justify-content: space-between;
    column-gap: 16px;
}

.copyright-container {
    /* SIZE & POSITION */
    width: 100%;

    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    align-content: stretch;
    justify-content: start;

    /* TEXT */
    color: var(--color-gray-light);
    font-style: normal;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}


.section-title {
    /* LAYOUT */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    align-content: stretch;
    justify-content: start;
    padding-inline-start: 16px;
    padding-inline-end: 16px;

    /* FLEX ELEMENT */
    flex-shrink: 0;

    /* TEXT */
    color: var(--color-green-light);
    font-style: normal;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
}

.car-listings {
    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    row-gap: 4px;
}

.car-item {
    /* SIZE & POSITION */
    /* FIXME: guessing here to fill the space */
    width: 100%;

    /* FILL */
    background-color: var(--color-white);

    /* SHADOW */
    box-shadow: 0px 2px 2px 0px var(--color-border-shadow);

    /* LAYOUT */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    align-content: stretch;
    justify-content: start;

    /* FIXME: still required? */
    /* Prevent the card from collapsing too much on small screens */
    min-height: 120px;
}

/* Listing image (on the left side) */
.image-container {
    /* SIZE & POSITION */
    width: 160px;
    height: 120px;

    /* LAYOUT */
    display: flex;
    align-items: center;
    justify-content: center;

    /* FLEX ELEMENT */
    flex-shrink: 0;

    /* TEXT */
    text-decoration: none;
    color: var(--color-white);
    font-size: 22px;
    font-weight: 500;

    /* FILL */
    background-color: var(--color-green-dark);
}

.image-container .thumbnail {
    /* SIZE & POSITION */
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* TEXT */
    text-decoration: none;
    color: var(--color-white);
}

/* Listing details (on the right side) */
.details-container {
    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    row-gap: 4px;
    padding-inline-start: 16px;
    padding-inline-end: 16px;
    padding-block-start: 8px;
    padding-block-end: 8px;

    /* FLEX ELEMENT */
    flex: 1;
}

/* title / model of the car item */
.item-title {
    /* TEXT */
    color: var(--color-green-dark);
    font-style: normal;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;

    /* FIXME: use whole line to redirect */
}

.item-price {
    /* TEXT */
    color: var(--color-green-light);
    font-style: normal;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
}

.item-attrs {
    /* TEXT */
    color: var(--color-gray-light);
    font-style: normal;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
}

.item-attrs-sep {
    /*
    margin: 0 0.15em;
    color: var(--color-muted);
     */
}


.car-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding-inline-start: 4px;
}

.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;

    color: var(--gray-shade-1);
    background: var(--gray-shade-3);
}

.icon-btn:hover {
    filter: brightness(0.95);
}

.icon-btn:focus-visible {
    outline: 2px solid var(--green-shade-6);
    outline-offset: 2px;
}

.icon-edit::before {
    content: "✎";
}

.icon-delete::before {
    content: "✕";
    font-weight: bold;
}

.icon-delete {
    color: var(--gray-shade-1);
    background: var(--green-shade-5);
}

/* car.html */
.image-frame {
    /* SIZE & POSITION */
    width: 100%;
    aspect-ratio: 4 / 3;

    /* FILL */
    background-color: var(--color-green-dark);

    overflow: hidden;
}

.image-frame img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;
}

.gallery__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gallery__summary::-webkit-details-marker {
    display: none;
}

.gallery__summary::marker {
    content: "";
}

.gallery__show-more {
    width: 100%;
    padding: 12px;
    background-color: var(--color-green-dark);

    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery__show-more-text {
    /* TEXT */
    font-family: var(--font-sans);
    color: var(--green-shade-1);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.container-title {
    color: var(--gray-shade-4);
}

.car-title-container {
    /* FILL */
    background: var(--background-ligher);

    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    padding-inline: 16px;
    padding-block: 12px;
    row-gap: 8px;

    box-shadow: 0px 2px 2px 0px var(--color-border-shadow);
}

.car-title-container .title {
    /* TEXT */
    color: var(--color-green-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.car-title-container .price {
    /* TEXT */
    color: var(--gray-shade-5);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.main-container {
    /* SIZE & POSITION */
    width: 100%;

    /* FILL */
    background: var(--background-ligher);

    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    padding-inline: 16px;
    padding-block: 12px;
    row-gap: 8px;

    box-shadow: 0px 2px 2px 0px var(--color-border-shadow);
}

/*
.main-container :is(h1, h2, h3, p, ul, li) {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}
 */

.properties-container {
    /* SIZE & POSITION */
    width: 100%;

    /* LAYOUT */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    column-gap: 4px;
}

.properties-item {
    /* SIZE & POSITION */
    width: 100%;

    /* LAYOUT */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: start;
    align-content: stretch;
    justify-content: start;
    padding-top: 8px;
    padding-bottom: 8px;

    border-bottom: 1px solid var(--gray-shade-1);
}

.properties-item-last {
    border-bottom: none;
}

.property {
    /* TEXT */
    color: var(--gray-shade-4);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;

    flex: 1;
}

.vehicle-description {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;

    /* TEXT */
    font-family: var(--font-sans);
    color: var(--gray-shade-4);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;

    flex-shrink: 0;
}

.property-value {
    /* TEXT */
    color: var(--gray-shade-5);
    font-weight: 500;
}

.doc__address {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--gray-shade-4);
    margin: 0 0 var(--space-text);
    text-decoration: none;
    text-transform: none;
}

.email {
    color: var(--gray-shade-4);
    text-decoration: none;
    text-transform: none;
}