/* Main Content */
main {
    margin-top: 70px;
    padding: 30px 0;
    min-height: calc(100vh - 70px - 200px);
}

/* Hero Section */
/*.hero {
    height:220px;
    text-align: center;
    padding: 60px 0;
   /* background: linear-gradient(135deg, var(--primary-color) 0%, #333 100%); */
  /* background-image: url('./images/background_images/pexels-thepaintedsquare-189378.jpg'); 
  background-image: url('./images/background_images/pexels-njeromin-12734294.jpg');
  pexels-njeromin-12734294.jpg /mountains
  pexels-timmossholder-3612930.jpg
  */
  
  /*background-image: 
  linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
  url('./images/background_images/pexels-timmossholder-3612930.jpg'); 
  background-image:   
  url('./images/Slider.png');
   background-size: cover;
   background-position: center;
    color: var(--text-light);
    margin-bottom: 20px;
    border-radius: 12px;
} */
 

/* Filters */
.filters {
    margin-bottom: 20px;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}
.filter-container {

    background-image: 
    linear-gradient(var(--primary-color), var(--primary-color));
    /*linear-gradient(rgba(31, 51, 71, 0.05), rgba(13, 52, 83, 0.1));*/
    /*linear-gradient(to right,#00376e, #0076de); Blue gradient*/
    /*linear-gradient(#8888883f, #88888852);*/
    /*radial-gradient(circle at center,#e5e5e5 0%,#88888852 100%);*/
 
    background-size: cover;
    background-position: center;
    padding: 1.2rem;
    border-radius: 1rem; 
}

/*
.products-grid {
    position: relative;
    background-color: #f7fbff;
    background-image: 
      radial-gradient(circle at 20px 20px, #5394fd22 2px, transparent 0),
      radial-gradient(circle at 60px 60px, #5394fd22 2px, transparent 0);
    background-size: 80px 80px;
    padding: 2rem;
    border-radius: 1rem;
    overflow: hidden;
  }
  
  .products-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(83, 148, 253, 0.08); 
    pointer-events: none;
    z-index: 1;
  }
*/

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .filter-content {
    z-index: 1000;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-small);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    min-height: 450px;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.product-badge.sale {
    background-color: var(--secondary-accent);
    color: var(--text-light);
}

.product-badge.new {
    background-color: #ffdb00;
    color: var(--text-dark);
}

.product-img {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
}

.product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

/* Make product-info a flex container with column direction */
.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    z-index: 1;
    justify-content: space-between;
}
/* Make description take up available space, pushing actions to bottom */
.product-info .description {
    margin-bottom: 15px;
    flex-grow: 1;
    min-height: 60px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.4;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.stars {
    color: #ffd700;
    font-size: 14px;
}

.rating-count {
    font-size: 12px;
    color: var(--text-gray);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    padding-bottom: 10px;
}

.original-price {
    font-size: 14px;
    color: var(--text-gray);
    text-decoration: line-through;
}

/* Style the product actions to stick to bottom */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
}

.view-btn {
    padding: 8px 15px;
    background-image:linear-gradient(#8ad631, #578d19); 
    /*background-color: #8ad631; */
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-light);
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    flex-grow: 1;
}
.view-btn {
    flex-grow: 1;
    text-align: center;
    display: flex;

}
/* Product condition labels */
.new-btn-2, .secondhand-btn-2 {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.new-btn-2 {
    background-color: #0079e1;
    color: var(--text-light);
   /* border-left: 3px solid var(--accent-color);
    border-right: 3px solid var(--accent-color);*/
    margin-top: 5px;
}

.secondhand-btn-2 {
    background-color: #000;
    color: var(--text-light);
    /*border-left: 3px solid #606075;
    border-right: 3px solid #606075;*/
    margin-top: 5px;
}

.type-btn {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.type-btn {
    background-color: orange;
    color: var(--text-light);
    /*border-left: 3px solid var(--accent-color);
    border-right: 3px solid var(--accent-color);*/
    margin-top: 5px;
}

.type-btn-2 {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.type-btn-2 {
    background-color: forestgreen;
    color: var(--text-light);
    /*border-left: 3px solid var(--accent-color);
    border-right: 3px solid var(--accent-color);*/
    margin-top: 5px;
}

/* Add subtle transition */
.new-btn, .secondhand-btn-2 {
    transition: transform 0.2s ease;
}

.new-btn:hover, .secondhand-btn-2:hover {
    transform: translateX(2px);
}
/*Old new and second hand Buttons*/
.new-btn {
    background-color: rgba(0, 113, 227, 0.1);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
    border-right: 3px solid var(--accent-color);
    margin-top: 5px;
}

.secondhand-btn {
    background-color: rgba(27, 29, 37, 0.1);
    color: #606075;
    border-left: 3px solid #606075;
    border-right: 3px solid #606075;
    margin-top: 5px;
}

/* Add subtle transition */
.new-btn, .secondhand-btn {
    transition: transform 0.2s ease;
}

.new-btn:hover, .secondhand-btn:hover {
    transform: translateX(2px);
}
/* Additional improvements to prevent hidden elements */
.product-card:hover .product-actions {
    opacity: 1;
    visibility: visible;
}

.view-btn, .add-to-cart-btn {
    opacity: 1 !important; /* Force visibility */
    visibility: visible !important;
}

.view-btn:hover {
    background-color: #6aaa22;
    border-color: #d2d2d7;
    color: var(--text-light);
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed);
}

.add-to-cart-btn:hover {
    background-color: var(--accent-color);
}

.add-to-cart-btn i {
    font-size: 16px;
}