/* auth */
#authorize-form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    gap: 20px;
    margin-bottom: 40px;
    flex-direction: column;
}

#loginform {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 370px;
    width: 100% ;
}

.open-categories {
    display: none;
}

#loginform .input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#loginform .input-wrapper label,
.form-group label {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--light-text-2);
    display: block;
}

.form-card {
    width: 100%;
}

div.select .custom-select-wrapper[data-for=currency],
div[data-for="mileage_unit"] {
    width: fit-content;
}

.form-note p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    color: var(--light-text-1);
}

.form-group label {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--light-text-2);

}


.form-group .input-field {
    width: 100%;
}

.form-group .input-field textarea {
    height: 230px;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--primary);
    border: 1px solid var(--main-text);
    border-radius: 10px;
    padding: 20px;
}

.custom-select-trigger *,
.form-group input[type="text"] {
    font-family: var(--font-family) !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 120% !important;
    text-align: center;
    color: var(--primary) !important;
}

.auth input,
#loginform input {
    width: 100%;
    padding: 15.5px 20px;
    border: 1px solid var(--elements-1);
    border-radius: 10px;
    background: var(--white);
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--light-text-1);
}

.auth .request-reset-form {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-top: 40px;
}

.auth .request-reset-form * {
    width: 100%;
    max-width: 370px;
}

.reset-instructions {
    max-width: 370px;
    margin: 0 auto 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--light-text-2);
}

.password-hint {
    font-size: 12px;
    color: var(--light-text-2);
    margin-top: 5px;
}

.login-link, .register-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.login-link a, .register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover, .register-link a:hover {
    text-decoration: underline;
}

#loginform .btn-holder {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

#loginform .btn-holder .btn {
    width: fit-content;
}

#loginform .btn-holder .p16 {
    font-family: var(--font-family);
    text-align: center;
    color: var(--light-text-2);
}

.error-message, .auth-message.error {
    color: #dc3232;
    margin-bottom: 15px;
    padding: 10px;
    background: #ffebee;
    border-left: 3px solid #dc3232;
}

.auth-message.success {
    color: #155724;
    margin-bottom: 15px;
    padding: 10px;
    background: #d4edda;
    border-left: 3px solid #28a745;
}

.alert {
    padding: 10px;
    margin: 15px 0;
    border-radius: 5px;
}

.alert.error {
    background-color: #ffebee;
    color: #dc3232;
    border-left: 3px solid #dc3232;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

.input-error {
    animation: shake 0.5s;
}

.input-error {
    color: #dc3232;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.input-wrapper input[type="email"],
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    transition: border-color 0.3s;
}

.input-wrapper input.error {
    border-color: #dc3232 !important;
}


@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.auth .request-reset-form .alert {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    color: var(--light-text-2);
}

.logout {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--light-text-2);
    display: flex;
    gap: 10px;
    align-items: center;
    transition: .3s ease-in;
    cursor: pointer;
}

.logout * {
    transition: .3s ease-in;
    box-sizing: border-box;
}

.logout:hover {
    color: var(--primary);
}

.logout:hover svg path {
    fill: var(--primary);
}

.logout svg {
    display: flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
}

.top-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 40px;
}

.tabs-product {
    display: flex;
    width: 100%;
    flex-direction: row;
    gap: 30px;
    border-bottom: 1px solid var(--light-text-2);
}

.tabs-product .product {
    padding-bottom: 10px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    text-transform: uppercase;
    color: var(--light-text-2);
    cursor: pointer;
}

.tabs-product .product.active {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1px solid var(--primary);
}


.profile-header {
    display: flex;
    gap: 50px;
    align-items: flex-end;
    margin-bottom: 30px;
}

.profile-header .btn {
    width: fit-content;
    white-space: nowrap;
}

/* Product items styling */
.product-item {
    display: flex;
    padding-bottom: 15px;
    overflow: hidden;
    border-bottom: 1px solid var(--elements-1);
    align-items: center;
}

.product-holder-prodile {
    display: flex
;
    flex-direction: column;
    gap: 15px;
}

.top-column {
    display: flex
;
    width: 100%;
    justify-content: space-between;
}

.right-side {
    display: flex
;
    gap: 60px;
}

.product-item .image-column {
    width: 230px;
    height: 140px;
    flex-shrink: 0;
    position: relative;
}

.product-item .image-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.product-item .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f5f5f5;
    color: #999;
}

.product-item .content-column {
    padding: 0 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-item h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.product-item .product-info * {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--main-text);
}

.product-item .product-details {
    display: flex;
    font-size: 14px;
    margin-top: auto;
}

.product-item .detail-column {
    display: flex;
    flex-direction: column;
    margin-right: 30px;
}

.product-item .detail-column span {
    margin-bottom: 5px;
    color: #666;
}

.product-item .date-column {
    display: flex;
    flex-direction: column;
    margin-left: auto;
}

.product-item .date-column span {
    margin-bottom: 5px;
    color: #666;
}

.product-item .price-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    width: 220px;
    border-left: 1px solid #e7e7e7;
    background: #f9f9f9;
}

.product-item .product-price {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 18px;
    line-height: 120%;
    color: var(--main-text);
    text-align: right;
    margin-bottom: 15px;
}

.product-item .product-price * {
    font-family: var(--font-family);
font-weight: 600;
font-size: 18px;
line-height: 120%;
color: var(--main-text);
}

.product-item .product-controls {
    display: flex
;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.product-item .product-controls a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.top-column .product-title {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 18px;
    line-height: 120%;
    color: var(--main-text);
}

.product-item .product-controls svg {
    margin-right: 8px;
}

.product-item .publish-btn {

}

.product-item .publish-btn:hover {
}

.product-item .archive-btn {

}

.product-item .archive-btn:hover {
}

.product-item .edit-btn {

}

.product-item .edit-btn:hover {
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

.form-submit {
    margin-top: 20px;
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: var(--light-text-1);
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-numbers:hover {
    background-color: #e9ecef;
}

.page-numbers.current {
    background-color: var(--primary);
    color: white;
}

.page-numbers.prev,
.page-numbers.next {
    font-size: 18px;
}

.page-numbers.dots {
    background-color: transparent;
    cursor: default;
}

.no-products {
    text-align: center;
    padding: 30px;
    font-size: 18px;
    color: var(--light-text-2);
}

/* Loading state for buttons */
.btn.loading,
.logout.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading:after,
.logout.loading:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading indicator for product holder */
.loading-indicator {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: var(--light-text-2);
}

/* Notification styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Responsive styles */
@media (max-width: 768px) {
    .product-item {
        flex-direction: column;
    }
    
    .product-item .image-column {
        flex: initial;
        width: 100%;
        height: 200px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .product-item .product-controls {
        justify-content: center;
    }
    
    .product-item .product-controls .btn {
        flex: 1 1 auto;
        text-align: center;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: calc(100% - 40px);
    }
}

/* Product form styling */
.product-form {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    display: flex;
    border-radius: 10px;
}

.product-form .form-group {
    padding: 10px 0;
}

.product-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--light-text-1);
}

.color-selector label {
    min-width: unset !important;
    width: fit-content !important;
}

.product-form input[type="text"],
.product-form input[type="number"],
.product-form textarea,
.product-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--elements-1);
    border-radius: 8px;
    font-size: 16px;
    color: var(--light-text-1);
}

.product-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
}

.product-form textarea {
    resize: vertical;
    min-height: 150px;
}

.product-form input[type="file"] {
    display: block;
    width: 100%;
    padding: 8px 0;
    margin-bottom: 10px;
}

.product-form .status-hint {
    display: block;
    font-size: 13px;
    color: var(--light-text-2);
    margin-top: 5px;
}

.product-form .form-submit {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Стили для предпросмотра изображения */
.image-preview {
    margin-top: 15px;
    display: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
    border: 1px solid var(--elements-1);
}

.current-image {
    margin-bottom: 15px;
}

.current-image p {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--light-text-2);
}

.current-image img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 5px;
    border: 1px solid var(--elements-1);
}

/* Стили для отображения статуса товара */
.product-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.product-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}

@media (max-width: 768px) {
    .product-form .form-submit {
        flex-direction: column;
    }
    
    .product-form .form-submit .btn {
        width: 100%;
    }
}

/* Success message styling */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.product-meta {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-archive-date {
    display: block;
    font-size: 14px;
    color: #666;
}


#product-form > div:nth-child(5) > div:nth-child(12) {
    flex-direction: column;
    align-items: start;
    gap: 20px;
}

.car-specs-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.car-specs-list span {
    font-size: 14px;
    color: #434343;
    line-height: 1.3;
}

/* Стили для информации в нижней колонке на странице продукта */
.bot-column {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
    gap: 10px;
}

.bot-column * {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    color: var(--light-text-2);
}

.car-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 5px;
    width: fit-content;
}

.grid-item {
    font-size: 14px;
    color: #434343;
    line-height: 1.3;
    width: 100px;
}

.car-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.car-dates span {
    font-size: 14px;
    color: #434343;
    line-height: 1.3;
}

.bot-column span {
    font-size: 14px;
    color: #434343;
    line-height: 1.3;
}