/**
 * Products Page Styles
 * Responsive design: 3 columns (desktop) -> 2 columns (tablet) -> 1 column (mobile)
 */

/* Fix navbar overlap issue */
body {
    padding-top: 0;
}

.header_area .header_navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    background-color: #fff;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.header_area .navbar {
    padding: 15px 0;
}

.header_area .navbar-brand img {
    max-height: 70px;
    width: auto;
}

/* Navbar text visibility */
.header_area .navbar-nav .nav-link {
    color: #2c3e50;
    font-weight: 500;
    padding: 8px 15px;
    transition: color 0.3s ease;
}

.header_area .navbar-nav .nav-link:hover,
.header_area .navbar-nav .nav-link.active {
    color: #FFB316;
}

.header_area .navbar-toggler {
    color: #2c3e50;
}

.header_area .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44, 62, 80, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile navbar fix */
@media (max-width: 991px) {
    .header_area .navbar-brand img {
        max-height: 85px;
    }
    
    .header_area .navbar-toggler {
        border: none;
        padding: 0;
    }
    
    .header_area .navbar-collapse {
        background-color: #fff;
        padding: 15px 20px;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
        margin-top: 15px;
        border-radius: 5px;
    }
    
    .header_area .navbar-nav {
        padding: 10px 0;
    }
    
    .header_area .navbar-nav .nav-item {
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .header_area .navbar-brand img {
        max-height: 40px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better tap targets for touch devices */
@media (hover: none) and (pointer: coarse) {
    .view-details-btn,
    .cert-badge,
    .main-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========================================
   PAGE TITLE SECTION
   ======================================== */

.page_title_area {
    background-color: #f8f9fa;
    padding-top: 140px;
    padding-bottom: 100px;
}

.page_title_content h2.title {
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.page_title_content p {
    font-size: 18px;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   PRODUCT CARD STYLES
   ======================================== */

.products_area {
    background-color: #fff;
}

.products_area .container {
    padding-left: 15px;
    padding-right: 15px;
}

#products-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    row-gap: 40px;
}

#products-container > [class*='col-'] {
    padding-left: 0;
    padding-right: 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Product Card Image */
.product-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

/* Placeholder Image */
.product-placeholder-image {
    text-align: center;
    color: #adb5bd;
}

.product-placeholder-image i {
    font-size: 80px;
    display: block;
    margin-bottom: 10px;
}

.product-placeholder-image p {
    font-size: 14px;
    margin: 0;
}

/* Product Category Badge */
.product-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 179, 22, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Card Content */
.product-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.product-card-description {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Product Highlights */
.product-highlights {
    margin-bottom: 20px;
}

.product-highlights h5 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
}

.features-list li i {
    color: #28a745;
    margin-right: 8px;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Product Certifications */
.product-certifications {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 8px;
}

.cert-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

/* View Details Button */
.view-details-btn {
    margin-top: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    touch-action: manipulation;
}

.view-details-btn i {
    transition: transform 0.3s ease;
}

.view-details-btn:hover i {
    transform: translateX(5px);
}

.view-details-btn:active {
    transform: scale(0.98);
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-dialog.modal-xl {
    max-width: 1200px;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #FFB316;
    border-radius: 12px 12px 0 0;
    padding: 20px 30px;
}

.modal-header .close {
    padding: 0;
    margin: -1rem -1rem -1rem auto;
    font-size: 2rem;
    opacity: 0.5;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 20px 30px;
    gap: 10px;
}

/* Modal Product Image Carousel */
.product-image-carousel {
    margin-bottom: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.product-image-carousel .carousel-inner {
    border-radius: 8px;
}

.product-image-carousel .carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.product-image-carousel .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.product-image-carousel .carousel-control-prev,
.product-image-carousel .carousel-control-next {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 179, 22, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.product-image-carousel .carousel-control-prev {
    left: 15px;
}

.product-image-carousel .carousel-control-next {
    right: 15px;
}

.product-image-carousel .carousel-control-prev:hover,
.product-image-carousel .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(255, 179, 22, 1);
    box-shadow: 0 2px 10px rgba(255, 179, 22, 0.5);
}

.product-image-carousel .carousel-control-prev span,
.product-image-carousel .carousel-control-next span {
    font-size: 20px;
    font-weight: bold;
}

.product-image-carousel .carousel-indicators {
    bottom: -35px;
}

.product-image-carousel .carousel-indicators li {
    width: 60px;
    height: 60px;
    margin: 0 5px;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.5;
    border: 2px solid transparent;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.product-image-carousel .carousel-indicators li.active {
    opacity: 1;
    border-color: #FFB316;
    box-shadow: 0 2px 8px rgba(255, 179, 22, 0.4);
}

.product-image-carousel .carousel-indicators li:hover {
    opacity: 0.8;
    border-color: #FFB316;
}

.product-image-carousel .carousel-indicators li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-product-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-placeholder-image {
    width: 100%;
    height: 300px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    margin-bottom: 20px;
}

.modal-placeholder-image i {
    font-size: 100px;
    margin-bottom: 10px;
}

/* Product Detail Sections */
.product-detail-name {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.product-detail-category {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 20px;
}

.product-detail-section {
    margin-bottom: 25px;
}

.product-detail-section h5 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-detail-section h5 i {
    color: #FFB316;
}

.product-detail-section p {
    font-size: 15px;
    color: #495057;
    line-height: 1.7;
    text-align: justify;
}

/* Detail Lists */
.features-list-detail,
.applications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list-detail li,
.applications-list li {
    font-size: 15px;
    color: #495057;
    margin-bottom: 10px;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
}

.features-list-detail li i,
.applications-list li i {
    color: #28a745;
    margin-right: 10px;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Certifications in Detail View */
.certifications-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 10px;
    margin-bottom: 20px;
}

.cert-badge-large {
    display: inline-block;
    background-color: #FFB316;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.detail-text {
    font-size: 15px;
    color: #495057;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Desktop: 3 columns */
@media (min-width: 992px) {
    #products-container {
        gap: 30px;
        row-gap: 40px;
    }
    
    #products-container > [class*='col-'] {
        flex: 0 0 calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
    
    .page_title_area {
        padding-top: 140px;
        padding-bottom: 100px;
    }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .modal-dialog.modal-xl {
        max-width: 90%;
    }
    
    .product-image-carousel .carousel-item img {
        height: 320px;
    }
    
    .product-image-carousel .carousel-indicators li {
        width: 50px;
        height: 50px;
    }
    
    #products-container {
        gap: 25px;
        row-gap: 35px;
    }
    
    #products-container > [class*='col-'] {
        flex: 0 0 calc(50% - 12.5px);
        max-width: calc(50% - 12.5px);
    }
    
    .products_area .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .page_title_area {
        padding-top: 130px !important;
        padding-bottom: 70px !important;
    }
    
    .page_title_content h2.title {
        font-size: 38px;
    }

    .product-card-title {
        font-size: 22px;
    }

    .modal-body {
        padding: 20px;
    }
    
    .modal-header {
        padding: 18px 25px;
    }
    
    .modal-footer {
        padding: 18px 25px;
    }

    .product-detail-name {
        font-size: 28px;
    }
    
    .product-card-image {
        height: 220px;
    }
    
    .product-card-content {
        padding: 22px;
    }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .product-image-carousel {
        margin-bottom: 50px;
    }
    
    .product-image-carousel .carousel-item img {
        height: 250px;
    }
    
    .product-image-carousel .carousel-indicators {
        bottom: -30px;
    }
    
    .product-image-carousel .carousel-indicators li {
        width: 45px;
        height: 45px;
    }
    
    .product-image-carousel .carousel-control-prev,
    .product-image-carousel .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    
    #products-container {
        gap: 20px;
        row-gap: 25px;
    }
    
    #products-container > [class*='col-'] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .products_area .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .page_title_area {
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }
    
    .page_title_area .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .page_title_content h2.title {
        font-size: 32px;
    }

    .page_title_content p {
        font-size: 16px;
        padding: 0 15px;
    }

    .product-card-image {
        height: 200px;
    }

    .product-card-content {
        padding: 20px;
    }

    .product-card-title {
        font-size: 20px;
    }

    .product-card-description {
        font-size: 14px;
    }

    .modal-body {
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .modal-footer .main-btn,
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    .product-detail-name {
        font-size: 24px;
    }

    .product-detail-section h5 {
        font-size: 16px;
    }

    .cert-badge-large {
        font-size: 12px;
        padding: 6px 12px;
    }

    .modal-product-image {
        margin-bottom: 15px;
    }
    
    .modal-placeholder-image {
        height: 200px;
    }
    
    .products_area {
        padding-top: 30px !important;
        padding-bottom: 80px !important;
    }
}

@media (max-width: 576px) {
    .modal-dialog.modal-xl {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .product-image-carousel {
        margin-bottom: 40px;
    }
    
    .product-image-carousel .carousel-item img {
        height: 200px;
    }
    
    .product-image-carousel .carousel-indicators {
        bottom: -25px;
    }
    
    .product-image-carousel .carousel-indicators li {
        width: 35px;
        height: 35px;
        margin: 0 3px;
    }
    
    .product-image-carousel .carousel-control-prev,
    .product-image-carousel .carousel-control-next {
        width: 30px;
        height: 30px;
    }
    
    #products-container {
        gap: 15px;
        row-gap: 20px;
    }
    
    .products_area .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page_title_area {
        padding-top: 100px !important;
        padding-bottom: 50px !important;
    }
    
    .page_title_area .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page_title_content h2.title {
        font-size: 28px;
    }
    
    .page_title_content p {
        font-size: 14px;
        padding: 0 10px;
    }
    
    .product-category {
        font-size: 10px;
        padding: 4px 8px;
        left: 10px;
        top: 10px;
    }
    
    .product-card-image {
        height: 180px;
    }
    
    .product-card-content {
        padding: 15px;
    }
    
    .product-card-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .product-card-description {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .features-list li,
    .features-list-detail li,
    .applications-list li {
        font-size: 13px;
    }

    .cert-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .product-highlights h5 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .view-details-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-footer {
        padding: 12px 15px;
    }
    
    .product-detail-name {
        font-size: 20px;
    }
    
    .product-detail-category {
        font-size: 14px;
    }
    
    .product-detail-section {
        margin-bottom: 20px;
    }
    
    .product-detail-section h5 {
        font-size: 15px;
    }
    
    .product-detail-section p {
        font-size: 14px;
    }
    
    .detail-text {
        font-size: 14px;
    }
    
    .modal-placeholder-image {
        height: 150px;
    }
    
    .modal-placeholder-image i {
        font-size: 60px;
    }
    
    .products_area {
        padding-top: 20px !important;
        padding-bottom: 60px !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.text-center {
    text-align: center !important;
}

/* Back to top button positioning */
.back-to-top {
    z-index: 98;
}

/* Modal z-index */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}
