/* ========================================
   Reset and Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4a306d;
    --secondary: #f8c8dc;
    --accent: #ff6b6b;
    --text: #333333;
    --light: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    /* direction: rtl;
    text-align: right; */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

::selection {
    background-color: var(--light);
    color: var(--accent);
}

section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Preloader ---------- */
#preloader {
    position: fixed;
    inset: 0;
    background: rgba(26, 32, 44, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 80px;
    height: 80px;
    border: 6px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.loader::before,
.loader::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: -10px;
    left: -10px;
    animation: orbit 1s linear infinite;
}

.loader::before {
    background: var(--primary);
}

.loader::after {
    background: var(--light);
    animation-delay: 0.5s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

/* ========================================
   Buttons and Titles
======================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: #3a205d;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: #e8b8cc;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary);
}

/* ========================================
   Header and Navigation
======================================== */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.8rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Logo */
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-menu a:hover {
    color: var(--accent);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
    background: none;
    border: none;
    padding: 0.5rem;
}

/* Cart Icon & Count - RTL Fixed */
.cart-icon {
    position: relative;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    z-index: 10;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 1rem;
}

.cart-icon:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background-color: var(--accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 18px;
    z-index: 11;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

/* ========================================
   Cart Sidebar
======================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100%;
    background: var(--white);
    box-shadow: 3px 0 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    transition: var(--transition);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-sidebar.active {
    left: 0;
}

.cart-sidebar h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    font-size: 1.2rem;
    color: var(--primary);
    text-align: center;
}

.cart-items {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.cart-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    text-align: right;
}

.remove-item {
    background: #e63946;
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: auto;
}

.remove-item:hover {
    background: #c71c30;
}

.cart-footer {
    border-top: 2px solid #eee;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-footer p {
    font-weight: bold;
    text-align: center;
}

.clear-cart,
.close-cart {
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.clear-cart {
    background: #ff9800;
    color: var(--white);
}

.clear-cart:hover {
    background: #e68900;
}

.close-cart {
    background: var(--primary);
    color: var(--white);
}

.close-cart:hover {
    background: #36234f;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    width: 100%;
    background: linear-gradient(rgba(74, 48, 109, 0.8), rgba(74, 48, 109, 0.8)),
        url('cats/beautiful-domestic-cat-lying-fence.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: var(--white);
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ========================================
   Featured Cats Section
======================================== */
.featured-cats {
    padding: 4rem 0;
    background-color: var(--secondary);
}

.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.cat-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cat-image {
    height: 200px;
    overflow: hidden;
}

.cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cat-card:hover .cat-image img {
    transform: scale(1.05);
}

.cat-info {
    padding: 1.5rem;
    text-align: right;
}

.cat-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.cat-breed {
    color: #777;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.cat-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* ========================================
   Products Section
======================================== */
.products {
    padding: 4rem 0;
    background-color: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 180px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.2rem;
    text-align: right;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* ========================================
   About Section
======================================== */

.about {
    padding: 4rem 0;
    background-color: var(--secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-text h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 1rem;
}

.about-extra {
    display: none;
    background-color: var(--light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    max-width: 600px;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.about-extra.active {
    display: block;
}

/* ========================================
   Testimonials Section
======================================== */
.testimonials {
    padding: 4rem 0;
    background-color: var(--light);
}

.testimonials-container {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: right;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   FAQ Section
======================================== */
.faq {
    padding: 4rem 0;
    background-color: var(--secondary);
}

.faq-item {
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.faq-question {
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    display: none;
    margin-top: 0.5rem;
    color: #555;
    padding: 0.5rem;
}

.faq-answer.active {
    display: block;
}

/* ========================================
   Adoption Steps Section
======================================== */

.adoption {
    padding: 4rem 0;
    background-color: var(--light);
}

.adoption-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.step h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.step p {
    color: #555;
    font-size: 0.95rem;
}

/* ========================================
   Contact Form Section
======================================== */
.contact-form {
    padding: 4rem 0;
    background-color: var(--light);
}

.contact-form form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-family: inherit;
    text-align: right;
}

.contact-form textarea {
    height: 150px;
    width: 100%;
    resize: none;
}

.contact-form button {
    display: block;
    margin: 1rem auto 0;
    padding: 12px 24px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.contact-form button:hover {
    background-color: #3a205d;
}

/* ========================================
   Services Section
======================================== */
.services {
    padding: 4rem 0;
    background-color: var(--secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.service:hover {
    transform: translateY(-5px);
}

.service h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.2rem;
}

/* ========================================
   Blog Section
======================================== */
.blog {
    padding: 4rem 0;
    background: var(--light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.blog-post {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: right;
}

.blog-post h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.blog-post p {
    margin-bottom: 1rem;
    color: #666;
}

.blog-extra {
    display: none;
    margin-top: 1rem;
    background-color: var(--light);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.blog-extra.active {
    display: block;
}

/* ========================================
   Gallery Section
======================================== */
.gallery {
    padding: 4rem 0;
    background-color: var(--secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.gallery-grid img {
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.lightbox.active {
    visibility: visible;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
}

.lightbox-title {
    color: var(--light);
    margin-bottom: 0.5rem;
}

.lightbox-desc {
    color: var(--accent);
    font-size: 1rem;
}

/* ========================================
   Statistics Section
======================================== */
.stats {
    padding: 4rem 0;
    background-color: var(--light);
    text-align: center;
}

.stats h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background-color: var(--white);
    padding: 2rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    color: var(--text);
}

.section-title {
    position: relative;
    display: block;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 auto 3rem;
    padding-bottom: 0.5rem;
    text-align: center;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 100px;
}

/* ========================================
   Newsletter Section
======================================== */
.newsletter-title {
    position: relative;
    display: inline-block;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 0.5rem;
}

.newsletter-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.newsletter-title:hover::after {
    width: 100px;
}

.newsletter {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--secondary);
    color: var(--white);
}

.newsletter h2 {
    margin-bottom: 1.5rem;
}

.newsletter p {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 10px auto;
}

.newsletter-form input {
    padding: 12px;
    border-radius: 4px 0 0 4px;
    border: none;
    flex: 1;
    min-width: 200px;
    text-align: right;
}

.newsletter-form button {
    border-radius: 0 4px 4px 0;
    background-color: var(--accent);
    color: var(--white);
    padding: 12px 20px;
    border: none;
    cursor: pointer;
}

.newsletter-form button:hover {
    background-color: #ff5252;
}

/* ========================================
   Footer
======================================== */
footer {
    background-color: #333;
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    font-size: 1.2rem;
    color: var(--white);
}

.social-icons a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    color: var(--white);
}

/* حقوق النشر */
.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

.copyright a,
.copyright span {
    position: relative;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--light);
    transition: width 0.3s ease;
}

.copyright a:hover {
    color: var(--light);
}

.copyright a:hover::after {
    width: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .nav-menu {
        margin-top: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .nav-menu a {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 2.3rem;
        right: 1rem;
        transform: translateY(-50%);
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-input {
        border-radius: 4px;
        margin-bottom: 1rem;
    }

    .newsletter-btn {
        border-radius: 4px;
    }

    .testimonials-container {
        padding: 1rem;
    }

    .testimonial {
        padding: 1rem;
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }

    /* الأسئلة الشائعة */
    .faq-item {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .faq-question {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card h3 {
        font-size: 1.3rem;
    }

    .stat-card p {
        font-size: 0.85rem;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .cats-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    /* آراء العملاء */
    .testimonial {
        font-size: 0.9rem;
    }

    /* الإحصائيات */
    .stats-grid {
        grid-template-columns: 1fr;
        /* عنصر واحد في الصف */
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card h3 {
        font-size: 1.1rem;
    }

    /* الأسئلة الشائعة */
    .faq-item {
        font-size: 0.9rem;
    }

    /* النشرة البريدية */
    .newsletter-form input {
        font-size: 0.9rem;
        padding: 10px;
    }

    .newsletter-form button {
        font-size: 0.95rem;
        padding: 10px;
    }
}