/* =======================
   Base Reset & Utilities
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }

/* =======================
   Header & Navigation8
========================== */
header {
  border-radius:  0px 0px 15px 15px;
  background: linear-gradient(135deg, #8B4513, #A0522D);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  border: 2px solid white;
}

/* Navigation */
.navbar {
  position: relative;
  border-radius:  0px 0px 20px 20px;
}

.menu-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #8B4513;
  color: white;
  font-size: 26px;
  padding: 10px 12px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 1100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: 0.3s ease;
}

.menu-toggle:hover {
  background-color: #A0522D;
  transform: scale(1.1);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  /* background-color: green; */
}

.nav-links li a {
  color: rgb(243, 245, 243);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 5px;
  transition: 0.3s ease;
}

.nav-links li a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* =======================
   Search Form
========================== */
.search-form {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 25px;
  padding: 5px;
  width: 100%;
  max-width: 400px;
  transition: all 0.3s ease;
  margin: 10px auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-form input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-size: 1rem;
  border-radius: 25px;
  min-width: 0;
}

.search-form button {
  background: #8B4513;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease, padding 0.3s ease;
  white-space: nowrap;
}

.search-form button:hover {
  background: #654321;
}

/* Responsive tweak */
@media (max-width: 480px) {
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form input,
  .search-form button {
    width: 100%;
    margin: 5px 0;
    text-align: center;
  }
}

/* =======================
   Slideshow
========================== */
.slideshow-container {
  max-width: 100%;
  margin: 20px auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  position: relative;
}

.slide {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.slide img {
  width: 100%;
  height: 400px;
  object-fit:cover;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 30px 20px 20px;
  font-size: 1.2rem;
  font-weight: 500;
}

.prev, .next {
  position: absolute;
  top: 50%;
  padding: 16px 20px;
  font-size: 18px;
  color: white;
  font-weight: bold;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  transition: 0.3s ease;
}

.next {
  right: 0;
  border-radius: 5px 0 0 5px;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.1);
}

.dots {
  text-align: center;
  margin: 20px 0;
}

.dot {
  display: inline-block;
  height: 15px;
  width: 15px;
  margin: 0 5px;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s ease;
}

.dot:hover { background: #717171; transform: scale(1.2); }
.dot.active { background: #8B4513; transform: scale(1.3); }

/* =======================
   Tapis Grid
========================== */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.tapis {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  max-width: 350px;
  transition: 0.3s ease;
}

.tapis:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.tapis img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
  transition: 0.3s ease;
}

.tapis:hover img {
  transform: scale(1.05);
}

.tapis-content {
  padding: 20px;
}

.tapis-content h3 {
  color: #8B4513;
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 600;
}

.tapis-content p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.tapis-content p strong {
  color: #8B4513;
  font-size: 1.4rem;
  font-weight: 700;
}

.tapis-content a {
  display: inline-block;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 500;
  text-decoration: none;
  transition: 0.3s ease;
}

.tapis-content a:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* Tapis State Badge */
.tapis-state {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  color: white;
  margin: 5px 0;
  white-space: nowrap;
}

.state-in-stock { background-color: #abcff8; }
.state-on-command { background-color: #dc3545; }

/* =======================
   Footer
========================== */
footer {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}

.footer-text {
  font-size: 1.5rem;
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
}

/* Floating Button */
.floating-btn {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8B4513, #A0522D);
  color: white;
  padding: 15px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(139,69,19,0.3);
  transition: 0.3s ease;
  z-index: 1000;
}

.floating-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(139,69,19,0.4);
}

/* =======================
   Responsive Design
========================== */
@media (max-width: 768px) {
  .header-container { flex-direction: column; gap: 15px; }
  .search-form { order: 3; width: 100%; margin: 0; }

  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    right: 15px;
    background: #8B4513;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 10px;
    gap: 10px;
    width: 200px;
    z-index: 1000;
  }

  .nav-links.show { display: flex; }

  .nav-links li a {
    display: block;
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
  }

  .container {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px auto;
  }

  .slide img { height: 250px; }
  .prev, .next { padding: 12px 15px; font-size: 16px; }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .floating-btn {
    bottom: 20px;
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .logo { font-size: 1.5rem; }
  .logo-icon { width: 35px; height: 35px; }
  .slide img { height: 200px; }
  .slide-caption { font-size: 1rem; padding: 20px 15px; }
  .tapis-content { padding: 15px; }
  .tapis-content h3 { font-size: 1.1rem; }
  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

/* =======================
   Animations & Misc
========================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb {
  background: #8B4513;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #654321; }

button:focus, input:focus, a:focus {
  outline: 2px solid #8B4513;
  outline-offset: 2px;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.image-modal .modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    animation: zoom 0.3s ease-in-out;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

@keyframes zoom {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover {
    color: #ccc;
}
