:root {
    --primary-color: #ff9f43;
    --primary-light: #ffb870;
    --secondary-color: #ee5253;
    --dark-color: #2d3436;
    --dark-accent: #1e2223;
    --light-color: #f4f7f6;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --glass: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 15px 40px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

.navbar {
    position: fixed;
    top: 20px;
    left: 5%;
    width: 90%;
    z-index: 2000;
    padding: 15px 0;
    transition: var(--transition);
    border-radius: 100px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-scrolled {
    padding: 10px 0;
    top: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 159, 67, 0.2);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(255, 159, 67, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    transition: var(--transition);
    padding-bottom: 5px;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

#cart-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    color: var(--text-main);
    transition: var(--transition);
}

#cart-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.login-link {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(255, 159, 67, 0.3);
    transition: var(--transition);
    border: 2px solid transparent;
}

.login-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(238, 82, 83, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-msg {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.logout-link {
    background: rgba(45, 52, 54, 0.05);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid rgba(45, 52, 54, 0.1);
    transition: var(--transition);
}

.logout-link:hover {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(238, 82, 83, 0.3);
    border-color: var(--secondary-color);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 10% 0;
    background: linear-gradient(135deg, #fffcf5 0%, #fff0dc 100%);
    gap: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 40vh;
    height: 40vh;
    background: var(--primary-color);
    opacity: 0.05;
    border-radius: 50%;
    top: -10vh;
    right: -10vh;
}

.hero-content {
    flex: 1.2;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1.15;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    background: var(--primary-color);
    opacity: 0.15;
    z-index: -1;
    border-radius: 5px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-btns {
    display: flex;
    gap: 25px;
    margin-top: 30px;
}

.btn-primary {
    padding: 18px 45px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(255, 159, 67, 0.4);
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(255, 159, 67, 0.5);
    background: var(--dark-accent);
}

.btn-secondary {
    padding: 18px 45px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 159, 67, 0.05);
    transform: translateY(-2px);
}

.hero-image {
    flex: 0.8;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 10px solid var(--primary-color);
    opacity: 0.1;
    border-radius: 40px;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: cover;
    border-radius: 35px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    z-index: 2;
    transform: rotate(1deg);
}

.hero-image img:hover {
    transform: rotate(0deg) scale(1.03);
    box-shadow: var(--shadow-lg);
}

.products {
    padding: 120px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
    position: relative;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark-color);
    letter-spacing: -1px;
}

.section-title .line {
    width: 100px;
    height: 5px;
    background: var(--primary-color);
    margin: 15px auto;
    border-radius: 10px;
    position: relative;
}

.section-title .line::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--white);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--white);
    border-radius: 30px;
    padding: 25px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(238, 82, 83, 0.3);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.product-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    height: 45px;
    overflow: hidden;
}

.price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price::after {
    content: '/ ج.م';
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.add-to-cart {
    width: 100%;
    padding: 16px;
    background: var(--dark-color);
    color: var(--white);
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(45, 52, 54, 0.2);
}

.add-to-cart:hover {
    background: var(--primary-color);
    box-shadow: 0 6px 15px rgba(255, 159, 67, 0.4);
    transform: translateY(-2px);
}

footer {
    text-align: center;
    padding: 80px 10%;
    background: var(--dark-accent);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    width: 60vh;
    height: 60vh;
    background: var(--primary-color);
    opacity: 0.03;
    border-radius: 50%;
    bottom: -20vh;
    left: -20vh;
}

footer strong {
    color: var(--white);
    font-weight: 800;
}

.cart-container {
    padding: 160px 10% 80px;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 80vh;
}

.cart-item {
    display: flex;
    align-items: center;
    background: var(--white);
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 25px;
    box-shadow: var(--shadow-md);
    gap: 25px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.cart-item:hover {
    box-shadow: var(--shadow-lg);
    transform: scale(1.01);
}

.cart-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.cart-item-info p {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.remove-item {
    color: var(--secondary-color);
    cursor: pointer;
    background: rgba(238, 82, 83, 0.1);
    border: none;
    font-size: 1.3rem;
    transition: var(--transition);
    padding: 10px;
    border-radius: 50%;
}

.remove-item:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
}

.cart-total {
    background: var(--white);
    padding: 30px;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    text-align: left;
    margin-top: 40px;
    border: 2px solid rgba(255, 159, 67, 0.1);
}

@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero {
        padding: 120px 5% 0;
        gap: 40px;
    }
    .products {
        padding: 100px 5%;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: 100%;
        left: 0;
        top: 0;
        border-radius: 0;
        padding: 10px 0;
    }
    .nav-scrolled {
        top: 0;
    }

    .nav-links { 
        display: none;
    } 
    
    .nav-container {
        width: 92%;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 160px;
        padding-bottom: 70px;
        height: auto;
        gap: 50px;
    }

    .hero-content h1 { 
        font-size: 2.6rem; 
    }

    .hero-btns {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image img { 
        max-width: 320px; 
    }

    .section-title h2 {
        font-size: 2.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .cart-item img {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.6rem;
    }

    .nav-actions {
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary, .btn-secondary {
        padding: 15px 30px;
        width: 100%;
    }

    .product-card {
        padding: 20px;
    }

    .welcome-msg {
        display: none;
    }
}

.search-container {
    position: relative;
    margin: 0 15px;
    flex-grow: 0.5;
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    border-radius: 20px;
    border: 1px solid #eee;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.search-container input:focus {
    border-color: #ff9f43;
    box-shadow: 0 0 8px rgba(255, 159, 67, 0.2);
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s;
    z-index: 5;
}

.wishlist-btn i { color: #ccc; }
.wishlist-btn.active i { color: #e74c3c; }
.vets-section { padding: 60px 5%; background: #f9f9f9; }
.vets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.vet-card { background: white; padding: 20px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center; }
.vet-card img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; }
.booking-slots { margin: 15px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.slot-btn { padding: 8px 12px; border: 1px solid #ff9f43; border-radius: 5px; background: white; cursor: pointer; font-size: 0.9em; }
.slot-btn.booked { background: #eee; border-color: #ccc; color: #999; cursor: not-allowed; text-decoration: line-through; }
.slot-btn.selected { background: #ff9f43; color: white; }
.book-now-btn { background: #ff9f43; color: white; border: none; padding: 10px 25px; border-radius: 25px; cursor: pointer; margin-top: 10px; width: 100%; transition: 0.3s; }
.book-now-btn:hover { background: #e67e22; }

@media (max-width: 768px) {
    .search-container { order: 3; width: 100%; margin: 10px 0; }
}
 
.page-section {
    display: none; 
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    padding-top: 160px;
}

.page-section.active {
    display: block;
    opacity: 1;
}

.nav-links a {
    cursor: pointer;
}

.wishlist-btn.active i {
    color: #e74c3c !important;
}

.vet-card { cursor: pointer; transition: transform 0.3s; position: relative; }
.vet-card:hover { transform: translateY(-5px); }
.rating { color: #f1c40f; margin: 5px 0; }
.vet-meta { font-size: 0.9em; color: #666; margin-bottom: 5px; }
.vet-meta i { width: 20px; color: #ff9f43; }

.vet-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

.modal-body img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 5px solid #ff9f43; }

.my-bookings-section {
    padding: 160px 10% 60px;
    min-height: 80vh;
}

.bookings-list {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.booking-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #ff9f43;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.booking-card:hover { transform: translateX(5px); }
.booking-info h4 { color: #2d3436; margin-bottom: 5px; }
.booking-info p { color: #777; font-size: 0.9rem; margin-bottom: 5px; }
.booking-status {
    padding: 4px 10px;
    background: rgba(255, 159, 67, 0.1);
    color: #ff9f43;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
}

.booking-actions { display: flex; gap: 10px; }
.btn-edit-booking { background: none; border: 1px solid #ff9f43; color: #ff9f43; padding: 8px 15px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.btn-cancel-booking { background: rgba(238, 82, 83, 0.1); border: 1px solid #ee5253; color: #ee5253; padding: 8px 15px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.btn-cancel-booking:hover { background: #ee5253; color: white; }

.shop-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px 10%;
    margin-bottom: 30px;
}

.category-btn {
    background: #fff;
    border: 2px solid #f1f1f1;
    padding: 15px 10px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.category-btn i { font-size: 1.8rem; color: #ff9f43; }
.category-btn span { font-weight: 600; color: #2d3436; font-size: 0.9rem; }
.category-btn:hover, .category-btn.active {
    border-color: #ff9f43;
    background: #fffaf5;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 159, 67, 0.1);
}

.product-card { transition: 0.3s; }

.profile-section-ui {
    padding: 160px 10% 60px;
    min-height: 80vh;
}

.profile-form-group {
    margin-bottom: 15px;
    text-align: left;
}

.profile-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3436;
}

.profile-form-group input, .profile-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
}

.profile-edit-btn {
    background: #ff9f43;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.profile-card {
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 35px 25px; 
    text-align: center;
    max-width: 450px;
    margin: 50px auto; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; 
}

.profile-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 4px solid #ff9f43;
    object-fit: cover;
    flex-shrink: 0; 
}

.profile-info {
    width: 100%;
    margin-bottom: 15px;
}

.profile-info h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #2d3436;
    word-wrap: break-word; 
}

.profile-info p {
    color: #636e72;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-all;
}

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.05); 
}

.p-btn {
    padding: 12px 15px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.p-btn-edit {
    background: #ff9f43;
    color: white;
}

.p-btn-edit:hover {
    background: #e68a2e;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.2);
}

.p-btn-logout {
    background: #e74c3c;
    color: white;
}

.p-btn-logout:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

@media (max-width: 480px) {
    .profile-card {
        width: 90%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .profile-actions {
        grid-template-columns: 1fr; 
    }
}