/* Products & Cart Styling */

/* Browse Products Page */
.browse-products-page {
    min-height: 70vh;
}

.page-banner {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.page-banner h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 18px;
    opacity: 0.9;
}

.browse-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar Filters */
.browse-sidebar {}

.filter-section {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin: 8px 0;
}

.category-list a {
    color: #666;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: #8B4513;
    color: white;
}

.sort-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Products Grid */
.products-grid-container {}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.products-header h2 {
    color: #333;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
}

.search-form button {
    padding: 10px 20px;
    background: #8B4513;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.sale-badge,
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.sale-badge {
    background: #e74c3c;
    color: white;
}

.featured-badge {
    background: #f39c12;
    color: white;
    top: 45px;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.product-info h3 a {
    color: #333;
    text-decoration: none;
}

.product-info h3 a:hover {
    color: #8B4513;
}

.product-category {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}

.product-price {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.current-price {
    font-size: 20px;
    font-weight: 600;
    color: #8B4513;
}

.btn-add-to-cart,
.btn-out-of-stock {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-to-cart {
    background: #8B4513;
    color: white;
}

.btn-add-to-cart:hover {
    background: #704010;
}

.btn-out-of-stock {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Product Detail Page */
.product-detail-page {
    padding: 40px 20px;
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.product-gallery {}

.main-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: auto;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.thumbnail-images img:hover {
    border-color: #8B4513;
}

.product-details {}

.breadcrumb {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #8B4513;
    text-decoration: none;
}

.product-details h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.product-price-section {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.discount-badge {
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.product-stock {
    margin: 15px 0;
}

.in-stock {
    color: #27ae60;
    font-weight: 600;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: 600;
}

.product-short-desc {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.add-to-cart-form {
    margin: 30px 0;
}

.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

.quantity-controls button {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 18px;
}

.quantity-controls input {
    width: 80px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 10px;
}

.btn-add-to-cart-large {
    width: 100%;
    padding: 18px;
    background: #8B4513;
    color: white;
    border: 2px solid #8B4513;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart-large:hover:not(:disabled) {
    background: #704010;
    border-color: #704010;
}

.btn-add-to-cart-large:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.btn-add-to-cart-large i {
    font-size: 16px;
}

.product-specifications {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.product-specifications h3 {
    margin-bottom: 15px;
}

.product-description-section,
.related-products-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.description-content {
    line-height: 1.8;
    color: #666;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-products-grid .product-card h3 {
    font-size: 14px;
}

/* Pagination Styling - Bootstrap 4 compatible */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}

.pagination .page-link:hover {
    background-color: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.pagination .page-item.active .page-link {
    background-color: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Fix for arrow size */
.pagination .page-link svg {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
}

.pagination .page-link i {
    font-size: 14px;
    max-width: 16px;
    max-height: 16px;
}

.pagination .page-link span {
    font-size: 14px;
}

@media (max-width: 768px) {
    .browse-container {
        grid-template-columns: 1fr;
    }

    .product-container {
        grid-template-columns: 1fr;
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input {
        width: 100%;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pagination responsive for tablet */
    .pagination-wrapper {
        margin-top: 40px;
    }

    .pagination {
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .pagination .page-link {
        min-width: 38px;
        height: 38px;
        padding: 7px 11px;
        font-size: 13px;
    }

    .pagination .page-link svg,
    .pagination .page-link i {
        width: 14px;
        height: 14px;
        max-width: 14px;
        max-height: 14px;
    }
}

@media (max-width: 480px) {
    /* Pagination responsive for mobile */
    .pagination-wrapper {
        margin-top: 30px;
    }

    .pagination {
        gap: 0.3rem;
    }

    .pagination .page-link {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .pagination .page-link svg,
    .pagination .page-link i {
        width: 12px;
        height: 12px;
        max-width: 12px;
        max-height: 12px;
    }
}