.plans-bg {
    background-image: url("/images/product_listing_bg_2.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 0.5rem;
}

.plan-card {
    background: #fff;
    border-radius: 18px;
    padding: 10px;
    border: 2px solid #b30086;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plan-logo {
    width: 100px;
}

.plan-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-sub {
    font-size: 1rem;
    margin-bottom: 0;
}

.plan-features {
    padding-left: 18px;
    font-size: 1rem;
    margin-bottom: 0;
}

.duration-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.duration-select {
    width: 120px;
    font-weight: 600;
    border: 1px solid #999;
}

.price-row {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    text-align: center;
}

.price {
    font-size: 1.4rem;
    font-weight: 600;
}

.old-price {
    text-decoration: line-through;
}

.save {
    color: green;
    font-weight: 600;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 12px;
}

.ribbon {
  font-size: 0.95rem;
  font-weight: bold;
  color: #fff;
}
.ribbon {
  --r: .8em; 
  padding-inline: .5em calc(var(--r) + .25em);
  line-height: 1.8;
  clip-path: polygon(100% 0,0 0,0 100%,100% 100%,100% calc(100% - .25em),calc(100% - var(--r)) 50%,100% .25em);
  background: #1e40ff;
  width: fit-content;
  border-radius: 5px 0 0 5px;
}

.qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #999;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: #f3f3f3;
    border: none;
    padding: 4px 10px;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.add-cart-btn {
    background: #ff7a00;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 8px;
    border-radius: 10px;
    width: 250px;
    max-width: 100%;
    align-self: center;
    margin-top: auto;
    margin-bottom: 6px;
}

.add-cart-btn:hover {
    background: #e66f00;
    color: #fff;
}

.know-more-btn {
    background: #ff7a00;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 8px;
    border-radius: 10px;
    width: 250px;
    max-width: 100%;
    align-self: center;
    margin-top: auto;
    margin-bottom: 6px;
}

.know-more-btn:hover {
    background: #e66f00;
    color: #fff;
}

.product-filter-wrapper{
    position:relative;
    display:inline-block;
}

.product-filter-btn{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    background:#fff;
    border:2px solid #e0e0e0;
    border-radius:8px;
    padding:10px 16px;
    font-weight:500;
    min-width:180px;
    max-width:250px;
    white-space:nowrap;
    transition:all .25s ease;
}

.product-filter-btn i{
    font-size:16px;
}

.product-filter-btn:hover{
    border-color:#e66f00;
    background:#e9ad74;
}

.product-filter-wrapper .dropdown-menu{
    min-width: 100%;
    border-radius:8px;
    border:1px solid #eee;
    box-shadow:0 6px 18px rgba(0,0,0,0.12);
}

.product-filter-wrapper .dropdown-item{
    padding:6px 10px;
    white-space:nowrap;
    font-weight:500;
}

.product-filter-wrapper .dropdown-item:hover{
    background:#e9ad74;
}

@media (max-width: 768px) {
    .plan-card {
        padding: 24px 18px;
    }
}

/* Go To Cart button section */
.go-cart-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.go-cart-btn {
    background: red;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    width: auto;
    text-align: center;
    transition: all 0.25s ease;
}

.go-cart-btn:hover {
    background: #e60000;
    transform: translateY(-2px);
}

/* Module selection */
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.module-card {
    border: 2px solid #999;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.modal-content {
    border-radius: 14px;
}

.module-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.module-card.selected {
    border-color: #ff7a00;
    border-width: 4px;
}

.module-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: 0.2s ease;
}

.centered-ribbon {
    display: inline-block;
    margin: 12px auto 0;
    padding: 6px 14px;
    background: #1e40ff;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
}

.module-logo {
    width: 65px;
    margin-bottom: 10px;
}

.module-price {
    margin-top: 10px;
    font-size: 1rem;
}

.module-price .price {
    font-size: 1.4rem;
    font-weight: 700;
}

.module-price .old {
    text-decoration: line-through;
    margin-left: 6px;
}

.module-price .save {
    color: green;
    font-weight: 600;
    margin-left: 6px;
}

#moduleModal .btn-warning {
    background-color: #ff7a00;
    color: #fff;
}

#moduleModal .btn-warning:hover {
    background-color: #e66f00;
}

#moduleModal .modal-header,
#moduleModal .modal-footer {
    background-color: #EBF5FF;
    position: relative;
    top:0;
    right: 0;
}

.module-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 12px;
}

.module-count {
    position: absolute;
    left: 20px;
    font-weight: 600;
    color: #333;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 991px) {
    .module-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .module-count {
        position: static;
        margin-bottom: 6px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .module-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #moduleModal .modal-dialog {
        margin: 16px auto;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        height: auto;
    }

    #moduleModal .modal-content {
        max-height: 85vh;               
        border-radius: 18px;
    }

    #moduleModal .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}
