/* components.css */

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
}

.hero-img {
    height: 800px;
    object-fit: cover;
    object-position: center;
}

.hero-section .carousel-caption {
    bottom: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.2); /* Dark overlay for better text readability */
}

.hero-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-announcement);
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-bg);
    letter-spacing: 1px;
}

.btn-hero {
    background: transparent;
    color: var(--color-bg);
    border: 2px solid var(--color-bg);
    transition: var(--transition-fast);
}

.btn-hero:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

/* Override Bootstrap carousel controls to make them look premium */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: var(--transition-fast);
}
.hero-section:hover .carousel-control-prev,
.hero-section:hover .carousel-control-next {
}

/* Product Cards */
.filter-nav .nav-link {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: var(--transition-fast);
}
.filter-nav .nav-link.active,
.filter-nav .nav-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.product-card {
    transition: var(--transition-normal);
}

.product-img-wrapper {
    background-color: var(--color-bg-light);
}

.product-actions {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-card:hover .add-to-cart-wrapper {
    opacity: 1 !important;
}

.bg-new {
    background-color: var(--color-new);
}

.bg-sale {
    background-color: var(--color-sale);
}

.product-title {
    font-size: var(--text-base);
    font-weight: 400;
}

/* Collections Section */
.letter-spacing-md {
    letter-spacing: 2px;
}
.collection-card img {
    transform: scale(1);
    transition: transform var(--transition-slow);
}
.collection-card:hover img {
    transform: scale(1.05);
}
.collection-title-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    width: 100%;
}

/* Utilities for New Sections */
.hover-scale:hover {
    transform: scale(1.05);
}
.z-index-1 {
    z-index: 1;
}
.z-index-2 {
    z-index: 2;
}
.cursor-pointer {
    cursor: pointer;
}
.hover-opacity-50:hover {
    opacity: 0.5 !important;
}
.grayscale {
    filter: grayscale(100%);
}
.hover-grayscale-0:hover {
    filter: grayscale(0%);
}
.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* SaaS Product Card Design */
.product-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.saas-card {
    width: 100%;
    padding-top: 133%;
    position: relative;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}
.saas-card:hover {
    transform: translateY(-5px);
}
.saas-card-imgs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    display: block;
    background: #f8f8f8;
}
.saas-card-imgs img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}
.img-hover {
    opacity: 0;
}
.saas-card:hover .img-hover {
    opacity: 1;
}

.fancy-cart-btn {
    position: absolute;
    bottom: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: rgba(255, 216, 20, 0.9); /* #ffd814 with some transparency */
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 10;
    text-decoration: none;
}
.saas-card:hover .fancy-cart-btn {
    background: #000;
    color: #ffd814;
    transform: scale(1.1);
}

.saas-price-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ffd814;
    color: #000;
    padding: 12px 24px;
    border-top-left-radius: 24px;
    border-bottom-right-radius: 24px;
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 10;
    line-height: 1;
    white-space: nowrap;
    max-width: 80%;
}
.saas-price-tag::before {
    content: "";
    position: absolute;
    top: -24px;
    right: 0;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 0 0, transparent 24px, #ffd814 24.5px);
}
.saas-price-tag::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -24px;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 0 0, transparent 24px, #ffd814 24.5px);
}
.product-info-below {
    padding: 12px 8px 0 8px;
}
.product-title-below {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    line-height: 1.3;
}
.product-title-below:hover {
    color: #555;
}

/* ── Mobile Overrides for Product Cards ── */
@media (max-width: 767px) {
    .saas-card {
        border-radius: 16px;
    }
    .saas-card-imgs {
        border-radius: 16px;
    }
    .saas-price-tag {
        padding: 6px 12px;
        font-size: 0.95rem;
        border-top-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }
    .saas-price-tag::before {
        top: -16px;
        width: 16px;
        height: 16px;
        background: radial-gradient(circle at 0 0, transparent 16px, #ffd814 16.5px);
    }
    .saas-price-tag::after {
        left: -16px;
        width: 16px;
        height: 16px;
        background: radial-gradient(circle at 0 0, transparent 16px, #ffd814 16.5px);
    }
    .fancy-cart-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        bottom: 8px;
        left: 8px;
    }
    .product-title-below {
        font-size: 0.85rem;
        line-height: 1.25;
        margin-top: 4px;
    }
    .product-info-below {
        padding: 8px 4px 0 4px;
    }
}
