/**
 * NP Ajax Cart Popup CSS
 */

#np-ajax-add-to-cart {
  background-color: #000000 !important;
  width: 100%;
}

/* Styling για το κουμπί "ΠΡΟΣΘΗΚΗ ΣΤΟ ΚΑΛΑΘΙ" με slide effect */
#np-ajax-add-to-cart {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  #np-ajax-add-to-cart .elementor-button-text {
    display: inline-block;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    position: relative;
  }
  
  /* Προσθήκη του εικονιδίου καλαθιού με pseudo-element */
  #np-ajax-add-to-cart:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="white" d="M0 3c0-0.552 0.448-1 1-1v0h3c0.466 0 0.858 0.319 0.968 0.751l0.002 0.007 0.81 3.242h23.22c0.552 0.001 0.999 0.448 0.999 1 0 0.065-0.006 0.129-0.018 0.19l0.001-0.006-3 16c-0.090 0.467-0.495 0.816-0.982 0.816h-18c-0.487-0-0.892-0.349-0.981-0.81l-0.001-0.006-2.998-15.97-0.8-3.214h-2.22c-0.552 0-1-0.448-1-1v0zM6.204 8l2.626 14h16.34l2.626-14h-21.592zM10 24c-2.209 0-4 1.791-4 4s1.791 4 4 4v0c2.209 0 4-1.791 4-4s-1.791-4-4-4v0zM24 24c-2.209 0-4 1.791-4 4s1.791 4 4 4v0c2.209 0 4-1.791 4-4s-1.791-4-4-4v0zM10 26c1.105 0 2 0.895 2 2s-0.895 2-2 2v0c-1.105 0-2-0.895-2-2s0.895-2 2-2v0zM24 26c1.105 0 2 0.895 2 2s-0.895 2-2 2v0c-1.105 0-2-0.895-2-2s0.895-2 2-2v0z"></path></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }
  
  /* Hover effect */
  #np-ajax-add-to-cart:hover .elementor-button-text {
    transform: translateY(100%);
    opacity: 0;
  }
  
  #np-ajax-add-to-cart:hover:after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  
/* Cart Icon */
.np-cart-icon-wrapper {
  position: relative;
  display: inline-block;
  top: 3px;
}

.np-cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

.np-cart-icon svg {
  width: 24px;
  height: 24px;
}

/* Cart Bubble */
.np-cart-bubble {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background-color: #444444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  padding: 0 4px;
  box-sizing: border-box;
}

/* Popup Container */
.np-ajax-cart-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

.np-ajax-cart-popup.active {
  visibility: visible;
}

/* Overlay */
.np-ajax-cart-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.np-ajax-cart-popup.active .np-ajax-cart-popup-overlay {
  opacity: 1;
}

/* Offcanvas Content */
.np-ajax-cart-popup-content {
  position: fixed;
  top: 0;
  right: -400px; /* Start offscreen */
  width: 100%;
  max-width: 45%;
  height: 100%;
  background-color: #F1F0ED;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.np-ajax-cart-popup.active .np-ajax-cart-popup-content {
  right: 0; /* Slide in */
}

/* Popup Header */
.np-ajax-cart-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 20px;
  border-bottom: 1px solid #eee;
  /* background-color: #f8f8f8; */
}

.np-ajax-cart-popup-header h2 {
  margin: 0;
  font-size: 24px;
  color: #67645e;
  text-transform: uppercase;
}

.np-ajax-cart-popup-close {
  background: none;
  border: none;
  font-size: 60px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
  line-height: 0;
  position: relative;
  top: -10px;
}

.np-ajax-cart-popup-close:hover {
  color: #333;
}

/* Popup Body */
.np-ajax-cart-popup-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Loading Spinner */
.np-ajax-cart-popup-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.np-ajax-cart-popup-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: np-ajax-cart-spin 1s linear infinite;
}

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

/* Empty Cart */
.np-ajax-cart-empty {
  text-align: center;
  padding: 30px 0;
}

.np-ajax-cart-empty-message {
  font-size: 18px;
  margin-bottom: 20px;
  color: #666;
}

/* Cart Table */
.np-ajax-cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.np-ajax-cart-table th,
.np-ajax-cart-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.np-ajax-cart-table th {
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
}

.np-ajax-cart-remove {
  width: 30px;
  text-align: center;
}

.np-ajax-cart-thumbnail {
  width: 80px;
}

.np-ajax-cart-thumbnail img {
  max-width: 90px;
  height: auto;
  display: block;
  border-radius: 5px;
}

.np-ajax-cart-remove-item {
  display: inline-block;
  font-size: 28px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.np-ajax-cart-remove-item:hover {
  color: #e74c3c;
}

.np-ajax-cart-table .np-ajax-cart-subtotal .woocommerce-Price-amount {
	font-weight: 600;
}

/* Cart Item Quantity */
.np-ajax-cart-quantity {
  text-align: center;
}

.np-ajax-cart-quantity-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0;
  max-width: 105px;
}

.np-ajax-cart-qty {
  width: 40px;
  height: 38px;
  text-align: center;
  border: none;
  border-left: none;
  border-right: none;
  padding: 0 5px;
  -moz-appearance: textfield; /* Firefox */
  background-color: transparent;
}

/* Hide number input spinners */
.np-ajax-cart-qty::-webkit-outer-spin-button,
.np-ajax-cart-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

/* For Firefox */
.np-ajax-cart-qty[type=number] {
  -moz-appearance: textfield;
}

.np-ajax-cart-quantity-btn {
  width: 36px;
  height: 38px;
  background: transparent;
  border: 1px solid #ddd;
  color: #333;
  font-size: 1.4em;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  user-select: none;
  border: none;
  margin-left: 0;
}

.np-ajax-cart-quantity-btn:hover {
  background: #e8e8e8;
}

.np-ajax-cart-quantity-btn:active {
  background: #e0e0e0;
}

.np-ajax-cart-quantity-minus {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.np-ajax-cart-quantity-plus {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
}

/* Disabled state for buttons */
.np-ajax-cart-quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cart Actions */
.np-ajax-cart-actions {
  margin-bottom: 20px;
  text-align: right;
}

.np-ajax-cart-actions .button.np-ajax-cart-update {
  display: none;
}

/* Cart Totals */
.np-ajax-cart-totals {
  /* background-color: #f8f8f8; */
  padding: 20px;
  border-radius: 5px;
}

.np-ajax-cart-totals-table {
  width: 100%;
  margin-bottom: 20px;
}

.np-ajax-cart-totals-table th,
.np-ajax-cart-totals-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.np-ajax-cart-totals-table th {
  font-weight: 600;
  color: #333;
}

.np-ajax-cart-totals-table td {
  text-align: right;
}

.np-ajax-cart-total th,
.np-ajax-cart-total td {
  font-weight: 700;
  font-size: 1.4em;
  border-bottom: none;
}

/* Checkout Button */
.np-ajax-cart-checkout {
  text-align: center;
}
#np-ajax-cart-popup .np-ajax-cart-checkout a {
	width: 100%;
	background: #222;
	border: none;
	border-radius: 2px;
	-webkit-box-shadow: none;
	box-shadow: none;
	color: #fff;
	font-size: 1.1em;
	font-weight: 700;
	letter-spacing: 1px;
	margin-left: .7em;
	padding: .8em 2em;
	text-transform: uppercase;
	-webkit-transition: background .2s,color .2s;
	transition: background .2s,color .2s;
}


.np-ajax-cart-checkout-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #2ecc71;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.np-ajax-cart-checkout-button:hover {
  background-color: #27ae60;
}

/* Buttons */
.np-ajax-cart-popup .button {
  padding: 10px 15px;
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #333;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.np-ajax-cart-popup .button:hover {
  background-color: #eee;
}

/* Responsive */
@media (max-width: 768px) {
  .np-ajax-cart-popup-content {
    width: 95%;
    max-width: 95%;
    max-height: 95vh;
  }

  .np-ajax-cart-table thead {
    display: none;
  }

  .np-ajax-cart-table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #eee;
  }

  .np-ajax-cart-table td {
    display: block;
    text-align: right;
    border-bottom: 1px solid #eee;
    padding: 10px;
  }

  .np-ajax-cart-table td:before {
    content: attr(data-title) ": ";
    float: left;
    font-weight: 600;
  }

  .np-ajax-cart-table td.np-ajax-cart-thumbnail,
  .np-ajax-cart-table td.np-ajax-cart-remove {
    text-align: center;
  }

  .np-ajax-cart-table td.np-ajax-cart-thumbnail:before,
  .np-ajax-cart-table td.np-ajax-cart-remove:before {
    display: none;
  }

  .np-ajax-cart-actions {
    text-align: center;
  }

  .np-ajax-cart-checkout {
    text-align: center;
  }
}
