/* General styles (white-coffee.com inspiration) */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Choose a clean font */
    margin: 0;
    background-color: #f8f8f8;
    /* Light background */
    color: #333;
    /* Dark text */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #c00000;
    /* Red background */
    padding: 0px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    margin-bottom: 10px;
}

/* New class for the contents of the header */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    margin: 0;
    margin-bottom: 10px;
    font-size: 3em;
    color: #fff;
    /* White text */
    font-weight: 900;
    /* Bold */
    /* Responsive font size */
    font-size: calc(1.5em + 1vw);
}

.header-nav a {
    white-space: nowrap;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .header-nav {
        padding-bottom: 10px;
        margin-top: 10px;
    }

    /* Reduce font size for h1 on mobile */
    header h1 {
        font-size: calc(1.2em + 1vw);
        /* Smaller base size */
        text-align: center;
        /*Center the header*/
    }

    /* Reduce font size for other text */
    body,
    .card-title,
    .add-to-cart,
    .ebay-button,
    #start-shopping,
    #contact-us,
    .page-button,
    .sort-button,
    .admin-button,
    .header-nav a,
    a#back-to-shop,
    .copy-cart-info-button,
    a.filter-type-links,
    a.filter-city-links,
    #home-page-intro h2,
    #home-page-intro h3,
    #home-page-intro h4,
    .header-nav span {
        font-size: 0.9em;
        /* Adjust as needed */
    }

    #pagination-top, #pagination-bottom, #card-list, #sort-buttons {
        gap: 5px;
        /* Smaller spacing */
    }

    .page-button, .sort-button{
      margin: 0 2px;
    }
}

.header-nav a {
    padding: 10px;
    border-radius: 8px;
    background-color: #cccccc;
    color: black;
    font-size: 1em;
    border: none;
    /* Remove the outline */
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.header-nav a:hover {
    text-decoration: none;
    background-color: #0056b3;
    color: white;
}

a#back-to-shop {
    padding: 10px;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-size: 1em;
    text-decoration: none;
    font-weight: 750;
    /* Bold */    
}

a.filter-type-links {
    padding: 4px 8px;
    border-radius: 5px;
    background-color: #0052aa;
    color: white;
    font-size: 1em;
    text-decoration: none;
    font-weight: 750;
    /* Bold */    
}

a.filter-type-links:hover {
    text-decoration: none;
    background-color: #00356d;
    color: white;
}

a.filter-city-links {
    padding: 4px 8px;
    border-radius: 5px;
    background-color: #006bdd;
    color: white;
    font-size: 1em;
    text-decoration: none;
    font-weight: 750;
    /* Bold */    
}

a.filter-city-links:hover {
    text-decoration: none;
    background-color: #004085;
    color: white;
}

a#back-to-shop:hover,.header-nav a:hover {
    text-decoration: none;
    background-color: #004a99;
    color: white;
}

a {
    color: #007bff;
    /* Standard link color */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    padding: 20px 0;
}

footer {
    background-color: #c00000;
    /* Red background */
    color: #fff;
    text-align: center;
    padding: 2px 0;
    margin-top: 2px;
    color: #fff;
    /* White text */
    font-weight: 900;
    /* Bold */
}

/* Card list styles */
#card-list,
#page-links-top,
#page-links-bottom,
#sort-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Responsive grid */
    gap: 10px;
    margin-left: 2vw;
    margin-right: 2vw;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    position: relative;
    max-width: 50vh;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: auto;
}

/* Zoomable Images */
.zoomable {
    cursor: zoom-in;
    /* Change cursor to show it's zoomable */
    /*transition: transform 0.3s ease-in-out; /* Smooth zoom transition */
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    /* Ensure images behave as block elements for proper sizing */
    margin: 0 auto;
    /* Center the images horizontally */
}

.zoomable.zoomed {
    cursor: zoom-out;
    /* Change cursor when zoomed in */
    position: fixed;
    /* Overlay the zoomed image */
    top: 50%;
    left: 50%;
    max-width: 96vw;
    /* Allow larger sizes */
    max-height: 96vh;
    transform: translate(-50%, -50%) scale(0.9);
    /* Center and enlarge */
    z-index: 100;
    /* Ensure it's on top of everything */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
    border: 2px solid #fff;
    /* White border */
    background-color: white;
    /*object-fit: contain;
    border-radius: 0; 
    transform: none;*/
}

/* Optional: Add a semi-transparent overlay */
body.zoomed-in::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 99;
    /* Just below the zoomed image */
}

/* Ensure the image doesn't overlap the header or footer */
.zoomed {
    margin-top: 50px;
    margin-bottom: 50px;
}


.card-info {
    padding: 15px 15px 0px 15px;
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.card-title a {
    color: #333;
}

.card-price {
    font-weight: bold;
    color: #008000;
    /* Green price */
}

.add-to-cart, .ebay-button, #start-shopping, #contact-us {
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-weight: 750;
}

.page-button, .sort-button {
    background-color: #007bff;
    color: #fff;
    padding: 4px 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    margin: 0 5px;
    margin-bottom: 10px;
    /*pageButton.style.margin = '0 5px';*/
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-weight: 750;
}

.admin-button {
    background-color: #007bff;
    color: #fff;
    padding: 7px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 7px auto 7px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-weight: 750;
}


.add-to-cart:hover, .ebay-button:hover, #start-shopping:hover, #contact-us:hover, .page-button:hover, .admin-button:hover, .sort-button:hover {
    background-color: #0056b3;
}

/* Card Details */
#card-details {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
}

#card-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

#card-images img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#card-images img.zoomed {
    max-width: 90vw;
    max-height: 90vh;
}

#card-details-title {
    font-size: 2em;
    margin-bottom: 10px;
}

#ebay-link {
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    padding: 5px 10px;
}

/* cart */
#cart-items .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#cart-items .cart-item img {
    max-width: 100px;
    height: auto;
}

#checkout-button {
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#checkout-button:hover {
    background-color: #0056b3;
}

/* cart.html Styles */
.cart-table {
    width: 100%;
    table-layout: fixed;
}

.cart-table .image-cell {
    text-align: right;
}

.cart-table .title-cell {
    padding-left: 25px;
    padding-right: 25px;
}

.cart-table .price-cell {
    width: 10%;
}

.cart-table .remove-cell {
    padding-left: 25px;
    text-align: left;
}

.cart-summary-table {
    display: flex;
    justify-content: center;
}

.cart-summary-table table {
    width: auto;
}

.cart-summary-table td {
    text-align: left;
}

.cart-summary-table td:last-child {
    text-align: right;
}

.copy-cart-info-button{
    padding: 10px;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 750;
    /* Bold */    
}

.copy-cart-info-button:hover{
    background-color: #0056b3;
}

.cart-empty{
    text-align: center;
}

.filter-table-container{
    text-align: center;
}

.search-input{
    width: 50vw;
}

.cart-summary-table hr{
    border-top: 1px solid #333;
}

.cart-title{
    text-align: center;
}

.cart-summary-container{
  text-align: center;
}

.back-to-shop-container, .filter-container{
  text-align: center;
}

.checkout-button-container{
  text-align: center;
}

/* Modify the "copy-cart-info-button" class to make it a block element
   and center it with auto margins */
.copy-cart-info-button {
    padding: 10px 15px; /* Added for better styling */
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: block; /* Make it a block element */
    margin: 20px auto; /* Center it horizontally */
    max-width: 200px;
    font-size: 1em; /* Added: Match the font-size */
    width: fit-content; /* Added: Make the button fit the text */
    margin-left: auto;
    margin-right: auto;
}
/* Home Page Intro */
#home-page-intro {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    /* Use Segoe UI if available */
    line-height: 1.6; /* Increase the spacing between lines of text */
}

#home-page-intro h2 {
    font-size: calc(1.5em + 1vw);
    margin-bottom: 10px;
    color: #333;
}

#home-page-intro h3 {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}

#home-page-intro h4 {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
    font-weight: 500;
}

#home-page-intro #start-shopping, #home-page-intro #contact-us{
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-weight: 900;
}

#home-page-intro #start-shopping:hover, #home-page-intro #contact-us:hover{
    background-color: #0056b3;
}

/* Email link styling */
#home-page-intro a[href^="mailto"] {
    background-color: #007bff; /* Blue background */
    color: #fff; /* White text */
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease; /* Smooth transition for hover */
}
#home-page-intro a[href^="mailto"]:hover {
    background-color: #0056b3; /* Darker blue on hover */
}
