/* Catalog Container */
.f5-catalogo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    scroll-margin-top: 50px; /* Espaço para o header fixo, se houver */
}

/* Filters */
.f5-catalogo-filters {
    margin-bottom: 20px;
}

.f5-catalogo-filters select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

/* Product Grid */
.f5-catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

@media screen and (min-width: 992px) {
    .f5-catalogo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.f5-catalogo-product {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s;
}

.f5-catalogo-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: #f5f5f5;
}

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

.product-info {
    padding: 15px;
}

.product-name {
    margin: 0 0 10px;
    font-size: 1.1em;
}

.product-name a {
    color: #333;
    text-decoration: none;
}

.product-category {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.product-stock {
    font-size: 0.9em;
}

.in-stock {
    color: #28a745;
}

.out-of-stock {
    color: #dc3545;
}

/* Single Product */
.f5-catalogo-single-product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-gallery {
    position: relative;
}

.main-image {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.product-details {
    padding: 20px;
}

.product-title {
    margin: 0 0 20px;
    font-size: 2em;
    color: #333;
}

.product-meta {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.product-meta > div {
    margin-bottom: 10px;
}

.product-meta > div:last-child {
    margin-bottom: 0;
}

.product-description {
    line-height: 1.6;
    color: #666;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .f5-catalogo-single-product {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 600px) {
    .f5-catalogo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Quote Sidebar and Overlay */
.f5-catalogo-quote-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.f5-catalogo-quote-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px; /* Adjust width as needed */
    height: 100%;
    background: #fff;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.f5-catalogo-quote-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.sidebar-header .close-sidebar {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.sidebar-header .close-sidebar:hover {
    color: #333;
}

.sidebar-items-list {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.sidebar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-item .item-image {
    width: 60px;
    height: 60px;
    border: 1px solid #ddd;
    margin-right: 10px;
    flex-shrink: 0;
}

.sidebar-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-item .item-details {
    flex-grow: 1;
}

.sidebar-item .item-details h3 {
    margin: 0 0 5px;
    font-size: 1em;
}

.sidebar-item .item-details p {
    margin: 0 0 3px;
    font-size: 0.9em;
    color: #666;
}

.sidebar-item .remove-item {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer .button {
    width: 100%;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .f5-catalogo-quote-sidebar {
        width: 100%;
    }
}

.f5-catalogo-quote-link {
    margin-left: 20px;
}

.quote-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2271b1;
    padding: 10px 20px;
    border: 1px solid #2271b1;
    border-radius: 4px;
    transition: all 0.3s;
    background: #fff;
}

.quote-link:hover {
    background: #f0f0f0;
    color: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.quote-link .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    color: #2271b1;
    display: inline-block;
    vertical-align: middle;
}

.quote-count {
    background: #2271b1;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9em;
    min-width: 20px;
    text-align: center;
    margin-right: 8px;
    font-weight: bold;
}

.quote-text {
    font-weight: 500;
}

.quote-link:hover .quote-count {
    background: #135e96;
}

/* Remover qualquer display: none do contador */
.quote-count:empty {
    display: inline-block !important;
}

@media screen and (max-width: 768px) {
    .f5-catalogo-header {
        flex-direction: column;
    }
    
    .f5-catalogo-filters,
    .f5-catalogo-search,
    .f5-catalogo-quote-link {
        width: 100%;
        margin: 10px 0;
    }
}

/* Notificações */
.f5-catalogo-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.f5-catalogo-notification.success {
    background: #28a745;
}

.f5-catalogo-notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Adicionando estilos para as imagens dos produtos no orçamento */
.product-image-quote {
    position: relative;
    padding-top: 100%;
    background: #f5f5f5;
}

.product-image-quote img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quote Styles */
.f5-catalogo-quote {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.quote-items-list {
    margin-bottom: 30px;
}

.quote-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fff;
}

.quote-item-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.quote-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.quote-item-details {
    flex: 1;
}

.quote-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.quote-item-code {
    color: #666;
    font-size: 0.9em;
}

.quote-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 15px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
}

.quantity-btn:hover {
    background: #f5f5f5;
}

.quantity-input {
    width: 50px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.remove-item {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ff4444;
    margin-left: 5px;
}

.remove-item:hover {
    background: #fff5f5;
}

.quote-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.button-primary {
    background: #2271b1;
    color: white;
}

.clear-quote {
    background: #dc3545;
    color: white;
}

.empty-quote-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

@media (max-width: 600px) {
    .quote-item {
        grid-template-columns: 80px 1fr auto;
        gap: 10px;
        padding: 10px;
    }

    .quote-item-image {
        width: 80px;
        height: 80px;
    }

    .quote-item-details h3 {
        font-size: 14px;
    }

    .quote-item-code {
        font-size: 12px;
    }

    .quote-item-quantity input {
        width: 70px; /* Adjusted width for mobile */
    }

    .quantity-btn {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }

    .remove-item {
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
}

/* Ajuste para o scroll suave */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 50px; /* Espaço para o header fixo, se houver */
} 