/**
 * Plugin Stylesheet: Custom WooCommerce Mini-Cart
 * Using unique 'rinca' prefix to prevent theme/Elementor interference
 * No !important tags needed with unique class names
 */

 body {
    /* The order is important: 
       1. Mulish (Primary Font)
       2. Crimson Pro (Fallback Serif Font)
       3. sans-serif (Universal Fallback for safety)
    */
    font-family: "Mulish", "Crimson Pro", sans-serif;
}

/* --- Cart Item List Item Styles --- */
.elementor-menu-cart__close-button {
  display: none !important;
}

.elementor-menu-cart__main {
  width: 30% !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.cart_list.woocommerce-mini-cart.rinca-cart-list {
  padding: 20px;
 flex: 1;
  overflow-y: auto;
}

.rinca-cart-list .rinca-cart-item {
  padding: 0; 
  border: none;
  list-style: none;
  margin: 0;
}

/* Main wrapper - 2 columns layout */
.rinca-item-wrapper {
    display: flex;
    gap: 15px;
    padding: 15px 0;
}

/* Column 1: Product Image */
.rinca-item-image {
    flex: 0 0 80px; 
    width: 80px;
    display: flex;
    justify-content: center;
}

.rinca-item-image > a > img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
    display: block;
    position: relative;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    top: 0;
    transform: none;
    object-fit: cover;
}

.rinca-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Column 2: Product Details */
.rinca-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Row 1: Product Name and Price */
.rinca-item-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.rinca-item-name {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    font-family: "Mulish", sans-serif;
    line-height: 1.4;
}

.rinca-item-name:hover {
  text-decoration: underline;
}

.rinca-item-name a {
    text-decoration: none;
    color: black;
    width: fit-content;
}

.rinca-item-name a:hover {
    color: #000;
}

.rinca-item-price {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Row 2: Quantity and Remove Button */
.rinca-item-row-2 {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 10px;
}

/* Remove button */
.rinca-remove-btn {
  position: relative;
  color: black;
  opacity: 1;
  top: 0;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1;
  width: auto;
  height: auto;
  display: inline-block;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.rinca-remove-btn:hover {
  background: none;
  color: #c00;
  border: none;
  opacity: 1;
}

.rinca-remove-btn:before {
    border: none;
    content: '';
}

/* --- Quantity Input Styles --- */

/* Hide Quantity Input Arrows (Native Browser Controls) */
.rinca-qty-wrapper input[type=number]::-webkit-outer-spin-button,
.rinca-qty-wrapper input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

/* Quantity Wrapper Styles */
.rinca-qty-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #c8c8c8;
  width: fit-content;
  background: white;
}

.rinca-qty-wrapper > .rinca-qty-btn {
  background-color: white;
  color: black;
  box-shadow: none;
  padding: 5px;
  font-size: 1.3rem;
  width: fit-content;
  height: fit-content;
  border: none;
  cursor: pointer;
  line-height: 1;
  margin: 0;
  min-width: auto;
  min-height: auto;
  display: inline-block;
  text-align: center;
}

.rinca-qty-wrapper > .rinca-qty-btn:hover {
  background-color: #f5f5f5;
  color: black;
  border: none;
}

.rinca-qty-wrapper > .rinca-qty-btn:focus {
  outline: none;
  box-shadow: none;
}

/* Quantity Input Styles */
.rinca-qty-wrapper > .rinca-qty-input {
  padding: 0; 
  border: none;
  width: 40px; 
  min-height: 15px; 
  font-size: 1rem;
  color: black;
  height: 30px;
  text-align: center;
  background: white;
  margin: 0;
  box-shadow: none;
  line-height: 30px;
}

.rinca-qty-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

/* --- Free Shipping Progress Bar Styles --- */



.rinca-shipping-bar {
    padding: 10px 0 0 0;
    background: transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;

}

.rinca-shipping-bar.qualified {
    background: #d4edda;
}

.rinca-shipping-message {
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
    line-height: 1.4;
}

.rinca-shipping-message strong {
    font-weight: 600;
    color: #000;
}

.rinca-shipping-message .qualified {
    color: #155724;
    font-weight: 600;
    font-size: 15px;
}

.rinca-progress-bar {
    width: 100%;
    height: 15px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.rinca-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.rinca-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: rinca-shimmer 2s infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .rinca-shipping-bar {
        padding: 12px;
    }
    
    .rinca-shipping-message {
        font-size: 13px;
    }
    .elementor-menu-cart__main {
        width: 100% !important;
}
}

/* --- CROSS-SELL CAROUSEL STYLES --- */

.rinca-crosssell-wrapper {
    list-style: none;
    margin: 0;
    padding: 0;
    border: none;
}

.rinca-crosssell-title {
    font-size: 20px;
    font-weight: 700;
    color: black;
    margin: 15px 0 15px 0;
}

.rinca-crosssell-section > .rinca-crosssell-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: visible;
    padding: 30px 10px 30px 10px;
    background-color: beige;
    border-radius: 10px;
}

.rinca-carousel-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    min-height: 80px;
    transition: height 0.3s ease;
}

/* Individual slide item */
.rinca-crosssell-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    visibility: hidden;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show ONLY the active item */
.rinca-crosssell-item.active {
    visibility: visible;
    position: relative;
    opacity: 1;
}



/* Hide non-active items */
.rinca-crosssell-item:not(.active):not(.animating) {
    display: none;
}

/* When animating, position absolutely to prevent layout shifts */
.rinca-crosssell-item.animating {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Slide animations - REMOVED align-items: flex-start */
.rinca-crosssell-item.slide-in-right {
    animation: rinca-slideInRight 0.3s ease-out forwards;
}

.rinca-crosssell-item.slide-in-left {
    animation: rinca-slideInLeft 0.3s ease-out forwards;
}

.rinca-crosssell-item.slide-out-left {
    animation: rinca-slideOutLeft 0.3s ease-out forwards;
}

.rinca-crosssell-item.slide-out-right {
    animation: rinca-slideOutRight 0.3s ease-out forwards;
}

@keyframes rinca-slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes rinca-slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes rinca-slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes rinca-slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
/* Image container */
.rinca-crosssell-image {
    width: fit-content;
    display: block;

}

.rinca-crosssell-image > a > img.attachment-thumbnail.size-thumbnail {
    width: 80px;
    height: 80px !important;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    position: relative;
    top: 0;
    transform: none;
    margin: 0;
}

/* Details container */
.rinca-crosssell-details {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 50%;
}

.rinca-crosssell-name {
    font-size: 16px;
    font-weight: 600;
    font-family: "Mulish", sans-serif;
    margin: 0;
    line-height: 1.3;
}

.rinca-crosssell-name a {
    color: black;
    text-decoration: none;
}

.rinca-crosssell-name a:hover {
    text-decoration: underline;
}

.rinca-crosssell-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.rinca-crosssell-actions {
    margin-top: 4px;
}

.rinca-crosssell-details > .rinca-crosssell-actions > .rinca-crosssell-add-btn {
    background-color: transparent;
    color: #0B5B50;
    border: 2px solid #0B5B50;
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    box-shadow: none;
    line-height: 1.4;
}

.rinca-crosssell-add-btn:hover {
    background-color: transparent;
    color: black;
    border: 1px solid black;
    box-shadow: none;
}

.rinca-crosssell-add-btn:focus {
    outline: 2px solid black;
    outline-offset: 2px;
}

.rinca-crosssell-add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rinca-crosssell-add-btn.error {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}

/* Navigation Buttons */
.rinca-crosssell-carousel > .rinca-carousel-btn {
    background: transparent;
    border: none;
    color: black;
    padding: 0;
    cursor: pointer;
    font-size: 3rem;
    line-height: 1;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    box-shadow: none;
    min-width: auto;
    min-height: auto;
}

.rinca-crosssell-carousel > .rinca-carousel-btn:hover {
   background-color: transparent;
   color: black;
   opacity: 0.7;
   box-shadow: none;
}

.rinca-crosssell-carousel > .rinca-carousel-btn:focus {
   background-color: transparent;
   color: black;
   box-shadow: none;
   outline: 2px solid black;
   outline-offset: 2px;
}

.rinca-crosssell-carousel > .rinca-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- Footer & Button Overrides --- */

.rinca-footer-fixed {
  flex-shrink: 0;
  width: 100%;
  background-color: white;
  padding: 20px;
  box-sizing: border-box;
  margin: 0;
}

.woocommerce-mini-cart__total.total {
  margin-bottom: 20px;
}

.rinca-cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  border: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.rinca-cart-total strong {
  font-weight: 700;
  color: #3d4246;
}

.rinca-cart-total .woocommerce-Price-amount.amount {
  color: black;
  font-weight: 700;
}



.rinca-cart-buttons {
  padding-top: 0;
  margin: 10px 0 0 0;
}

.rinca-cart-buttons > a.rinca-checkout-btn.button.checkout {
  font-size: 22px;
  padding: 15px 0;
  border-radius: 100px;
  font-weight: 700;
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
  background-color: #0B5B50;
  color: white;
  border: 2px solid #0B5B50;
  box-shadow: none;
  line-height: 1.4;
}

.rinca-cart-buttons > a.rinca-checkout-btn.button.checkout:hover {
  background-color: white;
  color: black;
  border: 2px solid #0B5B50;
  box-shadow: none;
  text-decoration: none;
}

.rinca-cart-buttons > a.rinca-checkout-btn.button.checkout:focus {
  outline: 2px solid #0B5B50;
  outline-offset: 2px;
}

.rinca-cart-buttons > a.rinca-checkout-btn.button.checkout::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.rinca-cart-buttons > a.rinca-checkout-btn.button.checkout:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* --- Header with Close Button --- */

.rinca-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rinca-header-fixed {
  flex-shrink: 0;
  padding: 20px 20px 0 20px;
}

/* Custom Close Button */
.rinca-cart-header > .rinca-close-button {
  background: transparent;
  border: none;
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: all 0.2s ease;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  box-shadow: none;
  min-width: auto;
  min-height: auto;
}

.rinca-cart-header > .rinca-close-button:hover {
  background-color: #f5f5f5;
  color: black;
  box-shadow: none;
}

.rinca-cart-header > .rinca-close-button:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
  box-shadow: none;
}

.rinca-close-button svg {
  width: 25px;
  height: 25px;
  display: block;
}

.rinca-cart-heading {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}