/* Product Catalog Styles */

/* Hero Section */
.products-hero {
    position: relative;
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero-background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1);
}

.hero-bg-image.active {
    opacity: 1;
    animation: zoomIn 10s ease-in-out forwards;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.90) 0%, rgba(32, 58, 67, 0.85) 50%, rgba(44, 83, 100, 0.80) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    color: white;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
}

.hero-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.hero-carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.hero-carousel-indicators .indicator.active {
    background: white;
    border-color: rgba(102, 126, 234, 0.8);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Products Catalog */
.products-catalog {
    padding: 40px 0 80px;
}

/* Filters Card */
.filters-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    position: sticky;
    top: 80px;
}

.filters-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #1a202c;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-group .form-control,
.filter-group .form-select {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.filter-group .form-control:focus,
.filter-group .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* Products Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.results-count {
    margin: 0;
    color: #4a5568;
    font-size: 0.875rem;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-form .form-select {
    min-width: 180px;
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    font-size: 0.875rem;
}

#filterToggle {
    white-space: nowrap;
}

/* Product Card - COMPACT (matching home page) */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(255, 193, 7, 0.15);
    border-color: #FFC107;
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 65%;
    overflow: hidden;
    background: #f7fafc;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    color: #a0aec0;
    font-size: 2rem;
}

.badge-new,
.badge-popular {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-popular {
    background: linear-gradient(135deg, #FFC107 0%, #ff9800 100%);
}

.product-body {
    padding: 0.875rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.65rem;
    color: #FFC107;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.product-name {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: #1a202c;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-top: 0.625rem;
    border-top: 1px solid #e2e8f0;
}

.product-price {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFC107 0%, #ff9800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-stock .badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    border-radius: 12px;
}

/* Product Actions - Matching home page */
.product-actions {
    padding: 0.75rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.btn-add-to-cart {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #FFC107 0%, #ff9800 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.btn-add-to-cart:disabled {
    transform: none;
}

.btn-add-to-cart.adding {
    opacity: 0.7;
    pointer-events: none;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    gap: 5px;
}

.pagination .page-link {
    border-radius: 8px;
    color: #667eea;
    border: 1px solid #e2e8f0;
    padding: 8px 15px;
}

.pagination .page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .active .page-link {
    background: #667eea;
    border-color: #667eea;
}

/* Product Detail Page */
.product-detail-section {
    padding: 2.5rem 0 4rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.product-image-wrapper {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.product-detail-image {
    width: 100%;
    border-radius: 6px;
}

.product-detail-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    color: #a0aec0;
    font-size: 5rem;
    border-radius: 6px;
}

.product-badges {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-info {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.product-category-tag {
    display: inline-block;
    background: #edf2f7;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-detail-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.product-detail-price {
    font-size: 2.25rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1.25rem;
}

.product-stock-info {
    margin-bottom: 1.5rem;
}

.product-stock-info .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.product-description {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: #f7fafc;
    border-radius: 6px;
}

.product-description h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.product-description p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9375rem;
}

.product-actions {
    margin-bottom: 2rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.product-actions .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.product-meta {
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.meta-item {
    margin-bottom: 0.625rem;
    color: #4a5568;
    font-size: 0.875rem;
}

.meta-item strong {
    color: #1a202c;
    margin-right: 0.5rem;
}

/* Related Products */
.related-products-section {
    padding: 4rem 0 5rem;
    background: #f7fafc;
}

.related-products-section .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 991px) {
    .products-hero {
        min-height: 350px;
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Mobile Filter Toggle */
    .filters-card {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1050;
        margin-bottom: 0;
        border-radius: 0;
        border-right: 1px solid #e2e8f0;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .filters-card.show {
        left: 0;
    }

    .products-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .toolbar-left {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .toolbar-right {
        width: 100%;
    }

    .sort-form {
        width: 100%;
    }

    .sort-form .form-select {
        width: 100%;
    }

    .product-detail-title {
        font-size: 1.5rem;
    }

    .product-detail-price {
        font-size: 1.875rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .input-group {
        max-width: 100% !important;
    }
}

@media (max-width: 767px) {
    .products-hero {
        min-height: 320px;
        padding: 2.5rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-carousel-indicators {
        margin-top: 1.5rem;
        gap: 0.75rem;
    }

    .hero-carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }

    .products-catalog {
        padding: 2rem 0 3rem;
    }

    .filters-card {
        padding: 1.25rem;
        width: 260px;
    }

    .products-toolbar {
        padding: 1rem;
    }

    .results-count {
        font-size: 0.8125rem;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    /* COMPACT: Mobile card styling */
    .product-body {
        padding: 0.75rem;
    }

    /* COMPACT: Readable but smaller text */
    .product-name {
        font-size: 0.8125rem;
        font-weight: 700;
        line-height: 1.3;
    }

    .product-category {
        font-size: 0.625rem;
        margin-bottom: 0.25rem;
    }

    .product-price {
        font-size: 0.9rem;
        font-weight: 800;
    }

    /* COMPACT: Smaller badges */
    .product-stock .badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
        font-weight: 700;
    }

    .badge-new,
    .badge-popular {
        font-size: 0.625rem;
        padding: 0.3rem 0.65rem;
    }

    .product-footer {
        padding-top: 0.5rem;
        margin-bottom: 0;
    }

    /* COMPACT: Action buttons */
    .product-actions {
        padding: 0.625rem;
    }

    .btn-add-to-cart {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .product-detail-section {
        padding: 1.5rem 0 2.5rem;
    }

    .product-image-wrapper,
    .product-info {
        padding: 1.25rem;
    }

    .product-detail-title {
        font-size: 1.375rem;
    }

    .product-detail-price {
        font-size: 1.75rem;
    }

    .product-badges {
        top: 1.5rem;
        right: 1.5rem;
    }

    .related-products-section {
        padding: 2.5rem 0 3rem;
    }

    .related-products-section .section-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 575px) {
    .products-hero {
        min-height: 280px;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .hero-carousel-indicators {
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .hero-carousel-indicators .indicator {
        width: 40px;
        height: 3px;
    }

    .hero-carousel-indicators .indicator.active {
        width: 50px;
    }

    .filter-actions .btn {
        font-size: 0.875rem;
    }

    /* COMPACT: Very small screens */
    .product-name {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .product-price {
        font-size: 0.875rem;
    }

    .product-category {
        font-size: 0.6rem;
    }

    .product-stock .badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.45rem;
    }

    .product-actions {
        padding: 0.5rem;
    }

    .btn-add-to-cart {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .product-detail-title {
        font-size: 1.25rem;
    }

    .product-detail-price {
        font-size: 1.625rem;
    }
}
