/* General Styling */
.cart-icon-wrapper {
	margin-top: 5px;
	padding: 5px; /* Adjust padding to increase hover area */
	position: relative; /* Ensure the wrapper is positioned relative to manage absolute children */
}

.cart-icon-wrapper:hover {
    cursor: pointer; /* Optional: change cursor on hover */
}

.cart-icon-wrapper img {
   width: 30px; /* maximum size */
    height: auto; /* maintain aspect ratio */
}

.top-hd-part2 a {
    position: relative; /* Ensure the cart icon's parent is positioned relative */
	display: inline-block; /* To keep the icon and dropdown together */
}

.cart-dropdown-container {
    position: absolute;
    top: 12%; /* Position below the cart icon */
    right: 18%;  /* Align to the right of the cart icon */    
    width: 380px; /* Set a fixed width for the dropdown */
    background-color: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
  /*  overflow-y: auto;
    max-height: 400px;  Limit height with scroll for long carts */
    padding: 15px;
}

/* Cart Item */
.container-element {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f7f7f7;
    transition: background-color 0.3s, transform 0.2s;
}

.container-element:hover {
    background-color: #f0f0f0;
    transform: scale(1.02);
}

/* Course Image */
.course-image {
    width: 80px; /* Optimized for space */
    height: 80px;
    margin-right: 15px;
    border-radius: 8px; /* Rounded corners for a modern look */
    object-fit: cover; /* Maintain aspect ratio */
    border: 1px solid #ddd; /* Optional subtle border */
}

/* Course Details */
.container-element-column-items {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

/* Course Title */
.course-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
}

.course-title:hover {
    color: #007bff; /* Subtle hover effect */
}

/* Author */
.course-author {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

/* Price Details */
.price-details {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between prices */
}

.final-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

/* Struck price */
.struck-price {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
}

.discount-msg {
    font-size: 15px;
    color: #999;
}

/* Separator */
hr {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 15px 0;
}

/* Total Section */
.total-element {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.final-total {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.struck-total-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

/* Go to Cart Button */
.go-to-cart-button {
    width: 100%;
    padding: 10px 0;
    background-color: var(--strong-blue-with-black-shade);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.go-to-cart-button:hover {
    background-color: var(--hover-links-for-deep-gemstone-blue);
}

/* Item count bubble on the cart icon */
.cart-item-count {
    background-color:var(--hover-links-for-deep-gemstone-blue);
    color: white;
    font-size: 14px;
    border-radius: 50%;
    padding: 2px 10px;
    position: absolute;
    top:3%;
    right:10%;
    transform: translate(50%, -50%);
    z-index: 1001;
}

/* Empty Cart Message */
.empty-cart-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    text-align: center;
    font-size: 16px;
    color: #555;
    background-color: #f9f9f9;
    border-radius: 10px;
    font-weight: 600;
}

/* Scrollbar for Long Dropdowns */
.cart-dropdown-container::-webkit-scrollbar {
    width: 8px;
}

.cart-dropdown-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.cart-dropdown-container::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* === Large Desktops (1920px and above) === */
@media (min-width: 1920px) {
    .cart-dropdown-container {
        width: 430px;
        right: 21%;
        padding: 18px;
    }

    .cart-icon-wrapper img {
        width: 40px; /* maximum size */
     }

    .course-image {
        width: 90px; /* Optimized for space */
        height: 90px;
        margin-right: 18px;
    }

    .course-title {
        font-size: 20px;
    }

    .course-author,
    .struck-price {
        font-size: 18px;
    }

    .discount-msg {
      font-size: 18px;
    }

    .final-price {
        font-size: 20px;
    }

    .final-total {
        font-size: 22px;
    }

    .struck-total-price {
        font-size: 18px;
    }

    .go-to-cart-button {
        font-size: 22px;
    }

    .empty-cart-message {
        font-size: 18px;
    }
}

/* === Standard Laptops (1280px and below) === */
@media (max-width: 1280px) {
    .cart-dropdown-container {
        width: 350px;
        right: 15%;
        padding: 14px;
    }

    .cart-icon-wrapper img {
        width: 28px; /* maximum size */
     }

    .course-image {
        width: 75px; /* Optimized for space */
        height: 75px;
        margin-right: 12px;
    }
    
    .course-title {
        font-size: 15px;
    }

    .course-author,
    .struck-price {
        font-size: 14px;
    }

    .discount-msg {
      font-size: 14px;
    }

    .final-price {
        font-size: 16px;
    }

    .final-total {
        font-size: 17px;
    }

    .struck-total-price {
        font-size: 15px;
    }

    .go-to-cart-button {
        font-size: 17px;
    }

    .empty-cart-message {
        font-size: 15px;
    }
}

/* === Small Laptops (1024px and below) === */
@media (max-width: 1024px) {
    .cart-dropdown-container {
        width: 320px;
        right: 13%;
        padding: 12px;
    }

    .cart-icon-wrapper img {
        width: 25px; /* maximum size */
     }

    .course-image {
        width: 70px; /* Optimized for space */
        height: 70px;
        margin-right: 12px;
    }
    
    .course-title {
        font-size: 14px;
    }

    .course-author,
    .struck-price {
        font-size: 13px;
    }

    .discount-msg {
      font-size: 13px;
    }

    .final-price {
        font-size: 14px;
    }

    .final-total {
        font-size: 16px;
    }

    .struck-total-price {
        font-size: 14px;
    }

    .go-to-cart-button {
        font-size: 16px;
    }

    .empty-cart-message {
        font-size: 14px;
    }
}
