body {
    font-family: Arial, sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    background-color: #f0f0f0;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

nav a {
    text-decoration: none;
    color: black;
    font-size: 18px;
}

.device-info {
    display: flex;
    align-items: center;
    padding: 20px;
}

.device-info img {
    max-width: 100%;
    height: auto;
    max-width: 150px; /* Maximum width */
}

.control-panel {
    padding: 20px;
}

.control-panel input, .control-panel button {
    padding: 8px;
    margin: 5px;
    border: 1px solid #ddd;
}

.control-panel input:focus, .control-panel button:focus {
    outline: 2px solid #4CAF50; /* Green outline */
    outline-offset: 2px;
}

.table-row button:hover {
    background-color: #367c39; /* Slightly darker green */
}

.product-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
}

.panel {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
}

.table-box {
    margin: auto;
    border: 2px solid #ddd;
    padding: 10px;
}

.table-row {
    display: flex;
    justify-content: center;
}

.table-row input, .table-row button {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
}

.content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 20px;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .device-info, .control-panel {
        flex: 1 0 100%; /* Takes full width of the container */
    }

    .product-info {
        grid-template-columns: repeat(2, 1fr); /* Shows 2 columns on smaller screens */
    }
}

@media (max-width: 480px) {
    .product-info {
        grid-template-columns: 1fr; /* Stacks product panels vertically on very small screens */
    }
}


.modal {
    display: none;  /* This should hide the modal by default */
    position: fixed; /* Fixed positioning to overlay the whole screen */
    z-index: 1; /* On top of other content */
    left: 0;
    top: 0;
    width: 100%; /* Full width of the viewport */
    height: 100%; /* Full height of the viewport */
    background-color: rgba(0,0,0,0.4); /* Semi-transparent background */
}


.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
/* Existing CSS Below */


  .gallery-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
  .gallery-image {
    display: inline-block;
    width: 200px;
    margin-right: 10px;
  }
  img {
    width: 100%;
    height: auto;
  }

.info-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 30px 20px 30px 20px;
}

.product-list {
    list-style: disc inside;
    margin-bottom: 16px;
    padding-left: 18px;
}

.order-info, .details {
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .info-group {
        grid-template-columns: 1fr;
    }
}

/* Q&A Section Styles */
.qa-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.qa-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.qa-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: inherit;
    resize: vertical;
}

.qa-form .submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.qa-form .submit-btn:hover {
    background-color: #367c39;
}

.qa-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.qa-item .question {
    margin-bottom: 15px;
}

.qa-item .question strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.qa-item .answer {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.qa-item .answer strong {
    color: #4CAF50;
    display: block;
    margin-bottom: 5px;
}

.qa-item .status {
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.qa-item.gaida {
    border-left: 4px solid #ffa500;
}

.qa-item.answered {
    border-left: 4px solid #4CAF50;
}

@media (max-width: 768px) {
    .qa-section {
        padding: 10px;
    }
    
    .qa-form {
        padding: 15px;
    }
}

/* Shop Section Styles */
.shop-section {
    padding: 40px 20px;
    background-color: #f8f9fa;
}

.shop-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2.5em;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.shop-section .product-info {
    padding: 24px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.shop-section .product-info h3 {
    margin: 0 0 12px 0;
    color: #222;
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.shop-section .product-description {
    color: #444;
    font-size: 1.08em;
    margin-bottom: 18px;
    min-height: 48px;
    line-height: 1.4;
    font-weight: 400;
}

.shop-section .product-price {
    font-size: 1.5em;
    color: #219a43;
    font-weight: 700;
    margin: 0 0 18px 0;
    letter-spacing: 0.01em;
    line-height: 1;
}

.shop-section .product-contact {
    margin-top: 10px;
    width: 100%;
}

.shop-section .contact-button {
    margin-top: 6px;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.contact-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    text-align: center;
    width: 100%;
}

.contact-button:hover {
    background-color: #367c39;
}

.contact-info {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-card h3 {
    margin-bottom: 20px;
    color: #333;
}

.contact-card p {
    margin: 10px 0;
}

.contact-card .note {
    margin-top: 20px;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
        padding: 0 4px;
    }
    .product-card {
        margin-bottom: 18px;
        min-width: 0;
    }
    .shop-section {
        padding: 18px 2px;
    }
    .shop-section .product-info {
        padding: 18px 10px 14px 10px;
    }
    .shop-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
}