/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
.top-header {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.main-header {
    padding: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo img {
    max-height: 50px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-form button {
    padding: 8px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Product Card */
.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.product-price {
    color: #007bff;
    font-weight: bold;
    font-size: 1.2rem;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/*product detail*/
.product-image-card {
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 20px;
}

.product-main-img {
    object-fit: contain;
    max-height: 100%;
    max-width: 100%;
    width: auto !important;
    height: auto !important;
}

.product-info {
    height: auto;
    width: 100%;
}

.card-img-top {
    object-fit: contain;
    height: 300px;
}

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.related-products-section {
    margin-top: 2rem;
}

.related-products-section .card-img-top {
    height: 200px;
}

.card .list-unstyled li {
    display: flex;
    align-items: center;
}

.card .list-unstyled li i {
    font-size: 1.2rem;
}


/* Cart Styles */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
}

.cart-item-info {
    flex: 1;
}

.cart-quantity {
    width: 60px;
    padding: 5px;
    text-align: center;
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

/* Footer Styles */
.footer {
    background: #343a40;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

.footer h5 {
    margin-bottom: 20px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    color: #007bff;
}

/* Form Containers */
.login-container,
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form,
.register-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

/* Alerts */
.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Links */
.form-links {
    margin-top: 20px;
    text-align: center;
}

.form-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
}

/* Footer Styles */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #555;
}

/* Chat Bubble Styles */
.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.chat-icon:hover {
    transform: scale(1.1);
    background-color: #0056b3;
}

.chat-icon i {
    color: white;
    font-size: 28px;
}

.chat-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.chat-box.show {
    transform: scale(1);
}

.chat-header {
    padding: 15px;
    background-color: #007bff;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 80%;
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 20px;
    position: relative;
}

.message.user {
    background-color: #e9f5ff;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.ai {
    background-color: #f2f2f2;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input button {
    background-color: #007bff;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-input button:hover {
    background-color: #0056b3;
}

/* Loading animation */
.loading-dots {
    display: inline-flex;
    margin-left: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: #888;
    border-radius: 50%;
    animation: loading 1s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.dropdown-menu {
    display: none;
}
.dropdown-menu.show {
    display: block;
}
.btn-user-dropdown {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}
.btn-user-dropdown:hover,
.btn-user-dropdown:focus {
    background: none;
    border: none;
    color: inherit;
}

/* Dropdown submenu styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #cccccc;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover > a:after {
    border-left-color: #555;
}

/* Fix dropdown menu position on mobile */
@media (max-width: 767px) {
    .dropdown-submenu .dropdown-menu {
        left: 0;
        top: 100%;
    }
}
.col-md-8{
    height: 550px;
}

