/**
 * STRIKE - Artigos Militares
 * Estilos personalizados para o catálogo digital
 */

/* Variáveis CSS */
:root {
    --color-black: #121212;
    --color-dark: #1a1a1a;
    --color-success: #28a745;
    --color-success-hover: #218838;
    --color-success-dark: #145a23;
    --color-light: #f8f9fa;
    --color-gray: #6c757d;
    --transition-speed: 0.3s;
}

/* Estilos gerais */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--color-black) 0%, #0f0f0f 25%, #151515 50%, #1a1a1a 75%, #202020 100%) fixed;
    color: var(--color-light) !important;
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.bg-black {
    background-color: var(--color-black) !important;
}

.bg-dark {
    background-color: var(--color-dark) !important;
}

.text-success {
    color: var(--color-success) !important;
}

/* Barra de navegação */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.navbar-brand img {
    transition: transform var(--transition-speed);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color var(--transition-speed);
    margin: 0 5px;
}

.nav-link:hover {
    color: var(--color-success) !important;
}

/* Hero section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 50, 0, 0.6) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
    animation: gradientPulse 8s ease infinite;
}

/* Novo efeito de luz */
.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(40, 167, 69, 0.1) 0%,
        transparent 30%,
        transparent 100%
    );
    z-index: 1;
    animation: rotateLight 30s linear infinite;
    pointer-events: none;
}

@keyframes rotateLight {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.hero-section h1 {
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7), 0 0 10px rgba(40, 167, 69, 0.4);
    animation: fadeInDown 1.2s ease;
}

.hero-section h1 .highlight {
    position: relative;
    color: var(--color-success);
    display: inline-block;
}

.hero-section h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-success) 50%, 
        transparent 100%
    );
    animation: shimmerLine 3s infinite;
}

@keyframes shimmerLine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.hero-section h2 {
    animation: fadeInUp 1.2s ease 0.3s both;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    animation: fadeInUp 1.2s ease 0.6s both;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-section .btn {
    animation: fadeInUp 1.2s ease 0.9s both;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.hero-image-container {
    position: relative;
    z-index: 1;
}

.hero-image-container img {
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes gradientPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
}

/* Cards de produtos */
.product-item {
    margin-bottom: 1.5rem;
}

.product-item .card {
    display: flex;
    flex-direction: column;
    border-width: 2px !important;
    height: 100%;
}

.product-item .card.featured {
    border-color: var(--color-success) !important;
    position: relative;
    overflow: hidden;
}

.product-item .card.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, 
        var(--color-success), 
        transparent 40%,
        transparent 60%,
        var(--color-success) 100%);
    background-size: 250% 250%;
    animation: glowingBorder 3s ease-in-out infinite;
    border-radius: 3px;
}

@keyframes glowingBorder {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
}

.card-img-container {
    position: relative;
    padding-top: 75%; /* Proporção 4:3 */
    overflow: hidden;
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    height: 2.4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-text {
    flex-grow: 1;
    font-size: 0.8rem;
    color: #adb5bd !important;
    margin-bottom: 0.5rem;
    height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.card-footer {
    background-color: var(--color-dark) !important;
    border-color: var(--color-success) !important;
}

/* Container de produtos */
.products-container {
    width: 100%;
    margin: 0 auto;
}

/* Botões de categorias */
.category-buttons {
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.category-btn.active {
    background-color: var(--color-success);
    color: white;
}

/* Botões com gradiente */
.btn-gradient-success {
    background: linear-gradient(145deg, var(--color-success) 0%, var(--color-success-dark) 100%);
    border-color: var(--color-success-dark);
    color: white;
    transition: all var(--transition-speed);
}

.btn-gradient-success:hover {
    background: linear-gradient(145deg, var(--color-success-hover) 0%, var(--color-success-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Cards */
.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    transition: transform var(--transition-speed);
}

/* Modais */
.modal-content {
    border-width: 2px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, var(--color-dark) 0%, var(--color-black) 100%) !important;
}

.modal-header, .modal-footer {
    border-width: 2px !important;
}

/* Estilos específicos para o modal do carrinho */
#cartModal .card {
    transition: all var(--transition-speed);
    border-width: 2px !important;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.3) 0%, rgba(20, 20, 20, 0.5) 100%) !important;
}

#cartModal .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#cartModal .quantity-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cartModal .card-body {
    position: relative;
    overflow: hidden;
}

#cartModal .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(40, 167, 69, 0.05) 0%, rgba(0, 0, 0, 0) 50%, rgba(40, 167, 69, 0.05) 100%);
    pointer-events: none;
}

#cartModal #cartTotal {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-success);
}

/* Animação de pulso para botões no carrinho */
#cartModal .remove-from-cart:hover {
    animation: pulseRed 1s infinite;
}

#cartModal .quantity-btn:hover {
    animation: pulseGreen 1s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Carrossel */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-inner {
    border-radius: 4px;
    overflow: hidden;
}

.carousel-control-prev, .carousel-control-next {
    background-color: rgba(0, 0, 0, 0.5);
    width: 10%;
    height: 100%;
}

/* Formulários */
.form-control {
    background-color: var(--color-dark) !important;
    color: var(--color-light) !important;
    border-width: 2px !important;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), transform var(--transition-speed);
}

.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-check-input:checked {
    background-color: var(--color-success) !important;
    border-color: var(--color-success) !important;
}

/* Estilo para formulários flutuantes */
.form-floating .form-control {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    padding: 1rem 0.75rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: color 0.15s ease-in-out, transform 0.15s ease-in-out;
    color: rgba(255, 255, 255, 0.6);
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--color-success);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Botões de arquivo personalizados */
.custom-file-input {
    position: relative;
    width: 100%;
}

.custom-file-input input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.custom-file-input label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: var(--color-dark);
    color: var(--color-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    transition: all var(--transition-speed);
    cursor: pointer;
}

.custom-file-input:hover label {
    background-color: var(--color-success-dark);
    border-color: var(--color-success);
}

.custom-file-input span {
    margin-left: 0.5rem;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    20%, 100% {
        transform: translateX(100%);
    }
}

/* Efeito de pulso para elementos importantes */
.pulse-effect {
    animation: pulse 2s infinite;
}

.pulse-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

/* Responsividade */
@media (max-width: 1200px) {
    .col-xl-3 {
        width: 25%;
    }
}

@media (max-width: 992px) {
    .col-lg-4 {
        width: 33.333333%;
    }
}

@media (max-width: 768px) {
    .col-md-6 {
        width: 50%;
    }
}

@media (max-width: 576px) {
    .col-sm-6 {
        width: 100%;
    }
}

/* Personalização do DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--color-light) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    color: var(--color-gray) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--color-light) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: var(--color-black) !important;
    background: var(--color-success) !important;
    border-color: var(--color-success) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: var(--color-black) !important;
    background: var(--color-success) !important;
    border-color: var(--color-success) !important;
}

/* Loader/Spinner para carregamento */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top: 5px solid var(--color-success);
    border-right: 5px solid var(--color-success-hover);
    border-bottom: 5px solid var(--color-success-dark);
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Novo loader com efeito de pulso */
.loader-pulse {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-success) 0%, var(--color-success-dark) 100%);
    position: relative;
    animation: pulse-loader 1.5s ease-in-out infinite;
}

.loader-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--color-success);
    animation: pulse-shadow 1.5s ease-in-out infinite;
}

@keyframes pulse-loader {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.8);
    }
}

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Badges de status */
.badge {
    font-size: 0.8rem;
    padding: 0.5em 0.8em;
}

/* Status dos pedidos */
.badge-pending {
    background-color: #ffc107;
    color: #000;
}

.badge-paid {
    background-color: #28a745;
    color: #fff;
}

.badge-shipped {
    background-color: #17a2b8;
    color: #fff;
}

.badge-delivered {
    background-color: #20c997;
    color: #fff;
}

.badge-canceled {
    background-color: #dc3545;
    color: #fff;
}

/* Botões de ação */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Tabelas */
.table-responsive {
    margin-bottom: 0;
}

/* Cards do dashboard */
.dashboard-stat-card {
    background-color: #1a1a1a;
    border: 1px solid #28a745;
    transition: transform 0.2s;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
}

.dashboard-stat-card .icon {
    font-size: 2rem;
    opacity: 0.5;
}

/* Gráficos */
canvas {
    max-width: 100%;
    height: auto !important;
} 