/* Base */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #004aad;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body * {
	caret-color: transparent;
}

/* Reforça cursor visível em campos editáveis */
input,
textarea,
[contenteditable="true"],
select,
button {
	caret-color: auto !important;
}

main {
  flex: 1;
}

/* NavBar Dropdown */
.navbar .dropdown-toggle {
    color: #ffffff;
    transition: color 0.3s ease;
}

.navbar .dropdown-toggle:hover,
.navbar .dropdown-toggle:focus {
    color: #0b93f2;
}

.dropdown-menu {
    background-color: #1c1c2e;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    min-width: 200px;
    z-index: 1050;
}

.dropdown-menu .dropdown-item {
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: #0b93f2;
    color: #ffffff;
}

.navbar .dropdown-toggle::after {
    margin-left: 0.3em;
    vertical-align: middle;
}

@media (max-width: 992px) {
    .dropdown-menu {
        position: absolute !important;
    }
}

/* Alerta de sucesso e erro */
.alert-success {
  background-color: #0b93f2;
  color: #d4edda;
  border: 1px solid #1b5e20;
}

.alert-danger {
  background-color: #c62828;
  color: #f8d7da;
  border: 1px solid #8e0000;
}

.alert {
    margin-top: 15px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  float: right;
  cursor: pointer;
}

/* Navbar */
.navbar {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.navbar-brand {
  font-size: 1.75rem;
}

.nav-link {
  font-size: 1.1rem;
}

.navbar form {
  align-items: center;
}

.navbar form .form-control {
  height: calc(1.75em + 0.75rem + 2px);
  font-size: 1rem;
}

.btn-outline-light {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.navbar .d-flex.align-items-center {
  gap: 0.75rem;
}

.btn-welcome {
  display: inline-block;
  background-color: #0b93f2;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

/* Cart */
.cart-icon {
  display: flex;
  align-items: center;
}

.cart-icon img {
  width: 36px;
  filter: invert(100%);
}

#cart-count {
  font-size: 0.75rem;
  top: -6px;
  left: 22px;
}

/* Cards */
.category-card {
  background-color: #1e1e1e;
  border: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.card-title {
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

/* Cart icon */
.icon-button {
    background-color: #0b93f2;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.icon-button:hover {
    background-color: #004aad; /* verde mais escuro no hover */
}

/* Botão padrão */
.btn.btn-primary {
  background-color: transparent !important;
  color: #e0e0e0 !important;
  border: 1.5px solid #cccccc !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid #333;
  background-color: #1e1e1e;
  color: #ccc;
  padding: 1rem 0;
  text-align: center;
}

/* Banner Carrossel */
#promo-carousel {
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
  transition: transform 0.6s ease;
  height: 100%;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px 14px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: background 0.3s;
}

.arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.arrow.left {
  left: 16px;
}

.arrow.right {
  right: 16px;
}

/* Responsivo */
@media (max-width: 992px) {
  .marketplace-text {
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .logo-img {
    height: 50px;
  }

  .navbar .location-info {
    font-size: 0.9rem;
  }

  .navbar .form-control {
    width: 160px;
    height: 2.5rem;
    font-size: 0.95rem;
  }

  .btn-outline-light {
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
  }

  .cart-icon img {
    width: 30px;
  }

  #cart-count {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  #promo-carousel {
    height: 180px;
  }

  .arrow {
    font-size: 18px;
    padding: 8px 12px;
  }

  .marketplace-text {
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1.1rem;
  }

  .navbar .form-control {
    width: 140px;
  }

  .location-info {
    display: none;
  }

  .navbar .d-flex.align-items-center {
    gap: 0.8rem;
  }

  .cart-icon img {
    width: 28px;
  }
}

/* Logo */
.logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* Texto do marketplace */
.marketplace-text {
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 600;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Localização */
.navbar .location-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #ffffff;
}

.navbar .location-info img,
.location-info img {
  filter: invert(100%);
}

.location-info span {
  font-size: 0.95rem;
  white-space: nowrap;
}

.bg-darkBlue {
    background-color: #1e1e1e;
}

.card-body {
    background-color: #1e1e1e;
}

.theme-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(11, 147, 242, 0.1);
}

.theme-icon {
    font-size: 16px;
}

/* Tema escuro */
[data-theme="dark"] .sidebar {
    background-color: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .theme-toggle {
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(11, 147, 242, 0.2);
}

/* Tema claro */
[data-theme="light"] .sidebar {
    background-color: #ffffff;
    color: #1a202c;
}

[data-theme="light"] .theme-toggle {
    border-color: #e2e8f0;
    color: #1a202c;
}

/* - - - PAGE DETAILS - - - */

.product-detail-container {
    margin: 2%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

/* Image Gallery */
.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.05);
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #007bff;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars {
    color: #ffa500;
    font-size: 18px;
}

.rating-text {
    color: #DDD;
    font-size: 14px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 36px;
    font-weight: 700;
    color: #0B93F2;
}

.original-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #0B93F2;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-description {
    font-size: 16px;
    color: #DDD;
    line-height: 1.8;
    margin-bottom: 25px;
}

.product-features {
    background: #1e1e1e;
    border-radius: 8px;
    margin-bottom: 25px;
}

.features-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
}

.features-list {
    padding: 0px;
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

.features-list li:last-child {
    border-bottom: none;
}

.feature-label {
    font-weight: 500;
    color: #DDD;
}

.feature-value {
    color: #DDD;
}

/* Purchase Section */
.purchase-section {
    background: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #eee;
    border-radius: 4px;
    font-weight: bold;
}

.quantity-input {
    width: 50px;
    color: #1e1e1e !important;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.main-image-container {
    position: relative;
    display: inline-block;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid white;
    margin-bottom: 20px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.3s ease;
    cursor: pointer;
    z-index: 2;
}

.favorite-btn .heart-icon {
    pointer-events: none;
}

.heart-icon {
    transition: fill 0.3s ease, stroke 0.3s ease;
    width: 36px;
    height: 36px;
}

.quantity-selector {
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-label {
    font-weight: 500;
    color: #DDD;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-btn {
    background: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 16px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.btn-outline {
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.shipping-info {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.shipping-title {
    font-weight: 600;
    color: #28A745;
    margin-bottom: 8px;
}

.shipping-text {
    color: #155724;
    font-size: 14px;
}

/* Related Products */
.related-section {
    margin: 2%;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 20px;
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #ffffff;
}

.related-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-product {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.related-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-product img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-product-info {
    padding: 15px;
}

.related-product-name {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #DDD;
}

.related-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #0B93F2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 25px;
    }

    .product-title {
        font-size: 24px;
    }

    .current-price {
        font-size: 28px;
    }

    .action-buttons {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 15px;
        margin: -15px;
        border-top: 1px solid #e0e0e0;
    }

    .related-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-detail-container {
    animation: fadeIn 0.6s ease-out;
}

.row {
    width: 100%;
    display: flex;
    align-items: flex-start;
}

/* Sidebar */
.sidebar {
    margin-top: 10px;
    border-radius: 0px 10px 10px 0px;
    background-color: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: fixed;
}

.sidebar.collapsed {
    width: 40px;
}

.toggle-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 5px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    width: 30px;
    height: 60px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 1001;
}

.toggle-btn:hover {
    background-color: #444;
    border-color: #666;
}

.sidebar.collapsed .toggle-btn {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-content {
    padding: 1.4rem;
    padding-right: 36px;
    height: 78vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    padding: 60px 0 1.5rem;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.sidebar-content h5 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.filter-section {
    margin-bottom: 2rem;
}

.sidebar-content h6 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: #cccccc;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding-left: 1rem;
}

.price-range {
    margin-bottom: 1rem;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 0.5rem;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
    accent-color: #ffffff;
}

.checkbox-item label {
    color: #cccccc;
    cursor: pointer;
    transition: color 0.3s ease;
}

.checkbox-item:hover label {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar.expanded {
        flex: 0 0 220px;
        width: 220px;
        min-width: 220px;
    }

    .main-content {
        padding: 20px;
    }
}