/* ============================================
   Your Poodles Styles
   ============================================ */

/* Poodle List */
.poodle-list-main {
    padding: 40px 0;
}

.poodle-list__add-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.poodle-list__add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.poodle-list__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
    opacity: 0.8;
}

/* Poodle Card */
.poodle-card {
    background: var(--body-color);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.poodle-card--in-memoriam {
    border-color: rgba(127, 184, 50, 0.4);
}

.poodle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.poodle-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.poodle-card__image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

.poodle-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poodle-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    opacity: 0.2;
}

.poodle-card__content {
    padding: 6px 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.poodle-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.poodle-card__badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
}

.poodle-card__badge--breed {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.poodle-card__badge--memoriam {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.poodle-card__title {
    font-size: 18px;
    margin: 0;
    color: var(--secondary-color);
}

.poodle-card__description {
    font-size: 13px;
    line-height: 1.35;
    color: var(--secondary-color);
    opacity: 0.85;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poodle-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 12px;
    color: var(--secondary-color);
    opacity: 0.85;
}

.poodle-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 6px;
    margin-top: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.poodle-card__stats {
    font-size: 11px;
    color: var(--secondary-color);
    opacity: 0.75;
}

.poodle-card__btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.poodle-card:hover .poodle-card__btn {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Poodle List Layout */
.poodle-list__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

.poodle-list__sidebar {
    position: sticky;
    top: 100px;
}

.poodle-list-section {
    min-width: 0;
}

/* Единая высота карточек в сетке */
.poodle-list__grid .poodle-card,
.poodle-detail__related-grid .poodle-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.poodle-list__grid .poodle-card__link,
.poodle-detail__related-grid .poodle-card__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.poodle-list__grid .poodle-card__content,
.poodle-detail__related-grid .poodle-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.poodle-list__grid .poodle-card__footer,
.poodle-detail__related-grid .poodle-card__footer {
    margin-top: auto;
}

/* Poodle Filters - вертикальная боковая панель */
.poodle-filters {
    padding: 20px;
    background: var(--body-color);
    border-radius: 20px;
    border: 2px solid var(--secondary-color);
}

.poodle-filters__group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 20px;
}

.poodle-filters__group:last-child {
    margin-bottom: 0;
}

.poodle-filters__label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.poodle-filters__btn {
    padding: 8px 16px;
    border: 1px solid var(--secondary-color);
    background: transparent;
    color: var(--secondary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: left;
}

.poodle-filters__btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.poodle-filters__btn--active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

.poodle-filters__select {
    padding: 8px 16px;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    background: var(--body-color);
    color: var(--secondary-color);
    font-size: 14px;
    width: 100%;
}

@media (max-width: 768px) {
    .poodle-list__layout {
        grid-template-columns: 1fr;
    }

    .poodle-list__sidebar {
        position: static;
    }

    .poodle-filters__group {
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 15px;
    }

    .poodle-filters__label {
        width: 100%;
        margin-bottom: 0;
        margin-right: 10px;
    }

    .poodle-filters__btn {
        text-align: center;
    }
}

/* Poodle Detail */
.poodle-detail__gallery {
    margin-bottom: 30px;
}

/* Poodle Gallery - главное фото + сетка остальных (без слайдера) */
.poodle-gallery__main {
    margin-bottom: 24px;
}

.poodle-gallery__main figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poodle-gallery__caption {
    text-align: center;
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin-top: 12px;
}

.poodle-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.poodle-gallery__item {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.poodle-gallery__thumb-wrapper {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.poodle-gallery__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.poodle-gallery__thumb-caption {
    font-size: 13px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin: 2px 0 0;
    text-align: center;
}

@media (min-width: 768px) {
    .poodle-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.poodle-detail__header {
    margin-bottom: 24px;
}

.poodle-detail__header .blog-post-header__title {
    background: none;
    padding: 0;
}

.poodle-detail__body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.poodle-detail__meta-list {
    padding: 20px;
    background: var(--body-color);
    border-radius: 20px;
    border: 2px solid var(--secondary-color);
}

.poodle-detail__meta-list dt {
    font-weight: 600;
    color: var(--primary-color);
    margin: 10px 0 4px 0;
}

.poodle-detail__meta-list dt:first-child {
    margin-top: 0;
}

.poodle-detail__meta-list dd {
    margin: 0;
    color: var(--secondary-color);
}

.poodle-detail__related {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--secondary-color);
}

.poodle-detail__related-title {
    font-size: 24px;
    margin: 0 0 20px 0;
    color: var(--secondary-color);
}

/* Единые отступы H1 и breadcrumbs: форма повторяет список (40px между breadcrumbs и H1) */
.poodle-form-hero {
    margin-top: 0;
    padding-top: 40px;
}

.poodle-form-hero .hero__content.poodle-form-hero__content {
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Poodle Form */
.poodle-form-section {
    padding: 40px 0;
}

.poodle-form__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.poodle-form__messages {
    margin-bottom: 20px;
}

.poodle-form__message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.poodle-form__message--success {
    background: #d4edda;
    color: #155724;
}

.poodle-form__message--error {
    background: #f8d7da;
    color: #721c24;
}

.poodle-form__heading {
    font-size: 20px;
    margin: 30px 0 15px 0;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.poodle-form__heading:first-of-type {
    margin-top: 0;
}

.poodle-form__hint {
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.85;
    margin: -5px 0 20px 0;
}

.poodle-form__hint-inline {
    display: block;
    font-size: 13px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin-top: 5px;
    margin-bottom: 0;
}

.poodle-form__field {
    margin-bottom: 20px;
}

.poodle-form__field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.poodle-form__field input[type="text"],
.poodle-form__field input[type="email"],
.poodle-form__field input[type="date"],
.poodle-form__field select,
.poodle-form__field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    font-size: 16px;
}

.poodle-form__field input[type="file"] {
    padding: 10px 0;
}

.poodle-form__error {
    display: block;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.poodle-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.poodle-form__photos {
    margin-bottom: 20px;
}

.poodle-form__add-photo-wrap {
    margin-top: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.poodle-form__add-photo-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border: 2px solid var(--secondary-color);
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.poodle-form__add-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.poodle-form__photo-item {
    padding: 20px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    border: 1px dashed var(--secondary-color);
}

.poodle-form__photo-item:last-of-type {
    margin-bottom: 0;
}

.poodle-form__photo-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.poodle-form__photo-preview {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    border: 2px dashed rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.poodle-form__photo-placeholder {
    font-size: 12px;
    color: var(--secondary-color);
    opacity: 0.6;
    text-align: center;
    padding: 10px;
}

.poodle-form__photo-placeholder--error {
    color: #dc3545;
}

.poodle-form__photo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Скрытые поля formset */
.poodle-form__photo-item input[name*="-order"],
.poodle-form__photo-item input[name*="-DELETE"] {
    display: none !important;
}

.poodle-form__submit {
    margin-top: 30px;
    width: 100%;
    max-width: 400px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .poodle-detail__body {
        grid-template-columns: 1fr;
    }

    .poodle-form__row {
        grid-template-columns: 1fr;
    }
}
