/* Product Search Page Styles */
.search-container {
    max-width: 1600px;
    margin: 0 100px;
    padding: 2rem 1rem;
    min-height: 80vh;
   
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.search-header h1 {
    color: #00545E;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.search-header p {
    color: #00313B;
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.search-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.search-sidebar {
    flex: 0 0 320px;
    position: sticky;
    top: 2rem;
}

.search-content {
    flex: 1;
    min-width: 0;
    max-width: 1200px;
}

.search-form-container {
    background: #F5F3EB;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 84, 94, 0.1);
}

.search-input-group {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #B7B981;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: #00545E;
    box-shadow: 0 0 0 3px rgba(0, 84, 94, 0.1);
}

.search-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.tags-section {
    margin-bottom: 1rem;
}

.tags-section h3 {
    color: #00313B;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tags-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.tag-checkbox:hover {
    background-color: rgba(183, 185, 129, 0.1);
}

.tag-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #B7B981;
}

.tag-label {
    color: #00313B;
    font-weight: 500;
}

.btn-search, .btn-clear {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-search {
    background: #00313B;
    color: white;
    border: 2px solid #00313B;
}

.btn-search:hover {
    background: #B7B981;
    color: #00313B;
    border-color: #B7B981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 49, 59, 0.2);
}

.btn-clear {
    background: #F5F3EB;
    color: #00545E;
    border: 2px solid #00545E;
}

.btn-clear:hover {
    background: #00545E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 84, 94, 0.2);
    text-decoration: none;
}

.search-results {
    margin-top: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F5F3EB;
}

.results-header h2 {
    color: #00545E;
    font-size: 2rem;
    font-weight: 600;
}

.results-count {
    color: #00313B;
    font-weight: 500;
    background: #B7B981;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: center;
    padding: 1rem 0;
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: none;
}

.product-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 84, 94, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 380px;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 84, 94, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 84, 94, 0.8), rgba(181, 185, 129, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.view-details-btn {
    background: white;
    color: #00545E;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(15px);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.product-card:hover .view-details-btn {
    transform: translateY(0);
}

/* Prevent flash on click by disabling hover effects during active state */
.product-card-link:active .product-overlay,
.product-card-link:active .product-image img,
.product-card-link:active .view-details-btn {
    transition: none !important;
}

.view-details-btn .icon-eye::before {
    content: "👁";
    font-style: normal;
}

/* Search Page Product Cards - Make selectors more specific to avoid conflicts */
.search-container .product-info {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container .product-name {
    color: #00545E;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.search-container .product-description {
    color: #00313B;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    max-height: 4.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.search-container .product-description p {
    margin: 0 0 0.5rem 0;
}

.search-container .product-description p:last-child {
    margin-bottom: 0;
}

.search-container .product-description strong {
    color: inherit;
    font-weight: 600;
}

.search-container .product-description em {
    color: inherit;
    font-style: italic;
}

.search-container .product-description ul,
.search-container .product-description ol {
    margin: 0;
    padding-left: 16px;
}

.search-container .product-description li {
    margin-bottom: 2px;
}

.search-container .product-description h4 {
    color: inherit;
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0 4px 0;
}

.search-container .product-description a {
    color: inherit;
    text-decoration: none;
}

.search-container .product-description a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.search-container .product-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-container .original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 1rem;
    font-weight: 400;
}

.search-container .final-price {
    color: #00545E;
    font-size: 1.4rem;
    font-weight: 700;
}

.search-container .product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.search-container .product-tag {
    background: #B7B981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-results, .search-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: #00313B;
}

.no-results svg, .search-placeholder svg {
    color: #B7B981;
    margin-bottom: 1.5rem;
}

.no-results h3, .search-placeholder h3 {
    color: #00545E;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.no-results p, .search-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-browse-all {
    display: inline-block;
    background: #00545E;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-browse-all:hover {
    background: #B7B981;
    color: #00313B;
    text-decoration: none;
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .search-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .search-sidebar {
        flex: none;
        position: static;
        max-width: none;
    }
    
    .search-content {
        max-width: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .product-card {
        max-width: 100%;
    }
}

@media (max-width: 968px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        justify-items: center;
    }
    
    .product-card {
        max-width: 400px;
    }
    
    .tags-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 1rem;
    }
    
    .search-header h1 {
        font-size: 2rem;
    }
    
    .search-form-container {
        padding: 1.5rem;
    }
    
    .search-input {
        border-radius: 12px;
    }
    
    .search-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-search, .btn-clear {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .tags-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
