/*hero header starts*/
.hero-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    color: white;
    min-height: 400px;
    direction: rtl;
    gap: 40px;

}




.content-side{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;

}

.content-side .subtitle{
    color: var(--gold-primary);
    letter-spacing: 2px;
    font-size: 4rem;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}



.content-side h1,
.content-side h2,
.content-side p,
.content-side .subtitle{
    width: 100%;
    text-align: right;
}

.content-side h2{
    color: var(--gold-dark);
}

.content-side p{
    color: gray;
    line-height: 1.8;
    max-width: 500px;
    font-size: 1rem;
}

.image-side{
    flex: 1;
    display: flex;
    justify-content: flex-start;
    mask-image: linear-gradient(to left, transparent, black 20%);
    -webkit-mask-image: linear-gradient(to left, transparent, black 20%);
}

.image-side img{
    max-width: 600px;
    height: auto;

}


/*hero header ends*/

/*filter bar starts*/

.filter-btn{
    background: transparent;
    color: white;
    border: 1px solid var(--border);
    font-size: .9rem;
    transition: all .3s;

}

.filter-btn:focus,
.filter-btn:focus-visible,
.form-control:focus{
    outline: none !important;
    box-shadow: none !important;
}

.filter-btn.active{
    background: rgba(255, 255, 0, 0.2);
    color: var(--gold-primary);
}

.form-control{
    background: var(--color-bg) !important;
    color: white !important;
    border: 1px solid var(--border) !important;
}

/*filter bar ends*/


/*spinner starts*/

.spinner{
    width: 40px;
    height: 40px;
    border: 4px solid var(--gold-primary);
    border-top: 4px solid transparent;
    border-radius: 50%;
    margin: 1rem auto;
    animation: spin 0.8s linear infinite;
}


@keyframes spin {

    from{ transform: rotate(0deg); }
    to{ transform: rotate(360deg); }

}


/*spinner ends*/

.carpet-item {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.carpet-cover{
    height: 250px;

}

.carpet-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}



/* --- Floating Badge --- */
.carpet-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--color-bg);
    color: var(--gold-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    z-index: 2;
}

footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }



/* --- Content Section --- */
.carpet-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.carpet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--color-border);
}

.carpet-design {
    color: var(--color-text-white);
    font-size: 1.2rem;
    font-weight: bold;
}

.carpet-id {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    background: var(--color-surface-alt);
    padding: 3px 8px;
    border-radius: 6px;
}

.carpet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes to the bottom */
}

.origin-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.origin-value {
    color: var(--color-text-white);
    font-weight: bold;
    font-size: 0.95rem;
}

/* --- Load More Button --- */
#load-more-btn {
    background-color: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.2s ease;
}

#load-more-btn:hover {
    background-color: var(--color-accent-hover);
    box-shadow: 0 0 15px var(--color-accent-soft);
}
#load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* --- Specifications Section (Dimensions & Area) --- */
.carpet-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--color-border);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.text-end {
    text-align: right;
}

.spec-label {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-value {
    color: var(--color-text-white);
    font-size: 0.95rem;
    font-weight: bold;
}


@media (max-width: 1000px) {


    .hero-header{
        height: 300px;
        min-height: 0;
        display: block;
        padding: 0;

    }

    .hero-header .content-side .subtitle{
        font-size: 2rem;
    }

    .hero-header .content-side h1{
        font-size: 1.2rem;
    }

    .hero-header .content-side h2{
        font-size: 1rem;
    }

    .hero-header .content-side p{
        display: none;
    }

    .hero-header .content-side{
        position: absolute;
        top: 0;
        right: 10px;

    }

    .hero-header .image-side{
        width: 100%;
        height: 100%;
        justify-content: center;
        mask-image: linear-gradient(to right, black 5%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 5%, transparent 100%);

    }

    .hero-header .image-side img{
        width: 100%;
        max-width: 100%;

    }
}

@media (max-width: 768px) {
    .filtering-container{
        left: 0;
        width: 100%;
    }

    #exit {
        position: absolute;
        top: 45px;
        left: 15px;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        display: block !important;
    }

    .categories{
        margin-bottom: 1rem;
    }

    .filter-btn{
        font-size: .7rem;
    }
}

