/* root/style-product.css */

/* --- COMMON ADMIN STYLES (Add & Edit Pages) --- */
.admin-form-container { max-width: 1000px; margin: auto; padding: 20px; background: #fff; }
.tabs { display: flex; border-bottom: 2px solid #ddd; margin-bottom: 20px; }
.tab-button { padding: 10px 20px; cursor: pointer; border: none; background: #eee; font-weight: bold; transition: 0.3s; }

.tab-content { display: none; padding: 20px; border: 1px solid #ddd; border-top: none; background: #fff; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select { 
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; 
}

#preview-container { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.preview-wrapper { width: 120px; height: 120px; border: 2px solid #eee; position: relative; border-radius: 4px; overflow: hidden; }
.preview-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.preview-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); color: #fff; font-size: 10px; text-align: center; padding: 2px; }

/* Rich Text Editor Toolbars */
.editor-toolbar { background: #f8f9fa; border: 1px solid #ccc; border-bottom: none; padding: 5px; border-radius: 4px 4px 0 0; }
.editor-toolbar button { padding: 5px 10px; margin-right: 5px; cursor: pointer; border: 1px solid #ccc; background: #fff; font-weight: bold; }
.html-editor { min-height: 200px; border: 1px solid #ccc; padding: 10px; border-radius: 0 0 4px 4px; background: #fff; overflow-y: auto; }
.short-editor { min-height: 100px; }

/* Alerts */
.success-alert { background: #d4edda; color: #155724; padding: 10px; border-radius: 5px; margin-bottom: 20px; border: 1px solid #c3e6cb; }

/* --- PUBLIC VIEW PAGE STYLES --- */
.view-body { font-family: sans-serif; margin: 0; padding: 20px; background: #f9f9f9; }
.view-container { max-width: 1000px; margin: auto; background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.product-detail-upper { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.product-image { flex: 1 1 300px; }
.product-image img { width: 100%; border-radius: 10px; display: block; }
.product-info { flex: 2 1 500px; }
.product-info h2 { margin-top: 0; color: #333; }
.price { font-size: 1.5em; color: #e74c3c; font-weight: bold; }
.regular-price { text-decoration: line-through; color: #aaa; margin-left: 10px; font-size: 0.9em; }
.stock { font-weight: bold; color: green; }
.stock.outofstock { color: red; }
.sku, .created { font-size: 0.9em; color: #666; margin-top: 10px; }

.description-tabs-section { margin-top: 20px; line-height: 1.6; background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding-bottom: 32px !important; }

/* View Page Tab Overrides */
.view-tabs .tab-button { background-color: transparent; color: #555; border-bottom: 2px solid transparent; }
.view-tabs .tab-button.active { color: #007bff; border-bottom: 2px solid #007bff; background: none; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-detail-upper { flex-direction: column; align-items: center; }
    .product-image, .product-info { flex: none; width: 100%; }
}

    .tabs { display: flex; border-bottom: 2px solid #ddd; margin-bottom: 20px; }
    .tab-button { padding: 10px 20px; cursor: pointer; border: none; background: #eee; font-weight: bold; }
    
    .tab-content { display: none; padding: 20px; border: 1px solid #ddd; border-top: none; background: #fff; }
    .form-group { margin-bottom: 15px; }
    .form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
    .form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
    #preview-container { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
    .preview-wrapper { width: 120px; height: 120px; border: 2px solid #eee; position: relative; border-radius: 4px; overflow: hidden; }
    .preview-wrapper img { width: 100%; height: 100%; object-fit: cover; }
    .preview-label { position: absolute; bottom: 0; width: 100%; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; text-align: center; padding: 2px 0; }
    .editor-container {
border: 1px solid #ddd;
border-radius: 4px;
margin-bottom: 20px;
background: #fff;
}
.editor-toolbar {
background: #f8f9fa;
border-bottom: 1px solid #ddd;
padding: 8px;
display: flex;
gap: 5px;
}
.editor-toolbar button {
background: #00000091;
border: 1px solid #ccc;
padding: 5px 10px;
cursor: pointer;
border-radius: 3px;
font-weight: bold;
}
.rich-editor {
min-height: 100px;
padding: 15px;
outline: none;
}
.rich-editor ul {
margin-left: 20px;
list-style: disc;
}
