/* ====================================
   MODAL DE VARIA��ES DE PRODUTOS
   IZI STYLE - Sistema de Carrinho
   ==================================== */

/* Overlay do Modal */
.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Container do Modal */
.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Bot�o Fechar */
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: none;
  background: #f9f9f9;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  color: #333;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.close-modal:hover {
  background: #f70a31;
  color: white;
  transform: rotate(90deg);
}

/* Layout do Modal (2 colunas) */
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Coluna Esquerda: Imagem */
.modal-product-image-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9f9;
  border: 1px solid #eee;
}

.modal-product-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* Coluna Direita: Informa��es */
.modal-product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-product-info h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.modal-product-price {
  font-size: 28px;
  font-weight: 700;
  color: #f70a31;
  margin: 0;
}

/* Se��es de Op��es */
.modal-options-section {
  margin-bottom: 20px;
}

.modal-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  color: #333;
  letter-spacing: 0.5px;
}

/* Grid de Op��es (Tamanho/Cor) */
.modal-options-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Bot�es de Op��es */
.size-option,
.color-option {
  padding: 12px 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  min-width: 60px;
  text-align: center;
}

.size-option:hover,
.color-option:hover {
  border-color: #f70a31;
  background: #fff5f7;
}

.size-option.selected,
.color-option.selected {
  background: #f70a31;
  color: white;
  border-color: #f70a31;
  transform: scale(1.05);
}

/* Bot�o Adicionar ao Carrinho */
.btn-modal-add {
  width: 100%;
  padding: 16px 24px;
  background: #f70a31;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.btn-modal-add:hover {
  background: #c40827;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 10, 49, 0.3);
}

.btn-modal-add:active {
  transform: translateY(0);
}

/* Notifica��es Toast */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 30px;
  background: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 11000;
  animation: slideInRight 0.3s ease;
  max-width: 350px;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.cart-notification.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.cart-notification.success {
  border-left: 4px solid #10b981;
}

.cart-notification.success i {
  color: #10b981;
  font-size: 20px;
}

.cart-notification.warning {
  border-left: 4px solid #f59e0b;
}

.cart-notification.warning i {
  color: #f59e0b;
  font-size: 20px;
}

.cart-notification.info {
  border-left: 4px solid #3b82f6;
}

.cart-notification.info i {
  color: #3b82f6;
  font-size: 20px;
}

.cart-notification span {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* Responsivo */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 20px;
    max-height: 95vh;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .modal-product-info h2 {
    font-size: 20px;
  }
  
  .modal-product-price {
    font-size: 24px;
  }
  
  .size-option,
  .color-option {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .btn-modal-add {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .cart-notification {
    top: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 15px;
  }

  .close-modal {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .modal-options-grid {
    gap: 8px;
  }

  .size-option,
  .color-option {
    padding: 8px 12px;
    font-size: 12px;
    min-width: 50px;
  }
}

/* ====================================
   MINI-CART (Sidebar do Carrinho)
   ==================================== */

.mini-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mini-cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mini-cart-container {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  z-index: 10002;
}

.mini-cart-overlay.open .mini-cart-container {
  right: 0;
}

.mini-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.mini-cart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-cart-header h3 i {
  color: #f70a31;
}

.mini-cart-close {
  width: 36px;
  height: 36px;
  border: none;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  color: #666;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-cart-close:hover {
  background: #f70a31;
  color: white;
}

.mini-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.mini-cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.mini-cart-empty i {
  font-size: 48px;
  margin-bottom: 15px;
  color: #ddd;
}

.mini-cart-empty p {
  margin: 0;
  font-size: 14px;
}

.mini-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 10px;
}

.mini-cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}

.mini-cart-item-info {
  flex: 1;
  min-width: 0;
}

.mini-cart-item-name {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart-item-price {
  margin: 0;
  font-size: 13px;
  color: #666;
}

.mini-cart-item-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  color: #999;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-cart-item-remove:hover {
  background: #f70a31;
  color: white;
}

.mini-cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  background: #f9f9f9;
}

.mini-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 700;
}

.mini-cart-total span:last-child {
  color: #f70a31;
  font-size: 20px;
}

.btn-mini-cart-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  text-align: center;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}

/* Estilo para botoes de opcao do modal */
.modal-option-btn {
  padding: 12px 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  min-width: 60px;
  text-align: center;
}

.modal-option-btn:hover {
  border-color: #f70a31;
  background: #fff5f7;
}

.modal-option-btn.selected {
  background: #f70a31;
  color: white;
  border-color: #f70a31;
  transform: scale(1.05);
}

/* Responsivo Mini-Cart */
@media (max-width: 480px) {
  .mini-cart-container {
    width: 100%;
    max-width: 100%;
  }

  .mini-cart-header {
    padding: 15px;
  }

  .mini-cart-items {
    padding: 10px;
  }

  .mini-cart-item {
    padding: 10px;
  }

  .mini-cart-item img {
    width: 50px;
    height: 50px;
  }
}