/* ==================================================
   PLASTIC PRODUCTS SECTION
================================================== */
.plastic-products-section {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(19, 56, 128, 0.08), transparent 45%),
        radial-gradient(circle at 90% 15%, rgba(237, 29, 38, 0.12), transparent 40%),
        radial-gradient(circle at top, #ffffff 0%, #f3f6f4 55%, #eef1ef 100%);
    color: #0b1f2a;
}

.products-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: calc(var(--nav-height, 70px) + 48px) 20px 50px;
    width: 100%;
}

/* Hero */
.plastic-products-section .page-hero {
    position: relative;
    border-radius: 26px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 249, 255, 0.96) 60%, rgba(240, 246, 255, 0.98) 100%);
    border: 1px solid rgba(19, 56, 128, 0.12);
    padding: 32px;
    display: grid;
    gap: 20px;
    box-shadow: 0 24px 60px rgba(12, 31, 55, 0.12);
    margin-bottom: 20px;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.plastic-products-section .page-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(19, 56, 128, 0.18), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.plastic-products-section .page-hero::before {
    content: "";
    position: absolute;
    left: -140px;
    bottom: -140px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(237, 29, 38, 0.18), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.plastic-products-section .page-hero > * {
    position: relative;
    z-index: 1;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-brand .logos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-brand .logo {
    height: 42px;
    width: 42px;
    object-fit: contain;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
    font-weight: 800;
    color: #133880;
}

.hero-copy .title {
    margin: 6px 0;
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    font-weight: 800;
}

.hero-copy .subtitle {
    margin: 0;
    color: #566272;
    font-size: 1rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(19, 56, 128, 0.12);
    background: rgba(255, 255, 255, 0.76);
    padding: 8px 12px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(19, 56, 128, 0.12);
    flex: 1;
    min-width: 240px;
}

.search input {
    border: 0;
    outline: 0;
    padding: 10px 8px;
    font-size: 15px;
    width: 100%;
    font-weight: 600;
    color: #0b1f2a;
    background: transparent;
}

.search:focus-within {
    border-color: rgba(19, 56, 128, 0.4);
    box-shadow: 0 12px 30px rgba(19, 56, 128, 0.18);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #133880;
    display: flex;
    align-items: center;
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

.filter-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 210px;
}

.filter-select label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 800;
    color: #133880;
}

.filter-select select {
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(19, 56, 128, 0.2);
    outline: none;
    background: #fff;
    font-weight: 600;
    color: #0b1f2a;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-select select:hover,
.filter-select select:focus {
    border-color: rgba(19, 56, 128, 0.5);
    box-shadow: 0 10px 24px rgba(19, 56, 128, 0.12);
}

.product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(19, 56, 128, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.results-count {
    color: #566272;
    font-size: 14px;
}

.active-filters {
    color: #566272;
    font-size: 14px;
    background: #f4f8f6;
    border: 1px solid #e1ece7;
    padding: 6px 10px;
    border-radius: 999px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: linear-gradient(140deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(19, 56, 128, 0.12);
    box-shadow: 0 16px 34px rgba(11, 31, 42, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: 220px 220px;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(11, 31, 42, 0.18);
    border-color: rgba(19, 56, 128, 0.2);
}

.product-card .card-image {
    width: 100%;
    height: auto;
    overflow: visible;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
}

.product-card picture {
    display: block;
    width: 100%;
}

.product-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #133880;
    padding: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination button {
    background-color: #0a4e96;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: #133880;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: default;
}

.pagination button.active {
    background-color: #ED1C24;
    color: #fff;
    font-weight: 700;
}

/* -----------------------------------------
   SIDEBAR
------------------------------------------ */
.product-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 95%;
    height: 100%;
    background: #fff;
    box-shadow: -6px 0 25px rgba(0,0,0,0.25);
    transition: transform 0.35s ease;
    z-index: 9999;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: 0 0 0 12px;
    transform: translateX(100%);
}

.product-sidebar.open {
    transform: translateX(0);
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
}

/* Sidebar Content */
.sidebar-content img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
}

.sidebar-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0a4e96;
    margin: 15px 0 5px;
}

.sidebar-content p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Close Button */
.close-btn {
    position: absolute;
    right: 18px;
    top: 15px;
    font-size: 32px;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ED1C24;
}

/* Inquire Button */
.inquire-btn {
    width: 100%;
    padding: 14px 0;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.inquire-btn:hover {
    background: #155cc0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(21,92,192,0.35);
}

/* -----------------------------------------
   INQUIRY FORM
------------------------------------------ */
#inquiryForm {
    display: none;
    margin-top: 10px;
    width: 100%;
}

#inquiryForm h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0a4e96;
    margin-bottom: 15px;
}

#inquiryForm input,
#inquiryForm textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    margin-bottom: 12px;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#inquiryForm input:focus,
#inquiryForm textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

#inquiryForm input[readonly] {
    background: #f5f7fa;
    font-weight: 600;
    color: #333;
    cursor: default;
}

#inquiryForm textarea {
    resize: vertical;
    min-height: 90px;
}

#inquiryForm .submit-btn {
    width: 100%;
    padding: 14px 0;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(10,78,150,0.3);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

#inquiryForm .submit-btn:hover {
    background: #155cc0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(19,56,128,0.35);
}

/* -----------------------------------------
   FORM NOTIFICATIONS
------------------------------------------ */
.form-notification {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.form-notification.success {
    display: block;
    background: #e6f9f0;
    color: #067647;
    border: 1px solid #34d399;
}

.form-notification.error {
    display: block;
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f87171;
}

/* -----------------------------------------
   SUCCESS POPUP
------------------------------------------ */
.inquiry-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 25, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10050;
    padding: 20px;
}

.inquiry-popup.show {
    opacity: 1;
    pointer-events: auto;
}

.inquiry-popup-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px 20px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    transform: translateY(10px);
    transition: transform 0.2s ease;
}

.inquiry-popup.show .inquiry-popup-card {
    transform: translateY(0);
}

.popup-badge {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #e6f9f0;
    color: #067647;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid #34d399;
}

.inquiry-popup-card h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    color: #0a4e96;
}

.inquiry-popup-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.4;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #3b3b3b;
    cursor: pointer;
}

.popup-close:hover {
    color: #ED1C24;
}

/* -----------------------------------------
   RESPONSIVE & MOBILE STYLES
------------------------------------------ */
@media (max-width: 768px) {
    .hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .search {
        min-width: 0;
    }

    .filter-select {
        width: 100%;
    }

    .product-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid {
        gap: 20px;
    }

    .hero-brand .logo {
        height: 36px;
        width: 36px;
    }

    .product-sidebar {
        width: 95%;
        max-width: 420px;
        height: auto;
        max-height: 90vh;
        bottom: -100%;
        top: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
        padding: 20px;
        gap: 16px;
        transition: bottom 0.35s ease;
        overflow-y: auto;
    }

    .product-sidebar.open {
        bottom: 0;
        animation: slideUpSidebar 0.35s ease forwards;
    }

    #inquiryForm {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    #inquiryForm form {
        flex: none;
        width: 100%;
    }

    #inquiryForm input,
    #inquiryForm textarea,
    #inquiryForm .submit-btn {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-copy .title {
        font-size: 1.8rem;
    }

    .product-sidebar {
        width: 95%;
        max-width: 360px;
        left: 50%;
        transform: translateX(-50%);
        max-height: 95vh;
        padding: 10px;
        gap: 12px;
    }

    .sidebar-content img { max-height: 200px; }
    .sidebar-content h2 { font-size: 1.45rem; }
    .sidebar-content p { font-size: 0.95rem; margin-bottom: 12px; }
    .inquire-btn { font-size: 15px; padding: 12px 0; width: 100%; }
    .close-btn { font-size: 26px; }

    #inquiryForm input,
    #inquiryForm textarea {
        width: 100%;
    }
}

/* Slide-up animation for mobile sidebar */
@keyframes slideUpSidebar {
    from { transform: translateY(100%) translateX(-50%); }
    to   { transform: translateY(0) translateX(-50%); }
}

/* -----------------------------------------
   MISC / SAFETY
------------------------------------------ */
#inquiryForm,
#inquiryForm * {
    box-sizing: border-box;
}

.product-sidebar {
    overflow-x: hidden;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .product-sidebar {
            padding-bottom: calc(25px + env(safe-area-inset-bottom));
        }

        #inquiryForm .submit-btn {
            bottom: calc(15px + env(safe-area-inset-bottom));
        }
    }
}
