/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: oklch(98% 0.012 75);
    --bg-alt: oklch(95% 0.018 70);
    --bg-card: #ffffff;
    --text: oklch(28% 0.03 50);
    --text-light: oklch(45% 0.03 50);
    --dark: oklch(30% 0.045 50);
    --accent: oklch(74% 0.1 55);
    --price: oklch(48% 0.1 145);
    --border: oklch(88% 0.02 70);
    --radius: 18px;
    --shadow: 0 2px 16px rgba(80, 40, 10, 0.07);
    --shadow-hover: 0 8px 32px rgba(80, 40, 10, 0.13);
    --max-w: 1200px;
    --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--dark); text-decoration: none; transition: color var(--transition); }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; display: block; }

/* === Header === */
.header {
    background: var(--dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.header__logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.3px;
}
.header__logo span { color: var(--accent); }
.header__nav { display: flex; gap: 32px; list-style: none; }
.header__nav a {
    color: oklch(92% 0.015 75);
    font-weight: 600;
    font-size: 15px;
    transition: color var(--transition);
}
.header__nav a:hover,
.header__nav a.active { color: #fff; }

.header__burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

/* === Hero === */
.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: flex-start;
    color: #fff;
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, oklch(22% 0.04 50 / 0.92) 0%, oklch(22% 0.04 50 / 0.6) 40%, oklch(22% 0.04 50 / 0.05) 100%);
}
.hero__content {
    position: relative;
    z-index: 2;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 88px 56px 60px;
    width: 100%;
    max-width: 640px;
    margin-left: 56px;
}
.hero__badge {
    display: inline-block;
    background: oklch(74% 0.1 55 / 0.25);
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}
.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
}
.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}
.hero__buttons { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: var(--accent);
    color: var(--dark);
}
.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px oklch(74% 0.1 55 / 0.35);
}
.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.45);
    color: #fff;
}
.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.08);
    color: #fff;
    transform: translateY(-2px);
}
.btn-dark {
    background: var(--dark);
    color: #fff;
}
.btn-dark:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}
.btn-link {
    background: none;
    border: none;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 13px 8px;
}
.btn-link:hover { opacity: 0.8; }
.btn-filter {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text);
}
.btn-filter:hover {
    border-color: var(--dark);
    color: var(--dark);
}
.btn-sm { padding: 9px 22px; font-size: 14px; }

/* === Container === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 56px; }

/* === Section === */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
    font-size: 38px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text);
}
.section__subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto 48px;
    font-size: 16px;
}

/* === Breed Cards === */
.breeds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.breed-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.breed-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.breed-card__img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.breed-card__body { padding: 28px; }
.breed-card__title { font-size: 24px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.breed-card__text { color: var(--text-light); font-size: 15px; margin-bottom: 18px; line-height: 1.6; }

/* === Dog Cards === */
.puppies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.puppy-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
}
.puppy-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.puppy-card__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-alt);
}
.puppy-card__body { padding: 20px; }
.puppy-card__breed {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}
.puppy-card__name { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.puppy-card__meta {
    display: flex;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
}
.puppy-card__meta span + span::before { content: "·"; margin-right: 8px; }
.puppy-card__price {
    font-size: 20px;
    font-weight: 800;
    color: var(--price);
}
.puppy-card__placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--bg-alt), var(--bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
}

/* === Features === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.feature {
    text-align: center;
    padding: 36px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.feature__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: oklch(74% 0.1 55 / 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}
.feature__title { font-weight: 700; margin-bottom: 8px; font-size: 17px; }
.feature__text { color: var(--text-light); font-size: 14px; line-height: 1.5; }

/* === Puppy Detail === */
.puppy-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.puppy-detail__media {
    min-width: 0;
}
.puppy-detail__img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* === Carousel === */
.carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-alt);
}
.carousel__viewport {
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}
.carousel__track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}
.carousel__slide {
    flex: 0 0 100%;
    min-width: 0;
}
.carousel__slide img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel__btn:hover { background: rgba(0,0,0,0.7); }
.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }
.carousel__bottom {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
}
.carousel__dots {
    display: flex;
    gap: 6px;
    max-width: 60%;
    overflow: hidden;
    justify-content: center;
}
.carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}
.carousel__dot--active {
    background: #fff;
    transform: scale(1.3);
}
.carousel__counter {
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
/* Admin dogs: mobile cards (hidden on desktop) */
.admin-dogs-cards { display: none; }

.admin-dog-card {
    padding: 14px;
    border-bottom: 1px solid var(--border, #eee);
}
.admin-dog-card--inactive { opacity: 0.5; }
.admin-dog-card__top {
    display: flex;
    gap: 12px;
    align-items: center;
}
.admin-dog-card__photo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.admin-dog-card__placeholder {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: var(--bg-alt, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.admin-dog-card__name {
    font-weight: 700;
    font-size: 16px;
}
.admin-dog-card__meta {
    font-size: 13px;
    color: var(--text-light, #666);
    margin-top: 2px;
}
.admin-dog-card__price {
    font-weight: 700;
    font-size: 14px;
    margin-top: 2px;
}
.admin-dog-card__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.admin-dog-card__badges {
    display: flex;
    gap: 6px;
}

.photo-list-admin {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.photo-list-admin__row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: var(--bg-alt, #f5f5f5);
    border-radius: 10px;
}
.photo-list-admin__row img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    max-width: 100%;
}
.photo-list-admin__label {
    font-size: 14px;
    color: var(--text-light, #666);
}
.photo-list-admin__row--main {
    background: oklch(74% 0.1 55 / 0.15);
    border: 2px solid var(--accent);
}
.photo-list-admin__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
.puppy-detail__video {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 16px;
}
.puppy-detail__placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--bg-alt), var(--bg));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent);
}
.puppy-detail__info h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.puppy-detail__breed-tag {
    display: inline-block;
    background: oklch(74% 0.1 55 / 0.2);
    color: var(--dark);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}
.puppy-detail__price {
    font-size: 32px;
    font-weight: 800;
    color: var(--price);
    margin-bottom: 24px;
}
.puppy-detail__specs {
    list-style: none;
    margin-bottom: 24px;
}
.puppy-detail__specs li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}
.puppy-detail__specs li:last-child { border-bottom: none; }
.puppy-detail__specs .label { color: var(--text-light); }
.puppy-detail__desc {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 28px;
    font-size: 15px;
}

/* === Form === */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 560px;
    margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition);
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* === Alert === */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-weight: 500;
}
.alert-success { background: oklch(93% 0.05 145); color: oklch(35% 0.08 145); border: 1px solid oklch(82% 0.08 145); }
.alert-error { background: oklch(93% 0.04 25); color: oklch(40% 0.1 25); border: 1px solid oklch(82% 0.06 25); }

/* === About === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-text h2 { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.about-text p { color: var(--text-light); margin-bottom: 16px; line-height: 1.7; font-size: 15px; }
.about-img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.about-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--accent), oklch(74% 0.08 75));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

/* === Contact Info === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.contact-item {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.contact-item__icon { font-size: 2rem; margin-bottom: 12px; }
.contact-item__label { font-weight: 700; margin-bottom: 4px; font-size: 15px; }
.contact-item__value { color: var(--text-light); font-size: 14px; }

/* === Empty state === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; }

/* === Footer === */
.footer {
    margin-top: auto;
    background: var(--dark);
    color: oklch(75% 0.015 75);
    text-align: center;
    padding: 28px 20px;
    font-size: 14px;
}
.footer a { color: var(--accent); }

/* === Contact buttons (dog detail) === */
.contact-buttons {
    display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.btn-contact {
    padding: 8px 16px; border-radius: 8px; font-weight: 700;
    font-size: 13px; color: #fff; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-telegram { background: #0088cc; }
.btn-telegram:hover { background: #006daa; }
.btn-viber { background: #7360f2; }
.btn-viber:hover { background: #5a48d0; }
.btn-phone { background: #27ae60; }
.btn-phone:hover { background: #1e8e4e; }

/* === Share buttons === */
.share-buttons {
    display: flex; align-items: center; gap: 10px; margin-top: 20px;
    padding-top: 20px; border-top: 1px solid var(--border);
}
.share-buttons__label {
    font-size: 13px; color: var(--text-light); font-weight: 600;
}
.share-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 16px; text-decoration: none;
    transition: transform 0.2s;
}
.share-btn:hover { transform: scale(1.1); }
.share-btn--fb { background: #1877f2; }
.share-btn--tg { background: #0088cc; }
.share-btn--viber { background: #7360f2; }

/* === Breadcrumbs === */
.breadcrumbs {
    margin-bottom: 24px; font-size: 14px; color: var(--text-light);
}
.breadcrumbs a {
    color: var(--text-light); text-decoration: none;
}
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs__sep { margin: 0 8px; opacity: 0.5; }

/* === Floating contact buttons === */
.floating-contacts {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    display: flex; flex-direction: column; gap: 12px;
}
.floating-contact {
    width: 52px; height: 52px; border-radius: 50%;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    font-size: 20px; font-weight: 800; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.floating-contact:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.floating-contact--tg { background: #0088cc; }
.floating-contact--viber { background: #7360f2; }

/* === Responsive === */
@media (max-width: 1024px) {
    .container, .header__inner { padding-left: 28px; padding-right: 28px; }
    .hero__content { margin-left: 28px; padding: 60px 28px 40px; }
    .puppies-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container, .header__inner { padding-left: 20px; padding-right: 20px; }
    .header__nav { display: none; }
    .header__burger { display: block; }
    .header__nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--dark);
        padding: 20px 28px;
        gap: 16px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }
    .hero { min-height: 480px; }
    .hero__content { margin-left: 0; padding: 48px 20px 40px; max-width: 100%; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero__overlay {
        background: linear-gradient(to bottom, oklch(22% 0.04 50 / 0.85) 0%, oklch(22% 0.04 50 / 0.5) 100%);
    }
    .section { padding: 48px 0; }
    .section__title { font-size: 28px; }
    .puppies-grid { grid-template-columns: 1fr; }
    .breeds-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .puppy-detail { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .admin-dogs-table table { display: none; }
    .admin-dogs-cards { display: block; }
    .photo-list-admin__row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    .photo-list-admin__row img {
        width: 60px;
        height: 60px;
    }
    .photo-list-admin__actions {
        margin-left: 0;
        width: 100%;
    }
    .photo-list-admin__label {
        flex: 1;
        min-width: 0;
    }
}
