input {
    outline: none;
}

/* Modern product page layout */
.product-main-flex {
    display: flex;
    margin: 2rem 0;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    gap: 2rem;
}

.product-gallery {
    flex: 1;
    max-width: 50%;
}

.main-product-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.main-product-image:hover {
    transform: scale(1.02);
}

.product-info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.product-description {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
}

.product-price-stock {
    padding: 1.5rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    border: 1px solid #a7f3d0;
}

.product-price {
    font-size: 2.5rem;
    font-weight: 700;
    padding-right: 10px;
    color: #10b981;
    display: inline-block;
}

.product-cart-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.product-cart-actions label {
    font-weight: 600;
    color: #374151;
}

.product-cart-actions input[type="number"] {
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    width: 70px;
    max-width: 70px;
    transition: border-color 0.2s ease;
}

.product-cart-actions input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
}

.actionButton-addToCart {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.actionButton-addToCart:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.product-content-row1, .product-content-row2, .product-content-row3, .product-content-row4 {
    display: flex;
    margin: 10px 0;
  }

.product-content-row1 {
    display: flex;
}

.product-content-row1-container1 {
    display: flex;
    /*margin-right: 8px;*/
    flex-direction: column;
    flex: 1;
}

.product-title_and_description-container {

}

.product-image-container {
    margin-top: 15px;
    max-width: 100%;
    max-height: 100%;
    height: 300px;
    display: flex;
    flex: 1;
    align-items: flex-start;
    flex-direction: column;
    /*justify-content: space-between;*/
    align-items: flex-start;
}
  
.product-image-container form {
}

#product-image {
    max-width: 100%;
    min-height: 300px;
    height: auto;
    object-fit: contain;
  }

#product-image-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-content-row1-container2 {
    max-width: 40%;
    flex: 1;
    margin-left: auto;
    padding: 15px;
    background-color: #e6e6e6;
    display: flex;
    flex-direction: column;
}

.product-price-container {
    padding: 10px;
    border-bottom: 1px solid #e6e6e6;
    /*max-width: 220px;*/
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#product-price {
    padding: 15px;
    font-size: 28px;
}

#product-price-input {
    padding: 15px;
    font-size: 14px;
}

.actionButton-container {
    margin-top: 5px;
    display: flex;
    justify-content: end;
}

.actionButton-addToCart{
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffc300 0%, #ffaa00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 2rem;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 195, 0, 0.3);
}

.actionButton-addToCart:hover {
    background: linear-gradient(135deg, #ffaa00 0%, #ff9500 100%);
    box-shadow: 0 4px 8px rgba(255, 195, 0, 0.4);
    transform: translateY(-1px);
}
/* Medium devices (tablets) */
/*
@media (max-width: 1150px) {
    .actionButton-addToCart {
      margin-left: 50%; /* Adjust the margin-left based on the screen width
      max-width: calc(50% - 50%);
    }
}
/* Medium devices (tablets)
@media (max-width: 768px) {
    .actionButton-addToCart {
      margin-left: 50%; /* Adjust the margin-left based on the screen width
      max-width: calc(50% - 50%);
    }
}
*/
  /* Small devices (landscape phones)
  @media (max-width: 576px) {
    .actionButton-addToCart {
      margin-left: 45%; /* Adjust the margin-left based on the screen width
      max-width: calc(60% - 40%);
    }
}
*/


.product-content-row2 {
    margin-top: 50px;
    display: flex;
    flex: 1;
    padding: 15px;
}

.product-specifications-table-container {
    flex: 1;
    margin: 2rem 0;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.product-specifications-table-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.table-wrapper {
    width: 100%;
}

.product-table {
    margin-top: 5px;
    flex: 1;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.product-table caption, th, td {
    text-align: left;
    padding: 14px 18px;
    font-size: 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.product-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 700;
    color: #ffffff;
}

.product-table tr:last-child td {
    border-bottom: none;
}

.product-table tr:hover td {
    background-color: #f3f4f6;
}

.addTableEntries {
    margin-left: 5px;
}

.btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    }

.edit-btn, .save-btn {
    flex: 1;
    max-width: 60px;
}

.save-btn {
}

.delete-btn {
    flex: 1;
    max-width: 30px;
}
caption, tr, th, td {
    border: solid black 1px;
}

.product-table form, .product-table input {
    display: flex;
    align-items: center;
    height: 100%;
}

.row2-nav li:hover {
    background-color: rgb(119, 119, 122)
}

.row2-nav a {
    text-decoration: none;
    color: black;
}

.row2-nav span {
}

.product-content-row2-container2 {
    max-width: 40%;
    width: 100%;
    margin-left: auto;
    padding: 15px;
    background-color: #e6e6e6;
    display: flex;
    align-items: center;
}

.button-wrapper {
    display: flex;
    justify-content: space-evenly;
    flex: 1;
}

.delete-entries {
}

.save-all, .delete-entries {
    padding: 10px 20px;
}

.product-content-row3 {
    height: 300px;
}

.product-content-row3-container1 {
    width: 60%;
    margin: 10px 0;
    margin-right: 8px;
}

.product-content-row3-container2 {
    width: 40%;
    margin: 10px 0;
    margin-left: 8px;
}

.product-content-row4 {
    display: flex;
    justify-content: space-between;
}

.product-reviews-submit form {
    margin-top: 15px;
}

.product-reviews-submit,
.product-reviews-display {
    flex: 1;
    margin: 1rem;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.product-reviews-submit h2,
.product-reviews-display h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.product-reviews-submit form input,
.product-reviews-submit form select,
.product-reviews-submit form textarea {
    width: 100%;
    padding: 0.875rem;
    margin-bottom: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.product-reviews-submit form input:focus,
.product-reviews-submit form select:focus,
.product-reviews-submit form textarea:focus {
    border-color: #667eea;
    outline: none;
}

.product-reviews-submit form textarea {
    min-height: 120px;
    resize: vertical;
}

.product-reviews-submit form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.product-reviews-submit form button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

#reviews-container {
    margin-top: 15px;
    /*max-height: 300px;*/
}

#reviews-container::after {
    content: "";
    display: table;
    clear: both;
}

.review {
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.review:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.review strong {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.1rem;
}

.review span {
    margin-top: 5px;
    color: #10b981;
    font-weight: 600;
}

.review p {
    margin-top: 0.75rem;
    color: #374151;
    line-height: 1.6;
}

.ql-toolbar {
    margin-top: 5px;
}

.ql-editor {
    resize: vertical;
    overflow: auto;
    min-height: 130px;
    max-height: 500px;
    border: 1px solid #ccc;
}
/* Inline Editing Styles for Product Page */
.editable-field-product {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
    min-width: 60px;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.editable-field-product:hover {
    background-color: #f0fdf4;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Add visual indicator for editable fields */
.editable-field-product::after {
    content: "✏️";
    margin-left: 6px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.editable-field-product:hover::after {
    opacity: 0.6;
}

.edit-icon-product {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: #007bff;
    opacity: 0;
    transition: opacity 0.2s;
    display: none;
    pointer-events: none;
}

.editable-field-product:hover + .edit-icon-product,
.editable-field-product:hover ~ .edit-icon-product {
    opacity: 1;
}

.inline-edit-input-product {
    width: auto;
    min-width: 80px;
    max-width: 200px;
    padding: 4px 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #10b981;
    border: 1px solid #10b981;
    border-radius: 6px;
    background-color: #fff;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.inline-edit-input-product:focus {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

textarea.inline-edit-input-product {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.inline-edit-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-save-inline,
.btn-cancel-inline {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-save-inline {
    background: #10b981;
    color: white;
}

.btn-save-inline:hover {
    background: #059669;
}

.btn-cancel-inline {
    background: #6b7280;
    color: white;
}

.btn-cancel-inline:hover {
    background: #4b5563;
}

/* Ensure parent container has relative positioning */
.product-info-container {
    position: relative;
}

.product-title.editable-field-product,
.product-price.editable-field-product,
.product-description.editable-field-product {
    display: block;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
}

/* Price specific editable styling */
.product-price.editable-field-product {
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
}

.product-price.editable-field-product:hover {
    background: #f0fdf4;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

/* Specification Inline Editing Styles */
.editable-field-spec {
    cursor: pointer;
    padding: 14px 18px;
    transition: background-color 0.2s;
    position: relative;
    box-sizing: border-box;
}

.editable-field-spec:hover {
    background-color: #f0f8ff !important;
}

.inline-edit-input-spec {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 2px solid #007bff;
    border-radius: 4px;
    background-color: #fff;
    outline: none;
    box-sizing: border-box;
}

.inline-edit-input-spec:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.inline-edit-buttons-spec {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-save-inline-spec,
.btn-cancel-inline-spec {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-save-inline-spec {
    background-color: #28a745;
    color: white;
}

.btn-save-inline-spec:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.btn-cancel-inline-spec {
    background-color: #6c757d;
    color: white;
}

.btn-cancel-inline-spec:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.btn-add-spec {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-add-spec:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
