*{
    font-family: "Montserrat", sans-serif;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 2rem 0;
    background: #fff;
    width: 100%;
    z-index: 1000;
}

.nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-logo > a > img {
    height: 80px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
    position: relative;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease-out;
    border-bottom: #000 2px solid !important;
}
.search-wrapper.active .search-container {
    width: 300px;
    border-bottom-color: #eee;
}

.search-wrapper.active .search-container::after {
    width: 100%;
    left: 0;
    right: auto;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.search-wrapper.active .search-input {
    opacity: 1;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer !important;
    padding: 0.5rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.search-btn i {
    font-size: 20px;
}

.search-wrapper.active + .cart-icon {
    width: 0;
    opacity: 0;
    visibility: hidden;
    margin: 0;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 40px;
    width: 300px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.search-results.mobile {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.search-result-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.search-result-item .no-image {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.search-result-item .title {
    font-size: 14px;
}

.search-result-item .price {
    color: #666;
    font-size: 14px;
}

.search-result-item.selected {
    background-color: #f0f0f0;
}

.search-result-item.selected a {
    font-weight: 500;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
    display: flex;
    align-items: center;
}

.search-wrapper.active ~ .cart-icon {
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.cart-icon img {
    width: 20px;
    cursor: pointer;
}

.cart-icon.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.burger-menu {
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: end;
    background: none;
    border: none;
    z-index: 1002;
}

.burger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #333;
    position: absolute;
    transition: all 0.3s ease;
}

.burger-menu span:first-child {
    transform: translateY(-8px);
}


.burger-menu span:last-child {
    transform: translateY(8px);
}

.burger-menu.active span:first-child {
    transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:last-child {
    transform: rotate(-45deg);
}

.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    transition: all 0.4s ease;
    z-index: 1001;
    display: flex;
    justify-content:center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.side-menu-container{
    width: 1400px;
}

.side-menu.active {
    right: 0;
    opacity: 1;
}

.menu-items {
    text-align: flex-start;
    gap: 2rem;
}

.menu-items a {
    display: block;
    width: fit-content;
    margin: 3rem 0;
    color: #939393;
    text-decoration: none;
    font-size: 36px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(30px);
    transition: color 0.1s ease;
}

.side-menu.active .side-menu-container .menu-items a {
    animation: linkSlideUp 0.4s forwards;
}

.side-menu.active .side-menu-container .menu-items a:nth-child(2) { animation-delay: 0.1s; }
.side-menu.active .side-menu-container .menu-items a:nth-child(3) { animation-delay: 0.2s; }
.side-menu.active .side-menu-container .menu-items a:nth-child(4) { animation-delay: 0.3s; }
.side-menu.active .side-menu-container .menu-items a:nth-child(5) { animation-delay: 0.4s; }

@keyframes linkSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-items a.active {
    color: #000;
}

.menu-items a:hover {
    color: #000;
}

.navbar-underline{
    width: 100%;
    height: 10px;
    background-color: #000;
}

.mobile-menu-top {
    display: none;
}

.social-icons{
    width: 100%;
    display: flex;
    justify-content: end;
    gap: 40px;
    margin-top: 100px;
}

.social-icons a {
    color: #333;
    font-size: 40px;
    transition: color 0.3s ease;
}

@media screen and (max-width: 1400px) {
    .side-menu-container {
        width: 100%;
        padding: 0 5px;
    }
}

@media screen and (max-width: 768px) {
    .side-menu{
        height: 100vh;
        min-height: 500px;
        overflow: auto;
    }
    .side-menu{
        overflow: auto;
    }
    .side-menu-container{
        display: flex;
        justify-content: center;
        align-items: center ;
        flex-direction: column;
    }
    .social-icons{
        display: flex;
        justify-content: center;
        margin-top: 30px !important;
    }

    .menu-items{
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 0 !important;
    }

    .menu-items a {
        font-size: 24px;
        margin: 2rem 0;
    }
    .search-result-item > a{
        margin: 0 !important;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    .nav-right .cart-icon,
    .nav-right .search-wrapper {
        display: none !important; 
    }

    .navbar-wrapper .cart-icon {
        display: none !important;
    }

    .mobile-menu-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 2rem;
    }

    .mobile-search-wrapper {
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .mobile-search-container {
        width: 100%;
        max-width: 300px;
        position: relative;
    }

    .mobile-search-input {
        width: 100%;
        padding: 0.8rem;
        border: none;
        border-bottom: 2px solid #333;
        background: transparent;
        font-size: 16px;
        outline: none;
    }

    .mobile-search-btn {
        background: none;
        border: none;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #333;
    }

    .mobile-cart {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: relative;
        cursor: pointer;
    }

    .mobile-cart img {
        width: 24px;
    }

    .mobile-cart .cart-count {
        top: -8px;
        right: -8px;
    }

    .cart-sidebar {
        width: 100%;
        height: 90vh !important;
        right: -100%;
        z-index: 1008; 
    }

    .cart-sidebar.active {
        right: 0;
    }

    .cart-overlay {
        z-index: 1007;
    }

    .cart-item {
        padding: 15px;
    }

    .cart-item-quantity {
        flex-wrap: wrap;
    }

    .cart-header h2 {
        font-size: 20px;
    }

    .close-cart {
        font-size: 32px;
    }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    .side-menu {
        height: 100vh;
        padding: 1rem 0;
    }

    .side-menu-container {
        padding: 1rem;
    }

    .menu-items {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem !important;
        justify-items: center;
    }

    .menu-items a {
        font-size: 20px;
        margin: 1rem 0;
    }
    .social-icons a {
        font-size: 24px;
    }

    .mobile-menu-top {
        margin-bottom: 1rem;
    }
}

@media screen and (max-width: 926px) and (max-height: 428px) and (orientation: landscape) {
    .side-menu {
        height: 100vh;
    }

    .menu-items a {
        font-size: 18px;
        margin: 0.75rem 0;
    }
}

@media screen and (min-width: 769px) {
    .mobile-menu-top,
    .mobile-search-wrapper,
    .mobile-cart {
        display: none !important;
    }
}


.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1007;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 24px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 48px;
    cursor: pointer;
    padding: 0 8px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.cart-item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
}

.cart-item-price {
    font-weight: 500;
    color: #000;
    font-size: 15px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.cart-item-quantity button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-quantity button:hover {
    background: #eee;
}

.cart-item-quantity span {
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

.remove-item {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.remove-item:hover {
    background-color: rgba(255, 68, 68, 0.1);
    opacity: 1;
}

.remove-item i {
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
}

.remove-item:hover i {
    color: #ff4444;
    transform: scale(1.1);
}

.cart-item:hover .remove-item {
    opacity: 1;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ddd;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 18px;
}

.proceed-to-checkout {
    width: 100%;
    padding: 15px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
}

.cart-overlay.active {
    display: block;
}

@media screen and (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1010;
    display: none;
    overflow-y: auto;
}

.checkout-modal.active {
    display: block;
}

.modal-content-checkout {
    background: white;
    width: 95%;
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: 8px;
    position: relative;
}

.modal-header-checkout {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-checkout h2 {
    margin: 0;
    font-size: 24px;
}

.close-modal-checkout {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    padding: 0 8px;
}

.modal-body-checkout {
    padding: 30px;
    display: flex;
    gap: 30px;
}

.modal-body-checkout > hr{
    margin: 20px;
}

.checkout-total-items,
.checkout-form{
    width: 50%;
}

.checkout-total-items{
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    font-size: 18px;
    flex-direction: column;
}

.checkout-items {
    margin-bottom: 20px;
}

.checkout-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.checkout-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.checkout-item-details {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.checkout-item-price{
    position: absolute;
    bottom: 0;
    right: 0;
}

.checkout-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.checkout-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.checkout-summary {
    padding: 15px;
    border-bottom: 1px solid gray;
    position: relative;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    font-size: 18px;
}


.confirm-order {
    width: 100%;
    padding: 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

@media screen and (max-width: 480px) {
    .modal-content-checkout {
        width: 95%;
        margin: 1rem auto;
    }
    
    .checkout-item img {
        width: 50px;
        height: 50px;
    }
}

@media screen and (max-width: 768px) {
    .modal-content-checkout {
        width: 100%;
        margin: 0;
        min-height: 100vh;
        border-radius: 0;
    }

    .modal-body-checkout {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .checkout-total-items,
    .checkout-form {
        width: 100%;
    }

    .checkout-form {
        order: -1;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
    }

    .form-group input {
        padding: 12px;
        font-size: 16px;
    }

    .checkout-item {
        padding: 10px 0;
    }

    .checkout-summary {
        position: sticky;
        bottom: 0;
        background: lightgray;
        padding: 15px 5px;
    }

    .confirm-order {
        padding: 15px;
        font-size: 18px;
    }
}

.payment-method {
    margin-bottom: 30px;
    text-align: center;
}

.payment-method p {
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 18px;
}

.payment-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #333;
}

.payment-option input[type="radio"] {
    margin: 0;
}

.payment-option input[type="radio"]:checked + .payment-label {
    font-weight: 500;
}

.payment-option:has(input[type="radio"]:checked) {
    border-color: #333;
    background-color: #f8f8f8;
}

.payment-option i {
    font-size: 18px;
    color: #333;
}

.payment-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ddd !important;
    background-color: #f5f5f5;
}

.payment-option.disabled:hover {
    border-color: #ddd !important;
}

.payment-warning {
    margin-top: 10px;
    color: #dc3545;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-warning i {
    font-size: 16px;
}

.form-fields {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}
