/* ========================================
   Shop Page Styles
   ======================================== */

/* Override global styles for shop page */
/* Show all products on shop page (don't hide 5th+ products) */
.products-grid .product-card {
    display: flex !important;
}

.shop-section {
    padding: 60px 20px;
    background: #ffffff;
    min-height: 100vh;
}


.shop-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.shop-header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

.shop-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.shop-subtitle {
    font-size: 1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Filter & Sort Bar */
.shop-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.filter-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 300px;
}

.sort-control,
.category-filter-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-control label,
.category-filter-control label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-size: 0.95rem;
}

.sort-select,
.category-filter-select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.sort-select:hover,
.category-filter-select:hover,
.sort-select:focus,
.category-filter-select:focus {
    border-color: #999;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    outline: none;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
    transform: translateY(-6px);
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-view-details {
    background: white;
    color: #1a1a1a;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-view-details:hover {
    background: #f5f5f5;
    transform: scale(1.02);
}

.btn-view-details:active {
    transform: scale(0.98);
}

/* Wishlist Button */
.btn-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-wishlist:hover {
    background: #f5f5f5;
    color: #c41e3a;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
}

.btn-wishlist.active {
    background: #c41e3a;
    color: white;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-wishlist.active:hover {
    background: #a01729;
}

/* Product Content */
.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #666;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.5;
    flex-grow: 1;
}

/* Product Footer */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e8e8e8;
    padding-top: 12px;
    margin-top: auto;
    gap: 10px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
}

.btn-select-variant {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-select-variant:hover {
    background: #333;
    transform: translateX(3px);
}

.btn-select-variant:active {
    transform: translateX(1px);
}

/* No Products State */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}

.no-products h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.no-products p {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #666;
}

.no-products .btn {
    padding: 12px 30px;
    font-weight: 600;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (768px and above) */
@media (min-width: 768px) {
    .shop-section {
        padding: 80px 40px;
    }

    .shop-title {
        font-size: 2.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }

    .shop-filter-bar {
        padding: 25px 0;
    }
}

/* Desktop (1024px and above) */
@media (min-width: 1024px) {
    .shop-section {
        padding: 100px 0;
    }

    .shop-title {
        font-size: 3rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 32px;
    }

    .shop-header {
        margin-bottom: 50px;
    }

    .shop-filter-bar {
        padding: 30px 0;
    }

    .sort-select,
    .category-filter-select {
        min-width: 180px;
    }
}

/* Mobile (under 576px) */
@media (max-width: 575px) {
    .shop-section {
        padding: 40px 0px;
    }

    .shop-title {
        font-size: 1.8rem;
    }

    .shop-subtitle {
        font-size: 0.95rem;
    }

    .shop-filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 20px;
        gap: 12px;
    }

    .filter-controls {
        flex-direction: column;
        gap: 12px;
        min-width: auto;
    }

    .sort-control,
    .category-filter-control {
        width: 100%;
    }

    .sort-select,
    .category-filter-select {
        width: 100%;
        min-width: auto;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-content {
        padding: 16px;
    }

    .product-footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .btn-select-variant {
        flex: 1;
        justify-content: center;
        min-width: 140px;
    }
}

/* Extra Small (under 400px) */
@media (max-width: 399px) {
    .shop-section {
        padding: 30px 0px;
    }

    .shop-title {
        font-size: 1.5rem;
    }

    .shop-subtitle {
        font-size: 0.9rem;
    }

    .products-grid {
        gap: 10px;
    }

    .product-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .product-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        transform: translateY(-4px);
    }

    .product-content {
        padding: 14px;
    }

    .product-price {
        font-size: 1.2rem;
    }

    .btn-view-details {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .btn-select-variant {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .sort-select,
    .category-filter-select {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
}

/* ========================================
   Pagination Styles
   ======================================== */

.pagination-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.page-indicator {
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #666;
}

.page-indicator p {
    margin: 0;
    line-height: 1.6;
}

.page-indicator strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Bootstrap-style pagination override for custom styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    min-width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #ffffff;
    cursor: pointer;
}

.page-link:hover:not(.disabled) {
    border-color: #c41e3a;
    color: #c41e3a;
    background: #fff5f5;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.1);
}

.page-item.active .page-link {
    background: #c41e3a;
    border-color: #c41e3a;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.page-link.disabled,
.page-item.disabled .page-link {
    color: #ccc;
    border-color: #f0f0f0;
    background: #f9f9f9;
    cursor: not-allowed;
    pointer-events: none;
}

.page-link i {
    font-size: 0.85rem;
}

/* Mobile responsiveness for pagination */
@media (max-width: 768px) {
    .pagination-section {
        margin-top: 40px;
        padding-top: 30px;
    }

    .page-indicator {
        margin-bottom: 20px;
        font-size: 0.85rem;
    }

    .pagination {
        gap: 4px;
    }

    .page-link {
        padding: 8px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .page-link i {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .pagination {
        gap: 2px;
    }

    .page-link {
        padding: 6px 8px;
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .page-item.page-item:not(.active) {
        display: none;
    }

    .page-item:first-child,
    .page-item:last-child,
    .page-item.active {
        display: inline-block;
    }
}
