@font-face {
    font-family: 'CustomFont';
    src: url('../assets/fonts/f.otf') format('opentype');
}

/* Apply CustomFont to the whole document */
body {
    font-family: 'CustomFont', sans-serif;
}

/* Header styling */
header {
    text-align: center;
    padding: 1.2rem 0;
    position: relative;
}

#logo {
    max-width: 180px;
    transition: transform 0.3s;
}

#logo:hover {
    transform: scale(1.05);
}

/* Cart Styling with enhanced cuteness */
.cart-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
}

.cart-container::before,
.cart-container::after {
    content: "❀";
    position: absolute;
    top: -5px;
    font-size: 2rem;
    color: #e66a93;
}

.cart-container::before {
    left: 5px;
}

.cart-container::after {
    right: 5px;
}

.cart-title {
    color: #e66a93;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px dashed #f8a5c2;
    text-shadow: 1px 1px 2px rgba(230, 106, 147, 0.2);
    position: relative;
}

.cart-title::after {
    content: "♡";
    display: block;
    font-size: 1.5rem;
    margin-top: 5px;
    color: #f8a5c2;
}

.cart-empty {
    background-color: white;
    border-radius: 20px;
    border: 3px solid #f8a5c2;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(248, 165, 194, 0.2);
    position: relative;
    overflow: hidden;
}

.cart-empty::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        -45deg,
        #f8d7e3,
        #f8d7e3 10px,
        #ffecf3 10px,
        #ffecf3 20px
    );
}

.cart-empty h3 {
    color: #e66a93;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.cart-empty a {
    background-color: #ff85ad;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    margin-top: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(248, 165, 194, 0.4);
}

.cart-empty a:hover {
    background-color: #e66a93;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(248, 165, 194, 0.5);
}

.cart-items {
    background-color: white;
    border-radius: 20px;
    border: 3px solid #f8a5c2;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(248, 165, 194, 0.2);
    margin-bottom: 2rem;
    position: relative;
}

.cart-items::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        -45deg,
        #f8d7e3,
        #f8d7e3 10px,
        #ffecf3 10px,
        #ffecf3 20px
    );
    border-radius: 20px 20px 0 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 2px dashed #f8d7e3;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item::before {
    content: "♡";
    position: absolute;
    left: -15px;
    color: #f8a5c2;
    font-size: 1.3rem;
}

/* Improved cart item image styling */
.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    overflow: hidden;
    margin-right: 1.5rem;
    border: 2px solid #f8a5c2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image:hover {
    transform: scale(1.05);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Fix product layout on desktop - place remove and quantity under price */
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    color: #e66a93;
    font-size: 1.4rem;
    margin-bottom: 0.7rem;
    font-weight: bold;
    text-align: center; /* Center product name */
}

.cart-item-price {
    font-weight: bold;
    color: #ff85ad;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    text-align: center; /* Center price */
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center !important; /* Force center alignment */
    justify-content: center !important; /* Force center alignment */
    gap: 1rem;
    margin-top: 1rem;
    width: 100%; /* Take full width */
}

/* Improve quantity controls styling */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center !important; /* Force center alignment */
    margin: 0 auto 1rem auto; /* Center with auto margins */
    background-color: #fff9fb;
    padding: 0.5rem;
    border-radius: 20px;
    border: 2px solid #ffd1e3;
    width: fit-content !important; /* Force fit-content width */
    max-width: 180px; /* Set a maximum width */
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #ff85ad;
    background: white;
    color: #e66a93;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(248, 165, 194, 0.3);
    font-family: 'CustomFont', sans-serif !important; /* Force custom font */
}

.quantity-btn:hover {
    background-color: #ff85ad;
    color: white;
    transform: scale(1.1);
}

.quantity-input {
    width: 45px;
    height: 35px;
    border: 2px solid #ff85ad;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    margin: 0 0.5rem;
    color: #e66a93;
    background-color: white;
    font-family: 'CustomFont', sans-serif !important; /* Force custom font */
}

/* Improved remove button styling */
.remove-btn {
    background-color: #ff85ad;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.7rem 1.3rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 3px 8px rgba(248, 165, 194, 0.4);
    align-self: center !important; /* Force center */
    display: block !important; /* Force block display */
    margin: 0 auto !important; /* Force centering with !important */
    width: auto !important; /* Auto width instead of percentage */
    min-width: 100px; /* Minimum width */
    max-width: 180px; /* Maximum width */
    text-align: center;
    font-family: 'CustomFont', sans-serif !important; /* Force custom font */
}

.remove-btn:hover {
    background-color: #e66a93;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(248, 165, 194, 0.5);
}

.cart-summary {
    background-color: white;
    border-radius: 20px;
    border: 3px solid #f8a5c2;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(248, 165, 194, 0.2);
    position: relative;
}

.cart-summary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        -45deg,
        #f8d7e3,
        #f8d7e3 10px,
        #ffecf3 10px,
        #ffecf3 20px
    );
    border-radius: 20px 20px 0 0;
}

.summary-title {
    color: #e66a93;
    font-size: 1.6rem;
    margin-bottom: 1.8rem;
    text-align: center;
    border-bottom: 2px dashed #f8d7e3;
    padding-bottom: 0.8rem;
    position: relative;
}

.summary-title::after {
    content: "♡";
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
    color: #f8a5c2;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1.2rem;
    position: relative;
}

.summary-label {
    color: #ff85ad;
    font-weight: bold;
}

.summary-value {
    font-weight: bold;
    color: #ff85ad;
}

.total-row {
    border-top: 3px dashed #f8d7e3;
    margin-top: 0.8rem;
    padding-top: 1.5rem;
    font-size: 1.4rem;
}

.total-row .summary-label,
.total-row .summary-value {
    font-size: 1.5rem;
    color: #e66a93;
}

.checkout-btn {
    background-color: #ff85ad;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 1.2rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.3rem;
    width: 100%;
    margin-top: 2rem;
    transition: all 0.3s;
    box-shadow: 0 6px 12px rgba(248, 165, 194, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'CustomFont', sans-serif !important; /* Force custom font */
}

.checkout-btn::before {
    content: "♡";
    position: absolute;
    left: 20px;
    opacity: 0;
    transition: all 0.3s;
}

.checkout-btn::after {
    content: "♡";
    position: absolute;
    right: 20px;
    opacity: 0;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background-color: #e66a93;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(248, 165, 194, 0.5);
    padding-left: 2rem;
    padding-right: 2rem;
}

.checkout-btn:hover::before,
.checkout-btn:hover::after {
    opacity: 1;
}

.cart-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
}

.continue-shopping {
    background-color: white;
    color: #ff85ad;
    border: 3px solid #ffd1e3;
    border-radius: 25px;
    padding: 1rem 1.8rem;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(248, 165, 194, 0.3);
    font-family: 'CustomFont', sans-serif !important; /* Force custom font */
}

.continue-shopping:hover {
    background-color: #fff9fb;
    color: #e66a93;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(248, 165, 194, 0.4);
}

.clear-cart {
    background-color: #ff85ad;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 1.8rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(248, 165, 194, 0.3);
    font-family: 'CustomFont', sans-serif !important; /* Force custom font */
}

.clear-cart:hover {
    background-color: #e66a93;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(248, 165, 194, 0.4);
}

/* Cute loading animation */
.loading {
    text-align: center;
    padding: 2rem;
    color: #e66a93;
    font-size: 1.2rem;
    position: relative;
}

.loading::after {
    content: '♡';
    animation: pulse 1.5s infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* Footer styling */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    background-color: #fff9fb;
    border-top: 3px dashed #ffd1e3;
    position: relative;
}

footer::before,
footer::after {
    content: "❀";
    position: absolute;
    top: -10px;
    font-size: 1.5rem;
    color: #ff85ad;
}

footer::before {
    left: 20%;
}

footer::after {
    right: 20%;
}

footer p {
    color: #ff85ad;
    margin-bottom: 1rem;
}

.footer-social img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s;
    border-radius: 50%;
    padding: 3px;
    background-color: white;
    border: 2px solid #ffd1e3;
}

.footer-social img:hover {
    transform: scale(1.2) rotate(10deg);
}

.hamburger-menu {
    cursor: pointer;
    display: block;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    width: fit-content;
    margin: 0 auto;
    border: 2px solid #f8a5c2;
}

.hamburger-icon {
    width: 40px; /* Increased from 30px */
    height: 32px; /* Increased from 24px */
    position: relative;
    margin: 0 auto;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 4px; /* Increased from 3px */
    width: 100%;
    background: #e66a93; /* Changed from #333 to match theme */
    border-radius: 4px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-icon span:nth-child(1) {
    top: 0px;
}

.hamburger-icon span:nth-child(2) {
    top: 14px; /* Adjusted from 10px */
}

.hamburger-icon span:nth-child(3) {
    top: 28px; /* Adjusted from 20px */
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 245, 250, 0.95);
    padding: 20px 0;
    list-style: none;
    margin: 0;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 99;
    border-radius: 0 0 15px 15px;
}

.nav-menu.active {
    display: block;
}

.nav-menu li {
    padding: 10px 20px;
    text-align: center;
}

.nav-menu a {
    text-decoration: none;
    color: #e66a93;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: #d04477;
}

/* Animation for hamburger to X */
.hamburger-icon.active span:nth-child(1) {
    top: 14px; /* Adjusted from 10px */
    transform: rotate(45deg);
}

.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
    top: 14px; /* Adjusted from 10px */
    transform: rotate(-45deg);
}
/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Fix for checkout button animation - make it subtler */
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .cart-title {
        font-size: 1.8rem;
    }
    
    /* Hide desktop nav on mobile */
    .desktop-nav {
        display: none;
    }
    
    /* Show hamburger menu */
    .hamburger-menu {
        display: block;
        margin: 0.5rem auto;
        padding: 10px 15px;
        border-radius: 12px;
        text-align: center;
        position: relative;
        width: 60px;
    }
    
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    /* Show nav menu when active */
    .nav-menu.active {
        display: block;
        width: 90%;
        max-width: 90%; /* Limit width on mobile */
        left: 50%; /* Position at center */
        transform: translateX(-50%); /* Center horizontally */
        margin: 0 auto;
        border-radius: 15px;
        border: 2px solid #ffd1e3;
    }
    
    /* Improved mobile product layout */
    .cart-item {
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
        text-align: center;
        gap: 0.8rem;
    }
    
    .cart-item::before {
        display: none;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
        margin: 0 auto 0.5rem auto; /* Centered with auto margins */
        border-width: 1px; /* Thinner border on mobile */
    }
    
    .cart-item-details {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .cart-item-actions {
        display: flex;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.5rem;
        width: 100%;
        gap: 0.8rem;
    }
    
    .quantity-control {
        width: fit-content !important;
        max-width: 160px;
        margin: 0 auto 0.8rem auto;
        padding: 0.4rem;
        justify-content: center !important;
    }
    
    .quantity-btn {
        width: 30px; /* Smaller buttons on mobile */
        height: 30px;
    }
    
    .quantity-input {
        width: 40px; /* Smaller input on mobile */
        height: 30px;
    }
    
    .remove-btn {
        width: auto !important;
        max-width: 160px;
        padding: 0.7rem 1rem;
        margin: 0 auto !important;
    }
    
    .cart-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .continue-shopping, .clear-cart {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
    
    .checkout-btn {
        padding: 1rem;
    }
    
    .cart-container::before,
    .cart-container::after {
        display: none;
    }
    
    footer::before,
    footer::after {
        display: none;
    }
}