html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    margin-bottom: 60px;
}

/* Focused Elements */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Layout */
.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .container {
        width: 95%;
    }
}

h2 {
    font-size: 2.5em;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

/* List Reset */
main ul,
ul.product-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

    main ul li {
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #ccc;
    }

        main ul li:last-child {
            margin-bottom: 0;
            border-bottom: none;
        }

/* Grid Layout */
ul.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

li.product-item {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* Product Link Styling */
.product-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
    position: relative;
    z-index: 1;
}

    .product-link:hover {
        transform: translateY(-5px);
        background-color: #f0f0f0;
        z-index: 2;
    }

    .product-link h3 {
        font-size: 1.5em;
        color: #2c3e50;
        margin-bottom: 10px;
    }

    .product-link .price {
        font-weight: bold;
        color: #27ae60;
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .product-link .description {
        margin: 15px 0;
        font-size: 1.1em;
        color: #7f8c8d;
    }

    .product-link label,
    .product-link input {
        display: block;
        width: 100%;
        text-align: center;
    }

    .product-link label {
        font-size: 1.2em;
        color: #34495e;
        margin-bottom: 5px;
    }

    .product-link input {
        padding: 5px;
        font-size: 1em;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        width: 80px;
        margin-left: auto;
        margin-right: auto;
    }

/* PayPal Button Containers */
#paypal-button-container-rabbit,
#paypal-button-container-holland-lop,
#paypal-button-container-chicken,
#paypal-button-container-goat-milk,
#paypal-button-container-pig,
#paypal-button-container-eggs {
    width: 100%;
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

/* Mobile Image/Layout Adjustments */
@media (max-width: 576px) {
    .product-link img {
        max-width: 120px;
    }

    .product-link h3 {
        font-size: 1.2em;
    }

    .product-link .price {
        font-size: 1.1em;
    }
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    padding: 10px 20px;
    font-family: 'Arial', sans-serif;
}

/* Navbar Menu Items */
.navbar-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    list-style: none;
    font-size: 1.1rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
}

    .nav-item a {
        text-decoration: none;
        color: #ecf0f1;
        transition: color 0.3s, transform 0.3s ease;
        position: relative;
        padding: 8px 0;
        z-index: 1;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
    }

        .nav-item a:hover,
        .nav-item a:focus {
            color: #3498db;
            transform: translateY(-3px);
        }

        .nav-item a::after {
            content: "";
            position: absolute;
            width: 100%;
            height: 2px;
            bottom: 0;
            left: 0;
            background-color: #3498db;
            transform: scaleX(0);
            transform-origin: bottom right;
            transition: transform 0.3s ease-out;
        }

        .nav-item a:hover::after {
            transform: scaleX(1);
            transform-origin: bottom left;
        }

    .nav-item form button {
        padding: 10px 15px;
        font-size: 1.1rem;
        text-transform: uppercase;
        background-color: transparent;
        border: none;
        color: #ecf0f1;
        transition: color 0.3s, transform 0.3s ease;
    }

/* Email Display */
.navbar .email {
    font-size: 0.9rem;
    color: #ecf0f1;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 15px;
}

/* Active Link */
.nav-item a.active {
    color: #3498db;
    font-weight: normal;
}

/* Mobile Navbar */
@media (max-width: 576px) {
    .navbar {
        flex-direction: column;
        padding: 20px;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 15px;
    }

    .nav-item a {
        font-size: 1.2rem;
    }

    .navbar .email {
        margin-top: 10px;
        text-align: center;
    }
}

/* Hover dropdown for desktop */
@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        top: 100%;
        left: 0;
        margin-top: 0;
    }

    .nav-item.dropdown > .dropdown-toggle {
        pointer-events: none;
    }

    .dropdown-menu {
        top: 100%;
        left: 0;
        margin-top: 0;
        transform: translateY(0);
        padding: 12px 0;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        z-index: 1050;
    }

        .dropdown-menu .dropdown-item {
            padding: 16px 28px;
            color: #2c3e50;
            font-weight: 500;
            white-space: nowrap;
            transition: background-color 0.2s ease;
        }

            .dropdown-menu .dropdown-item:hover,
            .dropdown-menu .dropdown-item:focus {
                background-color: #f0f0f0;
                color: #3498db;
                text-decoration: none;
            }
}

/* Fix mobile dropdown behavior */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        position: relative;
        width: 100%;
        background-color: #34495e;
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
        left: 0;
    }

    /*.nav-item.dropdown .dropdown-menu {
        display: none;
    }*/

    .nav-item.dropdown.show .dropdown-menu {
        display: block;
    }

    .dropdown-menu .dropdown-item {
        color: #ecf0f1;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(236, 240, 241, 0.1);
    }

        .dropdown-menu .dropdown-item:hover,
        .dropdown-menu .dropdown-item:focus {
            background-color: #3f5871;
            color: #fff;
        }
}

/* Nested lists under product items */
.product-type-list {
    margin-top: 10px;
    padding-left: 15px;
    list-style-type: disc;
    font-size: 0.9em;
    color: #34495e;
}

.product-type-item {
    margin-bottom: 6px;
}

.breed-list {
    margin-top: 5px;
    padding-left: 20px;
    list-style-type: circle;
    font-size: 0.85em;
    color: #7f8c8d;
}

.breed-item {
    margin-bottom: 3px;
}

.product-img {
    width: 100%; /* fill container width */
    height: 200px; /* fixed height for uniformity */
    object-fit: cover; /* crop image without distortion */
    border-radius: 8px; /* rounded corners matching card style */
    display: block; /* remove inline gap below image */
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .product-img {
        height: 150px; /* smaller height on small screens */
    }
}
