/* Adoption browse page styles */

/* ════════════════════════════════════════
   REVEAL & ANIMATION
   (rv1–rv6 delays موجودة في main.css)
════════════════════════════════════════ */
.product-card {
    opacity: 0;
    transform: translateX(-3.2rem);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease,
        box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card.visible {
    opacity: 1;
    transform: translateX(0);
}
.product-card:hover {
    transition-delay: 0s !important;
    transform: translateY(-1rem);
    box-shadow: var(--shadow-lift);
    border-color: var(--primary-light);
}

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero-tag {
    background: rgba(194, 98, 42, 0.15);
    border: 0.1rem solid rgba(194, 98, 42, 0.3);
    animation: fade-up 0.7s ease both;
    gap: 0.8rem;
}
.hero-tag-dot {
    width: 0.6rem;
    height: 0.6rem;
    animation: blink 1.5s infinite;
}
.hero-desc {
    color: rgba(255, 255, 255, 0.5);
    max-width: 46rem;
    animation: fade-up 0.7s 0.2s ease both;
}
.hero-btns {
    animation: fade-up 0.7s 0.3s ease both;
}
.hero-cats {
    grid-template-columns: 1fr 1fr;
    animation: fade-up 0.7s 0.35s ease both;
}
.hero-cat {
    background: rgba(255, 255, 255, 0.07);
    border: 0.1rem solid rgba(255, 255, 255, 0.1);
    transition: var(--t);
}
.hero-cat::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 0.2rem;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );
    opacity: 0;
    transition: var(--t);
}
.hero-cat:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(194, 98, 42, 0.35);
    transform: translateY(-0.3rem);
}
.hero-cat:hover::after {
    opacity: 1;
}
.hsg-num {
    font-size: 3.8rem;
    background: linear-gradient(135deg, var(--primary-light), #f0b080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hsg-label {
    color: rgba(255, 255, 255, 0.38);
}
.hero-inner {
    z-index: 2;
    max-width: 96rem;
}

.hero-text {
    text-align: center;
}
.hero-tag {
    margin-left: auto;
    margin-right: auto;
}
.hero-desc {
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .lightbox-overlay {
        padding: 0.8rem;
    }
    .hero-btns {
        flex-direction: row;
    }
    .hero-btns .btn {
        width: auto;
    }

    .hero-text {
        text-align: left;
    }
    .hero-desc {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-tag {
        margin-left: 0;
        margin-right: 0;
    }
}
@media (min-width: 768px) {
    .hero-inner {
        flex-direction: row;
        gap: 6rem;
        align-items: center;
    }
    .hero-text {
        flex: 1;
    }
    .hero-cats {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ════════════════════════════════════════
   FILTER BAR
════════════════════════════════════════ */
.filter-bar {
    z-index: 10;
    box-shadow: 0 0.2rem 2rem rgba(0, 0, 0, 0.06);
}
.filter-search-icon {
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
}
.filter-input {
    padding: 1rem 1.4rem 1rem 4rem;
    min-width: 18rem;
}
.filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.3rem var(--primary-glow);
}
.filter-group::-webkit-scrollbar {
    display: none;
}
.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}
.filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.filter-chip.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.filter-count {
    background: rgba(194, 98, 42, 0.15);
    color: var(--primary);
}

@media (min-width: 640px) {
    .filter-bar {
        padding: 2.4rem;
    }
    .filter-input {
        min-width: 20rem;
    }
}
@media (min-width: 768px) {
    .filter-bar {
        padding: 2.4rem 3.2rem;
    }
    .filter-inner {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
}
@media (min-width: 1024px) {
    .filter-bar {
        padding: 2.4rem 4.8rem;
    }
    .filter-input {
        min-width: 30rem;
    }
}

/* ════════════════════════════════════════
   ANIMAL GRID
════════════════════════════════════════ */

.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
}
.product-card {
    box-shadow: var(--shadow-sm);
}
.product-img-wrap {
    height: 22rem;
    background: linear-gradient(145deg, #fff8f5, #ffe8d6);
}
.product-img {
    transition: transform 0.5s ease;
    display: block;
}
.product-card:hover .product-img {
    transform: scale(1.06);
}
.img-name-overlay {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.8rem 1.8rem 0.8rem;
    background: linear-gradient(
        to top,
        rgba(22, 14, 6, 0.55) 0%,
        transparent 100%
    );
    z-index: 2;
}
.prod-badge-tl {
    top: 1.2rem;
    left: 1.2rem;
    z-index: 2;
}
.prod-badge {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: var(--r-full);
    display: inline-block;
}
.badge-urgent {
    background: #ef4444;
    color: #fff;
    animation: pulse-urgent 2s ease-in-out infinite;
}
.badge-new {
    background: var(--primary);
    color: #fff;
}
.badge-special {
    background: #7c3aed;
    color: #fff;
}
@keyframes pulse-urgent {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.75;
    }
}
.card-slide-btn {
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 3.2rem;
    height: 3.2rem;
    background: rgba(255, 255, 255, 0.9);
}
.product-img-wrap:hover .card-slide-btn {
    opacity: 1;
}
.card-slide-btn:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.card-slide-prev {
    left: 0.8rem;
}
.card-slide-next {
    right: 0.8rem;
}
.card-dots {
    bottom: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.card-dot {
    width: 0.6rem;
    height: 0.6rem;
    background: rgba(255, 255, 255, 0.6);
}
.card-dot.active {
    background: #fff;
    transform: scale(1.3);
}
.meta-dot {
    width: 0.3rem;
    height: 0.3rem;
    background: var(--border-warm);
}
.animal-tag {
    border: 0.1rem solid rgba(194, 98, 42, 0.18);
    background: var(--primary-pale);
    color: var(--primary);
}
.tag-energy-low {
    background: #dcfce7;
    color: #166534;
    border-color: rgba(22, 101, 52, 0.2);
}
.tag-energy-med {
    background: #fef3c7;
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.2);
}
.tag-energy-high {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.2);
}
.adopt-btn-main:hover {
    background: var(--primary-dark);
    box-shadow: 0 0.6rem 2rem var(--primary-glow);
}
.pgbtn {
    width: 3.8rem;
    height: 3.8rem;
}
.pgbtn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}
.pgbtn-active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    font-weight: 700;
}
.pgbtn-disabled {
    opacity: 0.3;
}
.pg-ellipsis {
    line-height: 3.8rem;
}
.load-more-btn {
    border: 0.2rem solid var(--primary);
}
.load-more-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-lift);
}

@media (min-width: 640px) {
    .load-more-wrap {
        margin-top: 4.8rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
    }
}
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
        gap: 2.4rem;
    }
}

/* ════════════════════════════════════════
   PROCESS
════════════════════════════════════════ */

.process-pattern {
    background: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 6rem,
        rgba(194, 98, 42, 0.03) 6rem,
        rgba(194, 98, 42, 0.03) 6.1rem
    );
}
.process-orb {
    width: 55rem;
    height: 55rem;
    background: radial-gradient(
        circle,
        rgba(194, 98, 42, 0.12) 0%,
        transparent 70%
    );
    bottom: -10rem;
    right: -6rem;
}
.process-inner {
    z-index: 2;
    max-width: 96rem;
}
.process-hd {
    max-width: 60rem;
}
.process-title {
    font-size: clamp(2.8rem, 8vw, 4.2rem);
}
.process-grid {
    grid-template-columns: 1fr 1fr;
}
.process-line {
    display: none;
}
.process-num {
    width: 7.6rem;
    height: 7.6rem;
    background: linear-gradient(
        135deg,
        var(--primary-dark),
        var(--primary-light)
    );
    box-shadow: 0 0.8rem 2.8rem var(--primary-glow);
}
.process-step:hover .process-num {
    transform: scale(1.1) translateY(-0.4rem);
    box-shadow: 0 1.4rem 3.6rem var(--primary-glow);
}

@media (min-width: 768px) {
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .process-line {
        display: block;
        top: 3.8rem;
        left: calc(12.5% + 2rem);
        right: calc(12.5% + 2rem);
        height: 0.2rem;
        background: linear-gradient(
            90deg,
            var(--primary),
            var(--primary-light),
            var(--primary)
        );
        opacity: 0.25;
    }
}

/* ════════════════════════════════════════
   STORIES
════════════════════════════════════════ */

.stories-inner {
    max-width: 96rem;
}
.stories-hd {
    max-width: 60rem;
}
.stories-sub {
    max-width: 52rem;
}
.stories-title {
    font-size: clamp(2.8rem, 8vw, 4.2rem);
}
.stories-grid {
    grid-template-columns: 1fr;
}
.story-card {
    transition: all 0.36s cubic-bezier(0.34, 1.1, 0.64, 1);
    box-shadow: var(--shadow-sm);
}
.story-card:hover {
    transform: translateY(-0.8rem);
    box-shadow: var(--shadow-lift);
    border-color: var(--primary-light);
}
.story-img-wrap {
    height: 22rem;
    overflow: hidden;
}
.story-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.story-card:hover .story-img {
    transform: scale(1.04);
}
.story-badge {
    background: var(--success-pale);
    color: var(--success);
    border: 0.1rem solid rgba(22, 101, 52, 0.2);
}
.story-quote {
    font-style: italic;
    border-left: 0.3rem solid var(--primary-light);
    padding-left: 1.4rem;
}
.story-avatar {
    width: 4.4rem;
    height: 4.4rem;
    background: linear-gradient(
        135deg,
        var(--primary-dark),
        var(--primary-light)
    );
}

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

/* ════════════════════════════════════════
   SUBMIT
════════════════════════════════════════ */

.submit-pattern {
    background: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 6rem,
        rgba(194, 98, 42, 0.03) 6rem,
        rgba(194, 98, 42, 0.03) 6.1rem
    );
}
.submit-orb {
    width: 55rem;
    height: 55rem;
    background: radial-gradient(
        circle,
        rgba(194, 98, 42, 0.11) 0%,
        transparent 70%
    );
    top: -8rem;
    left: -4rem;
}
.submit-inner {
    z-index: 2;
    max-width: 96rem;
}
.submit-img {
    width: 100%;
    height: 36rem;
    box-shadow: 0 2.4rem 6rem rgba(0, 0, 0, 0.35);
}
.submit-float {
    bottom: -2.4rem;
    right: -2.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 0.1rem solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(1.6rem);
    box-shadow: var(--shadow-md);
}
.submit-title {
    font-size: clamp(3rem, 7vw, 4.8rem);
}
.submit-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sub-step {
    border-bottom: 0.1rem solid rgba(255, 255, 255, 0.07);
}
.sub-step:last-child {
    border-bottom: none;
}
.sub-step-num {
    width: 4.8rem;
    height: 4.8rem;
    background: linear-gradient(
        135deg,
        var(--primary-dark),
        var(--primary-light)
    );
    box-shadow: 0 0.4rem 1.6rem var(--primary-glow);
}
.sub-step:hover .sub-step-num {
    transform: scale(1.1);
}

@media (min-width: 640px) {
    .submit-btns {
        flex-direction: row;
    }
    .submit-btns .btn {
        width: auto;
    }
}
@media (min-width: 768px) {
    .submit-layout {
        flex-direction: row;
        gap: 7rem;
        align-items: center;
    }
    .submit-visual {
        flex: 1;
    }
    .submit-img {
        height: 50rem;
    }
    .submit-content {
        flex: 1;
    }
}

/* ════════════════════════════════════════
   CTA
════════════════════════════════════════ */

.cta-inner {
    max-width: 72rem;
}
.cta-title {
    font-size: clamp(3rem, 9vw, 5.2rem);
    margin: 1.2rem 0;
}
.cta-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cta-btns .btn {
    max-width: 36rem;
}

@media (min-width: 640px) {
    .cta-btns {
        flex-direction: row;
        justify-content: center;
    }
    .cta-btns .btn {
        width: auto;
        max-width: none;
    }
}

/* ════════════════════════════════════════
   ANIMAL (ADOPT) MODAL + 4-STEP WIZARD
════════════════════════════════════════ */
.modal-overlay {
    background: rgba(22, 14, 6, 0.82);
    backdrop-filter: blur(1rem);
    z-index: 800;
    padding: 1.6rem;
    padding-bottom: 0;
}
.modal-box {
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    max-height: calc(100dvh - 3.2rem);
    max-width: 52rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    animation: modal-in 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.modal-box::-webkit-scrollbar {
    display: none;
}
.close-wrap {
    flex: 0 1 52rem;
    min-width: 0;
}
.modal-body {
    overflow: visible;
    min-height: 0;
}
.modal-body-scroll {
    overflow: visible;
}
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 2.4rem;
    }
    .modal-box {
        border-radius: var(--r-2xl);
        max-width: 88rem;
        max-height: calc(100dvh - 4.8rem);
        height: 56.82rem;
        flex-direction: row;
        overflow: hidden;
    }
    .modal-body {
        width: 50%;
        max-height: 100%;
        overflow: hidden;
    }
    .modal-body-scroll {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
    }
    .modal-body-scroll::-webkit-scrollbar {
        display: none;
    }
    .modal-img-side {
        width: 50%;
        flex-shrink: 0;
        overflow: hidden;
    }
    .modal-img-side .modal-img {
        width: 100%;
        height: 100%;
        min-height: 52rem;
        object-fit: cover;
        display: block;
    }
}
.modal-img-side {
    user-select: none;
}
.modal-img-side:active {
    cursor: grabbing;
}
.modal-img {
    height: 30rem;
    width: 100%;
}
.modal-img-overlay {
    background: linear-gradient(
        to top,
        rgba(22, 14, 6, 0.2) 0%,
        transparent 50%
    );
}
.modal-img-badges {
    top: 1.6rem;
    left: 1.6rem;
    z-index: 2;
}
.modal-name-overlay {
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    z-index: 2;
}
.modal-breed-lbl {
    color: rgba(255, 255, 255, 0.7);
}
.modal-slide-btn {
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.9);
}
.modal-slide-btn:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.modal-slide-prev {
    left: 1.2rem;
}
.modal-slide-next {
    right: 1.2rem;
}
.modal-dots {
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.modal-dot {
    width: 0.8rem;
    height: 0.8rem;
    background: rgba(255, 255, 255, 0.6);
}
.modal-dot.active {
    background: #fff;
    transform: scale(1.3);
}
.modal-details {
    grid-template-columns: 1fr 1fr;
}
.modal-actions {
    margin-top: auto;
}
.modal-add-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 0.8rem 2.4rem var(--primary-glow);
}
.modal-wish-btn {
    background: transparent;
}
.modal-wish-btn:hover {
    background: var(--primary-pale);
}

/* ══ ADOPT STEPS HEADER ══ */
.adopt-steps-header {
    position: sticky;
    top: 0;
    z-index: 10;
}
.form-progress-track {
    height: 0.4rem;
    background: var(--border);
}
.form-progress-fill {
    transition: width 0.4s ease;
}
.form-step-circle {
    width: 3.2rem;
    height: 3.2rem;
    background: var(--border);
}
.form-step-circle.active {
    background: var(--primary);
    color: #fff;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.3rem var(--primary-glow);
    outline: none;
}
.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 0.3rem rgba(192, 57, 43, 0.15) !important;
}
.form-err-inline {
    color: var(--danger);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.form-radio-btn {
    border-color: var(--border);
}
.form-radio-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}
.form-radio-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.form-toggle-row {
    border-color: var(--border);
}
.form-toggle {
    width: 4.8rem;
    height: 2.8rem;
    background: var(--border);
    border: none;
    border-radius: 100rem;
}
.form-toggle.on {
    background: var(--primary);
}
.form-toggle-knob {
    top: 0.3rem;
    left: 0.3rem;
    width: 2.2rem;
    height: 2.2rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.15);
}
.form-toggle.on .form-toggle-knob {
    left: calc(100% - 2.5rem);
}
.confirm-card-sub {
    color: rgba(255, 255, 255, 0.7);
}
.confirm-row {
    border-bottom: 0.1rem solid var(--border);
    padding-bottom: 1rem;
}

/* ══ SUCCESS VIEW ══ */
.success-view {
    background: linear-gradient(135deg, #2d6a4f 0%, #1a4a2e 100%);
    padding: 4.8rem 2.4rem;
    position: relative;
    overflow: hidden;
    gap: 0;
    flex: 1;
    min-height: 100%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.success-view::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 4rem,
        rgba(255, 255, 255, 0.03) 4rem,
        rgba(255, 255, 255, 0.03) 4.1rem
    );
    pointer-events: none;
}
.confetti-wrap {
    z-index: 0;
}
@keyframes confetti-fall {
    0% {
        transform: translateY(-2rem) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(10rem) rotate(720deg);
        opacity: 0;
    }
}
.confetti-piece {
    animation: confetti-fall 2s ease-in forwards;
    border-radius: 0.2rem;
}
.success-icon-wrap {
    z-index: 2;
    width: 9.6rem;
    height: 9.6rem;
    box-shadow: 0 0.8rem 3.2rem rgba(0, 0, 0, 0.2);
    animation: scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
.success-svg {
    width: 4.8rem;
    height: 4.8rem;
}
.success-check {
    stroke: #2d6a4f;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: check-draw 0.5s ease 0.7s both;
}
.success-view .playfair {
    position: relative;
    z-index: 2;
    color: #fff;
    animation: fade-up 0.5s 0.3s ease both;
}
.success-view p {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.75);
    animation: fade-up 0.5s 0.4s ease both;
}
.success-view strong {
    color: #fff;
}
.adoption-ref {
    z-index: 2;
    background: rgba(255, 255, 255, 0.12);
    border: 0.1rem solid rgba(255, 255, 255, 0.2);
    animation: fade-up 0.5s 0.5s ease both;
    color: white;
}
.adoption-ref strong {
    color: #fff;
}
.success-view .modal-add-btn {
    position: relative;
    z-index: 2;
    animation: fade-up 0.5s 0.6s ease both;
}

/* ══ MODAL CLOSE BTN ══ */
.modal-close-btn-fixed {
    top: 1rem;
    right: 1.4rem;
    z-index: 1100;
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.25);
    transition:
        transform 0.22s ease,
        background 0.18s ease;
    backdrop-filter: blur(0.4rem);
}
@media (min-width: 768px) {
    .close-wrap {
        position: static;
        flex-basis: 88rem;
    }
    .modal-close-btn-fixed {
        position: fixed;
    }
}
.modal-close-btn-fixed:hover {
    transform: rotate(90deg) scale(1.1);
    background: #fff;
}
