/* home.css - 
   
*/
#content {
background:            #EEE;
font-size:             16px;
font-family:           optima, helvetica, arial, sans-serif;
max-width:             1200px;
margin:                auto;
border:                1px solid #000080;
padding:               10px;
flex: 1;
}

h1 {
margin:                0;
color:                 #000080;
}

h2 {
color:                 #000080;   
text-align:            center;
border-top:            white 1px solid;
border-bottom:         white 1px solid;
}

html, body {
  overflow-x: hidden;
}

#top {
font-family:           optima, helvetica, arial, sans-serif;
background-color: #000080;
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
padding: 10px 20px;
margin-bottom: 20px;
text-align: left;
}

#logo.logo-small {
  margin: 0;
}

#logo.logo-small img {
  max-width: 90px;
  display: block;
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  max-width: 100%;
}

.account-nav a {
  color: white;
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 14px;
  text-align: center;
  border-radius: 4px;
  white-space: nowrap;
}

.account-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Shop layout: category sidebar + product grid */
#shopContent {
  width: 100%;
  background: #EEE;
  font-size: 16px;
  font-family: optima, helvetica, arial, sans-serif;
}

.shop-layout {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.category-sidebar {
  flex: 0 0 240px;
  background: #fff;
  border-right: 1px solid #ccc;
}

.category-sidebar h3 {
  color: white;
  background-color: #000080;
  margin: 0;
  padding: 16px 20px;
  text-align: left;
  border: none;
}

.category-sidebar a {
  display: block;
  color: #000080;
  width: auto;
  margin: 0;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.category-sidebar a:hover {
  background: #f0f0f5;
}

.category-sidebar a.active {
  background: #000080;
  color: white;
}

.shop-main {
  flex: 1;
  min-width: 0;
  padding: 20px 30px;
}

/* Form Styles */
.topLabel {
float:                left;
display:              inline-block;
margin:               0px 20px 0 0px; 
}

.topLabel label {
display:               block;
}

input[type=text] {
font-size:             1em;
padding:               5px;
margin:                0px;
display:               inline;
}

select {
font-size:             1.2em;   
}

button {
font-size:             1em;
padding:               10px;
border-radius:         10px;
background:            white;
margin:                5px 5px;
}

fieldset {
color:                 #000080;
border:                1px solid #DDD;
border-radius:         10px;
}


a {
	color: white;
	margin: 30px;
	width: 50%;
	text-align: center;
}

#logo {
	text-align: center;
	color: white;
}

#nav {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 20px;
}

#nav input[type=text] {
	  
	padding: 6px;
	border: none;
	margin-top: 8px;
	margin-right: 16px;
	font-size: 17px;
	width: 500px;
	max-width: 700px;
	border-radius: 25px;
}

.container {
    display: grid;
    gap: 1rem;
    min-height: 100vh;
}

section {
	display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.product {
	position: relative;
    max-height: auto;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1.5rem;
	background-color: #D3D3D3;
}

.image-input {
    max-width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.price {
	margin: 0 0;
}

.quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity input {
    width: 30px;
    border-radius: 0.1rem;
    border: 0.1rem solid #4caf50;
	padding: 5px;
	margin: 10px;
}

.productoptions {
	margin-top: 1rem;
    background-color: #ADD8E6;
    color: white;
    border: none;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.productoptions button {
	cursor: pointer;
}

/* ===========================
   FINAL WORKING FOOTER CSS
   =========================== */

footer {
    background-color: #000080;
    width: 100%;
    padding: 20px 0;
    font-family: optima, helvetica, arial, sans-serif;
    text-align: center;
}

/* slogan + copyright */
footer p {
    color: white;
    font-weight: bold;
    margin: 10px 0;
}

/* horizontal layout for the three sections */
.footer-sections {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
}

/* each section */
.footer-section {
    color: white;
    text-align: left;
    min-width: 160px;
}

/* fix headings so they stop forcing vertical stacking */
.footer-section h3 {
    margin: 0 0 8px 0;
    padding: 0;
    text-align: left;
    font-size: 18px;
    color: white;
}

/* fix paragraph alignment inside sections */
.footer-section p {
    margin: 4px 0;
    padding: 0;
    text-align: left;
}

/* keep footer links compact instead of the wide nav-link spacing */
.footer-section a {
    display: block;
    margin: 0;
    width: auto;
    text-align: left;
    color: white;
}

td {
	padding: 20px;
}

td img {
	margin-right: 50px;
	max-height: 160px;
	border-radius: 25px;
}

.profileoptions button {
	font-size: 20px;
}

.desc {
	font-size: 24px;
}

.profcontainer {
	border: 0.1rem solid #4caf50;
	padding: 10px;
}

body {
	padding: 0px;
	margin: 0px;
}

.profbut {
	background-color: #1c87c9; 
	border: none; 
	color: white; 
	padding: 20px 34px; 
	text-align: center; 
	text-decoration: none; 
	display: inline-block; 
	font-size: 20px; 
	margin: 4px 2px; 
	cursor: pointer;
}

.cartitem {
	background-color: #D3D3D3;
	margin: 10px;
	padding: 20px;
}

.cartitem h3 {
	font-size: 26px;
	display: inline;
    vertical-align: center;
    font-family: 'Open Sans', sans-serif;
	padding-right: 30px;
}
.cartitem p {
    vertical-align: top;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 28px;
}

#cartcontent {
	max-width: 800px;
}

.checkout {
	display: inline;
}

.ask {
	font-size: 30px;
	color: #000080;
	margin: 0px;
	
}

#chat-container {
    width: 100%;
    max-width: 750px;
    height: 600px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
	align: center;
	margin: auto;
}
#chat-header {
    background: #0078ff;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}
#message-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.message {
    max-width: 75%;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}
.message.sent {
    background: #0078ff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.message.received {
    background: #e4e6eb;
    color: black;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
#chat-form {
    display: flex;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #ddd;
}
#message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    font-size: 1rem;
}
#send-btn {
    background: #0078ff;
    color: white;
    border: none;
    padding: 0 15px;
    margin-left: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
#send-btn:hover {
    background: #0056b3;
}
.product img.product-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px auto;
  background-color: #fff;
  border: 3px solid #000080;
  border-radius: 25px;
}

.product-detail-image {
  display: block;
  width: 50%;
  max-width: 300px;
  margin: 30px auto 0 auto;
  background-color: #fff;
  border: 3px solid #000080;
  border-radius: 25px;
}

/* ===========================
   MOBILE OVERRIDES
   Everything above is unchanged for desktop. These rules only
   apply at 768px and narrower.
   =========================== */
@media (max-width: 768px) {
  .shop-layout {
    flex-direction: column;
  }

  .category-sidebar {
    flex: none;
    width: 100%;
    box-sizing: border-box;
    border-right: none;
    border-bottom: 1px solid #ccc;
  }

  .shop-main {
    padding: 15px;
    box-sizing: border-box;
  }

  section {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .product img.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  #nav input[type=text] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-right: 0;
  }

  #chat-container {
    height: 70vh;
  }

  .checkout-main,
  .checkout-summary {
    min-width: 100%;
    box-sizing: border-box;
  }

  .product-detail-image {
    width: 80%;
  }
}