/* GLOBAL */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background: #f8f9fb;
    color: #333;
}

.product-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
}

/* IMAGE */
.product-image {
    flex: 0 0 34%;
    max-width: 400px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f5f7fb;
    border: 1px solid #e7ebf1;
    border-radius: 10px;
}

.product-image img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
}

/* DETAILS */
.product-details {
    flex: 1;
}

.product-details h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    margin-bottom: 5px;
    color: #1a237e;
}

/* TABLE */
.product-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.product-table td {
    padding: 2px;
    border: 1px solid #e0e0e0;
}

.product-table td:first-child {
    background: #f4f6f9;
    font-weight: 600;
    width: 150px;
}

/* BUTTONS */
.product-buttons {
    margin-top: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    margin-right: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    color: #fff;
    transition: 0.3s;
}

.primary {
    background: #0056b3;
}

.whatsapp {
    background: #25d366;
}

.btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* PRODUCT INFO SECTIONS */
.product-info-sections {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    background: #fff;
    border: 1px solid #e7ebf1;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    margin: 0 0 12px;
    color: #1a237e;
}

.overview-card {
    border: 1px solid #e7ebf1;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-list {
    margin: 0;
    padding-left: 18px;
}

.info-list li {
    margin-bottom: 8px;
    line-height: 1.6;
    word-break: break-word;
}

.overview-card .info-list {
    list-style: disc;
    padding-left: 22px;
}

.overview-card .info-list li {
    margin-bottom: 10px;
    padding: 0;
    border: none;
    background: transparent;
    font-weight: 400;
}

.related-card {
    grid-column: 1 / -1;
}

.related-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.related-list li {
    margin: 0;
}

.related-product-card {
    background: #fff;
    border: 1px solid #e2e6ef;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-product-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #e53935);
}

.related-category-badge {
    display: inline-block;
    background: #e53935;
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.related-product-name {
    margin: 0 0 10px;
    font-family: 'Montserrat', sans-serif;
    color: #1a237e;
    font-size: 20px;
    line-height: 1.25;
}

.related-product-image-wrap {
    border: 1px solid #e7ebf1;
    border-radius: 10px;
    background: #f6f8fc;
    padding: 0;
    height: 220px;
    margin-bottom: 12px;
    overflow: hidden;
}

.related-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.related-product-meta {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #2d2d2d;
    flex-grow: 1;
}

.related-product-meta span {
    color: #748092;
    font-weight: 600;
}

.related-view-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(to right, #1a237e, #283593);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 16px;
}

.related-view-btn:hover {
    background: linear-gradient(to right, #283593, #e53935);
}

@media(max-width: 1200px) {
    .related-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media(max-width: 1100px) {
    .related-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media(max-width: 900px) {
    .related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width: 700px) {
    .related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-product-name {
        font-size: 16px;
    }

    .related-product-image-wrap {
        height: 180px;
    }

    .related-product-meta {
        font-size: 13px;
    }

    .related-view-btn {
        font-size: 13px;
        padding: 8px 10px;
    }
}

@media(max-width: 420px) {
    .related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-product-name {
        font-size: 14px;
    }

    .related-product-image-wrap {
        height: 150px;
    }

    .related-product-meta {
        font-size: 12px;
    }

    .related-view-btn {
        font-size: 12px;
        padding: 7px 8px;
    }
}

/* WhatsApp Inquiry Modal */
.wa-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.wa-modal.active {
    display: block;
}

.wa-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.wa-modal-dialog {
    position: relative;
    width: min(560px, calc(100% - 24px));
    height: calc(100vh - 24px);
    overflow: hidden;
    margin: 12px 12px 12px auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 14px 18px 20px;
    border: 1px solid #d8e6df;
    display: flex;
    flex-direction: column;
}

.wa-modal-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #0f6d4f;
    font-size: 26px;
    display: block;
    margin: 0 auto 8px;
    cursor: pointer;
    line-height: 1;
}

.wa-modal-dialog h2 {
    margin: 0 0 10px;
    padding-top: 8px;
    border-top: 1px solid #e2ece8;
    color: #0f6d4f;
    font-size: 40px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.wa-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.wa-field {
    border: 1px solid #b8d9cd;
    border-radius: 10px;
    padding: 8px 12px;
    background: #fff;
}

.wa-field label {
    display: block;
    color: #1c7b5a;
    font-size: 16px;
    margin-bottom: 4px;
}

.wa-field input,
.wa-field textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 18px;
    color: #2d2d2d;
    font-family: 'Roboto', sans-serif;
    background: transparent;
    line-height: 1.3;
}

.wa-field textarea {
    resize: none;
    min-height: 110px;
    max-height: 110px;
}

.wa-field input::placeholder,
.wa-field textarea::placeholder {
    color: #5a5a5a;
}

.wa-submit-btn {
    margin-top: 2px;
    align-self: flex-start;
    border: none;
    background: #0f6d4f;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 7px;
    padding: 10px 22px;
    cursor: pointer;
}

.wa-submit-btn:hover {
    background: #0b5a41;
}

@media (max-width: 768px) {
    .wa-modal-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
        height: calc(100vh - 16px);
        padding: 10px 12px 12px;
    }

    .wa-modal-dialog h2 {
        font-size: 24px;
    }

    .wa-field label {
        font-size: 14px;
    }

    .wa-field input,
    .wa-field textarea {
        font-size: 14px;
    }

    .wa-submit-btn {
        font-size: 16px;
        padding: 10px 16px;
    }
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 60px;
    color: #666;
    font-size: 18px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a237e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 60px;
    color: #e53935;
    font-size: 18px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.error a {
    color: #1a237e;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 5px;
}

.error a:hover {
    background: #e0e0e0;
}

/* RESPONSIVE */
@media(max-width: 992px) {
    .product-grid {
        flex-direction: column;
    }
    
    .product-image {
        max-width: 100%;
        width: 100%;
        min-height: 320px;
    }
    
    .product-details h1 {
        font-size: 24px;
    }
}

@media(max-width: 768px) {
    .product-wrapper {
        padding: 30px 0;
    }
    
    .product-grid {
        padding: 20px;
    }

    .product-image {
        min-height: 260px;
        height: 260px;
        overflow: hidden;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: contain;
        object-position: center;
    }
    
    .product-info-sections {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 480px) {
    .product-image {
        min-height: 220px;
        height: 220px;
    }
}
