/* Video Stories Styling */
.video-stories-container {
    position: relative;
    margin-bottom: 20px;
    padding: 10px 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.video-stories-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 5px 10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.video-stories-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.video-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 70px;
}

.video-story-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
    margin-bottom: 5px;
    overflow: hidden; /* Add this to ensure the image doesn't overflow */
}

.video-story-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid white;
}

.video-story-name {
    font-size: 0.75rem;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Video Modal Styling */
.video-container {
    position: relative;
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: black;
}

.video-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

/* Animation for stories */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.video-story-circle:hover {
    animation: pulse 1s infinite;
}

.stories-section-title {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    margin: 0 0 5px 15px;
}

/* Prevent video download styles */
video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

video::-webkit-media-controls-panel {
    width: calc(100% + 30px);
}

video::-webkit-media-controls-download-button {
    display: none !important;
}

/* Hide download button in Firefox */
video::-moz-media-controls-download-button {
    display: none !important;
}

/* Disable text selection on video elements */
video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Product Card Styling */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* Square aspect ratio */
    background-color: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 10px;
}

.product-image img:hover {
    transform: scale(1.05);
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.home-product-title-container {
    height: 90px; /* Fixed height */
    margin-bottom: 10px;
    overflow: hidden;
}

.home-product-title {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    max-height: 100%;
}

.home-product-title:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.price {
    font-size: 1.1rem;
    color: #dc3545;
    font-weight: bold;
    margin-top: auto;
}

.button-container {
    margin-top: auto;
}

.badge-custom {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.ratings-container {
    margin: 10px 0;
}

.interest-tag {
    font-size: 0.8rem;
    color: #6c757d;
}

.carousel-inner {
    border-radius: 8px;
    overflow: hidden;
}

.section-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: currentColor;
    border-radius: 3px;
}

/* Product Carousel Styles */
.product-section {
    margin-bottom: 2.5rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: var(--primary-dark);
    transform: translateX(3px);
}

/* Enhanced Carousel Scrolling */
.product-carousel-container {
    position: relative;
    margin: 0 -15px;
    padding: 0 15px;
    overflow: hidden;
}

.product-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 5px 0;
    margin: 0 -5px;
}

.product-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.product-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.product-carousel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.product-carousel::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.product-carousel:after {
    content: '';
    flex: 0 0 1px;
    /* This creates a small invisible element at the end to improve scroll snapping */
}

.product-carousel-item {
    flex: 0 0 auto;
    width: 65%; /* Adjust based on your design */
    max-width: 250px;
    padding: 0 5px;
    scroll-snap-align: start;
}

/* Navigation buttons for carousel */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.carousel-nav-btn.prev {
    left: 5px;
}

.carousel-nav-btn.next {
    right: 5px;
}

.product-carousel-container:hover .carousel-nav-btn {
    opacity: 1;
}

.carousel-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Make product cards in carousel more compact */
.product-carousel .product-card {
    margin-bottom: 0;
}

.product-carousel .product-card .home-product-title-container {
    height: 60px; /* Smaller height for mobile */
}

.product-carousel .product-card .home-product-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    max-height: 60px;
}

.product-carousel .product-card .price {
    font-size: 1rem;
}

.product-carousel .product-card .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* See All Card */
.see-all-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}

.see-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.see-all-link:hover {
    background-color: #e9ecef;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.see-all-content {
    text-align: center;
}

.see-all-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.see-all-link i {
    font-size: 1.5rem;
}

/* Skeleton Loader */
.skeleton-loader {
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.skeleton-image {
    height: 180px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-price {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 40%;
}

.skeleton-button {
    height: 36px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .product-carousel-item {
        width: 65%;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .home-product-title-container {
        height: 70px; /* Smaller for mobile */
    }
    
    .carousel-nav-btn {
        display: none; /* Hide navigation buttons on mobile */
    }
}