/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    .popup {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease;
    }

    .popup-content {
        background: #ffffff;
        padding: 20px;
        border-radius: 8px;
        max-width: 100%;
        width: 400px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: relative;
        text-align: center;
        overflow: hidden;
    }

    .popup-content .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: #333;
    }

    .options-grid {
        display: flex;
        gap: 12px;
        padding: 10px;
        cursor: grab;
        overflow-x: scroll; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
        scrollbar-width: none; /* Firefox */
    }

    .options-grid::-webkit-scrollbar {
        display: none; /* Hide the scrollbar in WebKit browsers (Chrome, Safari) */
    }

    .option-btn {
        background: #f0f0f0;
        border: none;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 0.9rem;
        color: #333;
        transition: all 0.3s ease;
        cursor: pointer;
        flex-shrink: 0;
    }

    .option-btn:hover {
        background: #ddd;
    }

    .option-btn.selected {
        background: #007bff;
        color: #fff;
    }

    .option-btn.selected .week-number {
        color: white !important; 
    }

    .option-btn.selected .week-range {
        color: white !important; 
    }

    .size-name {
        display: flex;
        font-weight: 600;
        font-size: 12px;
    }

    .size-price {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .size-qty {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .done-btn {
        font-size: 12px;
        padding: 10px 16px;
        width: 100%;
        letter-spacing: 1px;
        margin-top: 24px;
        border-radius: 2px;
        font-weight: 700;
        border-width: 0px;
        background-color: rgb(255, 63, 108);
        color: rgb(255, 255, 255);
        cursor: pointer;
    }

    .done-btn:hover {
        background: #0056b3;
    }

    /* Show popup */
    .popup[style*="display: flex;"] {
        visibility: visible;
        opacity: 1;
    }

    .week-number {
        font-size: 12px;
        font-weight: 600;
        color: #3498db; /* Week number color */
    }

    .week-range {
        font-size: 12px;
        color: #555;
        margin-top: 5px;
        font-weight: 600;
    }

    .option-title {
        display: flex;
        font-size: 14px;
        font-weight: 600;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .popup {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease;
    }

    .popup-content {
        background: #ffffff;
        padding: 20px;
        border-radius: 8px;
        max-width: 90%;
        width: 400px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: relative;
        text-align: center;
        overflow: hidden;
    }

    .popup-content .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: #333;
    }

    .options-grid {
        display: flex;
        gap: 12px;
        padding: 10px;
        cursor: grab;
        overflow-x: scroll; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
        scrollbar-width: none; /* Firefox */
    }

    .options-grid::-webkit-scrollbar {
        display: none; /* Hide the scrollbar in WebKit browsers (Chrome, Safari) */
    }

    .option-btn {
        background: #f0f0f0;
        border: none;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 0.9rem;
        color: #333;
        transition: all 0.3s ease;
        cursor: pointer;
        flex-shrink: 0;
    }

    .option-btn:hover {
        background: #ddd;
    }

    .option-btn.selected {
        background: #007bff;
        color: #fff;
    }

    .option-btn.selected .week-number {
        color: white !important; 
    }

    .option-btn.selected .week-range {
        color: white !important; 
    }

    .size-name {
        display: flex;
        font-weight: 600;
        font-size: 14px;
    }

    .size-price {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .size-qty {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .done-btn {
        font-size: 14px;
        padding: 10px 16px;
        width: 100%;
        letter-spacing: 1px;
        margin-top: 24px;
        border-radius: 2px;
        font-weight: 700;
        border-width: 0px;
        background-color: rgb(255, 63, 108);
        color: rgb(255, 255, 255);
        cursor: pointer;
    }

    .done-btn:hover {
        background: #0056b3;
    }

    /* Show popup */
    .popup[style*="display: flex;"] {
        visibility: visible;
        opacity: 1;
    }

    .week-number {
        font-size: 14px;
        font-weight: 600;
        color: #3498db; /* Week number color */
    }

    .week-range {
        font-size: 12px;
        color: #555;
        margin-top: 5px;
        font-weight: 600;
    }

    .option-title {
        display: flex;
        font-size: 16px;
        font-weight: 600;
    }    
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    .popup {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease;
    }

    .popup-content {
        background: #ffffff;
        padding: 20px;
        border-radius: 8px;
        max-width: 90%;
        width: 400px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: relative;
        text-align: center;
        overflow: hidden;
    }

    .popup-content .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: #333;
    }

    .options-grid {
        display: flex;
        gap: 12px;
        padding: 10px;
        cursor: grab;
        overflow-x: scroll; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
        scrollbar-width: none; /* Firefox */
    }

    .options-grid::-webkit-scrollbar {
        display: none; /* Hide the scrollbar in WebKit browsers (Chrome, Safari) */
    }

    .option-btn {
        background: #f0f0f0;
        border: none;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 0.9rem;
        color: #333;
        transition: all 0.3s ease;
        cursor: pointer;
        flex-shrink: 0;
    }

    .option-btn:hover {
        background: #ddd;
    }

    .option-btn.selected {
        background: #007bff;
        color: #fff;
    }

    .option-btn.selected .week-number {
        color: white !important; 
    }

    .option-btn.selected .week-range {
        color: white !important; 
    }

    .size-name {
        display: flex;
        font-weight: 600;
        font-size: 14px;
    }

    .size-price {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .size-qty {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .done-btn {
        font-size: 14px;
        padding: 10px 16px;
        width: 100%;
        letter-spacing: 1px;
        margin-top: 24px;
        border-radius: 2px;
        font-weight: 700;
        border-width: 0px;
        background-color: rgb(255, 63, 108);
        color: rgb(255, 255, 255);
        cursor: pointer;
    }

    .done-btn:hover {
        background: #0056b3;
    }

    /* Show popup */
    .popup[style*="display: flex;"] {
        visibility: visible;
        opacity: 1;
    }

    .week-number {
        font-size: 14px;
        font-weight: 600;
        color: #3498db; /* Week number color */
    }

    .week-range {
        font-size: 12px;
        color: #555;
        margin-top: 5px;
        font-weight: 600;
    }

    .option-title {
        display: flex;
        font-size: 16px;
        font-weight: 600;
    }
} 

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .popup {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease;
    }

    .popup-content {
        background: #ffffff;
        padding: 20px;
        border-radius: 8px;
        max-width: 90%;
        width: 400px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: relative;
        text-align: center;
        overflow: hidden;
    }

    .popup-content .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: #333;
    }

    .options-grid {
        display: flex;
        gap: 12px;
        padding: 10px;
        cursor: grab;
        overflow-x: scroll; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
        scrollbar-width: none; /* Firefox */
    }

    .options-grid::-webkit-scrollbar {
        display: none; /* Hide the scrollbar in WebKit browsers (Chrome, Safari) */
    }

    .option-btn {
        background: #f0f0f0;
        border: none;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 0.9rem;
        color: #333;
        transition: all 0.3s ease;
        cursor: pointer;
        flex-shrink: 0;
    }

    .option-btn:hover {
        background: #ddd;
    }

    .option-btn.selected {
        background: #007bff;
        color: #fff;
    }

    .option-btn.selected .week-number {
        color: white !important; 
    }

    .option-btn.selected .week-range {
        color: white !important; 
    }

    .size-name {
        display: flex;
        font-weight: 600;
        font-size: 14px;
    }

    .size-price {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .size-qty {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .done-btn {
        font-size: 14px;
        padding: 10px 16px;
        width: 100%;
        letter-spacing: 1px;
        margin-top: 24px;
        border-radius: 2px;
        font-weight: 700;
        border-width: 0px;
        background-color: rgb(255, 63, 108);
        color: rgb(255, 255, 255);
        cursor: pointer;
    }

    .done-btn:hover {
        background: #0056b3;
    }

    /* Show popup */
    .popup[style*="display: flex;"] {
        visibility: visible;
        opacity: 1;
    }

    .week-number {
        font-size: 14px;
        font-weight: 600;
        color: #3498db; /* Week number color */
    }

    .week-range {
        font-size: 12px;
        color: #555;
        margin-top: 5px;
        font-weight: 600;
    }

    .option-title {
        display: flex;
        font-size: 16px;
        font-weight: 600;
    }
} 

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .popup {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease;
    }

    .popup-content {
        background: #ffffff;
        padding: 20px;
        border-radius: 8px;
        max-width: 90%;
        width: 400px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: relative;
        text-align: center;
        overflow: hidden;
    }

    .popup-content .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: #333;
    }

    .options-grid {
        display: flex;
        gap: 12px;
        padding: 10px;
        cursor: grab;
        overflow-x: scroll; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
        scrollbar-width: none; /* Firefox */
    }

    .options-grid::-webkit-scrollbar {
        display: none; /* Hide the scrollbar in WebKit browsers (Chrome, Safari) */
    }

    .option-btn {
        background: #f0f0f0;
        border: none;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 0.9rem;
        color: #333;
        transition: all 0.3s ease;
        cursor: pointer;
        flex-shrink: 0;
    }

    .option-btn:hover {
        background: #ddd;
    }

    .option-btn.selected {
        background: #007bff;
        color: #fff;
    }

    .option-btn.selected .week-number {
        color: white !important; 
    }

    .option-btn.selected .week-range {
        color: white !important; 
    }

    .size-name {
        display: flex;
        font-weight: 600;
        font-size: 14px;
    }

    .size-price {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .size-qty {
        display: flex;
        font-weight: 400;
        font-size: 12px;
    }

    .done-btn {
        font-size: 14px;
        padding: 10px 16px;
        width: 100%;
        letter-spacing: 1px;
        margin-top: 24px;
        border-radius: 2px;
        font-weight: 700;
        border-width: 0px;
        background-color: rgb(255, 63, 108);
        color: rgb(255, 255, 255);
        cursor: pointer;
    }

    .done-btn:hover {
        background: #0056b3;
    }

    /* Show popup */
    .popup[style*="display: flex;"] {
        visibility: visible;
        opacity: 1;
    }

    .week-number {
        font-size: 14px;
        font-weight: 600;
        color: #3498db; /* Week number color */
    }

    .week-range {
        font-size: 12px;
        color: #555;
        margin-top: 5px;
        font-weight: 600;
    }

    .option-title {
        display: flex;
        font-size: 16px;
        font-weight: 600;
    }
}