/* === Module 5: E-commerce & CMS Styles === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #000;
    margin: 0;
}

/* Blurred background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Appear behind all over elements */
    background: url("../img/Shopping_Chart_Backdrop.png") no-repeat center center;    
    background-size: cover;
    filter: blur(0px);
    transform: scale(1.025);
}
.container {
    max-width: 90%;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.product-card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    border-radius: 1rem;
    padding: 15px;
    text-align: center;
    background-color: var(--background-alt);
    display: flex;
    flex-direction: column;
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    border-radius: 1rem;
}

.product-card h3 {
    font-size: 1.2em;
    margin: 10px 0;
}

.product-card .product-desc {
    font-size: 0.9em;
    color: var(--text-secondary);
    flex-grow: 1; /* Pushes price and button to the bottom */
}

.product-card .product-price {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.product-card form {
    margin-top: auto; /* Aligns form to the bottom */
}

.product-card button, input, textarea{
    background-color: #fff;
    border-radius: 1rem;
    border: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    margin-left: 1rem;
    padding: 0.3rem 0.6rem;
    transition: background-color 0.3s;
}

.product-card button:hover {
    background-color: #004a8c;
    color: white;
    transition: background-color 0.3s;
}

.product-card input {
    appearance: textfield;
}

body.dark-mode .product-card button {
    background-color: #333;
    color: white;
}

body.dark-mode .product-card button:hover {
    background-color: #004a8c;
    color: white;
    transition: background-color 0.3s;
}

.cart-table input {
    appearance: textfield;
    margin-left: 0;
    margin-right: 1rem;
}

.cart-table button {
    background-color: white;
    border-radius: 1rem;
    border: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 0.3rem 0.6rem;
    transition: background-color 0.3s;
}

.cart-table button:hover {
    background-color: #004a8c;
    color: white;
    transition: background-color 0.3s;
}

body.dark-mode .cart-table button {
    background-color: #333;
    color: white;
}

body.dark-mode .cart-table button:hover {
    background-color: #004a8c;
    color: white;
}


/* Shopping Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.cart-table th, .cart-table td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
    transition: background-color 0.3s;
}

.cart-table th {
    background-color: var(--background-alt);
}

.cart-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
}

.cart-update-form, .cart-remove-form {
    display: inline-block;
}

.cart-summary {
    border: 1px solid #ccc;
    color: black;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    float: none;
}

.cart-summary h3 {
    margin: 0;
    border-bottom: 1px solid #ccc;
    padding: 20px;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 10px 20px 10px 20px;
    transition: background-color 0.3s;
}

body.dark-mode .cart-summary {
    color: white;
}

body.dark-mode .cart-summary p {
    background-color: #2c2c2c;
}

.checkout-info {
    font-style: italic;
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 15px;
    text-align: center;
}

/* General Form Styles */
.form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

.form-container button {
    display: block;
    margin: 2rem auto 0rem auto;

}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.social-icons a {
    font-weight: bold;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    
    border-radius: 1rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    transition: background-color 0.3s;
}

.social-icons svg {
    width: 38px;
    height: 38px;
    padding: 5px 8px 0 8px;
}

body.dark-mode .social-icons a {
    background-color: #1e1e1e;
}

body.dark-mode .social-icons svg {
    fill: white;
}

.social-icons svg:hover {
    fill: white;
}

.social-icons .facebook-icon:hover {
    background-color: #004daa;
}

.social-icons .instagram-icon:hover {
    background-color: #8a3ab9;
}

.social-icons .twitter-icon:hover {
    background-color: rgb(29, 155, 240);
}



.last-modified {
    text-align: center;
    margin-bottom: 10px;
    color: white;
}


ul {
    padding-left: 0;
}

.main-menu {
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.main-menu ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px; /* Adjust spacing between items */
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.main-menu li {
    margin-bottom: 0; /* Remove vertical margin */
}

.main-menu a {
    display: block;
    padding: 10px 20px;
    background-color: #f9f9f9;
    color: #fff;
    text-decoration: none;
    border-radius: 1rem;
    transition: background-color 0.3s;
}

.main-menu a:hover {
    background-color: #555;
}

body.dark-mode .main-menu a {
    background-color: #2c2c2c;
}

.form-group {
    text-align: center;
    margin: 1rem 0;
}

.form-group input, textarea {
    padding: 0.35rem 0.75rem;
}

.btn {
    background-color: white;
    border-radius: 1rem;
    border: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 0.4rem 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #004a8c;
    color: white;
    transition: background-color 0.3s;
}

body.dark-mode .btn {
    background-color: #333;
    color: white;
}

body.dark-mode .btn:hover {
    background-color: #004a8c;
    color: white;
    transition: background-color 0.3s;
}

.message {
    font-weight: bold;
}

.content p {
    text-align: center;

}