/* --- Base Styles (Desktop First Approach) ---
These styles apply to all screen sizes unless overridden by media queries.
*/

/* Slider Container */
.nasir-video-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1280px; /* Adjust max-width for your website's main content width */
    margin: 0 auto;
    overflow: hidden; /* Hides videos outside the viewport */
    box-sizing: border-box;
    padding: 40px 20px; /* More generous padding for desktop */
    user-select: none; /* Prevent text selection during drag */
    touch-action: pan-y; /* Allow vertical scrolling, but handle horizontal pan */
}

.nasir-video-slider {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Smooth sliding animation */
    width: fit-content; /* Allows flex container to expand */
    will-change: transform; /* Performance hint for smoother animation */
}

/* Individual Video Item */
.nasir-video-item {
    flex-shrink: 0; /* Prevent shrinking */
    width: 280px;  /* Desktop default width for a vertical video display */
    height: 498px; /* Aspect ratio 9:16 (280 * 16 / 9 = 497.77) */
    margin-right: 30px; /* Space between videos */
    position: relative; /* Needed for absolute positioning of the button */
    cursor: grab; /* Indicate draggable */
    overflow: hidden; /* Ensures video stays within bounds */
    background-color: #f0f0f0; /* Fallback background */
    display: flex; /* Center video and potential fallback content */
    justify-content: center;
    align-items: center;
    border-radius: 12px; /* Slightly more rounded for a modern look */
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); /* Slightly stronger shadow */
    transition: transform 0.2s ease-out; /* Smooth hover effect */
}

.nasir-video-item:last-child {
    margin-right: 0;
}

.nasir-video-item:active {
    cursor: grabbing; /* Indicate currently dragging */
}

.nasir-video-item video {
    width: 100%;
    height: 100%; /* Make video fill the item */
    object-fit: cover; /* Ensures video covers the element, cropping if necessary */
    display: block;
    border-radius: 12px; /* Apply rounded corners to the video itself */
}

/* Shop the Look Button */
.nasir-shop-button {
    position: absolute; /* Overlay the video */
    bottom: 20px; /* Position at the bottom, adjust as needed */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for exact centering */
    background-color: rgba(0, 0, 0, 0.75); /* Slightly more opaque */
    color: white;
    padding: 10px 20px;
    border-radius: 25px; /* More rounded, pill-like */
    text-decoration: none;
    font-weight: 600; /* Semibold */
    font-size: 16px; /* Slightly larger for desktop */
    z-index: 10;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease; /* Fade in on hover, color change */
    white-space: nowrap; /* Prevent text wrapping */
    min-width: 120px;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
}

/* Show button on video item hover or focus */
.nasir-video-item:hover .nasir-shop-button,
.nasir-video-item:focus-within .nasir-shop-button {
    opacity: 1; /* Fade in on hover/focus */
    background-color: rgba(0, 0, 0, 0.9); /* Darker on hover */
}

/* Navigation Arrows */
.nasir-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px 18px; /* Larger padding for desktop */
    cursor: pointer;
    z-index: 20;
    border-radius: 50%; /* Perfect circle */
    font-size: 28px; /* Larger arrow icon */
    line-height: 1; /* Ensures vertical centering of arrow symbol */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.nasir-slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1); /* Slight grow effect on hover */
}

.nasir-slider-arrow.left {
    left: 0px; /* Flush with wrapper edge */
}

.nasir-slider-arrow.right {
    right: 0px; /* Flush with wrapper edge */
}

/* --- Mobile & Tablet Responsive Adjustments --- */

/* For screens up to 1024px (e.g., larger tablets, small laptops) */
@media (max-width: 1024px) {
    .nasir-video-slider-wrapper {
        padding: 30px 15px;
    }
    .nasir-video-item {
        width: 240px;  
        height: 427px; /* 240 * 16 / 9 */
        margin-right: 25px;
        border-radius: 10px;
    }
    .nasir-video-item video {
        border-radius: 10px;
    }
    .nasir-shop-button {
        padding: 9px 18px;
        font-size: 15px;
        bottom: 18px;
        border-radius: 22px;
        min-width: 110px;
    }
    .nasir-slider-arrow {
        padding: 10px 16px;
        font-size: 26px;
        left: -5px; /* Slightly push arrows out for more visibility */
        right: -5px;
    }
}

/* For screens up to 768px (e.g., tablets in portrait, larger phones) */
@media (max-width: 768px) {
    .nasir-video-slider-wrapper {
        padding: 20px 10px; /* Reduced padding */
    }
    .nasir-video-item {
        width: 180px; /* Moderate width for mobile vertical videos */
        height: 320px; /* 180 * 16 / 9 */
        margin-right: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Lighter shadow */
    }
    .nasir-video-item video {
        border-radius: 8px;
    }
    .nasir-shop-button {
        padding: 8px 15px;
        font-size: 14px;
        bottom: 15px;
        border-radius: 20px;
        min-width: 100px;
    }
    .nasir-slider-arrow {
        /* Smaller arrows for effective use on smaller screens */
        width: 38px; /* Fixed width for perfect circle */
        height: 38px; /* Fixed height for perfect circle */
        padding: 0; /* Remove padding, use width/height for size */
        font-size: 20px; /* Smaller font size for icon */
        left: 0px;  
        right: 0px;
        background-color: rgba(0, 0, 0, 0.6); /* Slightly darker for better visibility */
    }
    .nasir-slider-arrow:hover {
        transform: translateY(-50%) scale(1); /* No scale on hover for mobile to avoid accidental touches */
    }
}

/* For screens up to 480px (e.g., most smartphones in portrait) */
@media (max-width: 480px) {
    .nasir-video-slider-wrapper {
        padding: 15px 5px; /* Minimal padding */
    }
    .nasir-video-item {
        width: 150px; /* Even smaller for very small screens */
        height: 267px; /* 150 * 16 / 9 */
        margin-right: 10px;
        border-radius: 6px;
    }
    .nasir-video-item video {
        border-radius: 6px;
    }
    .nasir-shop-button {
        padding: 6px 12px;
        font-size: 12px;
        bottom: 10px;
        border-radius: 18px;
        min-width: 80px;
    }
    .nasir-slider-arrow {
        width: 32px; /* Even smaller fixed width */
        height: 32px; /* Even smaller fixed height */
        font-size: 16px; /* Even smaller font size */
        left: 0px; /* Closer to edge */
        right: 0px;
    }
}
