/* ===== ESTILOS PARA AS CATEGORIAS ===== */

/* Grid de categorias */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0 4rem;
}

/* Card de categoria */
.category-card {
    background: #111;
    border: 2px solid #333;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.category-card:hover {
    border-color: #c49a1f;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(196, 154, 31, 0.2);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c49a1f, #e5b82b, #c49a1f);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    z-index: 2;
}

.category-card:hover::before {
    transform: translateX(0);
}

/* Imagem da categoria - AJUSTADA PARA LARGURA TOTAL */
.category-image {
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid #333;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-image .image-placeholder {
    width: 100%;
    height: 100%;
    font-size: 5rem;
    color: #c49a1f;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* Informações da categoria - AJUSTADO */
.category-info {
    padding: 1.5rem 1.2rem;
    text-align: center;
    background: #111;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-info h3 {
    color: #c49a1f;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    word-wrap: break-word;
}

.category-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: auto;
}

.category-btn {
    background: none;
    border: 1px solid #c49a1f;
    color: #c49a1f;
    padding: 0.6rem 0.8rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex: 1;
    white-space: nowrap;
}

.category-btn i {
    font-size: 0.85rem;
}

.category-btn:hover {
    background: #c49a1f;
    color: #000;
    transform: translateY(-2px);
}

.info-btn:hover {
    background: #4CAF50;
    border-color: #4CAF50;
}

.produtos-btn:hover {
    background: #c49a1f;
}

/* ===== MODAL DE CATEGORIA ===== */
.category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-modal-container {
    background: #111;
    border: 3px solid #c49a1f;
    border-radius: 30px;
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    position: relative;
    box-shadow: 0 0 50px rgba(196, 154, 31, 0.3);
    animation: slideUpModal 0.4s ease;
    overflow: hidden;
}

@keyframes slideUpModal {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Layout em duas colunas */
.modal-layout {
    display: flex;
    height: 100%;
    min-height: 400px;
}

/* Coluna da esquerda - Imagem */
.modal-image-column {
    flex: 0 0 250px;
    background: #0a0a0a;
    border-right: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-image-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(196, 154, 31, 0.2);
}

.modal-image-placeholder {
    font-size: 5rem;
    color: #c49a1f;
    text-align: center;
    animation: pulseIcon 2s ease-in-out infinite;
}

/* Coluna da direita - Conteúdo */
.modal-content-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #111;
    overflow: hidden;
}

/* Título fixo */
.modal-title-fixed {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #c49a1f;
}

.modal-title-fixed h2 {
    color: #c49a1f;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.3;
}

/* Área de descrição com scroll */
.modal-description-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
    max-height: 200px;
}

.modal-description-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-description-scroll::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.modal-description-scroll::-webkit-scrollbar-thumb {
    background: #c49a1f;
    border-radius: 3px;
}

.modal-description-text {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

.modal-description-text p {
    margin-bottom: 1rem;
    text-align: justify;
}

.modal-description-text p:last-of-type {
    margin-bottom: 0;
}

.modal-description-text br {
    display: block;
    content: "";
    margin-top: 0.5rem;
}

/* Frase de efeito fixa */
.modal-quote-fixed {
    background: #0f0f0f;
    border-left: 4px solid #c49a1f;
    padding: 1rem;
    margin: 0.5rem 0 1rem;
    border-radius: 0 8px 8px 0;
}

.modal-quote-text {
    color: #c49a1f;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
    margin: 0;
}

/* Botões fixos */
.modal-buttons-fixed {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    border-top: 1px solid #333;
    padding-top: 1rem;
}

.modal-btn {
    background: none;
    border: 1px solid #c49a1f;
    color: #c49a1f;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-btn i {
    font-size: 0.9rem;
}

.voltar-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.produtos-btn:hover {
    background: #c49a1f;
    color: #000;
}

/* ===== DESCRIÇÃO COMPACTADA ===== */
.rpg-description-compact {
    padding: 1.5rem;
    margin: 1rem 0 2rem;
}

.rpg-description-compact .description-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.rpg-description-compact .description-text {
    font-size: 0.95rem;
}

/* ===== HEADER DE CATEGORIA ===== */
.category-header {
    text-align: center;
    margin: 2rem 0 3rem;
    padding: 2rem;
    background: #111;
    border: 2px solid #c49a1f;
    border-radius: 30px;
}

.category-header h1 {
    color: #c49a1f;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.category-header p {
    color: #888;
    font-size: 1.1rem;
    font-style: italic;
}

/* ===== BOTÃO VOLTAR ===== */
.back-to-categories {
    color: #c49a1f;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 1rem;
    background: rgba(196, 154, 31, 0.1);
    border: 1px solid #c49a1f;
    border-radius: 30px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.back-to-categories:hover {
    background: #c49a1f;
    color: #000;
    transform: scale(1.05);
}

/* ===== MEDIA QUERIES PARA TABLETS E DISPOSITIVOS MÉDIOS ===== */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-image {
        height: 160px;
    }
    
    .category-info {
        padding: 1rem 0.8rem;
    }
    
    .category-info h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .category-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .category-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-layout {
        flex-direction: column;
        min-height: auto;
    }
    
    .modal-image-column {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 2px solid #333;
        padding: 1rem;
    }
    
    .modal-image-container img {
        max-height: 150px;
    }
    
    .modal-content-column {
        padding: 1.2rem;
    }
    
    .modal-title-fixed h2 {
        font-size: 1.3rem;
    }
    
    .modal-description-scroll {
        max-height: 180px;
    }
    
    .modal-buttons-fixed {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }

    /* FOOTER EM 2 COLUNAS PARA MOBILE */
    .footer-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem;
    }

    .footer-section:nth-child(1),
    .footer-section:nth-child(3) {
        grid-column: 1 / 2;
    }

    .footer-section:nth-child(2),
    .footer-section:nth-child(4) {
        grid-column: 2 / 3;
    }

    .footer-section h4 {
        font-size: 0.9rem;
    }

    .footer-section ul li a {
        font-size: 0.8rem;
    }
}

/* ===== MEDIA QUERIES PARA CELULARES ===== */
@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-image {
        height: 140px;
    }
    
    .category-info {
        padding: 0.8rem;
    }
    
    .category-info h3 {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
        white-space: normal;
    }
    
    .category-buttons {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .category-header {
        padding: 1rem;
        margin: 1rem 0 2rem;
    }
    
    .category-header h1 {
        font-size: 1.2rem;
    }
    
    .category-header p {
        font-size: 0.8rem;
    }
    
    .back-to-categories {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

/* ===== MEDIA QUERIES PARA CELULARES PEQUENOS ===== */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .modal-container {
        width: 95%;
        max-width: 400px;
        padding: 1rem;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    
    .modal-container > div:first-child {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .modal-container > div:first-child h2 {
        font-size: 1.1rem;
    }
    
    .modal-container > div:first-child h2 i,
    .modal-container > div:first-child h2 span:first-child {
        display: none;
    }
    
    .modal-container > div:nth-child(2) {
        flex-direction: column !important;
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .modal-container > div:nth-child(2) > div:first-child {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: 150px !important;
    }
    
    .modal-container > div:nth-child(2) > div:first-child img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .modal-container > div:nth-child(2) > div:last-child {
        width: 100% !important;
        height: 200px !important;
        max-height: 200px !important;
        overflow-y: auto !important;
    }
    
    .modal-container > div:nth-child(3) {
        margin-bottom: 1rem !important;
        padding: 0.8rem !important;
    }
    
    .modal-container > div:nth-child(3) p {
        font-size: 0.8rem;
    }
    
    .modal-container > div:nth-child(4) {
        margin-bottom: 1rem !important;
    }
    
    .modal-container > div:nth-child(4) > div {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    .modal-container > div:nth-child(4) a {
        width: calc(50% - 0.25rem) !important;
        min-width: 120px;
        justify-content: center !important;
        padding: 0.5rem 0.5rem !important;
        font-size: 0.7rem !important;
        margin: 0 !important;
        background: rgba(196, 154, 31, 0.05);
        border: 1px solid #c49a1f;
        color: #c49a1f;
        border-radius: 30px;
        text-decoration: none;
        transition: all 0.3s;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        font-weight: 600;
    }
    
    .modal-container > div:nth-child(4) a i {
        font-size: 0.8rem;
    }
    
    .modal-container > div:last-child {
        display: flex !important;
        justify-content: center !important;
        gap: 0 !important;
        padding-top: 1rem !important;
    }
    
    .modal-container > div:last-child button:first-child {
        display: none;
    }
    
    .modal-container > div:last-child button:last-child {
        width: auto !important;
        min-width: 180px;
        margin: 0 auto !important;
        padding: 0.6rem 1.5rem !important;
        font-size: 0.8rem !important;
    }

    /* FOOTER EM 2 COLUNAS PARA MOBILE */
    .footer-content {
        gap: 1rem;
    }

    .footer-section h4 {
        font-size: 0.85rem;
    }

    .footer-section ul li a {
        font-size: 0.75rem;
    }
}

/* ===== MEDIA QUERIES PARA CELULARES MUITO PEQUENOS ===== */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 160px;
    }
    
    .modal-container > div:nth-child(4) > div {
        flex-direction: column !important;
    }
    
    .modal-container > div:nth-child(4) a {
        width: 100% !important;
    }
    
    .modal-container > div:last-child button:last-child {
        width: 100% !important;
        min-width: auto;
    }
}