/* Shop Header */
.shop-header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #f85606;
    outline: none;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Filters Sidebar */
.col-lg-3 {
    margin-top: 20px;
}

.filters-sidebar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Filter Section */
.filter-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

/* Filter Options */
.filter-option {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
}

.filter-option input[type="checkbox"] {
    margin-right: 8px;
}

/* Price Range */
.price-range {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    position: relative;
}

.price-range input {
    width: calc(50% - 10px);
    min-width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.price-range span {
    display: none;
}

.price-range .btn {
    width: 100%;
    margin-top: 10px;
}

/* Desktop styles */
@media (min-width: 992px) {
    .price-range {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .price-range input {
        width: 80px;
        flex: 0 0 auto;
    }

    .price-range span {
        display: inline;
        color: #666;
        flex: 0 0 auto;
    }

    .price-range .btn {
        width: auto;
        margin-top: 0;
        padding: 5px 10px;
        font-size: 0.875rem;
        flex: 0 0 auto;
    }
}

/* Small screen adjustments */
@media (max-width: 576px) {
    .price-range {
        gap: 5px;
    }

    .price-range input {
        font-size: 0.85rem;
        padding: 6px;
    }
}

/* Rating Filter */
.rating-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.rating-option input[type="checkbox"] {
    margin-right: 8px;
}

.stars {
    color: #ffc107;
    margin-right: 5px;
}

/* Products Grid */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Product Card Styling */
.product-card {
    background: white;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eee;
}

.product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect ratio */
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 10px;
}

.product-info {
    padding: 8px 12px;
    background: #fff;
}

.product-title {
    font-size: 14px;
    color: #212121;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 18px;
    font-weight: 500;
    color: #f57224;
    margin-bottom: 6px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.product-rating .stars {
    color: #ffc107;
    font-size: 12px;
}

.rating-count {
    color: #9e9e9e;
    font-size: 12px;
}

/* Product Grid Layout */
@media (min-width: 1200px) {
    .col-lg-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575px) {
    .col-12 {
        padding: 0 8px;
    }
    
    .product-card {
        margin-bottom: 8px;
    }

    .product-info {
        padding: 6px 8px;
    }

    .product-title {
        font-size: 13px;
        height: 36px;
    }

    .product-price {
        font-size: 16px;
    }
}

/* Product Hover Effect */
.product-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-hover {
    opacity: 1;
}

.view-details {
    background: #f57224;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 2px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-card:hover .view-details {
    transform: translateY(0);
}

/* Grid Container Spacing */
.row {
    margin-right: -8px;
    margin-left: -8px;
}

[class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    color: #f85606;
}

.page-item.active .page-link {
    background-color: #f85606;
    border-color: #f85606;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .filter-section {
        padding: 15px;
    }
}

@media (max-width: 991px) {
    .filter-section {
        position: sticky;
        top: 20px;
        z-index: 100;
    }

    .price-filter {
        flex-wrap: wrap;
    }

    .price-input {
        width: calc(50% - 5px);
    }

    .price-filter .btn {
        width: 100%;
        margin-top: 10px;
    }

    .col-lg-3 {
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .filter-section {
        position: relative;
        top: 0;
        margin-bottom: 15px;
    }

    .filter-option {
        font-size: 0.9rem;
    }

    .rating-option {
        font-size: 0.9rem;
    }
}

/* Filter Toggle Button for Mobile */
.filter-toggle {
    display: none;
}

@media (max-width: 576px) {
    .filter-toggle {
        display: block;
        width: 100%;
        margin-bottom: 15px;
    }

    .filter-section {
        display: none;
        padding: 15px;
    }

    .filter-section.show {
        display: block;
    }

    .filter-section h4 {
        font-size: 1rem;
    }

    .price-filter {
        gap: 5px;
    }

    .price-input {
        font-size: 0.9rem;
    }

    .col-lg-3 {
        margin-top: 10px;
    }
}

/* Button Positioning */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 8px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Desktop Button Position */
@media (min-width: 992px) {
    .price-filter .btn-primary {
        position: relative;
        top: 0;
        right: 0;
    }
} 

/* Back Button Styling */
.back-btn {
    color: #333;
    font-size: 20px;
    padding: 8px;
    transition: all 0.3s ease;
    background: none;
    border: none;
}

.back-btn:hover {
    color: #f57224;
    transform: translateX(-3px);
}

/* Responsive Back Button */
@media (max-width: 768px) {
    .back-btn {
        padding: 4px;
        font-size: 18px;
    }
}