/* 
* LioraGemStone - Main Stylesheet
* Theme: Clean, Elegant Gemstone E-commerce
*/

/* Base Styles */
:root {
  --primary-color: #a67c52;
  --secondary-color: #f5f0e9;
  --accent-color: #d4af37;
  --text-color: #333333;
  --light-text: #777777;
  --white: #ffffff;
  --light-bg: #f9f9f9;
  --border-color: #e5e5e5;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: "Kanit", sans-serif;
  font-weight: 300;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--primary-color);
}

section {
  padding: 50px 0;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #8e6a45;
  color: var(--white);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-sm {
  padding: 5px 15px;
  font-size: 14px;
}

/* Header Styles */
header {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: relative;
  z-index: 1000;
}

.top-header {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

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

.logo span {
  font-family: "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--primary-color);
  letter-spacing: 1px;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .logo span {
    font-size: 18px;
  }

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

@media (max-width: 575px) {
  .logo span {
    display: none;
  }
}

.search-container {
  max-width: 100%;
}

.search-container .form-control {
  border-radius: 4px 0 0 4px;
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  font-size: 14px;
}

.btn-search {
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 0 4px 4px 0;
}

.header-actions .btn-link {
  color: var(--text-color);
  font-size: 18px;
  padding: 5px;
  position: relative;
}

.header-actions .btn-link:hover {
  color: var(--primary-color);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* แก้ไขสไตล์ Mobile Search ให้เป็นแบบ Sticky */

/* เพิ่มสไตล์ใหม่สำหรับ Mobile Search */

.mobile-search {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1010;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
}

/* เพิ่ม CSS เพื่อให้แน่ใจว่า mobile-search จะแสดงผลบนมือถือเท่านั้น */
@media (max-width: 767px) {
  .top-header {
    padding-top: 0;
    padding-bottom: 0;
  }

  header {
    display: none;
  }

  .mobile-search {
    display: block;
  }
}

/* ซ่อน mobile-search บน desktop */
@media (min-width: 768px) {
  .mobile-search {
    display: none;
  }
}


.mobile-search-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mobile-search-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-right: 10px;
}

.btn-menu {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-color);
  padding: 5px;
  margin-right: 10px;
  cursor: pointer;
}

.mobile-logo {
  display: block;
}

.mobile-logo img {
  height: 30px;
  width: auto;
}

.mobile-search-form {
  flex: 1;
  min-width: 0;
}

.mobile-search-form .input-group {
  width: 100%;
}

.mobile-search-form .form-control {
  height: 36px;
  border-radius: 18px 0 0 18px;
  border: 1px solid var(--border-color);
  padding: 5px 15px;
  font-size: 14px;
}

.mobile-search-form .btn-search {
  height: 36px;
  border-radius: 0 18px 18px 0;
  padding: 0 15px;
}

.mobile-search-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 10px;
}

.btn-icon {
  font-size: 18px;
  color: var(--text-color);
  margin-left: 15px;
  position: relative;
}

/* ปรับแต่งสไตล์ cart-count สำหรับ mobile */
.mobile-search-right .cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ซ่อน sticky search เมื่อไม่ได้อยู่บนมือถือ */
@media (min-width: 768px) {
  .mobile-search {
    display: none;
  }
}

/* ปรับแต่งสไตล์เพิ่มเติมสำหรับ mobile */
@media (max-width: 575px) {
  .mobile-search-form .form-control {
    font-size: 13px;
    padding: 5px 10px;
  }

  .mobile-logo img {
    height: 25px;
  }

  .btn-menu {
    font-size: 18px;
    margin-right: 8px;
  }

  .btn-icon {
    font-size: 16px;
    margin-left: 12px;
  }
}

.main-nav {
  padding: 10px 0;
  background-color: var(--white);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-menu li {
  margin-right: 20px;
}

.nav-menu li:last-child {
  margin-right: 0;
}

.nav-menu a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-color);
  padding: 5px 0;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu a.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

/* Sticky Search */
.sticky-search {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  z-index: 1000;
  padding: 10px 0;
  display: none;
}

.sticky-search.show {
  display: block;
}

/* Hero Section */
.hero-section {
  padding: 30px 0;
}

.hero-banner {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 400px;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--text-color);
}

.hero-content p {
  margin-bottom: 20px;
  color: var(--light-text);
}

.hero-tagline {
  background-color: var(--secondary-color);
  padding: 10px;
  text-align: center;
  border-radius: 0 0 8px 8px;
  font-weight: 400;
}

.promo-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 400px;
}

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

.promo-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
}

.promo-content h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 5px;
}

.promo-content p {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--light-text);
}

/* Categories Section */
.category-item {
  display: block;
  text-align: center;
  margin-bottom: 20px;
}

.category-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.category-item h3 {
  font-size: 14px;
  font-weight: 400;
}

/* Gem Categories */
.gem-category {
  display: block;
  text-align: center;
}

.gem-img {
  width: 100%;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.gem-category h3 {
  font-size: 14px;
  font-weight: 400;
}

/* Product Cards */
.product-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-img {
  position: relative;
  height: 200px;
}

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

.product-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: all 0.3s ease;
}

.product-card:hover .product-actions {
  opacity: 1;
}

.product-actions a {
  width: 35px;
  height: 35px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-actions a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.product-info {
  padding: 15px;
}

.product-title {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-desc {
  font-size: 14px;
  color: var(--light-text);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  display: flex;
  align-items: center;
}

.price {
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-color);
}

.old-price {
  font-size: 14px;
  color: var(--light-text);
  text-decoration: line-through;
  margin-left: 10px;
}

/* Promotions Section */
.promotion-item {
  position: relative;
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.promo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--danger-color);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.promotion-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.promo-info {
  padding: 10px;
  text-align: center;
}

.promo-info h3 {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-info .price {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0;
}

.promo-info .old-price {
  font-size: 12px;
  color: var(--light-text);
  text-decoration: line-through;
}

/* Rare Gems Section */
.rare-gem-info {
  padding: 30px;
  background-color: var(--secondary-color);
  border-radius: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rare-gem-info h3 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 15px;
}

.rare-gem-info p {
  margin-bottom: 15px;
  color: var(--light-text);
}

.rare-gem-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.rare-gem-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.rare-gem-item h4 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  text-align: center;
}

/* About Section */
.about-content {
  padding-right: 30px;
}

.about-content p {
  margin-bottom: 15px;
  color: var(--light-text);
}

.about-features {
  margin-top: 30px;
}

.feature-item {
  text-align: center;
  margin-bottom: 20px;
}

.feature-item i {
  font-size: 30px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.feature-item h4 {
  font-size: 14px;
  font-weight: 400;
}

.about-image img {
  border-radius: 8px;
  width: 100%;
  height: 350px;
  object-fit: cover;
}

/* Seller Section */
.seller-section {
  background-color: var(--light-bg);
}

.seller-banner {
  background-image: url("../images/seller-banner.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  padding: 50px 30px;
  position: relative;
}

.seller-banner:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

.seller-content {
  position: relative;
  color: var(--white);
}

.seller-content h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 15px;
}

.seller-content p {
  margin-bottom: 20px;
}

/* Newsletter Section */
.newsletter-section {
  background-color: var(--secondary-color);
  padding: 50px 0;
}

.newsletter-form {
  margin-top: 20px;
}

.newsletter-form .form-control {
  height: 50px;
  border-radius: 4px 0 0 4px;
  border: none;
}

.newsletter-form .btn {
  height: 50px;
  border-radius: 0 4px 4px 0;
}

/* Footer */
.main-footer {
  background-color: #333;
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-logo img {
  max-height: 50px;
  margin-bottom: 15px;
}

.footer-about {
  font-size: 14px;
  margin-bottom: 20px;
  color: #ccc;
}

.social-links a {
  display: inline-block;
  width: 35px;
  height: 35px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 35px;
  color: var(--white);
  margin-right: 10px;
}

.social-links a:hover {
  background-color: var(--primary-color);
}

.footer-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--white);
}

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

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

.footer-links a {
  color: #ccc;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: #ccc;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .hero-content {
    width: 60%;
    padding: 30px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .about-content {
    padding-right: 0;
    margin-bottom: 30px;
  }
}

@media (max-width: 767px) {
  .section-title {
    font-size: 20px;
  }

  .hero-banner {
    height: 350px;
  }

  .hero-content {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
  }

  .promo-card {
    height: 300px;
    margin-top: 20px;
  }

  .rare-gem-info {
    margin-bottom: 30px;
  }

  .seller-banner {
    padding: 30px 20px;
  }

  .seller-content h2 {
    font-size: 24px;
  }
}

@media (max-width: 575px) {
  .hero-banner {
    height: 300px;
  }

  .hero-content {
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 20px;
  }

  .product-img {
    height: 150px;
  }
}

/* Login Modal Styles */
#loginModal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#loginModal .modal-title {
  font-weight: 600;
  font-size: 1.5rem;
}

#loginModal .btn-primary {
  background-color: #8a2be2;
  border-color: #8a2be2;
  padding: 10px;
  font-weight: 500;
}

#loginModal .btn-primary:hover {
  background-color: #7525c9;
  border-color: #7525c9;
}

#loginModal .btn-outline-primary {
  color: #8a2be2;
  border-color: #8a2be2;
}

#loginModal .btn-outline-primary:hover {
  background-color: #8a2be2;
  color: white;
}

#loginModal .btn-outline-secondary {
  border-color: #ddd;
  color: #333;
  padding: 8px;
  text-align: center;
  position: relative;
}

#loginModal .btn-outline-secondary:hover {
  background-color: #f8f9fa;
}

#loginModal .form-control {
  padding: 10px 12px;
  border-radius: 6px;
}

#loginModal .form-control:focus {
  border-color: #8a2be2;
  box-shadow: 0 0 0 0.25rem rgba(138, 43, 226, 0.25);
}

#loginModal .separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

#loginModal .separator::before,
#loginModal .separator::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
}

#loginModal .separator span {
  padding: 0 10px;
  color: #777;
  font-size: 14px;
}

#loginModal .social-login {
  margin: 20px 0;
}

#loginModal .social-login .btn {
  position: relative;
  text-align: center;
  padding-left: 40px;
}

#loginModal .social-login .btn i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

#loginModal .terms-text {
  text-align: center;
  font-size: 12px;
}

#loginModal .terms-text a {
  color: #8a2be2;
  text-decoration: none;
}

#loginModal .terms-text a:hover {
  text-decoration: underline;
}

/* ปรับ margin ของปุ่มให้เหมาะสม */
.header-actions .me-2 {
  margin-right: 0.5rem;
}

/* เพิ่ม CSS สำหรับปุ่ม Sign In */
.header-actions .btn-outline-primary {
  border: 1px solid #8a2be2;
  color: #8a2be2;
  transition: all 0.3s ease;
  font-size: 14px;
  padding: 5px 12px;
}

.header-actions .btn-outline-primary:hover {
  background-color: #8a2be2;
  color: #fff;
}

.header-actions .btn-outline-primary .me-1 {
  margin-right: 4px;
}