/* Modern Catalog Styles */
:root {
    --cat-primary: #2E7D32;
    --cat-primary-light: #4CAF50;
    --cat-primary-dark: #1B5E20;
    --cat-dark: #1a3d1c;
    --cat-bg: #f1f8f4;
    --cat-card-bg: #ffffff;
    --cat-border: #c8e6c9;
}

body {
    background-color: var(--cat-bg);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header Override - Responsive Design */
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
    position: relative;
    overflow: hidden;
    background-color: #1a3d1c;
}

/* Desktop - Banner image */
.banner-desktop {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 0 20px 20px;
}

/* Mobile styles - Show text with old background */
@media (max-width: 767px) {
    .catalog-header {
        background-image: url('../img/catalog_header.png');
        background-size: cover;
        background-position: center;
        min-height: 200px;
    }
    
    .banner-desktop {
        display: none;
    }
    
    .catalog-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 0 0 20px 20px;
    }
    
    .header-content {
        display: block;
        position: relative;
        z-index: 2;
        text-align: center;
        padding: 40px 20px;
    }
    
    .header-content h1 {
        color: var(--cat-dark);
        font-weight: 700;
        font-size: 1.8rem;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .header-content p {
        color: var(--cat-dark);
        font-size: 0.95rem;
    }
}

/* Desktop/Tablet styles - Show only banner image, hide text */
@media (min-width: 768px) {
    .header-content {
        display: none;
    }
}

/* Search Bar */
.search-container {
    background: white;
    padding: 20px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(46, 125, 50, 0.1);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    border: none;
    flex-grow: 1;
    padding: 10px 20px;
    font-size: 1.1rem;
    outline: none;
}

.search-btn {
    background: var(--cat-primary);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--cat-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4);
}

/* Product Card Grid Spacing */
.outer_div .row {
    margin-left: -15px;
    margin-right: -15px;
}

.outer_div .col-sm-6,
.outer_div .col-md-4,
.outer_div .col-lg-3 {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 30px;
    display: flex;
}

/* Product Card */
.product-card-modern {
    background: var(--cat-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    width: 100%;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.product-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(46, 125, 50, 0.2);
    border-color: var(--cat-border);
}

.product-img-wrap {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #f1f2f6;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 10px;
}

.product-card-modern:hover .product-img-wrap img {
    transform: scale(1.08);
}

.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.badge-success {
    background-color: #4CAF50;
}

.badge-warning {
    background-color: #FF9800;
    color: #333;
}

.badge-danger {
    background-color: #f44336;
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 125, 50, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card-modern:hover .img-overlay {
    opacity: 1;
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h4 {
    margin: 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cat-dark);
    min-height: 44px;
    line-height: 1.3;
}

.product-info .d-flex {
    margin-top: auto;
    padding-top: 10px;
}

.price-tag {
    font-size: 1.25rem;
    color: var(--cat-primary);
    font-weight: 700;
}

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

.pagination>li>a {
    border-radius: 50% !important;
    margin: 0 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--cat-dark);
    font-weight: 600;
}

.pagination>.active>a {
    background-color: var(--cat-primary);
    color: white;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4);
}

/* Footer verde solo para catalogo.php */
body.page-catalogo .navbar-default.navbar-fixed-bottom {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    border-color: #1B5E20;
}

body.page-catalogo .navbar-default.navbar-fixed-bottom .navbar-text,
body.page-catalogo .navbar-default.navbar-fixed-bottom a {
    color: #ffffff;
}

body.page-catalogo .navbar-default.navbar-fixed-bottom a:hover {
    color: #a5d6a7;
    text-decoration: none;
}
