/* Base Styles */
:root {
    --primary-color: #e92929;
    --secondary-color: #FF6B6B;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: 80px;
}

/* Navigation */
.navbar {
    background-color: white;
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #db2777;
    text-decoration: none;
    transition: color 0.2s;
}

.logo a:hover {
    color: #be185d;
}

.cart-btn {
    background: transparent;
    border: none;
    color: rgb(83, 83, 83);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-count {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Filters */
.filters {
    background-color: white;
    padding: 1rem 2rem;
    margin: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

#price-range {
    width: 200px;
}

/* Pet Grid */
.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.pet-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.pet-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.pet-info {
    padding: 1rem;
}

.pet-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.pet-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;         /* Keep it responsive on smaller screens */
    max-width: 1000px;  /* INCREASED - Set your desired max width */
    max-height: 95vh;   /* INCREASED SLIGHTLY - Set your desired max height */
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    padding: 20px;      /* Combines padding from the duplicate rule */
}

/* Optional: Increase max height for the scrollable cart items area */
.cart-items {
    max-height: 600px; 
    overflow-y: auto;
    margin: 1rem 0;
}
@keyframes slideUp {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--dark-color);
}

/* Pet Modal */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
}

.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.thumbnail-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--primary-color);
}

.pet-details h2 {
    margin-bottom: 0.5rem;
}

.pet-info {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
}

.pet-type {
    background-color: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background-color: #3a7bc8;
}

/* Cart Modal */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: bold;
}

.remove-item {
    color: var(--secondary-color);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2rem;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.cart-total {
    font-weight: bold;
    font-size: 1.2rem;
}

.clear-cart-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.clear-cart-btn:hover {
    background-color: #e05a5a;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    
    .pet-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (min-width: 992px) {
    .modal-body {
        flex-direction: row;
    }
    
    .image-gallery {
        width: 60%;
    }
    
    .pet-details {
        width: 40%;
    }
}
