/**
 * Sandro Mini Cart Styles
 * Clean, minimal design with sharp edges, 1px borders, and slide-in animation
 * Matches the Sandro design system specifications exactly
 */

/* =============================================================================
   SANDRO MINI CART CONTAINER & ANIMATIONS
   ============================================================================= */

.sandro-mini-cart-container {
    font-family: 'supremo', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background: #ffffff;
    color: #000000;
    width: 50vw;
    min-width: 600px;
    max-width: 800px;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid #e5e5e5;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Show mini cart with slide-in animation */
.panel-open-cart .sandro-mini-cart-container,
.sandro-mini-cart-container.is-open {
    transform: translateX(0);
}

/* Overlay behind mini cart */
.sandro-mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.panel-open-cart .sandro-mini-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when cart is open */
body.sandro-cart-open {
    overflow: hidden;
}

/* =============================================================================
   MINI CART HEADER
   ============================================================================= */

.sandro-mini-cart-header {
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    flex-shrink: 0;
}

.sandro-mini-cart-title {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
    color: #000000;
    text-align: left;
}

/* Close button */
.sandro-mini-cart-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.sandro-mini-cart-close:hover {
    color: #000000;
}

.sandro-mini-cart-close svg {
    stroke: #000000;
}

/* =============================================================================
   MINI CART ITEMS
   ============================================================================= */

.sandro-mini-cart-items {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}

.sandro-mini-cart-items .woocommerce-mini-cart {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sandro-mini-cart-item {
    display: flex;
    padding: 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff;
    position: relative;
}

.sandro-mini-cart-item:last-child {
    border-bottom: 1px solid #e5e5e5;
}

.sandro-mini-cart-item:hover {
    background: #ffffff;
}

/* =============================================================================
   ITEM IMAGE
   ============================================================================= */

.sandro-mini-cart-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 120px;
    margin-right: 16px;
    position: relative;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 0;
}

.sandro-mini-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.sandro-sale-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #000000;
    color: #ffffff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 4px 6px;
    border-radius: 0;
    text-transform: uppercase;
    line-height: 1;
}

/* =============================================================================
   ITEM DETAILS
   ============================================================================= */

.sandro-mini-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.sandro-mini-cart-item-info {
    flex: 1;
}

.sandro-mini-cart-item-title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    line-height: 1.2;
    color: #000000;
}

.sandro-mini-cart-item-title a {
    color: #000000;
    text-decoration: none;
}

.sandro-mini-cart-item-title a:hover {
    color: #000000;
}

.sandro-mini-cart-item-price {
    margin-bottom: 12px;
    margin-top: 4px;
}

.sandro-current-price {
    font-weight: 400;
    color: #000000;
    font-size: 15px;
}

.sandro-original-price {
    text-decoration: line-through;
    color: #737373;
    font-size: 13px;
    margin-left: 8px;
}

.sandro-discount-percentage {
    background: #000000;
    color: #ffffff;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 0;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sandro-mini-cart-item-attributes {
    margin-bottom: 12px;
}

.sandro-mini-cart-attribute {
    font-size: 12px;
    color: #000000;
    margin-bottom: 4px;
    line-height: 1.2;
}

.sandro-attribute-label {
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sandro-attribute-value {
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 400;
}

/* =============================================================================
   ITEM ACTIONS
   ============================================================================= */

.sandro-mini-cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.sandro-mini-cart-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sandro-quantity-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #666666;
}

.sandro-quantity-value {
    font-size: 12px;
    font-weight: 700;
    color: #000000;
}

.sandro-quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    overflow: hidden;
}

.sandro-quantity-minus,
.sandro-quantity-plus {
    background: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sandro-quantity-minus:hover,
.sandro-quantity-plus:hover {
    background: #f5f5f5;
    color: #000000;
}

.sandro-quantity-minus:disabled,
.sandro-quantity-plus:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sandro-quantity-input {
    border: none;
    width: 40px;
    height: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #000000;
    background: #ffffff;
    border-left: 1px solid #eeeeee;
    border-right: 1px solid #eeeeee;
}

.sandro-quantity-input:focus {
    outline: none;
    background: #fafafa;
}

.sandro-remove-item {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0;
    transition: none;
    color: #000000;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.sandro-remove-item:hover {
    background: none;
    color: #666666;
}

.sandro-remove-item svg {
    stroke: #000000;
}

.sandro-remove-icon {
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
}

/* =============================================================================
   MINI CART SUMMARY
   ============================================================================= */

.sandro-mini-cart-summary {
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.sandro-mini-cart-subtotal {
    padding: 24px 24px 20px;
}

.sandro-summary-line {
    display: flex;
    justify-content: "space-between";
    align-items: center;
    margin-bottom: 12px;
}

.sandro-summary-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000000;
}

.sandro-summary-value {
    font-size: 15px;
    font-weight: 400;
    color: #000000;
}

.sandro-applied-coupons {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 0;
}

.sandro-applied-coupon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

/* Promotional Text Section */
.sandro-promotional-text {
    padding: 16px 24px;
    background: #f8f8f8;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sandro-promo-item {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #666666;
    text-align: center;
    flex: 1;
    position: relative;
}

.sandro-promo-item:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: #cccccc;
    font-size: 8px;
}

.sandro-coupon-code {
    font-weight: 500;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sandro-coupon-discount {
    font-weight: 400;
    color: #000000;
}

/* =============================================================================
   FEATURES SECTION
   ============================================================================= */

.sandro-mini-cart-features {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.sandro-mini-cart-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.sandro-mini-cart-feature-text {
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
}

/* =============================================================================
   MINI CART BUTTONS
   ============================================================================= */

.sandro-mini-cart-buttons {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 33px;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
}

.sandro-view-basket-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid #000000;
    border-radius: 0;
    background: #ffffff;
    color: #000000;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1px;
}

.sandro-view-basket-btn:hover {
    background: #000000;
    color: #ffffff;
    text-decoration: none;
}

/* =============================================================================
   EMPTY CART STATE
   ============================================================================= */

.sandro-mini-cart-empty {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sandro-empty-cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.sandro-empty-cart-icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.sandro-empty-cart-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    color: #000000;
}

.sandro-empty-cart-message {
    font-size: 14px;
    color: #737373;
    margin: 0 0 32px 0;
    line-height: 1.4;
}

.sandro-continue-shopping {
    display: inline-block;
    padding: 16px 32px;
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid #000000;
    border-radius: 0;
    transition: all 0.2s ease;
}

.sandro-continue-shopping:hover {
    background: #ffffff;
    color: #000000;
    text-decoration: none;
}

/* =============================================================================
   LOADING STATE
   ============================================================================= */

.sandro-mini-cart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.sandro-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eeeeee;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: sandro-spin 1s linear infinite;
}

@keyframes sandro-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================================
   ITEM LOADING STATE
   ============================================================================= */

.sandro-mini-cart-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.sandro-mini-cart-item.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 5;
}


/* =============================================================================
   MINI CART ADVANCED STYLING (inspired by sandro.com), by Chima Studios
   ============================================================================= */

/* Ensure image container matches item height */
#sandro-mini-cart-panel .woocommerce-mini-cart .sandro-mini-cart-item-image{
	width: 160px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Force thumbnails to fill container height and crop if necessary */
#sandro-mini-cart-panel a .attachment-woocommerce_thumbnail{
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* Sandro mini cart item */
#sandro-mini-cart-panel .woocommerce-mini-cart .sandro-mini-cart-item{
	min-height:initial;
	border-bottom-color:#020202;
	border-bottom-width:1px !important;
	padding-bottom:0px;
	padding-left:0px;
	padding-top:0px;
	margin-bottom:0px;
	justify-content:center;
	align-items:center;
}

/* Bdi */
#sandro-mini-cart-panel .sandro-current-price bdi{
	font-size:12px;
}

/* Link */
#sandro-mini-cart-panel .sandro-mini-cart-item-info a{
	font-family:'supremoflat'!important;
	font-weight:400;
}

/* Sandro summary line */
#sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-summary-line{
	justify-content:space-between;
	font-family:'supremoflat';
	font-size:13px;
}

/* Bdi */
#sandro-mini-cart-panel .sandro-summary-line bdi{
	font-size:13px;
}

/* Sandro view basket */
#sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-view-basket-btn{
	padding-top:12px;
	padding-bottom:12px;
	background-color:#020202;
	color:#ffffff;
	font-family:'supremotall' !important;
	font-size:11px;
}

/* Sandro mini cart subtotal */
#sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-mini-cart-subtotal{
	border-bottom-style:none;
	border-top-style:solid;
	border-top-color:#020202;
	border-top-width:1px !important;
	padding-top:12px;
	padding-right:12px;
	padding-bottom:0px;
}

/* Sandro mini cart subtotal */
#temp-mini-cart-holder #sandro-mini-cart-panel #sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-mini-cart-checkout-section .sandro-mini-cart-subtotal{
	border-top-width:1px !important;
}

/* Sandro mini cart buttons */
#sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-mini-cart-buttons{
	border-top-style:none;
	padding-top:15px;
}

/* Sandro mini cart header */
#sandro-mini-cart-panel .sandro-mini-cart-header{
	border-bottom-color:#020202;
}

/* Sandro mini cart header */
#temp-mini-cart-holder #sandro-mini-cart-panel #sandro-mini-cart-panel .sandro-mini-cart-header{
	border-bottom-width:1px !important;
}

/* Sandro mini cart item details */
#sandro-mini-cart-panel .woocommerce-mini-cart .sandro-mini-cart-item-details{
	justify-content:normal;
	padding-top:15px;
	padding-bottom:15px;
	display:block;
}

/* Sandro promotional text */
#sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-promotional-text{
	background-color:transparent;
	border-top-style:none;
	padding-left:0px;
	padding-right:0px;
}

/* Sandro mini cart summary */
#sandro-mini-cart-panel .sandro-mini-cart-summary{
	border-top-style:none;
}

/* Sandro promo item */
#sandro-mini-cart-panel .sandro-promotional-text .sandro-promo-item{
	font-family:'supremotall'!important;
	color:#141414;
}

/* Sandro quantity label */
#sandro-mini-cart-panel .woocommerce-mini-cart .sandro-quantity-label{
	color:#020202;
	font-weight:400;
}

/* Sandro quantity value */
#sandro-mini-cart-panel .woocommerce-mini-cart .sandro-quantity-value{
	font-weight:400;
}

/* Sandro view basket (hover) */
#sandro-mini-cart-panel .sandro-mini-cart-summary .sandro-view-basket-btn:hover{
	background-color:#2d2d2d;
}

.widget_shopping_cart_content .product_list_widget {
    opacity: 1;
    padding: 0 0!important;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .sandro-mini-cart-container {
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
    }
    
    .sandro-mini-cart-header {
        padding: 16px 20px;
    }
    
    .sandro-mini-cart-close {
        top: 16px;
        right: 20px;
    }
    
    .sandro-mini-cart-item {
        padding: 20px;
    }
    
    .sandro-mini-cart-item-image {
        width: 70px;
        height: 105px;
        margin-right: 12px;
    }
    
    .sandro-mini-cart-item-title {
        font-size: 12px;
    }
    
    .sandro-mini-cart-subtotal {
        padding: 20px;
    }
    
    .sandro-mini-cart-features {
        padding: 16px 20px;
    }
    
    .sandro-mini-cart-buttons {
        padding: 20px;
    }
    
    .sandro-view-basket-btn {
        padding: 14px 20px;
        font-size: 12px;
    }


}

@media (max-width: 480px) {
    .sandro-mini-cart-item-image {
        width: 60px;
        height: 90px;
    }
    
    .sandro-mini-cart-feature-text {
        font-size: 11px;
    }
}

/* =============================================================================
   INTEGRATION WITH EXISTING GOYA THEME
   ============================================================================= */

/* Override Goya's existing mini cart styles when Sandro mini cart is active */
#side-cart .sandro-mini-cart-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#side-cart .sandro-mini-cart-items {
    flex: 1;
    overflow-y: auto;
}

/* Hide original Goya mini cart elements when Sandro is active */
.sandro-mini-cart-container ~ .widget_shopping_cart_content,
.sandro-mini-cart-container ~ .et-cart-empty,
.sandro-mini-cart-container ~ .cart-panel-summary {
    display: none !important;
}

/* Animation for mini cart updates */
.sandro-mini-cart-item {
    animation: sandro-fade-in 0.3s ease-in-out;
}

@keyframes sandro-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quantity input styling improvements */
.sandro-quantity-input::-webkit-outer-spin-button,
.sandro-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sandro-quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Focus states for accessibility */
.sandro-quantity-minus:focus,
.sandro-quantity-plus:focus,
.sandro-quantity-input:focus,
.sandro-remove-item:focus,
.sandro-view-basket-btn:focus,
.sandro-checkout-btn:focus,
.sandro-continue-shopping:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .sandro-mini-cart-container {
        border: 2px solid #000000;
    }
    
    .sandro-mini-cart-item {
        border-bottom: 2px solid #000000;
    }
    
    .sandro-summary-line {
        border-bottom: 1px solid #000000;
    }
}

button.sandro-remove-item {
    border: 1px solid;
    padding-bottom: 20px;
}