:root {
  --portrait-width: 300px;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff5ec;
}

.navbar {
  background-color: #331f08;
  color: #fff;
  text-align: center;
  padding: 1rem 2rem 0.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  transition: all 0.5s ease-in-out;
}

.navbar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: flex-direction 0.5s ease-in-out, align-items 0.5s ease-in-out;
}

.logo {
  transform: translateX(0);
  transition: transform 0.5s ease-in-out;
}

.logo-img {
  height: 40px;
  max-width: 100%;
  object-fit: contain;
}

.nav-links-wrapper {
  margin-top: 1.5rem;
  transform: translateX(0);
  transition: transform 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8rem;
  list-style: none;
  padding: 0;
  margin: 0;
  transition: gap 0.5s ease-in-out;
}

.nav-links li a {
  text-decoration: none;
  color: #F7E3BA;
  font-size: 1.1rem;
  font-weight: 500;
}

.nav-links li a:hover {
  color: #fff;
}

.cart-icon {
  font-size: 1.1rem;
  color: #F7E3BA;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-icon:hover {
  color: #fff;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  color: #F7E3BA;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 2rem;
}

.navbar.scrolled .navbar-content {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.navbar.scrolled .nav-links-wrapper {
  margin-top: 0;
}

.navbar.scrolled .nav-links {
  justify-content: flex-start;
  gap: 2rem;
}

/* Breadcrumb Styles */
.breadcrumb {
  background: #fff5ec;
  padding: 15px 0;
  margin-bottom: 10px;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
  color: #331f08;
}

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

.breadcrumb-list li a {
  color: #725123;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-list li a:hover {
  color: #1a1202;

}

.breadcrumb-list li.current {
  color: #331f08;
  font-weight: 500;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '>';
  margin: 0 8px;
  color: #555;
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 10px 0;
  }

  .breadcrumb-list {
    font-size: 0.85rem;
    gap: 8px;
  }

  .breadcrumb-list li:not(:last-child)::after {
    margin: 0 6px;
  }
}

.container {
    padding: 20px;
    display: flex;
    gap: 30px;
    min-height: 100vh;
    margin-left: -30px;
}

.sidebar {
    width: 250px;
    background: #301903;
    backdrop-filter: blur(10px);
    padding: 25px;
    height: fit-content;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 50px;
    margin-top: -50px;
}

.main-content {
    flex: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    color: rgb(53, 52, 52);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    background-clip: text;
}

.controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section h3 {
    color: #F3E0B7;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid #faf3d6;
    padding-bottom: 8px;
}

.price-range {
    margin-bottom: 25px;
}

.range-container {
    position: relative;
    margin: 20px 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #e7e7e3, #ffd151);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffeab2;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 600;
    color: #F3E0B7;
}

.category-filter {
    margin-bottom: 25px;
}

.category-list {
    list-style: none;
}

.category-item {
    padding: 12px 16px;
    color: #e4b37b;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    margin-left: -50px;
}

.category-item:hover {
    background: linear-gradient(135deg, #422809);
    color: #795730; 
    transform: translateX(5px);
    border-left-color: #795730;
    box-shadow: 0 5px 15px rgba(43, 28, 0, 0.3);
}

.category-item.active {
    background: linear-gradient(135deg, #422809);
    color: #795730;
    border-left-color: #795730;
     box-shadow: 0 5px 15px rgba(43, 28, 0, 0.3);
}

.subcategory {
    margin-left: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.sub-subcategory {
    margin-left: 40px;
    font-size: 0.85rem;
    opacity: 0.7;
    padding: 10px 16px;
}

.sub-subcategory:hover {
    background: linear-gradient(135deg, #422809);
    color: #795730;
    transform: translateX(5px);
    border-left-color: #795730;
    box-shadow: 0 5px 15px rgba(43, 28, 0, 0.3);
}

.sub-subcategory.active {
    background: linear-gradient(135deg, #422809);
    color: #795730;
    border-left-color: #795730;
    box-shadow: 0 5px 15px rgba(43, 28, 0, 0.3);
}

.filter-section.search-sort {
    margin-bottom: 25px;
}

.search-sort .search-box,
.search-sort .sort-controls {
    margin-bottom: 15px;
}

.search-sort .search-box input,
.search-sort .sort-controls select {
    width: 90%;
    padding: 10px 12px;
    border: 2px solid #795730;
    border-radius: 10px;
    background: #422809;
    color: #b3afaf;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.search-sort .search-box input:focus,
.search-sort .sort-controls select:focus {
    border-color: #795730;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.specification-filter {
    background: #2a1800;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    color: #f3e0b7;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    transform: translateY(-10px);
    border: 1px solid #4a3200;
}

.specification-filter.show {
    opacity: 1;
    max-height: 600px;
    transform: translateY(0);
}

.specification-filter h3 {
    margin: 0;
    padding: 15px 18px;
    font-size: 1rem;
    color: #DDCAA4;
    border-bottom: 1px solid #2b2924;
    background: #160e01;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.spec-close-btn {
    background: none;
    border: none;
    color: #6e6658;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.spec-close-btn:hover {
    background: rgba(255, 209, 81, 0.2);
    transform: scale(1.1);
}

#specificationContent {
    padding: 15px 18px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

#specificationContent::-webkit-scrollbar {
    width: 6px;
}

#specificationContent::-webkit-scrollbar-track {
    background: #1a0f00;
    border-radius: 3px;
}

#specificationContent::-webkit-scrollbar-thumb {
    background: #31270d;
    border-radius: 3px;
}

#specificationContent::-webkit-scrollbar-thumb:hover {
    background: #c7ba96;
}

.spec-group {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 209, 81, 0.1);
    padding-bottom: 15px;
}

.spec-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-group h4 {
    font-size: 0.95rem;
    color: #b3ab98;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.spec-group h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #3a3832;
    margin-right: 8px;
    border-radius: 2px;
}

.spec-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.spec-options label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.spec-options label:hover {
    background-color: rgba(255, 209, 81, 0.15);
    border-color: rgba(255, 209, 81, 0.3);
    transform: translateY(-1px);
}

.spec-options input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #ffd151;
    transform: scale(1.1);
    flex-shrink: 0;
}

.spec-options input[type="checkbox"]:checked + span {
    color: #ffd151;
    font-weight: 600;
}

.clear-specs {
    background: transparent;
    border: 1px solid #2b2924;
    color: #a79465;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 15px 18px 18px;
    transition: all 0.3s ease;
    width: calc(100% - 36px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.clear-specs:hover {
    background: #ffd151;
    color: #2a1800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 209, 81, 0.3);
}

.clear-specs::before {
    content: '\f1f8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

@media (max-width: 768px) {
    .specification-filter.show {
        max-height: 70vh;
    }
    
    #specificationContent {
        max-height: calc(70vh - 120px);
        padding: 12px 15px;
    }
    
    .spec-options {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .spec-options label {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .specification-filter h3 {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .clear-specs {
        margin: 12px 15px 15px;
        width: calc(100% - 30px);
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .specification-filter.show {
        max-height: 60vh;
    }
    
    #specificationContent {
        max-height: calc(60vh - 100px);
    }
    
    .spec-group h4 {
        font-size: 0.9rem;
    }
    
    .spec-options label {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Existing styles for product card */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 50px;
    padding: 20px 0;
}

.product-card {
    background: #FFF3E3;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #944800, #4e2300);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(206, 114, 114, 0.15);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none; /* Ensure no underline on image link */
}

.product-info {
    padding: 25px;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-name a {
    text-decoration: none; /* Remove underline from product name link */
    color: #2c3e50; /* Match existing product name color */
}

.product-name a:hover {
    color: #1a2b3c; /* Slightly darker shade for hover effect */
}

.product-category {
    font-size: 0.9rem;
    color: #18181a;
    margin-bottom: 15px;
    font-weight: 500;
}

.product-specs {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.spec-tag {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #020202;
    margin-bottom: 20px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline on button links */
    text-align: center;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #ffc65c);
    color: white;
    flex: 1;
}

.btn-secondary {
    background: #f0f0f0; /* Assuming a neutral background for secondary button */
    color: #2c3e50; /* Match product name color for consistency */
    flex: 1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e4980a);
}

.btn-secondary:hover {
    background: #e0e0e0; /* Slightly darker for hover effect */
    color: #1a2b3c; /* Match product name hover color */
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: rgb(63, 32, 2);
}

.no-results h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgb(63, 32, 2);
    margin-bottom: 20px;
    font-weight: 500;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: rgb(63, 32, 2);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {  
        flex-direction: column;
        padding: 15px;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}