/* Общие настройки сайта */
:root {
    --bg-primary: #f5f5f4;
    --text-main: #1c1917;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --dark: #0c0a09;
    --card-bg: #ffffff;
    --border-color: #e7e5e4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.5;
}

/* Навигационная панель */
.navbar {
    background-color: var(--dark);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 900;
    tracking-letter: 0.05em;
    color: var(--accent);
    text-decoration: none;
}

.nav-links a {
    color: #d6d3d1;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links .btn-cabinet {
    background-color: #b45309;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-links .btn-cabinet:hover {
    background-color: var(--accent-hover);
}

/* HERO БЛОК с вашей картиной */
.hero {
    position: relative;
    background-color: #1c1917;
    min-height: 550px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-cover: cover;
    object-position: center;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0c0a09 0%, rgba(28,25,23,0.8) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
}

.hero-text-block {
    max-width: 650px;
}

.badge {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    color: #d6d3d1;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Кнопки дизайна */
.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--accent);
    color: #0c0a09;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: rgba(12, 10, 9, 0.6);
    color: white;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    border: 1px solid #44403c;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.btn-secondary:hover {
    background-color: #262626;
}

/* Блок стандартов породы */
.info-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-title {
    color: #d97706;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.card-text {
    color: #57534e;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Адаптивность для мобилок */
@media (max-width: 640px) {
    .hero h1 { font-size: 2.25rem; }
    .nav-container { flex-direction: column; gap: 1rem; }
    .nav-links a { margin: 0 0.5rem; }
}
/* --- СТИЛИ ДЛЯ КАТАЛОГА (catalog.php) --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* Панель фильтров */
.filters-form {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #78716c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    border: 1px solid #d6d3d1;
    border-radius: 0.5rem;
    padding: 0.625rem 2rem 0.625rem 1rem;
    font-size: 0.875rem;
    background-color: #fafaf9;
    color: var(--text-main);
    cursor: pointer;
    min-width: 160px;
}

.btn-filter-submit {
    background-color: var(--dark);
    color: white;
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-filter-submit:hover {
    background-color: #262626;
}

.filter-reset {
    font-size: 0.875rem;
    color: #78716c;
    text-decoration: none;
    padding-bottom: 0.5rem;
}

.filter-reset:hover {
    text-decoration: underline;
    color: var(--text-main);
}

/* Сетка карточек */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Стили карточки щенка */
.puppy-card {
    background-color: var(--card-bg);
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.puppy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ПЛАТНАЯ ОПЦИЯ: Выделение цветом */
.puppy-card.featured {
    border: 3px solid var(--accent);
    box-shadow: 0 10px 20px -3px rgba(245, 158, 11, 0.15);
    background-color: #fffbeb;
}

/* Изображение и бейджи */
.card-media {
    position: relative;
    height: 260px;
    background-color: #e7e5e4;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-container {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.card-badge {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.05em;
    width: fit-content;
}

.badge-top { background-color: #ef4444; } /* Красный для ТОП */
.badge-selling { background-color: #22c55e; } /* Зеленый для Свободен */
.badge-reserved { background-color: #3b82f6; } /* Синий для Резерва */

/* Тело карточки */
.card-body {
    padding: 1.5rem;
}

.puppy-name {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.puppy-birth {
    font-size: 0.75rem;
    color: #78716c;
    margin-bottom: 1.25rem;
}

.info-table {
    width: 100%;
    font-size: 0.875rem;
    color: #44403c;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.info-table tr td {
    padding: 0.25rem 0;
}

.info-table tr td:first-child {
    font-weight: 700;
    color: #78716c;
    width: 35%;
}

.info-table tr td:last-child {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 180px;
}

/* Футер карточки */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.puppy-price {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--dark);
}

.contact-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: opacity 0.2s;
}

.btn-contact:hover {
    opacity: 0.9;
}

.btn-phone {
    background-color: var(--dark);
    color: white;
}

.btn-wa {
    background-color: #25d366;
    color: white;
}
/* --- СТИЛИ ЛИЧНОГО КАБИНЕТА (account.php) --- */

.dashboard-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Боковая панель (Кошелек) */
.wallet-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: fit-content;
}

.wallet-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #78716c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.wallet-balance {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 1rem;
}

.wallet-instructions {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    color: #92400e;
    line-height: 1.5;
}

/* Основной контент (Объявления) */
.account-content {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.account-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark);
}

/* Список строк с объявлениями */
.listings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.listing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: #fafaf9;
    transition: background-color 0.2s;
}

.listing-row:hover {
    background-color: #f5f5f4;
}

.listing-info h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.listing-info p {
    font-size: 0.75rem;
    color: #78716c;
}

/* Кнопки платных услуг */
.services-panel {
    display: flex;
    gap: 0.5rem;
}

.btn-service {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-service:active {
    transform: scale(0.95);
}

.btn-service-top {
    background-color: var(--dark);
    color: white;
}

.btn-service-top:hover { background-color: #262626; }

.btn-service-color {
    background-color: var(--accent);
    color: #0c0a09;
}

.btn-service-color:hover { background-color: var(--accent-hover); }

/* Сообщения об ошибках и успехе */
.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .listing-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .services-panel { width: 100%; justify-content: flex-start; }
}
/* --- СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ (admin.php) --- */

.admin-body {
    background-color: #1c1917; /* Темный благородный фон для админки */
    color: #f5f5f4;
}

.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.admin-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 2rem;
    border-bottom: 2px solid #44403c;
    padding-bottom: 1rem;
}

.admin-card {
    background-color: #262626;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #44403c;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

.admin-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #e7e5e4;
}

/* Стили таблицы пользователей */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.admin-table th {
    color: #a8a29e;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid #44403c;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #44403c;
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: #2d2d2d;
}

.user-id {
    font-family: monospace;
    color: #a8a29e;
}

.balance-display {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fbbf24;
}

/* Форма быстрого изменения баланса */
.balance-form {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.input-balance-change {
    background-color: #171717;
    border: 1px solid #525252;
    color: white;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    width: 160px;
}

.input-balance-change:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-admin-submit {
    background-color: #b45309;
    color: white;
    font-weight: 700;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-admin-submit:hover {
    background-color: var(--accent);
    color: #0c0a09;
}
/* --- СТИЛИ ДЛЯ ФОРМЫ ДОБАВЛЕНИЯ ЩЕНКА --- */

.form-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 2rem auto;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #57534e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input, .form-textarea, .form-select {
    border: 1px solid #d6d3d1;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    background-color: #fafaf9;
    color: var(--text-main);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background-color: #ffffff;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.btn-submit {
    background-color: #b45309;
    color: white;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 0.625rem;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
}

.btn-cancel {
    background-color: transparent;
    color: #78716c;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 0.625rem;
    border: 1px solid #d6d3d1;
    text-decoration: none;
    font-size: 0.95rem;
    text-align: center;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background-color: #f5f5f4;
    color: var(--text-main);
}
/* --- СТИЛИ ДЛЯ ДЕТАЛЬНОЙ СТРАНИЦЫ ЩЕНКА (puppy.php) --- */

.puppy-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 2.5rem;
}

/* Галерея картинок */
.puppy-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-gallery-view {
    width: 100%;
    height: 500px;
    background-color: #e7e5e4;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.main-gallery-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.75rem;
}

.thumb-card {
    height: 70px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background-color: #e7e5e4;
}

.thumb-card.active, .thumb-card:hover {
    border-color: var(--accent);
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Карточка деталей справа */
.details-sidebar {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.details-price {
    font-size: 2.25rem;
    font-weight: 950;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.sidebar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.sidebar-table tr td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f4;
}

.sidebar-table tr td:first-child {
    color: #78716c;
    font-weight: 600;
}

.sidebar-table tr td:last-child {
    text-align: right;
    font-weight: 700;
    color: var(--dark);
}

.btn-contact-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    text-align: center;
}

@media (max-width: 968px) {
    .puppy-container { grid-template-columns: 1fr; }
    .details-sidebar { position: static; }
    .main-gallery-view { height: 350px; }
}
