/* Page Header with Slideshow Background */
.page-header-slideshow {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-header-slideshow .slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-header-slideshow .slide {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeInSlide 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.page-header-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay — transparent top, dark bottom for text readability */
.page-header-slideshow .slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}

.page-header-slideshow .slide-text {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 5;
    animation: slideTextFadeIn 1s ease-in-out;
    background: none;
    backdrop-filter: none;
    padding: 1.5rem 2rem;
    border-radius: 0;
    max-width: 80%;
}

.page-header-slideshow .slide-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header-slideshow .slide-text p {
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

@keyframes slideTextFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-header-slideshow .slide.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-header-slideshow .prev,
.page-header-slideshow .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.5);
    user-select: none;
    z-index: 10;
}

.page-header-slideshow .next {
    right: 0;
}

.page-header-slideshow .prev {
    left: 0;
}

.page-header-slideshow .prev:hover,
.page-header-slideshow .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.page-header-slideshow .dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.page-header-slideshow .dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.page-header-slideshow .dot.active {
    background-color: #ff6b35;
}



@media (max-width: 768px) {
    .page-header-slideshow {
        min-height: 350px;
    }

    .page-header-slideshow .slide-text {
        padding: 1rem 1.5rem;
        max-width: 90%;
        bottom: 8%;
    }

    .page-header-slideshow .slide-text h2 {
        font-size: 1.8rem;
    }

    .page-header-slideshow .slide-text p {
        font-size: 1rem;
    }

    .page-header-slideshow .prev,
    .page-header-slideshow .next {
        padding: 12px;
        font-size: 14px;
    }

    .page-header-slideshow .dot {
        height: 10px;
        width: 10px;
        margin: 0 4px;
    }
}

/* Product Detail Page Styles */
.product-detail-section {
    padding: 5rem 0;
}

.product-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.products-showcase {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.product-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.product-item:nth-child(even) {
    direction: rtl;
}

.product-item:nth-child(even) > * {
    direction: ltr;
}

.product-gallery {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.product-info h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-info p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-color);
}

.product-features {
    list-style: none;
}

.product-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-features i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .product-item {
        grid-template-columns: 1fr;
    }

    .product-item:nth-child(even) {
        direction: ltr;
    }

    .main-image {
        height: 300px;
    }
}

/* Slide Indicators */
.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--secondary-color);
    width: 30px;
    border-radius: 6px;
}

/* Category Filter Section */
.category-filter-section {
    background: #f8f9fa;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e8ecf0;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* ── Unified filter button — brand-aligned ── */
.filter-btn {
    padding: 0.5rem 1.4rem;
    background: #fff;
    color: #444;
    border: 1.5px solid #d0d5dd;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.filter-btn:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.filter-btn.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .category-filters {
        gap: 0.5rem;
        display: none;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Mobile dropdown — hidden on desktop, shown on mobile */
.category-filter-mobile {
    display: none;
    width: 100%;
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    background: #fff;
    border: 1.5px solid #d0d5dd;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23444444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    cursor: pointer;
    transition: border-color 0.18s;
}

.category-filter-mobile:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.category-filter-mobile option {
    background: #fff;
    color: #444;
    font-weight: 500;
}

@media (max-width: 768px) {
    .category-filter-mobile {
        display: block;
    }
}

/* Product Gallery Grid */
.products-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-gallery-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.product-gallery-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(26, 84, 144, 0.2);
    border-color: rgba(255, 107, 53, 0.3);
}

.product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.5s ease;
    min-width: 100%;
    min-height: 100%;
    padding: 1rem;
}

.product-gallery-card:hover .product-image img {
    transform: scale(1.03);
}

.product-card-info {
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--white);
    transition: all 0.3s ease;
}

.product-gallery-card:hover .product-card-info {
    background: linear-gradient(135deg, rgba(26, 84, 144, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
}

.product-card-info h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.product-gallery-card:hover .product-card-info h3 {
    color: #ff6b35;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.product-card-info p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.show-more-btn {
    background: transparent;
    color: #ff6b35;
    border: 2px solid #ff6b35;
    padding: 0.7rem 1.8rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.show-more-btn:hover {
    background: #ff6b35;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

@media (max-width: 768px) {
    .products-gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-gallery-card {
        max-width: 100%;
    }

    .product-image {
        height: 220px;
    }

    .product-card-info {
        padding: 1.2rem 1rem;
    }

    .product-card-info h3 {
        font-size: 1rem;
    }
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.product-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    z-index: 2001;
    background: var(--white);
    border-radius: 20px;
    max-width: 860px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #ff6b35;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem 3rem;
    align-items: start;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 12px;
    background: #f5f7fa;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-info {
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-info h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-info p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .modal-image {
        max-height: 280px;
    }

    .modal-info h2 {
        font-size: 1.4rem;
    }

    .modal-info p {
        font-size: 0.95rem;
    }
}

/* Pagination */
#paginationContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0 1rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 1rem;
    border: 2px solid #2c3e50;
    background: transparent;
    color: #2c3e50;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.page-btn:hover:not(.disabled) {
    background: #1a5490;
    border-color: #1a5490;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 84, 144, 0.3);
}

.page-btn.active {
    background: #f39c12;
    border-color: #f39c12;
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Product Card Image Slider ───────────────────────────────────────────── */
.card-slider {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.card-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.card-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.5s ease;
}

.product-gallery-card:hover .card-slide img {
    transform: scale(1.03);
}

/* Prev / Next arrows */
.card-slider-prev,
.card-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 28px;
    height: 44px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
    padding: 0;
    line-height: 1;
}

.card-slider-prev { left: 4px; }
.card-slider-next { right: 4px; }

.product-gallery-card:hover .card-slider-prev,
.product-gallery-card:hover .card-slider-next {
    opacity: 1;
}

.card-slider-prev:hover,
.card-slider-next:hover {
    background: rgba(255,107,53,0.85);
}

/* Dot indicators */
.card-slider-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}

.card-slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.card-slider-dot.active {
    background: #ff6b35;
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .card-slider { height: 220px; }
    .card-slider-prev,
    .card-slider-next { opacity: 1; width: 24px; height: 38px; font-size: 0.85rem; }
}

/* ── Modal Image Slider ───────────────────────────────────────────────────── */
.modal-slider {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f7fa;
    aspect-ratio: 4/3;
    min-height: 260px;
}

.modal-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.ms-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
}

/* Prev / Next arrows */
.modal-slider-prev,
.modal-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 56px;
    border-radius: 4px;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
    padding: 0;
    line-height: 1;
}

.modal-slider-prev { left: 6px; }
.modal-slider-next { right: 6px; }

.modal-slider-prev:hover,
.modal-slider-next:hover {
    background: rgba(255,107,53,0.9);
}

/* Dot indicators */
.modal-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.ms-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.ms-dot.active {
    background: #ff6b35;
    transform: scale(1.35);
}

@media (max-width: 768px) {
    .modal-slider {
        aspect-ratio: 4/3;
        min-height: 200px;
    }
    .modal-slider-prev,
    .modal-slider-next {
        width: 28px;
        height: 44px;
        font-size: 1.1rem;
    }
}
