/* ===== MAIN STYLESHEET ===== */
@import url('variables.css');
@import url('components.css');

/* ===== CATEGORY CARDS ===== */
.category-card {
  text-align: center;
  padding: 30px 15px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow-md);
  border-color: var(--accent);
}
.category-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
  transition: var(--transition);
}
.category-card:hover i { color: var(--accent); }
.category-card h5 { font-size: 1rem; margin-top: 8px; }

/* ===== PRODUCT CARDS ===== */
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px var(--shadow-md);
}
.product-card .product-img {
  position: relative;
  overflow: hidden;
  height: 250px;
}
.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.08);
}
.product-card .product-badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.product-card .badge-sale {
  background: #e74c3c;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.product-card .badge-new {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.product-card .product-actions {
  position: absolute;
  bottom: -50px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.9);
  transition: bottom 0.3s ease;
}
.product-card:hover .product-actions { bottom: 0; }
.product-card .product-actions button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.product-card .product-actions button:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.product-card .product-info {
  padding: 18px;
}
.product-card .product-category {
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.product-card .product-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-name a:hover { color: var(--primary); }
.product-card .product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.product-card .current-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.product-card .original-price {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-card .product-rating {
  margin-top: 8px;
  color: #f1c40f;
  font-size: 0.85rem;
}
.product-card .product-rating span {
  color: var(--text-light);
  margin-left: 4px;
}

/* ===== BLOG CARDS ===== */
.blog-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px var(--shadow-md);
}
.blog-card .blog-img {
  height: 200px;
  overflow: hidden;
}
.blog-card .blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-img img { transform: scale(1.05); }
.blog-card .blog-body {
  padding: 20px;
}
.blog-card .blog-date {
  font-size: 0.8rem;
  color: var(--text-light);
}
.blog-card .blog-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 8px 0;
}
.blog-card .blog-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== BANNER CTA ===== */
.banner-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.banner-cta h2 { color: #fff; font-size: 2rem; }
.banner-cta p { opacity: 0.9; margin: 16px 0 24px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-dark);
  color: #ccc;
  padding: 60px 0 0;
}
.footer h5 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.footer a { color: #aaa; font-size: 0.9rem; }
.footer a:hover { color: var(--accent); }
.footer ul li { margin-bottom: 10px; }
.footer .footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.footer .footer-contact i {
  color: var(--accent);
  margin-top: 4px;
}
.footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid #555;
  margin-right: 8px;
  color: #ccc;
  transition: var(--transition);
}
.footer .social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.footer-bottom {
  border-top: 1px solid #444;
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== PAGE HEADER / BREADCRUMB ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 60px 0;
  text-align: center;
  color: #fff;
}
.page-header h1 { color: #fff; font-size: 2rem; margin-bottom: 10px; }
.page-header .breadcrumb {
  justify-content: center;
  background: transparent;
  margin: 0;
}
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.7); }
.page-header .breadcrumb-item a:hover { color: #fff; }
.page-header .breadcrumb-item.active { color: var(--accent); }
.page-header .breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ===== FILTER SIDEBAR ===== */
.filter-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
}
.filter-sidebar h5 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}
.filter-group { margin-bottom: 24px; }
.filter-group label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.toolbar .result-count { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== PRODUCT DETAIL ===== */
.product-detail-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
}
.product-detail-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.product-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.product-thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.product-thumbnails img:hover,
.product-thumbnails img.active {
  border-color: var(--primary);
}
.product-detail-info h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.detail-price .old-price {
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 12px;
}
.quantity-input {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}
.quantity-input button {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-light);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}
.quantity-input button:hover { background: var(--primary); color: #fff; }
.quantity-input input {
  width: 60px; height: 40px;
  text-align: center;
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  font-weight: 600;
}

/* ===== CART ===== */
.cart-table { background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; }
.cart-table th {
  background: var(--bg-light);
  font-weight: 600;
  padding: 14px;
  font-size: 0.9rem;
}
.cart-table td { padding: 14px; vertical-align: middle; }
.cart-table img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
.cart-summary {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
}
.cart-summary h4 { margin-bottom: 20px; }
.cart-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-summary .summary-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: none;
}

/* ===== FORMS ===== */
.form-custom .form-control {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.form-custom .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,111,71,0.15);
}
.form-custom label { font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }
.form-custom .error-msg { color: #e74c3c; font-size: 0.8rem; margin-top: 4px; display: none; }
.form-custom .success-msg { color: #27ae60; font-size: 0.8rem; margin-top: 4px; display: none; }
.form-custom .is-invalid { border-color: #e74c3c !important; }
.form-custom .is-valid { border-color: #27ae60 !important; }
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 60px 0;
}
.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 10px 40px var(--shadow);
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}
.auth-card h2 { text-align: center; margin-bottom: 30px; }

/* ===== ABOUT PAGE ===== */
.about-story { padding: 80px 0; }
.about-values .value-card {
  text-align: center;
  padding: 30px 20px;
}
.about-values .value-card i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.team-card {
  text-align: center;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px var(--shadow-md); }
.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--accent);
}
.team-card h5 { font-size: 1rem; }
.team-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* ===== CONTACT PAGE ===== */
.contact-info-card {
  text-align: center;
  padding: 30px 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.contact-info-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px var(--shadow-md); }
.contact-info-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 16px;
}

/* ===== SITEMAP ===== */
.sitemap-section { padding: 60px 0; }
.sitemap-list li { padding: 8px 0; }
.sitemap-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.sitemap-list li a:hover {
  background: var(--bg-light);
  color: var(--primary);
}
.sitemap-list li a i { color: var(--accent); }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.search-overlay.active { display: flex; }
.search-overlay .search-box {
  width: 90%;
  max-width: 600px;
}
.search-overlay input {
  width: 100%;
  padding: 20px 30px;
  font-size: 1.3rem;
  border: none;
  border-bottom: 3px solid var(--accent);
  background: transparent;
  color: #fff;
  outline: none;
}
.search-overlay input::placeholder { color: rgba(255,255,255,0.5); }
.search-overlay .close-search {
  position: absolute;
  top: 30px; right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.search-results-dropdown {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 10px;
}
.search-results-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}
.search-results-dropdown a:hover { background: rgba(255,255,255,0.1); }
.search-results-dropdown img {
  width: 50px; height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
  color: var(--text-primary);
  border-color: var(--border);
  padding: 8px 16px;
  transition: var(--transition);
}
.pagination .page-link:hover,
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== MODAL QUICK VIEW ===== */
.modal-content { border-radius: var(--radius-lg); border: none; }
.modal-header { border-bottom: 1px solid var(--border-light); }
.modal-header .btn-close:focus { box-shadow: none; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 45px; height: 45px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(139,111,71,0.3);
  transition: var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .hero-slide { height: 400px; }
  .hero-content h1 { font-size: 2rem; }
  .filter-sidebar { margin-bottom: 24px; }
}
@media (max-width: 767px) {
  .hero-slide { height: 350px; }
  .hero-content h1 { font-size: 1.6rem; }
  .hero-content p { font-size: 0.95rem; }
  .section-title h2 { font-size: 1.5rem; }
  .product-detail-img img { height: 300px; }
  .footer { padding: 40px 0 0; }
}
@media (max-width: 575px) {
  .hero-slide { height: 300px; }
  .hero-content h1 { font-size: 1.4rem; }
  .auth-card { padding: 24px; }
  .navbar-icons .btn { padding: 4px 6px; font-size: 1rem; }
}

/* ===== ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== USER INFO DISPLAY ===== */
.user-info-display {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 2px solid #27ae60;
  margin-top: 30px;
}
.user-info-display h3 { color: #27ae60; margin-bottom: 20px; }
.user-info-display table td { padding: 8px 16px; }
.user-info-display table td:first-child { font-weight: 600; }
