/* Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: #333;
    color: #FFF;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* Đảm bảo các phần tử không quấn */
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    height: 50px;
    margin-right: 10px;
}

header .logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 2rem;
    flex-wrap: nowrap; /* Đảm bảo các mục không quấn */
}

header nav ul li {
    display: flex;
    align-items: center;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
}

header nav ul li a:hover {
    color: #ff5733;
}


header nav ul li:nth-child(1){
	position:relative;
}


header nav ul li:nth-child(1) input{
	height: 30px;
	width: 100%;
	border-radius: 5px;
	border: none;
	padding-left: 6px;
	outline: none;
}

header nav ul li:nth-child(1) i{
	position: absolute;
	font-size: 15px;
	right: 12px; 
	color: #333;
	line-height: 30px;
}

/* Hero Section */
.hero {
    position: relative;
    background: url("ps51.webp") no-repeat center center/cover;
    color: #FFF;
    text-align: center;
    padding: 6rem 0;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero .hero-text {
    position: relative;
    z-index: 3;
}

.hero h2 {
    margin: 0;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin: 1rem 0 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .btn {
    background-color: #ff5733;
    color: #FFF;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s, transform 0.3s;
}

.hero .btn:hover {
    background-color: #e04b2b;
    transform: scale(1.05);
}

/* Media Queries */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    header .logo {
        margin-bottom: 1rem;
    }

    header nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    header nav ul li {
        flex-grow: 1;
    }

    header nav ul li a {
        padding: 10px; /* Padding để tăng kích thước chọn */
        text-align: center; /* Căn giữa nội dung trong mục */
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    header .logo img {
        height: 40px;
        margin-right: 8px;
    }

    header .logo h1 {
        font-size: 1.2rem;
    }

    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    header nav ul li {
        flex-grow: 1;
    }

    header nav ul li a {
        padding: 8px; /* Giảm padding để các mục trông hợp lý hơn trên màn hình nhỏ */
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero .btn {
        padding: 0.5rem 1rem;
    }

    .hero {
        padding: 3rem 0;
    }
}




/* Sản phẩm */
.products {
    padding: 4rem 0;
    background-color: #f9f9f9;
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #333;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.product-item {
    background-color: #fff;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: calc(25% - 2rem);
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-15px);
}

.product-item img {
    max-width: 100%;
    min-height:220px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.product-item h3 {
    margin: 0.75rem 0 0.5rem;
    font-size: 1.5rem;
	min-height:82px;
}

.product-item p {
    margin: 0.5rem 0;
    color: #ff5733;

    font-weight: bold;
}

.product-item .description {
    font-size: 0.9rem;
    color: #666;
	min-height:72px;
    margin-top: 0.5rem;
}

.product-item .btn {
    background-color: #ff5733;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.product-item .btn:hover {
    background-color: #e64c00;
}


/* Media Queries */
@media (max-width: 768px) {
  .product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Căn sản phẩm vào hai bên lề */
    padding: 0 10px; /* Khoảng cách lề trái và phải là 25px */
  }

  .product-item {
    width: calc(50% - 30px); /* Mỗi dòng chỉ chứa 2 sản phẩm với khoảng cách 20px */
    margin-bottom: 1rem; /* Để lại khoảng cách giữa các dòng */
  }
}

@media (max-width: 480px) {
  .product-grid {
    padding: 0; /* Xóa padding để sản phẩm căn đều */
  }

  .product-item {
    width: calc(50% - 15px); /* Mỗi dòng chỉ chứa 2 sản phẩm với khoảng cách 10px */
    margin-bottom: 1rem; /* Để lại khoảng cách giữa các dòng */
  }
  .product-item p:nth-of-type(2){
	 display: none;
  }

}

/* Remove margin between product items */
.product-item {
  margin: 0; /* Xóa khoảng cách giữa các sản phẩm */
}


/* Footer */
footer {
  background-color: #333;
  color: #fff;
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-section {
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: #ff5733;
}

.footer-section p,
.footer-section a {
  color: #fff;
  margin-bottom: 0.5rem;
  display: block;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #ff5733;
}

.footer-section a img {
  width: 28px;
  margin-right: 0.5rem;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #777;
  padding-top: 1rem;
  color: #777;
}

/* Responsive Styles */
@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
  }

  .footer-section {
    flex: 1;
    margin-bottom: 0;
  }
}


/*con trỏ lướt lên*/

#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
/*con trỏ lướt lên*/    background-color: white;
    border: none;
    
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#scrollToTopBtn:hover {
    background-color: light orange;
}

#scrollToTopBtn img {
    width: 60%;
    height: 60%;
	border: solid 2px black;
}



/* 2 bên banner */
@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

.banner-left, .banner-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    animation: blink 3s infinite;
}

.banner-left {
    left: 30px;
}

.banner-right {
    right: 30px;
}

.banner-left img, .banner-right img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .banner-left, .banner-right {
        display: none;
    }
}




.footer-content button:hover{
	transform: scale(1.05);
	transition: all 0.3s ease;
	font-weight: bold;
}








.chat-container {
    width: 90%;
    max-width: 400px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
	float: right;
	top: 25%;
	right: 10px;
	z-index: 10000;
	position: fixed;
	height: 60%;
	display:none;
	
}

.chat-header {
    background-color: #0084ff;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

.chat-header button:hover{
	background-color: #333;
	color: #FFF;
	font-weight: bold;
	transition: all 0.3s ease;
}

.chat-box {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message .content {
    max-width: 70%;
    padding: 10px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.message.user .content {
    background-color: #0084ff;
    color: #fff;
    border-bottom-right-radius: 0;
}

.message.bot .content {
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 0;
}

.input-group {
    display: flex;
    border-top: 1px solid #ddd;
}

.input-group input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-top-left-radius: 10px;
    outline: none;
}

.input-group button {
    padding: 1rem;
    border: none;
    background-color: #0084ff;
    color: #fff;
    cursor: pointer;
    border-top-right-radius: 10px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Add Product Form Styles */
.add-product {
	width: 80%;
	margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
	margin-bottom: 2rem;
}

.add-product h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #333;
}

.add-product form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-product form input,
.add-product form button {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.add-product form button {
    background-color: #ff5733;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-product form button:hover {
    background-color: #e04b2b;
}