/* Cart Styling for Annapurna Jewelry */

/* Cart notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateX(0);
    display: flex;
    align-items: center;
}

/* Cart link styling */
.cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.cart-link:hover .cart-icon-wrapper {
    transform: translateY(-2px);
}

/* Cart icon wrapper */
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.cart-icon-wrapper i {
    font-size: 1.1rem;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.cart-link:hover .cart-icon-wrapper i {
    color: var(--accent);
}

.cart-text {
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cart-link:hover .cart-text {
    color: var(--accent);
}

/* Cart count badge styling */
.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 20px;
    background-color: var(--accent, #CA8D97);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.3);
    font-family: 'Poppins', sans-serif;
}

/* Cart count animation */
.cart-count-updated {
    animation: cart-count-pulse 1.5s ease-out;
}

@keyframes cart-count-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb, 202, 141, 151), 0.4);
    }
    30% {
        transform: scale(1.3);
        box-shadow: 0 0 0 6px rgba(var(--accent-rgb, 202, 141, 151), 0);
        border-color: rgba(255, 255, 255, 0.6);
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb, 202, 141, 151), 0);
    }
}

.cart-notification.success {
    background-color: #f8f9fa;
    color: var(--secondary);
    border-left: 4px solid var(--primary);
}

/* Enhanced error notifications */
.cart-notification.error {
    background-color: #fff;
    color: #842029;
    border-left: 4px solid #842029;
    box-shadow: 0 4px 12px rgba(132, 32, 41, 0.1);
}

.cart-notification i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.cart-notification.success i {
    color: var(--accent);
}

.cart-notification.error i {
    color: #842029;
}

/* Royal Cart Styling */
.royal-cart {
    display: flex;
    align-items: center;
    position: relative;
    padding: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.royal-cart-wrapper {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
    border: 1px solid rgba(var(--accent-rgb, 202, 141, 151), 0.3);
    border-radius: 20px;
    padding: 6px 14px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.royal-cart:hover .royal-cart-wrapper {
    border-color: rgba(var(--accent-rgb, 202, 141, 151), 0.6);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.royal-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.royal-cart i {
    font-size: 1.2rem;
    color: var(--secondary);
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.royal-cart:hover i {
    color: var(--accent);
}

.royal-cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 1px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.02em;
    overflow: hidden;
    position: relative;
}

/* Royal shine animation */
@keyframes royal-shine {
    0% {
        transform: translateX(-100%) rotate(35deg);
        opacity: 0;
    }
    10% {
        transform: translateX(-80%) rotate(35deg);
        opacity: 0.3;
    }
    20% {
        transform: translateX(0%) rotate(35deg);
        opacity: 0.6;
    }
    30% {
        transform: translateX(80%) rotate(35deg);
        opacity: 0.3;
    }
    40% {
        transform: translateX(100%) rotate(35deg);
        opacity: 0;
    }
    100% {
        transform: translateX(100%) rotate(35deg);
        opacity: 0;
    }
}

.royal-cart-count::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 80%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(35deg);
    pointer-events: none;
}

.royal-cart-count.royal-shine::after {
    animation: royal-shine 1.5s ease-in-out;
}

.royal-cart-text {
    margin-left: 10px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
}

.royal-cart:hover .royal-cart-text {
    color: var(--accent);
}

/* Mobile royal cart styling */
.mobile-cart-link.royal-cart {
    margin-right: 12px;
}

.mobile-cart-link.royal-cart .royal-cart-icon i {
    font-size: 1.3rem;
}

@media (max-width: 991.98px) {
    .royal-cart-count {
        top: -8px;
        right: -8px;
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
}

/* Elegant mobile menu toggle */
.elegant-toggler {
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.elegant-toggler:hover {
    background-color: rgba(var(--accent-rgb, 202, 141, 151), 0.1);
}

.elegant-toggler:focus {
    box-shadow: none;
}

.elegant-toggler-icon {
    width: 22px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.elegant-toggler-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--secondary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.elegant-toggler[aria-expanded="true"] .elegant-toggler-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.elegant-toggler[aria-expanded="true"] .elegant-toggler-icon span:nth-child(2) {
    opacity: 0;
}

.elegant-toggler[aria-expanded="true"] .elegant-toggler-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu animation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: white;
        z-index: 1050;
        padding: 2rem 1.5rem;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
        transition-delay: calc(0.05s * var(--item-index, 0));
    }
    
    .navbar-collapse.show .navbar-nav .nav-item {
        opacity: 1;
        transform: translateX(0);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 0.95rem;
        text-align: left;
    }
    
    .navbar-nav .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 60%;
        width: 3px;
        background-color: var(--accent);
        border-radius: 1.5px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover::before,
    .navbar-nav .nav-link.active::before {
        opacity: 1;
    }
}

/* Order error notification */
.order-error {
    background-color: #fff;
    border: 1px solid rgba(132, 32, 41, 0.2);
    border-left: 4px solid #842029;
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
}

.order-error-icon {
    color: #842029;
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 2px;
}

.order-error-content {
    flex: 1;
}

.order-error-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #842029;
}

.order-error-message {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 12px;
}

.order-error-actions {
    margin-top: 10px;
}

.order-error-actions .btn {
    font-size: 0.75rem;
    padding: 8px 20px;
    margin-right: 10px;
}

/* Add to cart button */
.add-to-cart-btn {
    border-radius: 20px;
    padding: 10px 25px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    letter-spacing: 0.05em;
    font-weight: 500;
    background-color: var(--primary);
    color: white;
    border: none;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-dark, #9a5c65);
}

.add-to-cart-btn.loading {
    opacity: 0.9;
    cursor: wait;
}

.add-to-cart-btn .spinner-border {
    margin-right: 8px;
    width: 1rem;
    height: 1rem;
}

/* Cart count badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Animation for cart count update */
@keyframes cartCountPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-count-updated {
    animation: cartCountPulse 0.5s ease;
}

/* Cart item */
.cart-item {
    transition: opacity 0.3s ease;
}

.cart-item:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Quantity input */
.quantity-input {
    width: 70px;
    text-align: center;
    border-radius: 20px;
}

.quantity-input.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-loader'%3E%3Cpath d='M12 2v4'%3E%3C/path%3E%3Cpath d='M12 18v4'%3E%3C/path%3E%3Cpath d='M4.93 4.93l2.83 2.83'%3E%3C/path%3E%3Cpath d='M16.24 16.24l2.83 2.83'%3E%3C/path%3E%3Cpath d='M2 12h4'%3E%3C/path%3E%3Cpath d='M18 12h4'%3E%3C/path%3E%3Cpath d='M4.93 19.07l2.83-2.83'%3E%3C/path%3E%3Cpath d='M16.24 7.76l2.83-2.83'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* Remove button */
.remove-from-cart {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.remove-from-cart:hover {
    opacity: 1;
    color: #c62828;
}

/* Checkout button */
.checkout-btn {
    border-radius: 20px;
    padding: 12px 30px;
    transition: all 0.3s ease;
    background-color: var(--accent);
    color: #fff;
    border: none;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Product card add to cart */
.product-card .add-to-cart-container {
    position: absolute;
    bottom: 15px;
    right: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .add-to-cart-container {
    opacity: 1;
}

/* Product options */
.product-options {
    margin-bottom: 20px;
}

.option-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.option-select {
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    width: 100%;
}

/* --- Enhanced Cart Page UI --- */
.cart-page {
    background: #fafbfc;
    min-height: 80vh;
}

/* Inline breadcrumb */
.breadcrumb-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #5a4a42;
    margin-bottom: 20px;
}

.breadcrumb-inline a {
    color: #5a4a42;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-inline a:hover {
    color: #CA8D97;
}

.breadcrumb-inline span {
    color: #9ca3af;
}

/* Breadcrumb Navigation */
.cart-page .breadcrumb-nav {
    background: rgba(255, 206, 224, 0.18);
    padding: 14px 22px;
    border-radius: 14px;
    margin-bottom: 0;
}

.cart-page .breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
}

.cart-page .breadcrumb-item {
    color: #5a4a42;
}

.cart-page .breadcrumb-item a {
    color: #5a4a42;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cart-page .breadcrumb-item a:hover {
    color: #CA8D97;
}

.cart-page .breadcrumb-item.active {
    color: #CA8D97;
    font-weight: 500;
}

.cart-page .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #9ca3af;
    padding: 0 8px;
}

.cart-page h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: #5a4a42;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.cart-items-card {
    border: 1px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: #fff;
}

.cart-items-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e8eaed;
    padding: 14px 20px;
}

.cart-items-card .card-header h5 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #5a4a42;
    margin: 0;
}

.cart-table-head th {
    border-bottom: 1px solid #e8eaed !important;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 12px 10px;
    background: #fafbfc;
}

.item-price,
.item-subtotal {
    font-weight: 600;
    color: #5a4a42;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
}

.cart-item {
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.cart-item:hover {
    background: #fafbfc;
}

/* Quantity stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 3px;
    gap: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qty-stepper .quantity-input {
    width: 50px;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
    padding: 4px 2px;
    font-weight: 500;
    color: #5a4a42;
    font-size: 0.9rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    background: #fef5f6;
    border: 1px solid #f5d5da;
    color: #CA8D97;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.qty-btn:hover {
    background: #fce8eb;
    border-color: #f0c1c7;
    color: #b87d87;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn i {
    font-size: 0.7rem;
}

/* Order summary */
.order-summary {
    border: 1px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: #fff;
}

.order-summary .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e8eaed;
    padding: 14px 20px;
}

.order-summary .card-header h5 {
    color: #5a4a42;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.order-summary .card-header i {
    color: #6b7280;
}

.order-summary .coupon-box {
    background: #fafbfc;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}

.order-summary .fw-600 { 
    font-weight: 600;
    font-size: 1.1rem;
    color: #5a4a42;
}

.order-summary .fw-500 { font-weight: 500; }

.cart-actions {
    background: #f8f9fa;
    padding: 14px 20px;
    border-top: 1px solid #e8eaed;
}

.cart-actions .btn {
    border-radius: 20px;
    padding: 10px 24px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.cart-actions .btn-outline-primary {
    border: 1px solid #CA8D97;
    color: #CA8D97;
}

.cart-actions .btn-outline-primary:hover {
    background: #fef5f6;
    border-color: #b87d87;
    color: #b87d87;
}

.cart-actions .btn-outline-danger {
    border: 1px solid #ef4444;
    color: #dc2626;
}

.cart-actions .btn-outline-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Benefits */
.cart-benefits .benefit {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cart-benefits .benefit:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.cart-benefits .benefit i {
    font-size: 1.4rem;
    color: #4a5568;
}

.benefit-title { 
    font-weight: 600;
    color: #5a4a42;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.benefit-sub { 
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Empty state */
.cart-empty-state {
    padding: 80px 40px;
}

.cart-empty-state .empty-illustration {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--accent-rgb,202,141,151),.2), rgba(var(--accent-rgb,202,141,151),.05));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 3rem;
    box-shadow: 0 8px 24px rgba(202, 141, 151, 0.15);
    margin-bottom: 24px;
}

.cart-empty-state h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #5a4a42;
    margin-bottom: 12px;
}

.cart-empty-state .btn {
    background: #CA8D97;
    border: none;
    color: #fff;
    padding: 14px 36px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(202, 141, 151, 0.2);
    transition: all 0.2s ease;
}

.cart-empty-state .btn:hover {
    background: #b87d87;
    box-shadow: 0 3px 12px rgba(202, 141, 151, 0.3);
}

.sticky-top { z-index: 1010; }

/* Remove button styling */
.remove-from-cart {
    transition: all 0.2s ease;
    border-color: transparent !important;
    background: #fef2f2 !important;
}

.remove-from-cart:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

/* Checkout button enhancement */
.checkout-btn {
    background: #CA8D97 !important;
    border: none !important;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(202, 141, 151, 0.2);
    color: #fff !important;
}

.checkout-btn:hover {
    background: #b87d87 !important;
    box-shadow: 0 3px 10px rgba(202, 141, 151, 0.3) !important;
}
