
#cart_root {
    height: 100%;
    padding: 10px;
}
    /* Mini Cart Custom Styles */
.mini-cart-custom {
    position: relative;
    max-width: 700px;
    margin: auto;
    height: 100%;
}

.empty-cart {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Cart Items */
.mini-cart-items {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 90%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap : 10px
}

.mini-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #ccc;
    position: relative;
    border-radius: 14px;
}

.mini-cart-item .thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.mini-cart-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.mini-cart-item .details {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.mini-cart-item .title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 4px;
    border-radius: 4px;
}

.quantity-controls button {
    width: 28px;
    height: 28px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: none;
    border-radius: 50px;
    color: black
}

.quantity-controls button:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
}

.quantity-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quantity-controls input.qty {
    width: 30px;
    height: 28px;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    background: none;
}


input[type=number].qty::-webkit-inner-spin-button,
input[type=number].qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number].qty {
    -moz-appearance: textfield;
}

.mini-cart-item .price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
}

.title-price {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 100%;
    gap: 10px
}

.mini-cart-item .remove {
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
    padding: 4px 6px;
    border-radius: 4px;
    background: none;
}

.mini-cart-item .remove:hover svg {
    filter: brightness(0) invert(1)
}

.remove-quantity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.mini-cart-item .remove:hover {
    background: #ff4444;
    color: #fff;
}

/* Coupon Form */
.mini-cart-coupon {
    display: flex;
    gap: 8px;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.mini-cart-coupon input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.mini-cart-coupon button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.mini-cart-coupon button:hover {
    background: var(--primary-color);
}

/* Applied Coupons */
.applied-coupons {
    padding: 10px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.coupon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
}

.coupon-item:last-child {
    margin-bottom: 0;
}

.coupon-code {
    font-family: monospace;
    font-weight: 600;
    color: #4CAF50;
    font-size: 13px;
}

.remove-coupon {
    width: 20px;
    height: 20px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
}

.remove-coupon:hover {
    background: #ff4444;
    color: #fff;
}

/* Cart Totals */
.cart-totals {
    padding: 15px;
    background: none;
    border: 1px solid #eee;
    border-radius: 14px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.discount-row {
    color: #4CAF50;
}

.final-total-row {
    border-top: 2px solid #ddd;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 16px;
}

/* Checkout Button */
.checkout-btn {
    display: block;
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 0;
    background: var(--primary-color);
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
    border-radius: 14px;
    font-size: 12px
}

.checkout-btn:hover {
    background: var(--primary-color);
}

/* Messages */
.mini-cart-message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.mini-cart-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mini-cart-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.mini-cart-custom.loading {
    opacity: 0.6;
    pointer-events: none;
}

/*popup form*/

.svg-coupon-container svg {
    width: 100%;
    display: flex
}

.svg-coupon-container svg path{
    stroke : var(--primary-color)
}

#popup-toggle {
  display: none;
}

.popup-btn {
  padding: 10px ;
  background: blue;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.applied-coupons {
    padding: 10px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.mini-cart-coupon {
    display: flex;
    gap: 8px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    flex-direction: column;
    width: 100%;
}

.popup-content {
    background: white;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex-direction: column;
}

.popup-close,
.popup-close-btn {
  cursor: pointer;
}

.popup-close {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.popup-close-btn {
  display: block;
  margin-top: 20px;
  background: red;
  color: white;
  padding: 10px;
  text-align: center;
}

#popup-toggle:checked + .popup-btn + .popup-overlay {
  display: flex;
}

.side-cart-bottom {
    position: absolute; 
    height: 10%; 
    bottom: 0; 
    width: 100%; 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    padding: 10px; 
    max-width: 700px; 
    margin: auto;
    inset-inline: 0;
}


.cart-loader, .product-loader, .wishlist-loader {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page Transition Loader - Checkout */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.page-transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

.page-transition-loader {
  width: 50px;
  height: 50px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-transition-loader::before,
.page-transition-loader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
}

.page-transition-loader::before {
  width: 50px;
  height: 50px;
  margin-top: -25px;
  margin-left: -25px;
  border: 3px solid transparent;
  border-top-color: var(--primary-color);
  border-right-color: var(--primary-color);
  animation: loader-spin 0.8s linear infinite;
}

.page-transition-loader::after {
  width: 30px;
  height: 30px;
  margin-top: -15px;
  margin-left: -15px;
  border: 3px solid transparent;
  border-bottom-color: var(--primary-color);
  border-left-color: var(--primary-color);
  opacity: 0.6;
  animation: loader-spin 1.2s linear infinite reverse;
}

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

.page-transition-text {
  margin-top: 20px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Dots animation */
.page-transition-dots {
  display: flex;
  gap: 6px;
  margin-top: 24px;
}

.page-transition-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: bounce-dot 1.4s ease-in-out infinite both;
}

.page-transition-dots span:nth-child(1) { animation-delay: 0s; }
.page-transition-dots span:nth-child(2) { animation-delay: 0.2s; }
.page-transition-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce-dot {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
